• Moose
  • Announcements

    • Dirktator

      March goal: We're almost there!   03/20/2017

      Hi Community! We're almost there for our March goals!  I just wanted to keep the momentum going so if you are able to help, please donate and get some gifts in exchange! Thanks so much to those who have helped out this month, we really appreciate it.
oppie

SimCityPak - Modding Tool

618 posts in this topic

Hi there, I registered just so I can offer my support in this project. I'd love to help out in any way I can. I'm a UI Designer so I know my way around Photoshop/Illustrator, etc. Maybe I can be helpful with something or another. Please let me know, I'd love to help!

Share this post


Link to post

I just wanted to say that s3pe (the Sims 3 Modding tool) has been adapted slightly so it will open SimCity 2013 package format. Not that it actually understands the formats of the packed files themselves yet, but the API does allow custom plugins that could do so.   You can get it at http://www.den.simlogical.com/denforum/index.php/topic,1808.0.html

1 person likes this

Share this post


Link to post

Seem to be no download links?

 

Go read the first post it has download links.

Share this post


Link to post

-- update --

installed latest xna, added the reference and bingo built like a champ!

 

 

wow this is great work your doing!

 

unfortunately i could not find any executable and the source code will not compile because Microsoft.Xna.Framework and Microsoft.Xna.Framework.Graphics reference are missing.

 

i'll trying getting/installing Xna and see if that helps!

 

again thanks for the wonderful work, now let the fun begin!

Share this post


Link to post

one more thing im new to sim/simcity modding

 

in settings u can specify a locale package and a default package

 

can u please post paths where they are or a screenshot of of this dialog completed

 

thanks in advance!

Share this post


Link to post

one more thing im new to sim/simcity modding

in settings u can specify a locale package and a default package

can u please post paths where they are or a screenshot of of this dialog completed

thanks in advance!

The default package is only for specifying a package to open when you first run the program, just saves you clicking open package everytime if you are viewing the same file.

The locale package is more special as it will load all the strings so they can viewed in prop files. For example instead of seeing a hex number in the Menu Title field you'll see the actual title.

The game directory is Program Files\Origin Games\SimCity. The main files are then in SimCityData and the locale file you want to add on settings is SimCityData\Locale\Data.package.

(If you run 64bit windows use Program Files (x86) instead of Program Files)

Share this post


Link to post

I'm back from vacation, so I can start working on this project again. I've added a public release on the codeplex page (linked to in the first post on this thread) and have put up some short answers to some of the most frequently asked questions about the tool.

I think that for now, the first priority is going to be adding writing capabilities for a few of the file formats so we can start experimenting with which mods may or may not be possible.

Share this post


Link to post

I'm back from vacation, so I can start working on this project again. I've added a public release on the codeplex page (linked to in the first post on this thread) and have put up some short answers to some of the most frequently asked questions about the tool.

I think that for now, the first priority is going to be adding writing capabilities for a few of the file formats so we can start experimenting with which mods may or may not be possible.

 

I would advise some caution though, in terms of keeping matters discrete and not easily linked to identities. Especially in light of the latest leaks it may not be a matter of what may or may not be possible, but what may or may not be permissable. It is EA, not Maxis, who decides on strategic directives. Modding is first and foremost in service of EA's MT model. And the Origin platform does have a history of being used as a data mining instrument as well as package validation, tied to the matter of applicable licenses it may be an idea first to find out what is permissable - at least to a degree.

Share this post


Link to post

I'm back from vacation, so I can start working on this project again. I've added a public release on the codeplex page (linked to in the first post on this thread) and have put up some short answers to some of the most frequently asked questions about the tool.

I think that for now, the first priority is going to be adding writing capabilities for a few of the file formats so we can start experimenting with which mods may or may not be possible.

 

I would advise some caution though, in terms of keeping matters discrete and not easily linked to identities. Especially in light of the latest leaks it may not be a matter of what may or may not be possible, but what may or may not be permissable. It is EA, not Maxis, who decides on strategic directives. Modding is first and foremost in service of EA's MT model. And the Origin platform does have a history of being used as a data mining instrument as well as package validation, tied to the matter of applicable licenses it may be an idea first to find out what is permissable - at least to a degree.

