xamionex / DarkwoodCustomizer

A mod for darkwood that lets you customize: Any Player or Enemy (HP,Stamina,Speed,etc.), Item stats (dmg,stacks,etc.), Inventory Sizes, Generator Drain Speed, Time Speed, and more!
https://www.nexusmods.com/darkwood/mods/22
MIT License
1 stars 0 forks source link

Customizable npc loot #20

Closed user7562 closed 3 weeks ago

user7562 commented 1 month ago

self explanatory. option to add random amounts of said item would be good to have as well.

xamionex commented 1 month ago

Test in 1.4.3 please CRI's are generated when loading a save or whatever you're wanting to configure gets spawned by the game

user7562 commented 1 month ago

Test in 1.4.3 please CRI's are generated when loading a save or whatever you're wanting to configure gets spawned by the game

config file is blank

xamionex commented 1 month ago

Did you enable the Custom Random Inventories option in the cfg?

user7562 commented 1 month ago

Did you enable the Custom Random Inventories option in the cfg?

yes

xamionex commented 1 month ago

Try making a new save, and if loading it doesnt generate all the cri's try making it to day 2 on that same save

user7562 commented 1 month ago

Try making a new save, and if loading it doesnt generate all the cri's try making it to day 2 on that same save

yes, that did the trick. i also figured out that the the shell item from bugs is actually called chitin. Other than that the log keeps spewing errors saying the following:

[Error :DarkwoodCustomizer] [USERCUSTOMRECIPES] Item weapon_submachine_full does not exist, stopping as to not break the plugin!

this same error popped up when i had this item registered in the customitems file as well

xamionex commented 1 month ago

That happens in this line of code here in case when the item being loaded, wasn't loaded by the game and my plugin also can't load it, which means it's an NRE (NullReferenceException, aka doesn't exist), try finding something similar to that in the itemlog, maybe it's called something else

user7562 commented 1 month ago

That happens in this line of code here in case when the item being loaded, wasn't loaded by the game and my plugin also can't load it, which means it's an NRE (NullReferenceException, aka doesn't exist), try finding something similar to that in the itemlog, maybe it's called something else

i literally just copy pasted that item's name from the item log. you must've coded it wrong

xamionex commented 1 month ago

Can you try weapon_submachine_01_full instead And if that doesnt work try without the _full

user7562 commented 1 month ago

Can you try weapon_submachine_01_full instead And if that doesnt work try without the _full

yes, that did it, now it works thanks. Now i have a question on how the chance values work. if the chance is set to 1.0 does that mean its a 100% chance of spawning? or is it 0.100 instead?

xamionex commented 1 month ago

1 is 100%

user7562 commented 1 month ago

1 is 100%

1 as in 1.0? or just 1

xamionex commented 1 month ago

1 is 100%

1 as in 1.0? or just 1

Yes

user7562 commented 1 month ago

1 is 100%

1 as in 1.0? or just 1

Yes

so if i want the chance to be 50% how do i do it? i keep seeing the other item's chances being 0.598 or 0.678 for example,

xamionex commented 1 month ago

I'd say 0.5

user7562 commented 1 month ago

I'd say 0.5 and how do i make the chance between say like 20 or 40? do i just do 0.24 and 0.33?

xamionex commented 1 month ago

It's a float and is probably used like 100% chance being 1.0 and 0.01 being 1% chance I haven't looked into the code for it to see how it functions but that's how i'd do it

user7562 commented 1 month ago

It's a float and is probably used like 100% chance being 1.0 and 0.01 being 1% chance I haven't looked into the code for it to see how it functions but that's how i'd do it

i see, thanks.

user7562 commented 4 weeks ago

Test in 1.4.3 please CRI's are generated when loading a save or whatever you're wanting to configure gets spawned by the game

its partially working, so far ive only seen it work with traders nothing else

xamionex commented 3 weeks ago

Can't figure this out for the life of me, this will take a while

xamionex commented 3 weeks ago

Added in 1.4.6, check out the wiki if you need help with it