sims算法

This is going to be a much easier and shorter tutorial and a bit more fun. You’re going to learn how to extend an in-game list. Extending a list is much safer because it’s often the least likely to conflict with other mods because we’re not replacing anything yet can add additional options or functionality to the entire game.

这将是一个更容易,更简短的教程,并且更加有趣。 您将学习如何扩展游戏清单。 扩展列表更加安全,因为它通常与其他模块冲突的可能性最小,因为我们不替换任何东西,但可以在整个游戏中添加其他选项或功能。

As briefly mentioned in part 4, there’s an official list of words/strings considered to be “true” and another list for “false”. These 2 lists are used in any command that takes a yes or no / true or false argument. Most mods don’t seem to use the list unfortunately but any that do will automatically be using the extended list. For this tutorial, we’re going to extend both of those lists.

如第4部分所述,有一个正式的单词/字符串列表被认为是“ true”,另一个列表是“ false”。 这两个列表可用于任何接受yes或no / true或false参数的命令。 不幸的是,大多数mod似乎并没有使用该列表,但是任何使用它的人都会自动使用扩展列表。 对于本教程,我们将扩展这两个列表。

确保您从第1部分开始 (Make sure you start at part 1)

The projects here assume your up-to-speed on how to mod for the Sims 4 using python scripting which I already covered in part 1 & part 2.

此处的项目假定您已掌握如何使用python脚本修改Sims 4的最新信息,我已经在第1部分和第2部分中进行了介绍。

给现有读者的说明 (A note for existing readers)

I’ve created a boilerplate / template project to help automate compiling, decompiling, packaging, etc… Link Here. And I tried my best to make it cross-platform and editor agnostic. If you’re about to start a new project and your interested in a template that lays out the groundwork for you then this would be that. Completely optional but there if your interested.

我创建了一个样板/模板项目,以帮助自动化编译,反编译,包装等..链接在这里。 我尽力使它跨平台且与编辑器无关。 如果您要开始一个新项目,并且对模板奠定了基础,而您对模板感兴趣,那么就是这样。 完全可选,但是如果您有兴趣的话。

In fact I wrote a whole tutorial on how to use it, link here

实际上,我写了一个完整的教程来介绍如何使用它,请点击这里

聚集词(Gathering Words)

I basically poked around the internet and gathered a large list of words that we’ll be using. Many forms of yes and no are local to your country and area so because I’m in America we’ll be pulling words from there.

我基本上是在互联网上闲逛,收集了大量我们将要使用的单词。 您可以在您所在的国家和地区使用多种形式的“是”和“否”,因此,因为我在美国,所以我们会从那里说一些话。

Normally though you’d want to have the list in a data file like JSON or XML and have many of them for different countries so that users can extend them themselves and all countries are included and the correct list is loaded based on the language of the player. — However that’s fairly complicated this early in the series so we’re going to shortcut and just pick a country and language. In the future, always keep in mind your audience. You never want to exclude people who may want to use your mod and in 2020 there are many established systems people have come up with related to localization to solve exactly that.

通常,尽管您希望将列表包含在JSON或XML之类的数据文件中,并且将其中的许多列表用于不同的国家/地区,以便用户可以自己扩展它们,并包括所有国家/地区,并根据播放器。 —但是,在本系列文章的开头部分,这是相当复杂的,因此我们将使用快捷方式,仅选择一个国家和语言。 将来,请始终牢记您的听众。 您永远不会排除可能想要使用您的mod的人,并且在2020年,人们已经提出了许多与本地化相关的成熟系统来解决这一问题。

Because the list is very large I’m going to place them in pastebin because I don’t want to fill up the articles with pages of words. You’re welcome to extend the list and add/or remove words.

因为列表很大,所以我将它们放置在pastebin中,因为我不想用单词页面填充文章。 欢迎您扩展列表并添加/或删除单词。

Link to the list of words.

链接到单词列表。

添加到列表 (Adding to the list)

We import both the lists of true and false. Also be sure to copy the code here which contains all the words for both lists.

我们同时导入truefalse列表。 另外,请确保在此处复制包含两个列表的所有单词的代码。

from sims4.commands import BOOL_TRUE, BOOL_FALSE

And then tell python to merge our lists into the official lists

然后告诉python将我们的列表合并到正式列表中