If you are referring to the github gist that was title SimCity UI + DRM by leaks, then that wasn't a leak, it is easily viewable in the game's packages. In plain text (it's compressed, but it's not encrypted or code from the EXE) on everyone's machine. The people at Maxis (and EA will too) know about people starting modding and have done nothing to stop it, if anything the opposite: https://twitter.com/oceanquigley/status/299566347438936064

 

It's good to have you back oppie, I'd have started on writing myself, but I think thats beyond my current skill. And I tried replacing a PNG like I did in the beta (modifying the package directly) and it showed up in game like in the beta.

Share this post


Link to post

Like warrior said, we've pretty much got permission from Maxis to start modding - although it should be noted that some people seem to be confusing modding with outright cracking (people have been asking me to make the game playable offline), which is illegal. Let it be said once again that I have no intention of doing this nor do I support people who want to use the tool for this purpose. The modding activities I hope are going to be possible is adding new vehicles, buildings, networks - basically the same things that made SimCity 4 into what it is today.

Personally, I don't really get where this "Maxis won't allow us to mod the game" expectation comes from. While modding will be challenging with regards to online play, I have no doubt that it will be possible. Yes, Maxis have said that they "won't support modding at launch", but I suspect that this refers mainly to them not being responsible for any negative effects that mods might have on your playing experience. Another argument that I've seen pop up is that user-made mods will compete with paid DLC, but seeing how The Sims 3 succesfully has both user-made and paid content, that seems to be overly cynical nonsense. Maxis knows that user-generated content is vitally important, and they've never blocked it before.

Honestly, at this point allowing mods will only be beneficial to the game and Maxis, considering how disastrous and controversial their launch was. I have a tiny hope that they might even assist the modding effort in a few small ways, because Maxis and SimCity need some good press right now, and what better news for the game than free and limitless new content from the community?

Anyway - warrior, I'm pretty impressed with the seach function for the Prop files - extremely helpful for finding the relation between the property files. Hopefully we'll be able to edit and write them soon so we can experiment with actual modifications.

Share this post


Link to post

Like warrior said, we've pretty much got permission from Maxis to start modding - although it should be noted that some people seem to be confusing modding with outright cracking (people have been asking me to make the game playable offline), which is illegal. Let it be said once again that I have no intention of doing this nor do I support people who want to use the tool for this purpose. The modding activities I hope are going to be possible is adding new vehicles, buildings, networks - basically the same things that made SimCity 4 into what it is today.

Personally, I don't really get where this "Maxis won't allow us to mod the game" expectation comes from. While modding will be challenging with regards to online play, I have no doubt that it will be possible. Yes, Maxis have said that they "won't support modding at launch", but I suspect that this refers mainly to them not being responsible for any negative effects that mods might have on your playing experience. Another argument that I've seen pop up is that user-made mods will compete with paid DLC, but seeing how The Sims 3 succesfully has both user-made and paid content, that seems to be overly cynical nonsense. Maxis knows that user-generated content is vitally important, and they've never blocked it before.

Honestly, at this point allowing mods will only be beneficial to the game and Maxis, considering how disastrous and controversial their launch was. I have a tiny hope that they might even assist the modding effort in a few small ways, because Maxis and SimCity need some good press right now, and what better news for the game than free and limitless new content from the community?

Anyway - warrior, I'm pretty impressed with the seach function for the Prop files - extremely helpful for finding the relation between the property files. Hopefully we'll be able to edit and write them soon so we can experiment with actual modifications.

Can fixing the way the pathing system works be possible like it was in sc4? On reddit they already have idea on how to fix it.

Share this post


Link to post

I've been able to parralelize the search function, so it can now search the _Game package in 3-4 seconds compared to 15 seconds (well at least this is on my computer)

Given that loading custom packages seems impossible, once writing is in the tool, how about creating a folder outside of the game's directory where packages are loaded. the simcitypak will backup the game files and then merge the packages into the games files so they take effect. Basically if they won't give us a place to load our packages we'll just make our own place :)

