There was no music playing, and there were no game buttons (they weren’t just invisible, they actually couldn’t be pressed).
Did the PU/Devlog thingie work?
How did you decide to compile the mod? This specific section should still work and is what I would have recommended here: Modding - Thrive Developer Wiki
So basically grab the latest 0.8.0 Thrive.pck, extract it delete everything except the files you want to modify. Then modify those files and finally run godotpcktool --action add MyMod.pck --remove-prefix extracted extracted --set-godot-version 4.2.0
(that last bit might be why you said later that the game didn’t want to load the pck file).
I did in-fact open an issue today on my godotpcktool that it might be good to default to Godot 4 but for now creating new .pck files meant for Godot 4 requires specifying the version explicitly:
I updated the modding wiki page a bit to add info on specifying the target godot version for the pck tool.
How to edit game code with a mod? I want to create a mod to be able to create multiple nucleus in a cell.
What would multiple nuclei give the player?
Funnily enough there was a bug present until recently where you could place multiple nuclei by using the symmetry mode.
Also shouldn’t you have some knowledge of the code thanks to your phosphoplast mod?
I obtained phosphorus through nitrogenase using a json file, but here you also need to edit the .cs files.
Which is not the same thing as a .pck file, I can imagine.
Harmony is used in Thrive as the way for mods to patch any code in the game. I think the modding wiki page has an example on how to use it.
Edit:
But actually hang on, isn’t the “unique” property in the organelle json what makes it so that you cannot place multiple nucleai? If turning that off doesn’t work then you could maybe even send a patch to the main repo to fix that so that your mod could easily work in the next Thrive release.
That sure will make it more motivating to work on this mod if it has the chances to not just be a mod, but become a part of the base game.
I meant that as a if turning off the unique property doesn’t allow placing multiple nucleai, then that implies a bug in the base game handling of the unique status. Fixing that bug will then mean that a mod to allow multiple nucleai is just a single line to toggle off the unique status of the nucleus.
I see. Now only to find that one line of code in the sea of a game’s code…
This works, but eukaryotic organelles do not unlocks. In addition, I also want to make sure that additional nucleus give some kind of positive buff.
Ah yeah, there’s that expected legacy code related to nucleus checking causing bugs.
That specific case is:
Which doesn’t really make much sense to be written like that anymore (it was made like that way back when the nucleus checks where done by comparing the organelle name). So yeah, unfortunately this is a case that needs probably a bunch of one line fixes in many places to correct the nucleus handling.
So what should I do then?
You need to fix these bugs either way in a mod or in the main Thrive repo, so I kind of recommend doing it in the main Thrive repo as a pull request as that’s easier, because Harmony is harder to use than just modifying C# code and putting the change in the main Thrive benefits everyone else as well. This has slight difficulties if you’ve never contributed to Thrive before.
If you just want the easiest thing then you need to make a Thrive fork where you make your mod in it. Then you’ll have a custom version of Thrive with the mod (but this is not really recommended as multiple mods can’t be used this way).
I guess there’s a bunch of such code pieces which no longer really do anything in the newer releases but litter up the codebase?
This isn’t one of those cases, but there surely is a little bit of useless code leftover from older versions that are no longer necessary due to other changes.
But this is just a case where code that has been updated over the years is in a state that doesn’t fully make sense anymore. Like if the code was written now a different approach would be used but as the code was originally very different and it’s been updated it has ended up looking like it does now. Does this explanation make any sense?
Oh I see, so the code was updated so many times that now it’s hard to recognize to it’s original form.
how to make a pull request?
Here’s an excellent document describing how to work on GitHub: GitHub Standard Fork & Pull Request Workflow · GitHub