Aller au contenu

Photo

Custom class ScriptVar requirement?


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

#1
Khaevil X

Khaevil X
  • Members
  • 5 messages
 How is the requirement type var implemented?  There's a few classes that use such a requirement, like assassin and pale master, but there's no script called X1_AllowAsasin and I can't find it in any of the scripts.

#2
Khaevil X

Khaevil X
  • Members
  • 5 messages
I've tried testing this with X1_AllowShadow
Setting a value of 0 or 1 as a local int for the module, or the pc, neither prevents taking shadow dancer on level up. Writing a script called X1_AllowShadow to return a 0 or a 1 with a StartingConditional function doesn't prevent taking shadow dancer either, nor does the script ever seem to get called.
This VAR requirement which is in the cls_pres_XXXX for pretty much every prestige class seems to do absolutely nothing?

#3
The Fred

The Fred
  • Members
  • 2 516 messages
As I remember it, this is a variable which must be set on the PC to allow (not disable) the class. You might have to change the 2da file so the required value is 1 rather than 0, though. At least, it worked in NWN1, but it may have been removed for NWN2.

#4
Khaevil X

Khaevil X
  • Members
  • 5 messages
I tried that, didn't work. Seems to be non-functional for NWN2.

Now I'm making a workaround that has the GUI run a script after generating the class list. I can't find any reference for the variable names for the lists so right now I can remove classes entirely from the list, but, not simply disable them. I also have to do a custom initial selection and recommendation to prevent having undesired classes selected by either of those methods. I can probably disable the next button based on the currently selected class, but, it won't be grayed out like it's supposed to be.

Anyone happen to know how to disable rows on the class_LIST listbox in the SCREEN_LEVELUP_class screen? This is the first time I've tried modifying the GUI so I'm in unfamiliar territory.

#5
The Fred

The Fred
  • Members
  • 2 516 messages
Removing classes from the list is exactly what I did with my Restricted Companion Multiclassing pack. To grey out the buttons, there should be a scripting function which will disable them, I'm not sure.

Incidentally, I don't think it covers this specifically, but you might find looking at 0100010's Enhanced Levelup System helpful.

An alternative might be to make the classes require feats the way the Shadow Thief and NW9 did in the OC. These feats could be given to players when they meet the other requirements. It could be somewhat immersion-breaking, though.

#6
Khaevil X

Khaevil X
  • Members
  • 5 messages
Issue with using feats is a new character doesn't actually have feats at the class selection stage, so trying to add requirements to a base class prevents creating characters of that class.

Those links contain examples of many gui functions I wasn't aware existed. I won't have time to go through it until this weekend, but, it looks helpful.

Thanks

#7
The Fred

The Fred
  • Members
  • 2 516 messages
So you're trying to disable certain base classes during level up? I think your best bet might just be to remove them from the list, or to have a message pop up when you try and click next which says something like "Such-and-such a special reason prevents you from taking this class now". Obviously it'd be better if they were greyed out, but I'm not sure if you can do that directly. You might be able to make the buttons disable themselves when a local var is set on them, though. I can't really remember - GUI is badly documented and my memory of what works and what doesn't is kinda foggy, I'm afraid.

If you haven't, look for the GUI page on the NWN2 wiki. It's a bit (read: a lot) of a mess, but it has some handy links at the bottom.