This week I focused on researching and coming to an understanding of the systems that RimWorld uses to keep track of the data and variables within the game. From this information I also came to a better understanding of how exactly I would go about creating a mod for RimWorld, and how to take advantage of the systems to create what I want.
The research ultimately led me to the knowledge that RimWorlds data is almost entirely stored as XML files, and that each individual entity, biome, weather, item, and even minute aspects of the game such as health conditions and status effects are all stored as XML files. XML files act as a form of storage for information rather than actual, functional code as it appears. In essence, XML is directly how the data being used is read, and being able to directly manipulate these XML databases will be how I create my mod.
For example, this is what the XML documentation for a gun looks like:
By copying a file for a entity that functions similar to one I'd wish to create, I can then rename and relocate the code to a different file location. This provides me with a copy of the entity that I can adjust the variables for until it becomes the new entity I wish to mod into the game.
For example, if I wanted to make a gun that can deal an incredibly high amount of damage, but can only shoot once every minute, I would set the value RangedWeapon_Cooldown to a high value to increase the cooldown, and create a new bullet class to create a bullet that can deal 100x the damage of a normal bullet.
Then, after setting the new gun to shoot the new bullet class instead of the normal one, I would have created a gun that can only shoot one bullet per minute, but do an incredibly high amount of damage to its target.
I also further looked into how the formatting of mods for RimWorld works; specifically the metadata required with each mod. I have come to a full understanding of what information is required regarding the metadata for a mod, and how to create a full system of additional data to go with a mod. Such information includes the name of the mod, mod author, a unique identifier and description, as well as the supported versions of the base game the mod is designed for.
Using this, as well as an image to represent the mod when viewing it in-game, allows me to access, use and test mods in-game as I'm developing them, allowing me to proceed ahead with development.
Screenshot of RimWorld XML code taken by me
This shows my understanding of the way RimWorld handles modding and XML documentation, and how I can go about creating my own entities by adjusting the values within this XML documentation.