This project is read-only.

Getting Started

In this short tutorial I will give a brief introduction to SimCityPak and I’ll show you how to create a mod that moves the pedestrian path from the university to the roads menu. This tutorial focuses on the basic usage of SimCityPak, the structure of the package files and how to edit a property file. Note that this tutorial was made using an older version of SimCityPak - several items in the user interface might be different, but the basics will remain relevant.

Download SimCityPak and put the files into a folder of your choice. Run the executable to start the modding tool.

In the 'File' menu, click 'Open Packages...'. Navigate to the folder where you've installed SimCity (usually Program Files/Origin/SimCity/). In the SimCityData subfolder, open the SimCity_Game.package.



A package file can be likened to a a .zip archive or a compressed folder; it contains a large number of files (sometimes compressed) in a single file on disk. The large list on the left of the screen represents a list of all the files contained in the package. Every file in the package is identified by its index (which is while I often refer to the files as indices).

The index is a pointer that counts both as an unique identifier for the game to refer to specific files and a pointer to a location in the package that contains the actual data for this index. The only thing that you generally have to know is that each index is defined by a Type, Group and Instance id (referred to as the index' "TGI"):
  • Type: The type of the file - denotes whether an index is a 3d model, property file, javascript file... etc.
  • Group: Used to group together different indices. In many cases, this id is empty.
  • Instance: The main identifier for each index. In a lot of cases, the type and group id aren't even included in a reference to a specific index.
Note that technically the combination of all the TGI id's needs to be unique - you will find that there are indices with the same instance id, but with different types. In most cases, this means that these indices are related somehow.

Finding the Property File

Filter on property files, and search for the item you want to move to a different menu. Note that some indices have a name and others haven’t - these names are added by modders to easily identify them and are not used by the game itself. In this case, we can use this feature to find the index we’re looking for.



Now that we’ve found the correct index, we can take a look at the property file. Note that just like the named indices, all of the named properties were identified by modders. The property we’re looking for is ‘Parent Menu’ - but don’t change it yet!



Because we don’t want to modify anything in the game’s package file itself, we’ll export this specific index to a new package file. Right-click on the index file and choose ‘Export to Package...’. Pick a file name and save it into your SimCityData folder.



Before we close the game.package, let’s find the value we want to change the property to. Search for any road type (for example ‘medium density avenue’). Find the ‘Parent Menu’ property again and click the pencil icon to open the edit window. Copy the value under ‘Instance’.



Now, open your newly created package. Clear the filter - you should see only one index at this point. Select the property file, and click the pencil icon on the ‘Parent Menu’ property gain. Paste the copies instance id into the instance textbox, and click ‘Save’.



In order to also save your changes in the package, go to the packages tab, select your newly created package, right-click and select ‘Save’.



Now we’ve created a new package that overrides the existing menu item in the university submenu. If you were to go in-game and into the university, you’ll notice that the icon for the pedestrian path is missing. This makes sense, of course, because we’ve changed the parent menu. But what if we want to keep the original menu item as well as having a new one in the roads menu?

To fix this, we go back to SimCityPak and open up our package again. Note how every index has a Type, Group and Instance id. The combination of these has to be unique. Because our property file has the exact same TGI as the original index, it overrides the original file. To avoid this, we have to give our index a unique TGI combination. Right-click on the index and choose “Change TGI information”.

In this window, we can modify the TGI values. Note that you normally should not edit the Type or Group values. To make our index unique, enter a new id. Note that this is a hexadecimal value (hence it starts with 0x, if you don’t know what to enter, you can use “0x12345678” for example). Click Save.



Once again, on the packages tab, select the package, right-click and pick “Save”.

Now, in-game, we have both the menu options in the roads menu and the university submenu.

Warning: SimCityPak is still in development and there will be bugs. Make backups often and whenever you make a change, test it in a seperate non-public region!



Last edited May 28, 2013 at 8:19 AM by oppie, version 6

Comments

CapTon2020 Sep 26, 2013 at 2:46 AM 
@luis26x http://www.youtube.com/watch?v=lS1ymJX4R98

luis26x Aug 7, 2013 at 1:49 AM 
because you do not create a video explaining everything.