Aller au contenu

Photo

Controlling available classes via script?


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
Verilazic

Verilazic
  • Members
  • 162 messages

I had an idea to control what classes are available for the player to level up with in my module, but here's the tricky thing: I'd want to change what's available at different times within the module. For example, let them choose their first 3 levels at will, then force them to level up as a cleric the next 3 times, then de-level them and let them level however they choose.

 

The only way I know of to adjust available classes is through modifying classes.2da, is that it? Can anyone think of a way of having 2 different classes.2da that are used at different times? Or should I just start a Chapter 2 at the point where I want to adjust it?



#2
meaglyn

meaglyn
  • Members
  • 811 messages

You can do it by catching it in the onlevelup event. You'd need to de-level them if they chose a class that was not available. Since that's the case you'd want to have a way to tell them what they are allowed to pick to keep the frustration down.   Have you seen the CCS system?  It does that sort of thing. I borrowed pieces of that for the way I'm handling training requirements and class restrictions.



#3
WhiZard

WhiZard
  • Members
  • 1 204 messages

If you are just going to delevel them anyway, you could use LevelUpHenchman() (after giving enough XP to level up to the desired level).



#4
Verilazic

Verilazic
  • Members
  • 162 messages

You can do it by catching it in the onlevelup event. You'd need to de-level them if they chose a class that was not available. Since that's the case you'd want to have a way to tell them what they are allowed to pick to keep the frustration down.   Have you seen the CCS system?  It does that sort of thing. I borrowed pieces of that for the way I'm handling training requirements and class restrictions.

 

I hadn't seen that before. I'll check it out, thanks. And I'm guessing that OnLevelUp() is called after the player finishes the levelup process, not at the moment they reach enough xp?

 

If you are just going to delevel them anyway, you could use LevelUpHenchman() (after giving enough XP to level up to the desired level).

 

You can use that on a PC? Iiiiinteresting.



#5
meaglyn

meaglyn
  • Members
  • 811 messages

Yes. It happens after. That's one drawback. That's why I was suggesting you make it clear somehow what classes are allowed. In CCS if the player levels up in a class not trained in it delevels with a message so he/she can try again.



#6
Verilazic

Verilazic
  • Members
  • 162 messages

I'll do that. I'm doing weird specific stuff with this module, so it's no big deal to add one more explanation for the player. Thanks!