FenrirZeroZero / HydrocraftRedux

0 stars 1 forks source link

Replacing the Time Tracker #21

Open HugoQwerty opened 3 months ago

HugoQwerty commented 3 months ago

I've been tinkering with the basics of using the rot mechanic to replace the time tracker, starting with cows.

How it could work: Cow - female, not food, doesn't need to be fed (they eat grass, we shouldn't have to feed them) Bull - male, as above. Pregnant Cow - food item, uses the ReplaceOnRotten system so after X days it gets removed & replaced. 1) We could make pregnancy take a realistic amount of time (9 months) 2) We could make two pregnant cow items, that are identical except one turns into a 'Cow with Male Calf' & the other 'Cow with Female Calf'. 3) Or, we could have the pregnant cow turn into a cow that is ready to give birth, which requires some player action (a recipe), which then gives a lactating cow & an RNG male/female calf. 4) cows lactate for 10 months, however I think it would be interesting (annoying?) if we had a 'Cow & Calf' (x2) item that does not give milk, as the calf is drinking it - so if you want the milk you need to kill the calf (too realistic?). 5) The complex bit about a lactating cow is how to make it stop 6) Milking the cow & giving a 'Cow with no milk' item is easy, we just have that rot into a 'Cow with milk' after 1 day, but how do we then have that stop after ~300 days? 7) We could just have them be like the cows in Stardew Valley, so they just give milk every day forever (& maybe a higher food requirement for the 'Milk Cow' recipe, so its not just free milk forever) 8) Or, we do something more complex with mod data to store a counter for the number times the cow can be milked - but we can't replace cows when they rot then, because the mod data wouldn't be copied to the new item. 9) We could allow a cow to be milked when the food item is stale, remove the cow, then spawn a new cow with mod data copied and decreased by 1 until it hits zero.

Or we could just not bother because B42 is going to do it all for us. :D

HugoQwerty commented 3 months ago

Update: ReplaceOnRotten only works if the new item is also of type Food All food items can be used in Hydrocraft's 'Make Compost' recipes... maybe we should remove those and just use the vanilla compost mechanic, so you have to wait 2 weeks rather than getting it instantly?

HugoQwerty commented 3 months ago

Was thinking, as the rot mechanic works without the hassle of the time tracker - we could use it extensively.

For example: Making ingots give a 'molten' ingot that becomes solid after 24 hours. Maybe change the ingot molds to be Normal instead of Drainable so you don't get it back for 24 hours (& maybe a chance to not get it back, so you have to keep making more of them - not sure if that would be too annoying or not). This might create a lot of new recipes & items, although we could probably merge the recipes & give the ingot back within an OnCreate function.

HugoQwerty commented 3 months ago

Update: Food still has a condition value, which we can use to cap the number of time something can be done - e.g. cap the number of times a cow can be milked. It should be possible to have a cow that can be milked only when the food item is Stale, reset the item to Fresh to add a cooldown on milking, & also reduce the condition. Just need the rotten time to be so long it won't ever happen (& if it does, well you should look after the animals better)

HugoQwerty commented 3 months ago

Possible better solution, food items seem to be unique in that when they rot the values are copied over onto the ReplaceOnRotten item the game creates, so we can use that to pass on the counter for number of times the animal can be milked.

I've tested it with calories, but maybe carbs, lipids, or proteins would be better suited - maybe calories would be useful later when killing / butchering the cow?

HugoQwerty commented 3 months ago

On another post I suggested getting rid of the potted plants, but given that food isn't really an issue in PZ - maybe them being OP is not really a big issue. So, I was thinking, I should be able to make seasonal trees, e.g. an apple tree that you can pick apples from but only during apple season. 🤓

HugoQwerty commented 3 months ago

Just realised (D'OH!) - if someone changes the rot speed in the sandbox anything that uses the rot mechanic wouldn't work as intended. 😢