Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Modding better production of Wood (Types/Amounts) [Help?]  (Read 1742 times)

Drakonis

  • Bay Watcher
    • View Profile
Modding better production of Wood (Types/Amounts) [Help?]
« on: August 26, 2022, 10:06:57 pm »

Hi Everyone,
Along with some ideas for modding Firewood I thought of some other ideas involving Trees and Wood-Farming in general. Could Anyone point me towards on how to implement some of those?

Chopping Trees Provide Firewood in addition to logs:
Spoiler (click to show/hide)

Creating [Grown] wood through Tree Farms
Spoiler (click to show/hide)
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Modding better production of Wood (Types/Amounts) [Help?]
« Reply #1 on: August 29, 2022, 02:40:00 pm »

Well, for the first one i think its not distinguishable to have a tree drop more than one material the tree defines itself structurally (you dont have a choice to selectively take anything other than the trunk). So I would have a reaction that breaks it up wherever applicable into four logs/objects of the firewood type, which can be each pushed through a woodburning furnace for multiplicative gains.


As for the second one, you can set up the 'grown' flag via DFhack scripts, then tie it to specific workshop recipies due to the flag not being applicable ingame via your own crafting without it. To get any sort of direct things done, normally dues-ex-machina wood generation like you see in vanilla elf-themed modifications usually have some sort of shrine or offering of equvilent exhange.

Actually growing the ingredients in normal farmplots then processing them through to different stages is a different thing entirely, I've seen mods where people take farm grown "saplings" then push them into workshops to make a seed & reusable wood.

Sense of balance is up to you really though.
Logged

Drakonis

  • Bay Watcher
    • View Profile
Re: Modding better production of Wood (Types/Amounts) [Help?]
« Reply #2 on: October 21, 2024, 03:14:21 pm »

Só... I've finally picked this up again after 2 years...
After generating a few world trying to find the modded trees to get their seeds and try it I just realised it could be much quicker to test if I simply embarked with those. SO.....

Can anyone help me on how to modify the Mountain entity so I can Always get the seeds I want on embark?
Logged

jecowa

  • Bay Watcher
    • View Profile
Re: Modding better production of Wood (Types/Amounts) [Help?]
« Reply #3 on: October 22, 2024, 02:51:16 am »

I suspect the seeds you embark with is hard-coded. If you want to embark with it, might need to swap out your custom plant with one of the starting 6. Rename the one you replace to something else, and you can probably still find it in the caverns later.

I did some test with modded crops. If you add [TREE:LOCAL_PLANT_MAT:WOOD] to a crop, it's no longer plantable.

Replacing a crop's PLANT_ALCOHOL_TEMPLATE section with this didn't prevent me from planting it:
Quote
   [USE_MATERIAL_TEMPLATE:WOOD:WOOD_TEMPLATE]
      [STATE_NAME:ALL_SOLID:almond wood]
      [STATE_ADJ:ALL_SOLID:almond wood]
      [PREFIX:NONE]
       [SOLID_DENSITY:795]
Don't know what that will do, though.
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Modding better production of Wood (Types/Amounts) [Help?]
« Reply #4 on: October 22, 2024, 10:11:34 am »

You're going to have to cheat for just your development purposes, construct a workshop reaction that converts seeds into wood (or out of nothing) and assign it to the civ and it'll always be there with you on embark. The upcoming modding API will add a bit more ways to distinguish what should be worldgen and fortress only to keep a lid on this kind of thing.

Permitted jobs take from the enviroment, which so long as its roughly placed in the surroundings of the civ, should always create consistent material sheets without messing with DFhack to artificially add materials. Woodcutters look in the surroundings for trees with some sort of seed to promote saplings (in 47.05 glumprongs could be farmed with use_evil_wood, but can't because they are sterile, in 50. saplings are autonomous) those types of wood is egible for carpenters on another permitted job on a entity level.

Saying your reaction is made out of no reagent, is basically a free pass to not trip up on this logic, vs looking for materials in the local area that don't exist or aren't sourcable. You can daisychain unattainable things from raw materials, coins are also another thing that exists seperate, being both metal worked on the permitted job listing and also tokened onto the civ to know to have gold coins meaning a value of 100 currency units for account tracking and adventuremode.
Logged

Drakonis

  • Bay Watcher
    • View Profile
Re: Modding better production of Wood (Types/Amounts) [Help?]
« Reply #5 on: October 30, 2024, 10:08:20 am »

You're going to have to cheat for just your development purposes, construct a workshop reaction that converts seeds into wood (or out of nothing) and assign it to the civ and it'll always be there with you on embark. The upcoming modding API will add a bit more ways to distinguish what should be worldgen and fortress only to keep a lid on this kind of thing.

Permitted jobs take from the enviroment, which so long as its roughly placed in the surroundings of the civ, should always create consistent material sheets without messing with DFhack to artificially add materials. Woodcutters look in the surroundings for trees with some sort of seed to promote saplings (in 47.05 glumprongs could be farmed with use_evil_wood, but can't because they are sterile, in 50. saplings are autonomous) those types of wood is egible for carpenters on another permitted job on a entity level.

Saying your reaction is made out of no reagent, is basically a free pass to not trip up on this logic, vs looking for materials in the local area that don't exist or aren't sourcable. You can daisychain unattainable things from raw materials, coins are also another thing that exists seperate, being both metal worked on the permitted job listing and also tokened onto the civ to know to have gold coins meaning a value of 100 currency units for account tracking and adventuremode.

Following your reasoning. I could just make custom reactions to create the seeds for testing, no?
Wouldn't even need to embark them
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Modding better production of Wood (Types/Amounts) [Help?]
« Reply #6 on: November 02, 2024, 03:47:43 am »

No reason you ought not to, but its not a significant leap in any indoor or outdoor gardening society, more so if your civ is carnivorous and has no necessity for agriculture. Then you'd have to introduce seeds via reaction.
Logged