However, before I get to that, I like to take a moment to talk about some design considerations on the modding system as it current stands. The most important consideration, believe it or not, is for me to create something that works without spending too much time on it. Why is this the case?
Well, first of all, I still got a game to make, so I don’t want to spent too much time on this detour. Secondly, despite the many responses that express interest in adding content, I am a little skeptical on how much new content will be made. I certainly don’t want to spend months to make a kickass modding system that nobody uses in the end. Hence, it is better to start with a minimal viable product and go from there. Finally, I assume that for those that will actually make new content, they are probably enthusiasts and is willing to work through a little hassle.
At the same time, the mod system can’t be too crude. It also needs to be extensible and flexible, with the ideal that mods created today can work with mods in the future.
For the users/consumers, the “installation” should be as hassle free as possible. Ideally - as simple as dragging a folder into the mod file or perhaps an “install mod” button in the in-game mod browser. But unfortunately, it just isn’t there yet to the self-imposed constraints in time due to the reasons mentioned above.
With all that said, here is how modding v0.00001 works:
Installation:
In the installation directory, you will find a new folder called data. In this folder, there are a bunch of json files:
Note the “_FilesToLoad.json” file. This is an “index” file - it tells the engine which files to load. When you open it, it looks like this:
You might notice that the “XXXXXX.json” entries matches the name of the files in the folder. You guessed it, that’s exactly how it works.
As an example, suppose if our friend PowerModder added some new moves to the game. And the data are in 2 new files, so the data folder now looks like this:
If you just copy and pasted the 2 new files to the data folder, it wouldn’t work. Why? Because the game have no idea these 2 new files existed or what type of data they contain. (At least in v0.0001). So you need to make modifications to the “_FilesToLoad.json”:
Now, assuming the content made by our friend PowerModder here is valid, that is all you need to do. Everything else the game will handle (or tries to).
Data File format:
You might notice that the game currently expects 4 different types of data files - animationsFiles, moveFiles, dialogueFiles and itemFiles. Let’s go over each file type:
ItemFiles contains list of extra items (equipment) the game will load. Individually, they look like this:
This isn’t actually valid JSON, because JSON doesn’t support comments ( // ). The comments are not used in code and are meant for humans to read rather than for computers. Feel free to mess around with the values and reload the game to observe their effects.
Two important fields:
- “uid” - this is a unique identifier for each item. Their name if you will. No two items should have the same “uid”.
- “meshId” - this is where to load the mesh/model data from. Here is it “meshes\\platearmor.json.” It means that this particular item uses the model data from “platearmor.json” under the subdirectory “meshes.” Indeed, if you open the “meshes” folder in the “data” folder, you can find “platearmor.json” there.
Game <<------ Item Description <<------ Model File
Here is an example. If you want to add say, “black_plate_armor_chest” to game. Step one is simple, we copy the existing json file. Then, you have an important decision to make. Do you want this for personal use or do you want to share it with others? If it’s for personal use, that’s easy, just paste the copied segment directly into the existing json file, like this:
JSONs are comma delimited so don’t forget to add a (,) in between! Use things like code editors and tools such as https://jsonlint.com/ to help spot mistakes!
If you want the possibility to eventually share this new addition with others, DO NOT OVERWRITE EXISTING FILES. Here is what you do instead:
First, we create a new .json file:
Then, under “_FilesToLoad.json”, add a new line to “itemFiles”:
Finally, open your new json file, add an [] pair for JSON array, and copy the item description in, so it looks like this:
Give it a new “uid”, mess some values (here rgb values are 0,0,0 for black) , and tada, you are done :D.
Question: is it possible to use own custom models?
Answer: Yes.
For that, you need to have blender that can export to a .json model file. I will provide a complementary .blend file on the next build with some in game models and animations for people to modify and build on. NOTE: I will not be providing a tutorial on how to use blender or providing support related to “how to do 3D modeling” - way too big of a subject. Then it’s a simple matter of setting a new “meshId.”
MoveFiles are additional move/grab/sex data the game will load. They are analogous for moves as ItemFiles for items. However, there is one big difference, is that move files are key-value pairs rather than an array/list (the type in ItemFiles). Arguably, this is a bad idea because of inconsistency, but it’s something I don’t want to fix at this point.
For clarity, MoveFiles uses this form
{
“MoveName”: {
...
}
}
Rather than
[
{
“Uid”: “MoveName”,
...
}
]
AnimationsFiles are the actual animation data. These files is expected to be generated via blender rather than edited by hand. They are analogous to the mesh/model json files. An an individual animation file can contain many different animations.
Graphically, it looks like this:
Game <<---- Move Description <<------ animation(s) <<---- Animations files
Finally, there is DialogueFiles. There isn’t much cool stuff you can do with it yet. It’s mostly there to facilitate testing threesome moves if you edit a couple of lines ;)
And that’s it for a basic summary of how modding works. I think it’s pretty crude, and documentation thin XD, but hey, its functional (I hope). I am willing to expand it further/ provide better docs if/once people actually started to create cool things with it. But until then, my attention is back on making the game. If you got question on modding or not sure how to do X, feel free to ask in the #modding-related channel on the official discord.
Game <<---- Move Description <<------ animation(s) <<---- Animations files
Finally, there is DialogueFiles. There isn’t much cool stuff you can do with it yet. It’s mostly there to facilitate testing threesome moves if you edit a couple of lines ;)
And that’s it for a basic summary of how modding works. I think it’s pretty crude, and documentation thin XD, but hey, its functional (I hope). I am willing to expand it further/ provide better docs if/once people actually started to create cool things with it. But until then, my attention is back on making the game. If you got question on modding or not sure how to do X, feel free to ask in the #modding-related channel on the official discord.