Page 1 of 1

Auto reset skills when changing class.

Posted: Tue Apr 05, 2011 12:21 am
by rock5
For my next project I think I will tackle this. This is for when changing class, not changing character. When changing character you would still need to load a new profile but when changing class you only need to change the skills.

So now for the brainstorming.

I've had an initial look at how it loads the skills. What it does is load the class specific skills and the general skills into settings.profile.skills and sorts them. This is done in the loadprofile function when loading all the other settings and I don't see a way to extract that process and do it separately. So what I thought I'd do is, instead of it saving directly to settings.profile.skills it would save all the class skills in a backup table eg. settings.profile.skillsbackup. This will hold the separate class skills and the general skills. Then at the end of the loadprofile function it can run another function eg. 'loadskills(class)' that copies the class skills and the general skills to settings.profile.skills and sorts them.

Then when player:update() updates the player.Class1 value it can check to see if it changed. If it did then it runs loadskills(player.Class1).

One last thing, at the end of loadskills() it will also rerun "setupMacros()" because when the class changes so does the action keys.

That's pretty straight forward. Did I miss anything?

Re: Auto reset skills when changing class.

Posted: Wed Apr 06, 2011 6:58 pm
by rock5
Hm.. No comment.

Anyway, I've committed it to rev592.

So now when you change class, the next time player:update() runs it will change the skill set and recheck the macro action key.

Note: if you change character you should still reload the profile.

Re: Auto reset skills when changing class.

Posted: Thu Apr 07, 2011 7:42 am
by lisa
Very nice =)

Re: Auto reset skills when changing class.

Posted: Sat Apr 09, 2011 11:24 pm
by kanta
Just want to say thanks for all your work on this.

Re: Auto reset skills when changing class.

Posted: Sat Apr 09, 2011 11:43 pm
by rock5
Rev 593 fixes a small bug when using hotkeys with your skills instead of 'macro'.