Also it strikes me as odd that there aren't any rules in the packages, unless I've missed something? It seems strange that'd put all that they have in the packages but left out the rules that bind everything together, I found some cheat rules (cant remember where though) but that was only one file.

Can fixing the way the pathing system works be possible like it was in sc4? On reddit they already have idea on how to fix it.

I think that is much to built into the game, so it's likely to built in to the EXE, which is far more challenging to modify, besides being illegal to redistribute. We may be able to tweak it but I doubt we'll be able to redo to the extent people want it, but we still have a lot to find out so just maybe.

Share this post


Link to post

If EA's attitude to Simcity modding is anything like that towards The Sims, then they positively encourage it.  On The Sims 3 forums the maxoids often refer to mods and modding tools, saying stuff like "you should be able to find a 3rd party tool that will do such and such"    Obviously the responsible modders draw the line at making content that will help players avoid paying for either the game or its paid addons.

Share this post


Link to post

The recent success people have had with getting debug mode to work is very encouraging to the prospects for modding. I've been working on adding the much-needed editing functionality for some of the file types (starting with the text files). For some reason the game refuses to start up when using my modified file so I'm still doing something wrong when writing to the package files.

Anyway, I hope I'll have a little more time to spend on the project once the weekend rolls around. Until then, I've added a new public release on the codeplex page that incorporates the changes that were made in the last few days and during my vacation: https://simcitypak.codeplex.com/releases/view/103404

Share this post


Link to post

The game will load any and all packages in SimCityData, with content priority probably being based on modification time of the package file itself.

 

I have my own codebase I'm developing based on my earlier Sims 3 and Spore work, http://svn.gib.me/public/simcity5/trunk.

Share this post


Link to post

oppie, do you know if it is possible to apply a patch from codeplex locally?

 

Also should changes be made using patches instead of commits/check ins?

Share this post


Link to post

oppie, do you know if it is possible to apply a patch from codeplex locally?

 

Also should changes be made using patches instead of commits/check ins?

I'm not sure how to apply the .patch files automatically yet - for the time being I've been doing it manually. These can be submitted by people who do not have checkin permissions on the project - changes should definitely be made with commits/checkins if possible.

Share this post


Link to post

ok that's good (preferring commits), I couldn't find any useful information on the internet about patches.

I've been looking into why SimCityPak's packages aren't loaded in game. I saved one of the game files with SimCityPak and compared it to the original in a hex editor. There were an awful lot of bytes that were 0x80 in the original, but 0x00 in the simcitypak saved version, towards the end of the file. The raw file size needs to be ORed with 0x80000000 before being written, don't ask me why it has to be.

it's also strange that the game rejected them, because 0x800000CC & ~0x80000000 = 0xCC, and 0x000000CC & ~0x80000000 = 0xCC. So it shouldn't have made any difference, it seems the game was explicitly checking for it...


Also is it ok to delete TypeMapper.cs and TGIRegistry.xml (Rather than TypeRegistry.xml) or are they still needed?

Share this post


Link to post

I too would like to offer my support to this and any other project that will have me. I am an experienced .net programmer programming with it daily as my full time job.

 

Thanks

Don

Share this post


Link to post

ok that's good (preferring commits), I couldn't find any useful information on the internet about patches.

I've been looking into why SimCityPak's packages aren't loaded in game. I saved one of the game files with SimCityPak and compared it to the original in a hex editor. There were an awful lot of bytes that were 0x80 in the original, but 0x00 in the simcitypak saved version, towards the end of the file. The raw file size needs to be ORed with 0x80000000 before being written, don't ask me why it has to be.

it's also strange that the game rejected them, because 0x800000CC & ~0x80000000 = 0xCC, and 0x000000CC & ~0x80000000 = 0xCC. So it shouldn't have made any difference, it seems the game was explicitly checking for it...

Also is it ok to delete TypeMapper.cs and TGIRegistry.xml (Rather than TypeRegistry.xml) or are they still needed?

