Modifying organelles.json

I have ran into an issue when attempting to edit the compounds which are dropped when you kill another cell; to be specific, I attempted to add glucose drops in both cytoplasm and chloroplasts. When I save the changes I have made to the organelle.json file and run Thrive, the program immediately crashes and I see this:

“child process exited with code 3765269347”

I assume the issue has to do with this topic; however, I am not really sure how to apply what the post says to my situation. Would I have to download Cmake and utilize a tool in the program itself?

2 Likes

Let’s make a new thread.

I’m guessing that the problem is that adding a new compound that is unexpected to be part of the cost of an organelle (glucose) breaks something, or you may have written invalid json.
You should check what is printed in ThriveLog.txt or what the game outputs if you run Thrive.exe in command prompt.

Though, I doubt that the current organelle system can be changed to used what you want to do. Instead this likely needs changes to scripts/microbe_stage/microbe_operations.as to the kill kill function, currently starting at line 1074: https://github.com/Revolutionary-Games/Thrive/blob/master/scripts/microbe_stage/microbe_operations.as#L1074

Turns out that it was indeed a syntax error. I needed to insert a comma after the line above the last compound, from

“initialComposition”:
{
“phosphates”: 2,
“ammonia”: 2
“glucose”: 2

to

“initialComposition”:
{
“phosphates”: 2,
“ammonia”: 2,
“glucose”: 2

Thank you for the help. Where should you suggest I offer my commentary on how my edit changes gameplay, if you think such feedback would be useful?

Edit: Nevermind, it seems that making glucose drop from organelles increases the glucose consumption cost of cells which have those organelles, which means that the player basically always runs out of glucose immediately no matter what as soon as they spawn in. How would you suggest I tackle this utilizing the kill function? I also notice that this component of Thrive runs on angelscript; what would you suggest I use to edit it, as my computer wants me to use adobe animate.

Probably Visual Studio Code as that is what I would normally use, or for more lightweight use Notepad++, both works well and is open-source. you might need some kind of extension for angelscript in VS Code to enable the code highlighting. Don’t know what hhyryylainen uses though.

1 Like

When on windows I use notepad++ for editing angelscript. On Linux, where I usually work on thrive, I use emacs with the C++ mode on angelscript files, which works fine most of the time, there are just a few AS syntax differences to C++ that it doesn’t properly understand so in those places I need to manually tweak the indentation.

1 Like

I would suggest that you add code, for adding glucose to compoundsToRelease, starting at line 1141 of microbe_operations.as That should then eject the glucose along the other compounds released on cell death.

I think you could release your changes as a mod on Modding and have people try it out. I think you should be able to create a zip that could be just unzipped on top of the game files and contain just the changed files.

1 Like

A post was merged into an existing topic: THE NEW Miscellaneous Talk That Doesn’t Deserve A New Thread Thread Thread

Alright great, I’ll begin working on it. Considering that my background in programming is limited to one of those coding workshop activities in which I programmed Flappy Bird by placing blocks around, it might take a while for me to make it work, but I’ll remain persistent by looking into basic coding tutorials.
I’m not sure if this would be the right place to ask, but considering my coding efforts have to do with this, is there a reason why glucose isn’t dropped from dead cells? In current Thrive, I feel that there is no reason why a player wouldn’t develop chloroplasts, as predation is currently rather inconsistent and unrewarding.

The reason is pretty simple: cells on death drop some of the compounds they were holding as well as some of the compounds that their organelles are made up of (and also shoot off some of the remaining agents). It’s an easy to understand / reason about system, unlike magically appearing glucose from kills.

2 Likes