Jump to content

New features for Character Level System


Recommended Posts

Hello Modders,
I am trying to make a Level-Up system for the standard characters of DST and I use Kzisor's template which he also used in his mod 'Wortox, the Demon King'.
Link to the template:

 

I got the basics of this mod working for Wigfrid and Wickerbottom. They get a set amount of levels. I customized the exp formula from being linear to a small exponential growth. I would like to add some other features and need your help.

1: EXP for other actions than eating and fighting - for peaceful players.
Mostly done, but still doing this by overwriting the normal actions which might cause incompatibilities with other mods which do the same. If you know a simple way that gives the Exp after calling the action without changing the action.lua itself, please tell me.  Maybe calling the action from a local function with some kind of fallback to the local function to give the exp there?

They get experience for eating, killing stuff and Wicker for reading her books.
For the last part I added an actions.lua to my mod, which potentially might cause compatibility issues with other mods and therefore probably is bad practice.
Also when trying to overwrite the CHOP action with the same function which got a :PushEvent command added (to message the exp gain to the level-system) my client crashes, where the same approach worked for reading books. ¯\_(ツ)_/¯
There probably is a better way to check if an action was performed (or will be performed) correctly and then push the event. Would not like to push the event first, so I don't know for sure how I could use the practice of copying a given function as a local old_function and using new_function to push the event and afterwards call old_function - which is better for compatibility but might cause glitches for the level system as you could start and action, get the exp and cancel the action and repeat.


2: Also I'm struggling to implement the level-up badge which is supposed to show a characters progression towards the next level-up, which works in the Wortox mod and in a Groot mod. :(

I tried to use the Wortox badge for testing, but it didnt even show up or crashed my game. I'm obviously using the template in the wrong way. Does it matter that the badges are supposed to be given to different 'custom' characters within one mod?

 

3: When that is done I will apply the level system to the other characters too. Wolfgang, WX-78 and Woodie might be a little puzzle as Wolfs stats are scaling, WX already has it's own level system and Woodie's stats change in beaverform.
 


I would like to approach these 3 problems in said order and I am including my playable WIP to this thread.
Please reply if you think of this mod as promising and if you think that you could help me with at least one of those issues. 

 

workshop-1529312031.rar

Edited by KainMorgen
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...