BOOL_TRUE.update(BOOL_TRUE_EXTRA)BOOL_FALSE.update(BOOL_FALSE_EXTRA)

You’re code should look like this, many entries omitted to keep article size down.

您的代码应该看起来像这样,省略了许多条目以减小文章的大小。

from sims4.commands import BOOL_TRUE, BOOL_FALSEBOOL_TRUE_EXTRA = {    "yup",    "yea",    "yuppers",    ...    "you-bet",    "mmhmm",    "way"}BOOL_FALSE_EXTRA = {    "nope",    "nuh-uh",    ":(",    ...    "not-on-my-life",    "not-on-my-watch",    "no-way",}BOOL_TRUE.update(BOOL_TRUE_EXTRA)BOOL_FALSE.update(BOOL_FALSE_EXTRA)

你完成了 (You’re done)

That’s it, replacing code is great but extending lists, sets, dictionaries, etc… can open the door for many possibilities and the games code has many lists and such like this. Like I said though, adding to something is often safer then replacing something because 2 mods can both add to something but can’t both replace something. Neither is good or bad though because replacing and extending game code and data opens many doors of possibilities and can make for amazing mods.

就是这样,替换代码很棒,但是扩展列表,集合,字典等……可以为多种可能性打开大门,而游戏代码中也包含许多此类列表。 就像我说过的那样,添加某些东西通常比替换某些东西更安全,因为2个mod都可以添加到某些东西中,但不能同时替换某些东西。 不管是好是坏,因为替换和扩展游戏代码和数据打开了许多可能性之门,并且可以制作出惊人的mod。

出版《模拟人生》 (Publication to Mod the Sims)

This has been accepted into Mod The Sims as a properly packaged mod. Link Here.

Mod Sims已将其作为正确打包的mod接受。 在这里链接。

下一部分? (Next Part?)

Part 6 is available here.

第6部分在这里可用。

翻译自: https://medium.com/@junebug12851/the-sims-4-modern-python-modding-part-5-extending-lists-fdc9dcb67980

sims算法


http://www.taodudu.cc/news/show-5702347.html

相关文章:

  • 总结一下从高中毕业后到现在的自己(2020.4.25)
  • 在线游戏(模拟)
  • 191105CSP模拟DAY1
  • 纪中集训2020.01.13【NOIP普及组】模拟赛C组总结————My First Time Write Summary
  • 轮盘(模拟)
  • SCAU 17968 Takio与Blue的人生赢家之战
  • NOIP模拟测试9
  • sims算法_如何保持“ Sims 4” Mod更新
  • sims算法_如何从Sims 4 Mods文件夹中删除损坏的Mod
  • 模拟人生mod后缀php,【搬运】模拟人生4家具MOD第一弹
  • 8-bitdo-zero 2
  • 这家喜欢做复古手柄的游戏公司又出新品了
  • android视频播放器!毕业一年萌新的Android大厂面经,面试心得体会
  • 那时我们还年轻[转]
  • stable diffusion webui 使用
  • 爱会长大—-腾肖澜
  • 独家:小米盒子进军西班牙,双11国内全系降价
  • QQ运动数据为0问题解决
  • U3D物体范围内随机运动
  • Python之仿QQ运动周报篇(纯数据,不含图形化页面)
  • (82)--用代码实现简谐运动
  • 基于Matlab的PUMA 560运动学与轨迹规划仿真
  • Python菜鸟在成长——列表和元组
  • 【Android自定义View实战】之仿QQ运动步数圆弧及动画,Dylan计步中的控件StepArcView
  • PHP小旋风站群系统源码
  • Multipass 旋风教程
  • 帆软-旋风图或飓风图
  • 【JS】获取一个月份有多少天
  • js输入一个年月,输出这个月有多少天
  • C/C++ 求某个月有多少天

