Modding RPG Tycoon


All that is required to mod RPG Tycoon is a basic understanding of XML markup and a text editor to create/change the XML files for the mod. With these two tools at your disposal, you’ll be able to edit and create 80% of the data used by the game. If you go one step further and have the ability to create PNG images too using some image editing software then you’re in the big leagues and have absolutely 100% of RPG Tycoon data at your fingertips!



In order to get started it’s recommended that you watch or read the previous documentation on modding the game. Each link below link provides an example mod for you to try for yourself alongside a Tutorial Video to walk you through what’s required. (These videos reference a slightly older way to mod the game, which limited you to editing the pre-made XML data files. Keep in mind, this has been replaced by the Mod folders in your User Documents instead giving you much more freedom.)



Getting Started

As of Alpha 11, RPG Tycoon is fully moddable with Steam Workshop support. If you have a standalone / DRM Free copy of the game, you can still mod it… Just unzip and copy these examples into the /Mods/ directory located inUser/Documents/RPGTycoon/ as shown below. If you’re making a mod, all you need to to is copy your folder into this location to test it before sharing. Any mods installed in this folder will be loaded upon launch of RPG Tycoon.

If you’re using Steam, any workshop files you subscribe to will be copied to this folder the next time you launch the game after subscribing to a mod.



Creating A Mod

Creating a mod for RPG is fairly straightforward. All you need is a little knowledge of how XML works, some kind of Text Editor. Your built-in text editor software such as notepad should be fine,. however Brackets is free and a more advanced alternative allowing you to view and edit the files easier. Each mod in RPG Tycoon should consist of 3 main files in order to be referenced properly by the game:

  • Config.xml file with header information to tell the game what to load.
  • A 100px by 100px PNG Icon labelled “Icon.png” for the Mod viewer.
  • A corresponding XML file and any optional sprites depending on your mod.

Most information that the game handles is stored in the /Data/ folder of your RPG Tycoon install directory. Once you have an idea for the kind of mod you’d like to create, it’s worth looking at the corresponding XML file to get an idea of how the information is loaded into the game and how the XML tags are stored. It also could be worth looking at some of the example mods linked above to see how mods are structured yourself while following this guide.



Creating the Config File

Each mod requires a config file. The config file details between two tags that this is a mod to the game and gives information to the game to be displayed within the in-game mod viewer such as the name of the mod, the author credit and a small description of the mod. The config file should also detail the corresponding XML files to load, in the example pictured below this config file directs the game to read foliage.xml each XML file name should be referenced using the <file name=” “/> tag before closing the config data file. You can have as many XML Mod files in one.



Adding the Mod Data

Now that the config file is ready you can start creating your mod! Create an XML file for your mod and name it uniquely/accordingly. Only one data type can be loaded per XML file, so if you want to create a more advanced mod you’ll need to create a seperate XML file for each mod type. However, if you’re just wanting to add a single data, such as a number of new buildings and decorations you can store as much as you like in one single XML file – (this is exactly the same as the way data is loaded by the game already. If this doesn’t make sense, check the /Data/ folder!)

When opening the <Data> tag for you mod, you need to define what type of mod this file is so that RPG Tycoon can load it correctly. Each XML file has it’s own <Data type=” “> tag and THIS MUST BE ACCURATE IN ORDER FOR YOUR MOD TO LOAD PROPERLY. If you’re not sure what tag to use, refer to the data type used for your mod in the /Data/ folder of the RPG Tycoon Game install directory. So for the example below, if you were to openBuildings.xml you would see that the type tag is building so in order to tell the game to load this XML Data as a building mod we set the type to building.



From there set the XML Tag according to the way that buildings are loaded into the game. Again, check the data folder or the video below to understand this. Basically each building or decoration will need a name, short description, long description, cost, maintenance, level the item unlocks, size string so that the player can figure out how big it’s going to be, a category relating to the item type so the building manager can sort it properly. (If you want the item to only be used once set CATEGORY_SPECIAL) whether the item has modular variations and can be cycled through, whether the item can be placed multiple times in build mode or if build mode should cancel after one placed (usually buildings should be false, decorations set to true), how many followers the item produces when placed (buildings), how much attractiveness the item produces(decorations) what type of building it is (TYPE_NONE for decorations, see buildings.xml for other types), the root texture name of the building tiles (see building guide below for more info) and the front index of the item (multiples of 30). Then each building tag contains a series of <tile> tags relating to how many tiles to place and the co-ordinates to place them, based on the left-most tile (buildingname_0_0).

If the item IS MODULAR. You must include the _mod+modnumber_ description in the item tile filename  (E.g: buildingname_mod0_0_0)

If the item ISN’T MODULAR you MUST name the file as follows buildingname_tilex_tiley 

(If you’re confused about sprite naming conventions, look at any of the XML files in the Graphics/Spritesheets folder in order to see how files are named.)

On the topic of sprite-sheets... There are currently two ways that the game handles loading images, one of which is via spritesheets created using the Texture Packer tool which are used by RPG Tycoon to load a large number of images at once to increase loading times and reduce draw calls in game. YOUR MOD DOES NOT NEED TO USE A SPRITESHEET. The game will load any images it finds in the mod folder upon load and will be able to access them accordingly. However, there may be a situation where you wish to add a large number of sprites into the game. In which case using the TexturePacker and exporting a spritesheet for Starling will allow all of those files to be loaded much faster. So it’s recommended to use in order to reduce load times for anybody that is modding with large file counts as it creates a single image and an xml file that the game can read to create a TextureAtlas reducing memory.


Making an Icon

Once you’ve finished working on all of your files all that’s left is to make an icon for the game to use. The icon needs to be 100×100 pixels in order to display properly in-game. JPEG/PNG file format is recommended and the icon should demonstrate something relating to your mod, or make it appealing for players to use!

Testing Your Mod

When all the data files are finished, your config file is complete, you have an icon and any other referenced images are included in the folder. The final step is to test your mod. Simply drop the mod into your /Mods/  folder and start RPG Tycoon. You should then be able to see the mod loaded into the mod viewer, and when playing the game any of your mod files should appear. If they don’t, go back over the data files. make sure everything is in order and make sure that you’ve opened and closed tags properly, that your XML files validate and that your referenced files are formatted correctly.

Uploading to Workshop

Finally if you’re using Steam, once you’ve tested your mod and you’re sure that works you can upload it to the Steam Workshop for other players to enjoy. Simply click the Upload button in the mod viewer. This will open a submission window with some information. Click “Select Mod File” and choose the Mod directory that contains all of your mod files. Select an icon from your computer to upload as the icon for the workshop (using the same icon file as your mod is advised). Then give your mod a title, description and tag it relating to mod type so that people can find it on the workshop easily. When your ready, hit submit and your mod should begin uploading!

Screen Shot 2015-11-26 at 01.04.49