SgtPineapple1st Posted December 8, 2015 Share Posted December 8, 2015 For the character I am making, I want to have multiple stat changes based on different conditions. First there is the movement and attack speed boost when holding a weapon. Secondly I would like his health, sanity, sanity drain, hunger, and hunger drain to change when it is winter. Is this possible in Don't Starve? Link to comment Share on other sites More sharing options...
ZupaleX Posted December 8, 2015 Share Posted December 8, 2015 Use in the constructor function of your character a WatchWorldState for the season thingy.For the first point, i would use a ListenForEvent and catch the "equip" event to check which item was equipped/unequipped and apply stats changed accordingly Link to comment Share on other sites More sharing options...
Kzisor Posted December 8, 2015 Share Posted December 8, 2015 @SgtPineapple1st, it's unclear if you're wanting to create a mod for Don't Starve or Don't Starve Together; you simply stated Don't Starve yet you posted in the Don't Starve Together section. While @ZupaleX's post tells you how to do it in Don't Starve Together; if you tried to use the same code in Don't Starve it would not work correctly. In Don't Starve you'd have to ListenForEvent 'seasonchange' and then if you're wanting it to work with Shipwrecked you would have to completely code it for that separately yet again because Shipwrecked doesn't have 'winter' it has different seasons. Link to comment Share on other sites More sharing options...
SgtPineapple1st Posted December 9, 2015 Author Share Posted December 9, 2015 @SgtPineapple1st, it's unclear if you're wanting to create a mod for Don't Starve or Don't Starve Together; you simply stated Don't Starve yet you posted in the Don't Starve Together section. While @ZupaleX's post tells you how to do it in Don't Starve Together; if you tried to use the same code in Don't Starve it would not work correctly. In Don't Starve you'd have to ListenForEvent 'seasonchange' and then if you're wanting it to work with Shipwrecked you would have to completely code it for that separately yet again because Shipwrecked doesn't have 'winter' it has different seasons.Ah thank you. Yeah I meant don't starve together. My friend and I are both making characters. I will look for @ZupaleX's post. Link to comment Share on other sites More sharing options...
SgtPineapple1st Posted December 9, 2015 Author Share Posted December 9, 2015 Use in the constructor function of your character a WatchWorldState for the season thingy.For the first point, i would use a ListenForEvent and catch the "equip" event to check which item was equipped/unequipped and apply stats changed accordingly I took a look at a few mods that have seasonal changes such as for farming or in the calendar mods. Most of them used GetSeasonManager() and checked season:IsWinter or season:IsSpring. I haven't tested it as I've been doing a majority of my coding at school. Link to comment Share on other sites More sharing options...
ZupaleX Posted December 9, 2015 Share Posted December 9, 2015 That's for checking what is the current season, even though it's some remains from don't starve. You should use TheWorld.state.season and different other TheWorld.state members to do this kind of checkings. 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