• 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

If you are going based on Spore's .prop files, you need to remember it's been five years since Spore and the format has likely changed slightly.

Share this post


Link to post

Hello everyone,

 

Experienced WPF/.net developer joining in here!

 

I can't wait to contribute towards this project.

 

Is it correct that right now the biggest critical issue is that the game can't load modified .package files?

Share this post


Link to post

No. it loads them fine. The biggest issue right now is unknown file formats and hashed names.

Share this post


Link to post

If you are going based on Spore's .prop files, you need to remember it's been five years since Spore and the format has likely changed slightly.

Yes, I was just wondering where the 0x30 came from if not Spore nor the game files.

Share this post


Link to post

Hello Everybody,

 

First off thanks for the tool! 

 

I do have some questions I very much like to get some help with:

 

1.

How do I replace a texture like the police car (texture 11) from the RW4 with the Instance-ID 0x84fcb1e9 from the SimCity_Graphics.package. If I use the import button the tool crashes after I selected the edited DDS-file (same format and size as original DXT1 with 8 mipmaps). Crash report:

 

Problem signature:
  Problem Event Name: CLR20r3
  Problem Signature 01: simcitypak.exe
  Problem Signature 02: 0.1.0.1
  Problem Signature 03: 514245d3
  Problem Signature 04: SimCityPak
  Problem Signature 05: 0.1.0.1
  Problem Signature 06: 514245d3
  Problem Signature 07: bf
  Problem Signature 08: 18
  Problem Signature 09: HXJP5ZDXFJLSPWFD1XT33QLO3ZTWWUWQ
  OS Version: 6.1.7601.2.1.0.256.1
  Locale ID: 1031
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
 
2.
Anyways, I think it would be better to create a separate package file that just contains the new texture. What is holding me back with this is that I can not figure how to name the texture file.
 
3.
I would like to change the ugly general texture of the cliffs that makes them look like dunes (http://eaassets-a.akamaihd.net/www.simcity.com/sites/default/files/road_17.gif) and the texture of the Doppeldecker-Bus from the British-City-Set but am not able to find them.
 
 
Any help would be appreciated! :)

Share this post


Link to post

@warrior/@gibbed - While I've managed to iron out most of the differences between the Spore and SimCity property file formats, I focused only on the reading aspect of them. I only just started on writing them back, so I'm bound to have made a few mistakes there. Your observation seems to be right - I've seen 0x809C as an identifier for array properties before.

EDIT: Writing 0x809C for the array properties and 0x8000 for all other ones seems to work - in some cases the tool generates the same data as the original file except when the file contains a bounding box, text or transform property (in this case the flags are 0x801C). Sadly, this is almost all of them. I believe these were called ComplexProperties in gibbed's original Spore implementation (something which I foolishly thought wasn't necessary anymore) so I need to figure out how those differ from normal properties. They seem to be arrays (reading them as arrays works perfectly for the tool) but they're also not. Transform properties are also still acting screwy but I'll fix those once I get those other issues under control.

@Xiskio - The importing of textures doesn't work yet. That button was a failed attempt to get editing the RW4 file to work, but for the time being I'll be focusing on property files first. Texture modification will probably be next, but given the amount of free time I have lately, it'll be a while until I get to it.

1 person likes this

Share this post


Link to post

@Xiskio - The importing of textures doesn't work yet. That button was a failed attempt to get editing the RW4 file to work, but for the time being I'll be focusing on property files first. Texture modification will probably be next, but given the amount of free time I have lately, it'll be a while until I get to it.

 

Do you know how to figure out the name of the texture file for example of the police car (texture 11) from the RW4 with the Instance-ID 0x84fcb1e9 from the SimCity_Graphics.package?

Share this post


Link to post

Hey guys, professional graphics artist here. I have over 12 years in GD, GUI, Textures etc...  I would like to make a high def realistic texture pack for the game when somebody figures out how. I don't usually keep up with these modding sections so if anyone could PM me when its possible who wants to work with me. I don't do models, but I can do all the textures.

Share this post


Link to post

public static uint FNV(this string input)

{

string lower = input.ToLowerInvariant();

uint rez = 0x811C9DC5;

 

for (int i = 0; i < lower.Length; i++)

{

rez *= 0x1000193;

rez ^= (char)(lower);

}

return rez;

}

 

Heya, I've been working on RE'ing the headers and data structures as well. Your snippet above explains why I've been doing /headdesk for the past three days (_ _)...

Even the uncompressed strings were like a hard brick wall to me ~.~ Anyways, thanks for the code! Lemme know if you need someone to troll your todo's :)

 

Cheers,

Fuz

Share this post


Link to post

I found the terrain Editor through this program you made here and it is not checked so how can this be working in the game to make this where we can do the terrain? Or am I wrong? TY

