|
本帖最后由 紅塵市長 于 2014-3-29 19:50 编辑
SimCity: The Extended Worker Data Mod and more
《模拟城市》:Guillaume讲解MOD
Mar 20, 2014 Guillaume Pierre, Lead Gameplay Scripter 紅塵市長翻譯、殿堂级精英控校對
Hello again, Mayors – I’m Guillaume Pierre, the Lead Gameplay Scripter and a designer on SimCity. You may have read the recently published SimCity Modding Policy posted here and have wondered how to make Mods yourself.
市长们好,我是《模拟城市》首席游戏脚本和设计师Guillaume Pierre。你或许在这里已经了解到了我们的《<模拟城市>MOD守则》知道如何使用MOD了。
Today I’m going to talk about a few Mods I’ve been working on. I hope this helps you make your own. Please note, these Mods are to be used strictly at your own risk, as they don’t go through a testing process like an official game update would. As you may already know, there is no official SimCity Mod tool set, so I’ve used a third-party service, Oppie’s SimCityPak tool*.
今天我们来谈一谈我一直在研究的MOD。我希望这能够帮助你。请注意,这些MOD的使用你要承担任何可能发生的风险,因为他们没有经过我们的官方测试。你也许知道,目前还没有官方的《模拟城市》MOD工具,所以我们也在使用第三方软件——Oppie的SimCityPak。
The Extended Worker Data Mod建筑人口调查MOD
Have you ever wondered how many jobs of each wealth level a work building supports? This Mod adds three bars to the civic, commercial and industrial buildings rollovers that gives you just that information. It will also help you make informed decisions in regards to zoning for residential buildings.
你是否想过每个建筑需要多少各种阶层的工人来运作它?这个MOD增加了3种数据统计——人口信息、商业信息、工业信息。他会帮你作出城市规划的明智之选。
In order to make this Mod, I created a new piece of UI with a matching data binding function. Fortunately, there was already an example similar to what I wanted to do in the MegaTower Office level rollover, so my first task was to copy the layout with the three bars into a new file.
为了让这个MOD达到效用,我创建了一个有着绑定数据的新用户界面。幸运的是在超级巨塔系统里已经有了一个相似的案例,所以我复制它们的结构创建了新文件。
I then looked up how the worker data was fed into the bars in the rollover, and copied that piece of JavaScript into another file. Because of the way the UI is packed in the game, I had to find a JavaScript file that is packed by itself rather than add the function to the main (and very long) UI file. To do this, I opened the Mayor Rating UI file and pasted the code at the bottom of it. I renamed the original “kSkyTowerLevelOfficePopulation” function to “kWorkers” and encoded it to “0xe15027f1”.
我观察这些数据是如何运行,并复制这段JavaScript到另一个文件。因为用户界面是用游戏在运行,我必须找到一个JavaScript文件包装他的主要功能到用户界面的文件上。考虑到用户界面在游戏里运行的方式,我必须找到一个单独的JAVA文件而不是直接加到那长长的主程序界面代码里。为了做到这一点,我打开市长等级的用户界面将代码粘贴到下方。我改名原来的“kSkyTowerLevelOfficePopulation”功能,“kworkers”编码为“0xe15027f1”。
Finally, I went through all the units in the game that have workers (I actually looked for the code for “kMaintenance” and combed through the results) and added the new rollover item’s ID to their list of extended rollover data.
最后我去查找了所有游戏里拥有工人数据的单位(我找到“kMaintenance”代码梳理搜索结果)添加到新的ID的数据信息表。
Get the Extended Worker Data mod here: http://community.simtropolis.com/files/file/29208-extended-worker-data-in-rollover/
建筑人口调查MOD在这里:http://www.simcity.cn/thread-130200-1-1.html
The Closer Road Guides Mod紧密引导线MOD
This Mod tightens the distance tuning for road guides, so streets and avenues get placed closer to each other when using guides. As a result, there is very little empty space in the back of each building, so you can get more houses into your city.
这个MOD收紧了道路引导线之间的距离,在每个建筑后方得到一些很小的区域,你可以收集起来建设更多的建筑。
You may not want to use this Mod if you turn off guides for curved roads though, as you might not get as many buildings developing.
如果你在弯曲指南下使用这个MOD,可能导致建筑生长空间不足。
In order to make this Mod I opened the SimCity game package file and exported a few files, including the global road template which is used by the avenues, and the narrow street definition files. Then I lowered the value of the guide distance (property ID: 0x0ec367af) and saved the files as a new package.
为了制造这个MOD,我打开了《模拟城市》游戏的package和一些功能文件,包括大道和街道的模板路径。然后我将引导距离值(属性ID:0x0ec367af)保存为一个新的package文件。
Get the Closed Road Guides Mod here: http://community.simtropolis.com/files/file/29201-closer-road-guides/
紧密道路引导线MOD在这里:http://www.simcity.cn/thread-131008-1-1.html
The Purple Line in Industrial Tech Map Mod紫色科技线MOD
This Mod takes the pink and purple lines that go from colleges and universities and directs them to factories and certain power plants that appear in the Industrial Tech Map. This is helpful to predict which factories are going to get skill first, and which ones are going to upgrade next.
这个MOD用粉红色和紫色的线,在科技地图上显示科技水平流向走势到工厂、电子厂、发电厂。有助于预测那些建筑会得到科技水平提升科技。
In the code, these type of lines are called “pipe overlays”, as they are a visualization definition for agents that use the “pipe” handler. Adding the line that goes from the college to medium tech factories, and the line from the university to high tech factories was straightforward. I added a new property array listing them in the data map file and that took care of it.
在代码中,这些线性叫做“pipe overlays”,因为他们是所有使用“pipe”处理法的代理所使用的视觉元素。这些线,从生产技术的各种建筑到工厂看起来很易懂。我添加了一个新的属性数组在地图数据文件让你可以看到它显示出来。
The other lines were a little more complex to get working. First I had to create new pipe overlay files for the lines coming from the college and university to the lower tech factories, and to power plants by copying the original pipe overlay files. Then I made these new overlay files point to their correct pipe sinks. Finally, I added references to the new files in the same array as the original overlay files in the data map file so they all show up in game and provide context as designed.
其他线的工作可能会复杂得多。首先我必须创建一个pipe让它显示低科技工厂的技术流向,以及发电厂的原始pipe的流向。然后做成新的pipe文件正确覆盖到pipe sinks中。最后添加到新的文件到游戏数据图中覆盖之前的数据,他们都会出现在游戏的环境中。
Get the Purple Line in Industrial Tech Map Mod here: http://community.simtropolis.com/files/file/29194-purplelineinindustrialtechmap/
紫色科技线MOD在这里:http://www.simcity.cn/thread-130181-1-1.html
That’s it for this time! I can’t wait to see what kind of amazing Mods you’re going to create. As always, I’m available to answer questions regarding this blog in the comments section below, on Twitter at @MaxisGuillaume, and in the Community-Generated Content section of our forums (http://forum.ea.com/eaforum/forums/show/4227.page).
我非常迫不及待的想看到你创作惊人的MOD。我可以帮你解答在Twitter @MaxisGuillaume这里提问这个博客的内容,以及我们的论坛:http://forum.ea.com/eaforum/forums/show/4227.page 来交流
请注意:Oppie’s SimCityPak tool 不是Maxis官方工具 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?入住
x
|