Visual Entertainment and Technologies Forum

Full Version: Quick Mod Tools Tutorial
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone, this is just a quick, lightly detailed overview of the mod tools and how to use them. More detailed tutorials will come after I implement the official Gearcity wiki page. This is not really meant to be comprehensive or anything. Before v1.22 comes out the mod tools are a use and learn at your own risk type deal.


First an overview of the map/mod system.

The editable parts of the game are broken down into two systems.
-The "Map" files which consists of map specific artwork, city artwork, news artwork, AI artwork, and scripts that use city ID's. These include the City information files, AI files, and the Turn Events file.
-The "Mod" Flies consist of scripts not specifically tied to the map files. Although components.xml and turnevents files do share some linkage. The mod files can also override files, such as turnevents, on specific map.

Currently on the Map files are implemented.

Map Tools
You can find maps in the game in the "install location/media/Maps" folder. Each map has it's own folder, two xml files, one for use in game, the other for the editor, and a number of folders and scripts in specific locations.

You may want to back up the map folder before changing anything there. You can break the game. Deleting the map folder then verifying game cache would also fix any issues if you break something. Smile

To open a map in the editor, click "Map Data Tools", "Open Map Data", then navigate to the folder with your map data and select the "MapFileForModTools.xml" (Please note, if you are currently working on a map and it is not completed, you should save it in a different location outside of the game. You can then load the xml files that file. This is to prevent the game from crashing on load.)

The Test Dot City map is probably the best to play around with.

You will notice on the left hand side various locations and folders. The exporter will look for specific files in these locations. So when you edit AI files, or City Data, please save those files in these folders.

If you're editing an existing map and do not want to overwrite it. Be sure to rename the map under "Map Name" before exporting.

All artwork must be saved in zip files and have unique names, and may not contain folders in the zip files.

To export the map, click export. Navigate to the /media/maps folder. A new folder will be saved with the name of the map and all files will be moved to that location.

City Tools
The city script files are located in the "install location/media/Maps/Map Name/scripts" folder. The tools are pretty self explanatory. Using a dot city map, such as Test Dot City map, you can add remove cities from the game using these files. Go ahead and open Test Dot City map's city xml file and add a city. Be sure to fill out all the information, then save it over the old xml file. You should see your new city in the game.
(Two points, First, the world coordinates will place the dot on the map, so be sure these are correct! Second point, removing cities will not automatically adjust turnevents or AI HQ locations city information at this time. So if you remove a city, you will have to adjust both of those files as well. I'll be adding a automated solution to this in the near future.)

You can also interpolate data between multiple points. For instance, in the "Classic Map" you'll see city files for 1980, 1950, 1930, and 1900. The mod tools will automatically adjust growth rates for you between the files if you load them. If you're making/editing something form scratch, it is best to start on the last year first and work your way backwards.


AI and Turn Events
Both of these files use other files. For instance the AI files use the city files for HQ locations of companies. The Turn Events link multiple files to world events as well. It can alter city's as well components.

In short, you'll find a couple of file loaders for both of these tools. Load the appropriate files, and modifying things such as HQ city locations for AI companies will become much more easy.

(Note, with the turn events files, unless you plan on re-translating the entire game to multiple languages, it is probably best to avoid the "Localization" checkboxes for news events. )

As I said, a nice quick overview. I'll have a better one with pictures in about a month or two. (Will make it while I work on the new map system.)
If you have any questions feel free to post them. This isn't really meant to be a fully detailed tutorial because it's a waste of time to write one at this second. (The wiki will have better formatting and I'll be writing a map from scratch in a couple of weeks, so I can take pictures/videos.) But I don't mind answering any questions if you have them.
If I wanted to make some custom engine/valve layouts, what would be the best way to do that? Make a mod? or use the component editor? The wiki isn't fully fleshed out yet, I know it's hard enough to just make the game.
(12-27-2017, 11:11 PM)Waffles Wrote: [ -> ]If I wanted to make some custom engine/valve layouts, what would be the best way to do that? Make a mod? or use the component editor? The wiki isn't fully fleshed out yet, I know it's hard enough to just make the game.

The wiki will be worked on after I finish the core maps. I was running a bit behind on those. But they're getting closer to being finished.

You would want to make a mod. In this case, Components Editor http://wiki.gearcity.info/doku.php?id=mo...entseditor
There is one problem however. Any new cylinder, valves, fuel types, and induction systems must be in the localization files. Or no cylinders, valves, fuel types, or induction systems can be localized. This makes it difficult to add new things. I plan on making a "base modification" file with a series of video tutorials after I complete the mod tool's wiki page.

Anyway, to do actually change stuff, Open the existing Components.xml and AIComponentsPopularity.xml files. Add in the layouts and valve systems you wish to use. Any valve types you add must be added to engine layouts they support. See 10-14: http://wiki.gearcity.info/doku.php?id=mo...ine_layout these either have to be all localized or none can be localized...

Save the file. Next you'll want to use the Mod Tool to make the mod. This is not documented yet, but in short you name the boxes, and check what you are modifying. Select the files that have changed and then export the mod. Take that folder and stick it in the /media/mods folder in the game. Finally select that mod from the external settings program.