Trees and Crops ?

Place for sharing your game modifications for Life is Feudal: Your Own

Lloyd.graham
 
Posts: 4
Joined: 11 Oct 2020, 04:32

Trees and Crops ?

Post by Lloyd.graham » 11 Oct 2020, 05:23

not exactly a coder or a Modder myself more a dabbler but I started my own server and had a few ideas I wanted to try involving adding some things, so I look a look at the code we seem to have access to but I couldn't seem to find what I was looking for. this might be due to my lack of ability or it just might be we don't have access.
so the first bit was that got me into this is I noticed mulberry's and Oak do not produce nuts (well acorns) nor berries (you get silk instead I guess but not to my likening) so I wanted to try to add these ... I can add the skill to the respective trees but failed to find the function that causes the trees to "grow" these respective items. (tried looking at branches and bark to see if I could find how they spawned in as well but no luck)
this brings me to the other thought I had had ... I had thought of adding a few different crops however again I seem to have failed to locate the function that makes crops grow.
so my question I guess is is do we have access to the code involved in either of these functions ?

User avatar
KuraiSeraph
 
Posts: 39
Joined: 27 Mar 2017, 12:30

Re: Trees and Crops ?

Post by KuraiSeraph » 21 Oct 2020, 11:50

Hi there,

to grow Nuts on Oaktrees go to your client folder than
art/forest/treeDatablocks.cs open it with your texteditor or notepade++

Than search for new TSForestItemData(Natural_Oak_Ill_Medium : Oak_Ill_Medium_Base)

that is the Oaktree qualitiy < 33 lvl 2 planted by Natur

add gatherables[3] = "1396 2";

(1396 is the Nuts ID, 2 is quantitiy)

next line is the Oaktree qualitiy 33-66 lvl 2 planted by Natur and so on.

scroll down to the Oaktree planted by Player and add the code again.

Save it an make a copy of the cs file. Go to your serverfolder.
art/forest past the cs file in and rename the treeDatablocks.cs.dso to someting else.

crops are different and i dont know how to add new ones.

Kurai


Lloyd.graham
 
Posts: 4
Joined: 11 Oct 2020, 04:32

Re: Trees and Crops ?

Post by Lloyd.graham » 28 Oct 2020, 06:19

Thank you! sorry its late I had been wrapped up in a few other projects and forgot to check back. this helps get at least one nagging thing off my back and with the knowledge I have gained recently In how to add items I could probably do it up properly and add acorns, I can also fix up mulberry's as well (I am weird I know it just nags me when a resource is left out that should otherwise be useable) If I ever figure out how to add crops I will post it cas I get the feeling a lot of people would be interested in that :)

also Never would have thought to look in the art folder I figured something like that would be in the data folder makes me think I need to explore the other folders more

User avatar
KuraiSeraph
 
Posts: 39
Joined: 27 Mar 2017, 12:30

Re: Trees and Crops ?

Post by KuraiSeraph » 29 Oct 2020, 21:32

For your own crops there is some stuff to check.

- 2D Image (art/2D/Items)
- 3D Model (art/models/3d/environment/cropsnew)
than there is a folder cropsspeedtree don´t know for what and can´t editing it
- Terrain (art/terrains)
- Texture (art/textures/GroundCover)
- Crops wild (data/gatherables.xml)
- Object (data/objects_types.xml)
- Skill (data/skill_types.xml)
- Substances (scripts/cm_substances.cs)
- File that use the cropsspeedtree (scripts/client/cm_environment.cs)

Maybe there is more or not.

Check the server if there the same files with dso, this u can change with the client cs file.

Kurai


Lloyd.graham
 
Posts: 4
Joined: 11 Oct 2020, 04:32

Re: Trees and Crops ?

Post by Lloyd.graham » 03 Nov 2020, 01:13

so after looking through the code and a fair bit of trial and error I have come to an unfortunate conclusion. Unless you can add more skills to the game (from what I have read you can not or at least it is very hard) as the way crops are handled is each one has a separate ability for planting and harvesting (except wild ones they seem to run off a XML list). this also means things like berries for the mulberry trees and other fruit trees can not be added without adding a skill for it as regular berries are incompatible.
So basically from what I can tell your ability to add functioning new exotic or more appropriately medieval themed crops/trees/fruits etc hinges very much on your ability to code into the game new skills.
you can add these items into the game and even put them on trees however there is no way to get them out the new crops you could add into your inventory via admin commands but never plant or harvest them.
The reason Nuts worked is because nuts from trees and trees that have nuts already exist so it was as simple as telling it (oh this tree type too)

at this point I am close to the limit of my skills in this area as lack the skill and programs to deal with the files I suspect are involved in ability and skill creation

the game is fun and has so much creative/modding potential to it that its a shame that a lot of it seems to be locked in places that are hard for people to reach


Lloyd.graham
 
Posts: 4
Joined: 11 Oct 2020, 04:32

Re: Trees and Crops ?

Post by Lloyd.graham » 03 Nov 2020, 22:10

I thought it was something like that sadly (tis a shame) it would be the same for all the crops I believe as well. My assumption is that skills/abilitys themselves are handled there in general thus why I figure the ability to add new plants and fruits (pears plums cherries eggplant parsnips etc) hinge on the ability to outright add a new skill/ability ID. my capability's are not of that level though and I can only speculate from other games where I have seen masive modifications that its possible but likely requires very high programming/modding skills. I can think of maybe some very messy backwards ways that might work but are honestly probably not worth the effort as it would at best be glitchy if it worked at all.

P.s ... fibers from trees should be doable tbh all you would need to do is create a recipe with bark that turns it into fibers something that has been done real life in the past and can even be seen done in some of the primitive technology youtube channels

Return to Game mods