sims算法_Sims 4 Modern Python Modding第5部分扩展列表相关推荐

  1. sims算法_如何从Sims 4 Mods文件夹中删除损坏的Mod

    sims算法 Electronic Arts 电子艺术 If your mods are not functioning properly in Sims 4, there are some free ...

  2. 机器学习算法清单!附Python和R代码

    来源:数据与算法之美 本文约6000字,建议阅读8分钟. 通过本文为大家介绍了3种机器学习算法方式以及10种机器学习算法的清单,学起来吧~ 前言 谷歌董事长施密特曾说过:虽然谷歌的无人驾驶汽车和机器人 ...

  3. 《大厂算法面试题目与答案汇总,剑指offer等常考算法题思路,python代码》V1.0版...

    为了进入大厂,我想很多人都会去牛客.知乎.CSDN等平台去查看面经,了解各个大厂在问技术问题的时候都会问些什么样的问题. 在看了几十上百篇面经之后,我将算法工程师的各种类型最常问到的问题都整理了出来, ...

  4. 相似图片检测:感知哈希算法之dHash的Python实现

    原文:https://blog.csdn.net/haluoluo211/article/details/52769325 相似图片检测:感知哈希算法之dHash的Python实现 某些情况下,我们需 ...

  5. python算法与程序设计基础第二版-算法与程序设计基础(Python版) - 吴萍

    基本信息 书名:21世纪高等学校计算机基础实用规划教材:算法与程序设计基础(Python版) 定价:39.00元 作者:吴萍21世纪高 出版社:清华大学出版社 出版日期:2015_2_1 ISBN:9 ...

  6. 机器学习算法一览(附python和R代码)

     机器学习算法一览(附python和R代码) 来源:数据观 时间:2016-04-19 15:20:43 作者:大数据文摘 "谷歌的无人车和机器人得到了很多关注,但我们真正的未来却在于能 ...

  7. 一文读懂FM算法优势,并用python实现

    介绍 我仍然记得第一次遇到点击率预测问题时的情形,在那之前,我一直在学习数据科学,对自己取得的进展很满意,在机器学习黑客马拉松活动中也开始建立了自信,并决定好好迎接不同的挑战. 为了做得更好,我购买了 ...

  8. 算法与数据结构(part2)--Python内置类型性能分析

    学习笔记,仅供参考 文章目录 算法与数据结构--基于python Python内置类型性能分析 timeit模块 计时器类timeit.Timer 计时器类下的timeit.Timer.timeit方 ...

  9. AdaBoost算法详解与python实现

    AdaBoost算法详解与python实现 https://tangshusen.me/2018/11/18/adaboost/

最新文章

  1. 一个生成全局唯一Sequence ID的高并发工厂类 (Java)
  2. 做项目的一点收获之二
  3. 关于SmartForm和ScriptForm的输出格式设置说明(转载)
  4. Girton学院研究生宿舍守则
  5. UVA 10196 Check The Check(模拟)
  6. JSON 是什么?它能带来什么?它和 XML 比较?
  7. 对 Redis 中的有序集合SortedSet的理解
  8. matlab集群搭建问题
  9. 为什么i3的cpu基础频率最高,达到4.0了?
  10. 戴尔修复已存在12年之久的驱动漏洞,影响数百万个人电脑
  11. java作用域对象笔记_Java学习笔记(七)——对象
  12. 自创本派高考理数试题集现在发布
  13. 河南科技大学计算机专业专升本,河南科技大学成人高考计算机应用技术专业的课程有哪些...
  14. 30+简约和平铺的WordPress复古主题
  15. python反编译_反编译 python
  16. 无线打印机 连接路由器连接到服务器,路由器连接打印机方法
  17. 酱香科技不在YYDS了,市盈率50倍的白酒,要回调到25倍的市盈率?泡沫要破灭了
  18. Windows系统共享文件夹或打印机等设备的dos脚本自动化
  19. 说说 iphone 数据线(充电线) 原装正品和仿制品、假货等的区别
  20. BDW01手把手系列04:基于TencentOS Tiny、腾讯云、腾讯连连之自制定位器

热门文章

  1. 达人评测 i7 12700H和i5 12500h选哪个好
  2. ”QQ尾巴“功能模拟
  3. iis打开php网页404,遇到IIS7配置PHP出现403和404错误的解决办法
  4. nsq Android客户端,NSQ源码-Nsq客户端
  5. win7更新win10错误代码0x80072f8f-0x20000的解决方法
  6. 作为主播应该如何挑选一款直播美颜SDK?
  7. cadence SPB17.4 - allegro - WARNING: Unsupported curve-fit, spline, or 3D POLYLINE
  8. 饿了么点餐源码、今日头条源码 等
  9. 网络编程系列——查询本机IP
  10. Photoshop图片高级处理:为美女的牙齿美白