post-603381-0-75220700-1363752303_thumb.

Share this post


Link to post

That is not what you think it is. It's configuration values.

Share this post


Link to post

That is not what you think it is. It's configuration values.

Are you talking to me? And if so oh was not sure what this was ty! Sure like more land room to build more goodies to keep those sims happier and how can I when run out of space how can we make that like 2 more inches? If can? TY

Share this post


Link to post

has anyone tried to compare a normal network to one of the regional networks and see if there is something that allows the networks to be drawn outside the city boundary, and then perhaps we can edit the city networks and possibly buildings as well.

Share this post


Link to post

has anyone tried to compare a normal network to one of the regional networks and see if there is something that allows the networks to be drawn outside the city boundary, and then perhaps we can edit the city networks and possibly buildings as well.

Not yet, but since I'm able to modify property files now (or well... most of them, a few still have issues), I've been looking into the menu items a bit. I've put the pedestrian pathways that come with the university into the roads menu () by modifying the "parent menu" property. It is also possible to edit the "Network" property and make the same menu item draw an entirely different network - for example, I also made an icon for the regional highway in this menu, but since it can't be deleted yet (and funny enough, this one couldn't go outside the city plot) I'm not uploading that one yet. But it's definitely looking like messing around with the property files alone is already going to give us a lot of possibilities for modding.

I still have to do quite a few usability, stability and bugfixing tweaks to the tool before I can upload this new version (which is already in source control), but I'll try to get it done as soon as possible.

1 person likes this

Share this post


Link to post

Good job one the awesome tool :P  looks like modding this simcity is gonna be awesome( if EA allows it)

Share this post


Link to post

has anyone tried to compare a normal network to one of the regional networks and see if there is something that allows the networks to be drawn outside the city boundary, and then perhaps we can edit the city networks and possibly buildings as well.

Not yet, but since I'm able to mod package files now (or well... most of them, a few still have issues), I've been looking into the menu items a bit. I've put the pedestrian pathways that come with the university into the roads menu () by modifying the "parent menu" property. It is also possible to edit the "Network" property and make the same menu item draw an entirely different network - for example, I also made an icon for the regional highway in this menu, but since it can't be deleted yet (and funny enough, this one couldn't go outside the city plot) I'm not uploading that one yet. But it's definitely looking like messing around with the property files alone is already going to give us a lot of possibilities for modding.

I still have to do quite a few usability, stability and bugfixing tweaks to the tool before I can upload this new version (which is already in source control), but I'll try to get it done as soon as possible.

 

Did you find what controls the order of the menu items? I'm guessing it the cost?

Share this post


Link to post

Did you find what controls the order of the menu items? I'm guessing it the cost?

Yes - The property that I previously identified as "cost factor" doesn't define the cost after all - but apparently it does define the menu ordering (I haven't found anything else that it affects).
1 person likes this

Share this post


Link to post

Hey oppie, im trying to edit regions but theres a couple of features which would be really really helpful when trying to figure out what each property is and that is:

 

- Ability to load multiple packages so the instance links work across packages.

 

- "Compare Properties" so I can click two files and see whats different about the individual properties and see what editing them does. 

 

But yeah, great tool looking really nice and really helpful.

Share this post


Link to post

Hi guys, awesome job btw building this tool. I'm a developer myself and I've spent a ton of time playing around with property edits and modified your code a bit. 

 

I built new features into the tool to allow saving changes to boolean and vector2,3,4 properties as well as a extract all files button. 

I'd love to be of help to the team.

Share this post


Link to post

Hmm anyone able to RE:

 

176a607a 55af4890 rw4 files in the app package?

 

they look to hold something to do with the regions. Unsure what :(

Share this post


Link to post

How can you guy do any modding or testing of this stuff without fear of getting your origin account terminated?  I would like to help in any way, but I dont want to get my account deleted until I know there is a offline version of the game to DL...

Share this post


Link to post

From what I understand, no one has added new models into the game, but have changed texture maps?

Share this post


Link to post

Hi guys, awesome job btw building this tool. I'm a developer myself and I've spent a ton of time playing around with property edits and modified your code a bit. 

 

I built new features into the tool to allow saving changes to boolean and vector2,3,4 properties as well as a extract all files button. 

I'd love to be of help to the team.

It's always nice to have more people on the team, although we're now starting to run into the problem of too many people working on the same bit of code. I've been working on and rewriting some of the property file code so that it works better, so I might already have made some of your changes obsolete. While I'd love to let everyone contribute where they can, we need to divide the work so that we're using everyone's talent to its full potential. I suggest using the Codeplex issue tracker (https://simcitypak.codeplex.com/workitem/list/basic) to organize tasks and let people know who's working on what. What do you guys think?

Also, I've uploaded a new release to the CodePlex site (https://simcitypak.codeplex.com/releases/view/103805) which includes the first file saving functionality so that people can start experimenting (this is the same version I used to make the university pedestrian path available in the roads menu).

1 person likes this

Share this post


Link to post

I agree with the concept of using the issue tracker built into the CodePlex Site to prevent us from stepping on each others toes. Are we going to continue to use this site to discuss what progress is being made?

 

Don

Share this post


Link to post

What is SimCityPak?

Simply put, it's a work-in-progress tool that will hopefully eventually be the iLive Reader equivalent for SimCity 2013.

 

What does the tool allow us to modify?

As of yet; nothing. You have to understand that to be able to modify any files, we must first be able to understand what's in them. While some of the file formats carry over from previous Maxis games like Spore and The Sims 3, in general there are many new things that have to be tediously reverse-engineered. While the tool will eventually be able to save and write to package files, for now it's main use is to facilitate the process of understanding the game files and what they're for.

 

What will we eventually be able to modify?

Nobody knows - the only way we'll be able to find out is through experimentation. People have expressed concern that because the game partially runs on Maxis' servers, we won't be able to modify anything at all - personally I have good hopes that we'll at least be able to mod things on the city level (possibly only in sandbox mode), although that's merely speculation at this point.

----

First of all, this tool was born when I realized that SimCity uses the same DBPF version as Spore, and that there were already a few Spore Modding tools out there that I could base my research on. I was lucky to come across SporeMaster (https://code.google.com/p/sporemaster/), an open-source .NET based tool. While this tool was made specifically for Spore (and there are quite some differences between the .RW4 model files for example) I managed to reuse a lot of the underlying object model to build my own tool from the ground up (I've been in contact with the creator of SporeMaster and have permission to use his work). From there, I've been trial-and-error'ing my way through the files to see what I can open and how.

For those of you who want to help building the tool (which is in C#/.NET/WPF with a dash of Xna thrown in), I've uploaded the source code over at https://simcitypak.codeplex.com/ . I'm not sure if anyone can just download the source code using TFS, but if you need access, give me your codeplex account and I'll make it so.

I've also uploaded an executable version of the tool. Let me know if it doesn't run or if anything goes wrong when opening a package. There will undoubtedly still be hundreds of bugs but most of them will be caused by unexpected data in the package files.

 

LINK TO THE LATEST VERSION: https://simcitypak.codeplex.com/releases/view/103404

Changelog:

 

0.003

  • Added Hex view to all file types (even the already identified ones)
  • Added Hex view to subsections of a RW4 file to identify the unknown ones
  • Added 3D preview for RW4 Mesh sections (warning, meshes aren't read correctly yet, so it still looks like crap)
  • Fixed most bugs when loading properties. Only 'Transform' type properties still have some issues
  • Added a context menu to Key Properties so that you can open the file it links to in a new window (right click the value and select "open in new window..."
  • Ability to export textures. From the RW4 Texure view, you can select a file and save it to the .dds format.
0.004
  • Added 3D view for RW4 meshes
0.005
  • Added first attempt as a viewer for RASTER files (which are surprisingly not building textures... wondering where those are hidden)
  • Added instance regisrty (Add custom names and comments to specific instances by right-clicking on the instance number in the main grid to make identification easier)
  • Modified properties view to be easier on the eyes
  • NOTE: While the properties files are being read a lot better than in previous versions, it still has a few bugs that I hope to be able to iron out soon.
0.006
  • Export to package - export one single TGI index to its own seperate package file
  • Properties files will now be read correctly - all properties will be read
  • Added relevant information to RASTER and PNG file displays (should be expanded)
  • Started refactoring of back-end object model code
0.1.0.0
  • Added textures in 3D viewer for vehicle models
  • Added Loading of Locale files from Settings screen (will load localized strings for PROP files)
  • Added About window
0.1.0.1
  • Added search for specific values in property files
  • Added first attempt at saving modified data to a property file (warning, still buggy)
0.1.0.2
  • Ability to edit Text files (JSON, Javascript etc...)
  • Ability to edit property files (still preliminary)
  • Advanced Search for property files
  • Ability to export multiple assets at once
  • Ability to save packages to a new file

FYI:  Your link is to 1.0.1, you can click there, then click "Downloads" to get to the newest one (1.0.2) or go here directly:  https://simcitypak.codeplex.com/releases/view/103805

Share this post


Link to post

No idea what you are talking about in 90% of your posts, but I just wanted to say keep up the good work! Mods are what will make or break this game.

 

All hail the modders!

Share this post


Link to post

Thank you elFarto for adding multiple package support :)

Share this post


Link to post

Thank you elFarto for adding multiple package support :)

It's still not complete. Saving changes you've made is still a bit messy, but hopefully it should work well enough for now.

 

Regards

elFarto

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.