Change the way the Fuel Generator works

Hello, I am a begginner at modding, and just wanted to make a "simple" mod (that's what I first though) for my friend and me. I'll explain there : My friend had a great idea, make a challenging world where we can't use infinite power (coal, normal fuel or nuclear) and see where we can go. It means we need to farm mobs to get energy through their proteins, by changing them into solid biofuel. Thanks to the somersloop, we can have a massive amount of solid biofuel, and put it into a massive amount of biomass burners. We wanted to double the production, by transforming this solid biofuel into liquid biofuel (using the somersloops again). This would have require less space, and produce a bit more than twice the amount of energy. But there is a problem : while the biofuel burner only produce what is consumed, the fuel generator always consume to produce the maximum amount of energy (so we would be in lack of resources quickly). That's where I wanted to create a mod, where fuel generator, while using liquid biofuel, would work in the same way as the biofuel burner. I don't know if that is possible, but while following the tutorial for making a mod and looking into the parameters of the generators, I found the thing I want to change : Untick "the M is Full Blast" (see image of the post) on the fuel generator (it would means every fuel would work like this, but I don't really care because we won't use any other fuel). That's where I understood that, in the tutorial, they tell you how to CREATE something, but not how to MODIFY something already existing. I found another tutorial about "Overwriting and Modifying Existing Content" but this seems very complicated for a beginner like me. That's why I am coming to you : 1) Do you know how to do it simply ? Do you think I can do this ? 2) DO you think it is possible to modify the way the fuel generator works with only the liquid biofuel ? (if not, this is not a big deal, but that would be interesting) Thank you, Noctolis
No description
6 Replies
Robb
Robb4d ago
the fuel generator always consume to produce the maximum amount of energy (so we would be in lack of resources quickly).
this is not what you are asking but it might also help you make your mod - Power Storage exists to store excess energy produced by always-on producers - I am pretty sure there is a flag on the generator buildings to make them behave "on demand" like they used to pre-...update.... uhh idk it was a long time ago oops I didn't finish reading, I think it's the full blast flag you want yeah you will need to perform a CDO edit on the generator and you might also need to modify existing generators when the save loads, not sure take a look at Example Mod for a code example of CDO editing a schematic the process for a building will be similar assuming you don't need to modify existing generators too making it behave that way only for liquid biofuel might be possible but would need some hooking shenanigans although the easiest way to handle this for your testing would probably be to make sure power storage is available before fuel generators you might also want to CDO fuels to change their energy values to balance how much fuel collection vs factory building you have to do
Noctolis
Noctolis4d ago
Yeah this is some things I need to think, but maybe it would be a later change, when we'll see the limits of this challenge I will try to read this calmly, it seems like a lot to process
Robb
Robb4d ago
the ExampleMod example is in the dev branch and not the master branch of the project right now you will have to switch branches with git, or redownload the project zip if you went that route (I highly suggest git instead) you could probably download zip of dev and swap in just ExampleMod's files if you went the zip route
Noctolis
Noctolis4d ago
Ok thank you for these informations, I cloned the git so I think i'll have to clone the branch
Archengius
Archengius4d ago
The flag is on the power info component and is called mIsFullBlast I'm pretty sure, just change it to false
Robb
Robb15h ago
any luck?
Want results from more Discord servers?
Add your server