Is this hardcoded?

Started by BattleFate, March 14, 2014, 09:50:38 AM

Previous topic - Next topic

BattleFate

Someone in the suggestions thread was wondering if the Nutrient Paste Dispenser should be kept in the game, mentioning some very valid points as to why it didn't make sense to have it available right off the bat.

One was that building a complex machine, compared to lighting a fire in a makeshift stove makes it almost useless to worry about building in comparison. The other was the unhappiness it gives compared to the happiness you get from preparring a meal.

So that made me think... What if I made a mod to adjust the NPD into a better machine. Requiring first some sort of research to even build it (compared to stoves which can be made right away). But once they are built, there's an obvious advantage in that they require less storage space (compared to storing cooked meals), and don't require a colonist to be working on them.

That would lead to them being an alternative to a stove. Requires more power, requires more space, requires less storage and doesn't require a colonist to be 'working' it.

Then with subsequent research projects, we can both improve the nutrition value of the meals, decrease their unhappiness (or even providing a basic happiness bonus), and possibly coming up with a new compact unit much later on...

So I poked around the XML files a bit... and I was wondering... Is the interaction between the nutrient paste dispenser (meals?) and the research projects hardcoded? I can see where the research project exists to reduce the amount of food needed to make a meal. I can see where the NPD information is defined. But I can't see where the reference exists for the game to know that when you research Nutrient Resynthesis it should reduce the amount of food used... So is that part hardcoded? I was going to use that as a template on how to adjust the other factors, like happiness and nutrient value of the meal...

Architect

Yeah it is unfortunately. An if statement every time food is dispensed checks to see if the research is finished and takes the food cost down by one if it is.
Check out BetterPower+ and all its derivatives by clicking the picture below.

It adds many new methods of power generation and uses for it, as well as other things such as incidents.


BattleFate

Do we know if this will be changed for Alpha 3? It should be a particularly easy mod to implement, if the appropriate XML support is in place.

Architect

I don't think it would be that easy to implement at all? You could do it yourself with a bit of C# modding though.
Check out BetterPower+ and all its derivatives by clicking the picture below.

It adds many new methods of power generation and uses for it, as well as other things such as incidents.


BattleFate

I just re-read my above post. I meant: It (this mod) would be particularly easy to implement, if the link between research projects and effect on meals was put into the XML.

Architect

Oh right sorry, i was on my phone at the time and I tend to just skim read XD You're quite right in that respect :P
Check out BetterPower+ and all its derivatives by clicking the picture below.

It adds many new methods of power generation and uses for it, as well as other things such as incidents.


Serrate Bloodrage

I hope it gets xml'd. I want to use the nutrient paste in recipes on a new bench to make Preteggs, Fakon and Tricken...since theres no eggs, bacon and chicken on this planet, who wouldn't artificially synthesize them!?!
Nutrient paste sounds like the perfect base material :)
_______________________________________

If only my colonist could have 'personal time' to reduced stress =D