Iceburg71 Posted November 24, 2022 Share Posted November 24, 2022 Is it possible to use probability when harvesting an animal to get or not get an item from it? or is there a way to specify a range say from 0 to 5 to get an item from harvesting an animal? or a combination of both? been struggling with this and I am either being an idiot because I have not worked on modding in a while, or it can't be done, or I just don't know how to do it. Thanks for any help. Link to comment Share on other sites More sharing options...
BFT2020 Posted November 24, 2022 Share Posted November 24, 2022 Not sure what you tried so far, but have you added a new line to the animal and added probability to it? For example, <entity_class name="animalStag" extends="animalTemplateTimid"> ......... <drop event="Harvest" name="foodRawMeat" tag="butcherHarvest" count="30"/> <!-- animalStag --> <drop event="Harvest" name="foodRawMeat" tag="butcherHarvest" prob="0.5" count="5"/> Not sure if this would work, never tried it myself Link to comment Share on other sites More sharing options...
Iceburg71 Posted November 24, 2022 Author Share Posted November 24, 2022 hmmm.. Haven't tried it like that yet. I will have to give something like that a go. I really want to do something like this as well for some animals to try and get a little more variety in what you get from some of them... this would give you anywhere from 0 to 10 meat. this is just an example... <drop event="Harvest" name="foodRawMeat" tag="butcherHarvest" count="0","10" Link to comment Share on other sites More sharing options...
meganoth Posted November 24, 2022 Share Posted November 24, 2022 (edited) 55 minutes ago, Iceburg71 said: hmmm.. Haven't tried it like that yet. I will have to give something like that a go. I really want to do something like this as well for some animals to try and get a little more variety in what you get from some of them... this would give you anywhere from 0 to 10 meat. this is just an example... <drop event="Harvest" name="foodRawMeat" tag="butcherHarvest" count="0","10" and it would probably fail. You have to write count="0,10" /> i.e. only one string and a closing bracket at the end. You could look at the existing code in vanilla xmls for examples. For example to get the syntax right now I just searched all the textfiles in Data/Config for the string "count" and among all those I immediately found one with a range. Also you can check for errors by looking into the directory ConfigsDump in the savegame after trying out a change. There you will see the resulting xmls. If your change is not there or an error is displayed you know the game did not accept your change. Edited November 24, 2022 by meganoth (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now