Hi! This is a request to refactor the way the spawn chance for a poison birchnut to spawn is determined.
local chance = (TheWorld.state.isautumn and TUNING.DECID_MONSTER_SPAWN_CHANCE_AUTUMN) or (TheWorld.state.isspring and TUNING.DECID_MONSTER_SPAWN_CHANCE_SPRING) or (TheWorld.state.issummer and TUNING.DECID_MONSTER_SPAWN_CHANCE_SUMMER) or (TheWorld.state.iswinter and TUNING.DECID_MONSTER_SPAWN_CHANCE_WINTER) or 0
Currently it does this ternary which has bad support for possible modded seasons.
I would like to ask if the logic would instead be:..
--prefabs/deciduoustrees.lua@521 local chance = TUNING.DECID_MONSTER_SPAWN_CHANCE[TheWorld.state.season] or 0 --tuning.lua DECID_MONSTER_SPAWN_CHANCE = { ["autumn"] = .15, -- high chance of monsters in autumn to cancel out double birchnut and general easyness of autumn ["spring"] = .08, -- next highest in spring because everything attacks in spring ["summer"] = .033, -- low chance in summer since summer is hard anyway ["winter"] = 0, -- can't make monsters in winter, they have to have leaves },
Then modders will be able to easily add their own tuning values without need for any egregious hooks.
Thanks!
Steps to Reproduce
1. Implement a custom season and watch in woe as you are unable to spawn a deciduous monster!
2. (You aren't really going to do step 1)
- 2
There are no comments to display.
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