Yes, this indeed fixed the bug - I've tested it on my machine and package files saved by SimCityPak are loaded ingame correctly. I've checked in a change that allows changing and saving text files. For now though, all files that are originally saved as compressed will be saved as non-compressed when modified. I've yet to wrap my head around the compression algorithm and non-compressed files work correctly, so it's not of that much concern for the time being. Next, I'm going to try making the modifiying of text files a little more streamlined (for now, even files that you only view are marked as modified) and then I'm going to try tackling saving PROP files.

Feel free to remove any unused files.

Share this post


Link to post

0x80000000 flag indicates compression flags are present, if you want to write without that flag being set, you need to not write the flags, too. The exception is DBBF files where this flag isn't used the same way.

Share this post


Link to post

Oppie: I have 4+ years experience with C# and XNA, been making my own games and such, if you don't mind I will be looking at your source code. Maybe sending you examples + the new code - maybe we can work together. Check out my tumblr page in the sig - its all XNA .Net related.

 

UPDATE: One thing I have noticed about RW4 files is that the InstanceID [example: 0x33c57482] can be linked to the Property Files by the same InstanceID

 

so the Building {RW4} 0x33c57482 - has a Property file that gives extra members by association of the InstanceID...

Property File {PROP] 0x33c57482

 

Model Bounding Box (??) = Bounding Box (MinX = -8.3, Min.Y = -0.12, Min.Z = -0.63, etc.....
LOD1 = RW4 File (0x2f4e681b)
Texture
Texture Bump

 

looking for another associated file to show Building Properties like, or maybe thats in the RW4... but I want to find if there is like occupancy rating, wealth value etc...

 

UPDATE 2: However, Property File and RW4 do not always match up - so I do not know if there is a relationship similar to the SC4Model and the LOT like SC4. I was hoping that the Property File was going to represent the building data, like the Name, Occupancy, Wealth... etc. like old system.

Share this post


Link to post

Hey i have noticed some of the "Unknown" groups are actually LTAC Compressed Audio files ( WAV? maybe? ). They were for the most  part grouped with 0x893b084b. I have found some other stuff in the code which is confuseing me to some extent. Things like Adobe Photoshop Brush files that are used in PS.... not sure why it would correlate with the game. I want to help yall out but im not really sure what needs attention.

Share this post


Link to post

Oppie, I'm wondering why the ModifiedDatabaseIndex needs to be subclassed for specific types, couldn't it just have a generic data property that could be used for all types?

Share this post


Link to post

Also it strikes me as odd that there aren't any rules in the packages, unless I've missed something? It seems strange that'd put all that they have in the packages but left out the rules that bind everything together, I found some cheat rules (cant remember where though) but that was only one file.

 

I think I've found the rules, in SimCity-Scripts_<numbers>.package. Look at the only unknown type file in that package. Looks like it could be a compressed/compiled form of the rules.

 

Regards

elFarto

Share this post


Link to post

0x08068AEB is indeed EcoRulesBinary (I've given it an extension of .er2bin, 0x08068AEC is EcoRulesScript with an extension of .er2).

Share this post


Link to post

How did you work out the name? I assume it is the FNV hash of the name, but how did you go in the other direction?

I did not expect the rules to be in one file, though that isn't so different to RULs in SC4. It means if we want to make changes to it, someone will have to set up a central team like the NAM.

Share this post


Link to post

The game definitely supports multiple eco rule binaries, each DLC has its own.

 

(Some of the DLC accidentally included .er2 files, too)

Share this post


Link to post

When saving props, it writes 0x30 after the type of the property, why 0x30? The prop file I was trying to edit (menu list) had a value of 0x809C there. Editing and saving the prop file with the 0x30 value caused the game not to load cities (the right edge of the screen went red), whereas if I changed it to 0x809C it loaded fine and the change was noticeable.

The only reference I could find on the Internet for prop files said it should be 0x10 for array properties, nothing about 0x809C.

(the Menu List file is just 3 array properties)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an Account  

Sign up to join our friendly community. It's easy!  :thumb:


Register a New Account

Sign In  

Already have an account? Sign in here.


Sign In Now

  •  
  • Recently Browsing   0 members

    No registered users viewing this page.