Aller au contenu

Photo

restricting PC class in module


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

#1
Games For Learning

Games For Learning
  • Members
  • 58 messages
Hi All,

I've just done a cursory search of this forum and can't seem to find if there is a way to restrict allowed character classes for a module. I'd like to not have magic users of any sort initially and later allow them to either multi-class or start over with the same basic stats.

Thanks in advance.

#2
Dann-J

Dann-J
  • Members
  • 3 161 messages
I'nm guessing you'd have to edit classes.2DA, and modify the 'Playerclass' column from 1 to 0 for those classes you don't wan't supported.

http://nwn2.wikia.com/wiki/classes.2da

You'd have to have the modified 2DA in the override or campaign folder, rather than in a HAK, in order for it to have any effect during character creation.

You'd still run into trouble with existing characters though. Perhaps a better option would be to check what class the player is when the module starts, and then allow the player to re-level the character in a different class via a conversation.

Modifié par DannJ, 27 février 2012 - 02:22 .


#3
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
Since character creation happens before the player is actually loaded into the module, there's no easy way to restrict the player's choices at character creation. You could always do your own 2DAs, like people do for custom classes, though.

A simple fix would be to do a simple check at the beginning of the module, either with the on-player-loaded script or in your initial conversation, if you have one. If the PC has an inappropriate class, tell them what they did wrong and prevent them from advancing the plot any further, or just hit them with a severe and permanent spell failure effect, which you remove at the appropriate point in the plot.

#4
Artemis Absinthe

Artemis Absinthe
  • Members
  • 59 messages

Lugaid of the Red Stripes wrote...

Since character creation happens before the player is actually loaded into the module, there's no easy way to restrict the player's choices at character creation. You could always do your own 2DAs, like people do for custom classes, though.

A simple fix would be to do a simple check at the beginning of the module, either with the on-player-loaded script or in your initial conversation, if you have one. If the PC has an inappropriate class, tell them what they did wrong and prevent them from advancing the plot any further, or just hit them with a severe and permanent spell failure effect, which you remove at the appropriate point in the plot.


Are you sure about that ? the module (and the campaign) is loaded before the character creation, so, editing the classes.2da might actually work.

the problem, maybe, is when someone create a character in another module and then use it in the module with class restriction, solved by eliminating the class from the 2da instead of setting as non playable

DannJ wrote...
You'd still run into trouble with existing characters though. Perhaps a better option would be to check what class the player is when the module starts, and then allow the player to re-level the character in a different class via a conversation.


or kick him out, since you can't re-level the 1st

anyway

Games For Learning wrote...
I'd like to not have magic users of any sort

 

bards, rangers and paladins included ? because they're spellcasters too...

If I may suggest, take a look at the classes.2da and how to disable wizard, cleric, druid, sorceror and warlock, as DannJ suggested, then open the cls_spgn_bard.2da, cls_spgn_rang.2da  and cls_spgn_pal.2da and disable the spells progression. This way you can still use these classes, but without spells. =]

Modifié par Artemis Absinthe, 27 février 2012 - 04:22 .


#5
Games For Learning

Games For Learning
  • Members
  • 58 messages
Thanks everyone for the tips. I'll check them out and let you know how it works out.
:)

#6
luna_hawke

luna_hawke
  • Members
  • 88 messages
I think you might be able to make them prestige classes?
I haven't tried something like this.

If you can do that, you can restrict the casting classes by requiring them to have some feat or qualifying condition to take them.
Then they can't be taken on level 1 and you can control when they can be taken.

It wonder to if you can have a requirement for a base class like a prestige class has.
Maybe look at that to?

#7
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
Racial restrictions too.

#8
The Fred

The Fred
  • Members
  • 2 516 messages
My Restricted Companion Multiclassing can actually be applied to players, and lets you control their class options through scripting. However, you can already do that with some 2da jiggerypokery by e.g. adding and removing prereq feats. What this effectively does is hide the classes, great for unlockable classes - the only problem is that they're visible at character creation.

One thing you can do is have players enter via a mini-mod which uses a different classes.2da file. This would be the same as your normal one, but have those classes disabled. Then, when they move to the next mod, they find they can level-up with new classes. That has some issues though: firstly, it's more of a regional thing - once past a certain point, classes become available. They can't be turned on or off. Further, a player could just enter with a premade character of a class of their choice.

If you were going to do that, you're probably better off checking a player's class when they enter and not letting them progress or even just telling them off. You're going to be relying on them to play the game how it was designed anyway.

I think the best solution is just to add prereqs as suggested, effectively making these classes into PrCs. They should still work OK. NWN1 had a system where you could add a variable as a prereq, effectively allowing you to script in PrC access, but I hear it doesn't work in NWN2. I haven't tried it out myself. If it doesn't, you can just use feats. A tad uglier perhaps, but it should work.

#9
Artemis Absinthe

Artemis Absinthe
  • Members
  • 59 messages

luna_hawke wrote...

I think you might be able to make them prestige classes?
I haven't tried something like this.

If you can do that, you can restrict the casting classes by requiring them to have some feat or qualifying condition to take them.
Then they can't be taken on level 1 and you can control when they can be taken.

It wonder to if you can have a requirement for a base class like a prestige class has.
Maybe look at that to?


just put, under the column PreReqTable (classes.2da), the name of the cls_pres_XxX (e.g. cls_pres_wizard), then create the cls_pres_XxX.2da (e.g. cls_pres_wizard.2da)  following the rules for the cls_pres_*.2da (nwn2.wikia.com/wiki/Cls_pres_*.2da).

it's quite easy

Let's say you want the wizard to have a custom feat as prerequisite, your cls_pres_wizard.2da will look like this :



2DA V2.0

                                   LABEL                   ReqType               ReqParam1              ReqParam2 
0         Custom_Feat_Req                        FEAT                          2253                         ****



Where the number under the ReqParam1 column is the feat's id (feat.2da)

And, in classes.2da, in the wizard line (10), under the colum PreReqTable, just cls_pres_wizard, without extension.

Modifié par Artemis Absinthe, 27 février 2012 - 08:51 .


#10
Games For Learning

Games For Learning
  • Members
  • 58 messages
Okay, this is terribly difficult for me, as I'm not a computer person at all and I appreciate your help.
I think I might be best off by allowing all character classes but disabling spell use. That way I can control character scrolls, wands, etc, but they can't just memorize and cast their own until certain events happen. I would warn players about these spellcaster limitations in the module preamble. The comment about bards, rangers, etc put this idea in my head. If I can limit it for them, then why not for other casters too. Thanks for that Artemis.

Now, I'm looking at the classes.2da file in Excel right now. I managed to extract it and save a copy into the override folder for now. Could you please let me know what I should save it as, in terms of file extension, from Excel so that I can use it for my module and test it out? I've tried to check into 2da editors and I'm really confused. Also, this is just a guess, but do I simply have to change the spellgaintable and spellknowntable values to **** for spell user classes? Is there a way to change them back part-way through a game or will I need to have two files?

Thanks for your patience with me.

Modifié par Games For Learning, 01 mars 2012 - 11:25 .


#11
Artemis Absinthe

Artemis Absinthe
  • Members
  • 59 messages

Games For Learning wrote...

Okay, this is terribly difficult for me, as I'm not a computer person at all and I appreciate your help.
I think I might be best off by allowing all character classes but disabling spell use. That way I can control character scrolls, wands, etc, but they can't just memorize and cast their own until certain events happen. I would warn players about these spellcaster limitations in the module preamble. The comment about bards, rangers, etc put this idea in my head. If I can limit it for them, then why not for other casters too. Thanks for that Artemis.

Now, I'm looking at the classes.2da file in Excel right now. I managed to extract it and save a copy into the override folder for now. Could you please let me know what I should save it as, in terms of file extension, from Excel so that I can use it for my module and test it out? I've tried to check into 2da editors and I'm really confused. Also, this is just a guess, but do I simply have to change the spellgaintable and spellknowntable values to **** for spell user classes? Is there a way to change them back part-way through a game or will I need to have two files?

Thanks for your patience with me.


Ok, look, I use this editor, not just for 2da editing, but also for other stuff : notepad-plus-plus.org/

Open the Electron Toolset, view menu, 2DA, select the 2da you want to open, then save it. It will save a copy of the 2da in your override folder with separated columns. Open it with Notepad ++ and then just save it, the editor will use the same extension of the original file (.2da).

2DA's extension is .2da, I think excel can't save it, but I never tried

For the other questions. 
Yes, changing the values to **** will do the trick, but you can't disable warlock's spellcasting this way, cause they haven't spell progression.

And, no, there isn't a way to change 2DAs in-game, they're static resources.

#12
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
The devs did it with excel, just save as a tab delimited text file, and use the 2da extension. Note that excel can garble files when opening them though ( 2da's in NWN1 used a weird space delimited format, NWN2 allows both this and tab delimited which is much more widely supported ).

Recommend using a program for 2da editing you find on the vault.

#13
Games For Learning

Games For Learning
  • Members
  • 58 messages
Hi All,

Sorry it has taken me so long to get back to this project.

Okay, so I can use Excel and it works to edit .2da files. I tried to remove a class as a test and it worked fine. That's not what I would like to do in the module.

I've been able to follow along most of what Artemis suggested, in terms of editing the classes.2da to include a wizard custom prereq and have a cls_pres_wizard.2da that looks like the one suggested above. Where I'm stuck right now is creating the custom feat file. There's a code for description and the text file that goes with the feat.2da says that refers to "A string Ref for the description of the feat." I can't figure out where such a string reference should be created or saved. i think if I can get that part done, then all I need to do is grant the custom feat when it is appropriate in the module and offer characters a chance to re-level as a different class.

If someone could please provide assistance with the custom feat thing, I would appreciate it.

Thanks!

#14
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
I'm certainly not expert in 2DA editing, but I think the 'string Ref' refers to the system of localizing the game for different languages. So instead of listing a class as 'wizard', you have a string ref, meaning a number, that refers to a line on a .tlk file. Different language installations have different versions of the .tlk file, with the appropriate translation. Us amateurs, though, tend to just do everything in one language, and so don't use the string ref system.

#15
Games For Learning

Games For Learning
  • Members
  • 58 messages
Hi Lugaid,

Thanks for this... I was able to get it so that I can restrict classes and add them back through conversations. I think the last piece of this puzzle is string references. I vaguely remember something about formatting for strings needing $ or some such thing.

What I've got is a new class called Bard2, which I have removed spell-use from. Through conversations I've got it so the original Bard class can be gained. I'm just getting this strref error when I choose Bard2. Could you please help with formatting names in 2da files?

I also have a custom feat I've called spell use. It never appears as a feat in the character's list, but still allows levelling up into spell-user classes as it is supposed to. I suspect that it isn't showing up because of a bad strref format again.

If worse comes to worst, could someone please direct me to some instructions in the use of .tlk files?

Thanks,

#16
Games For Learning

Games For Learning
  • Members
  • 58 messages
Actually,

The Bard2 class isn't working the way I want it to. There are all sorts of errors in the string references. I think I'll just restrict them out and bring them in through conversation later. It's too bad, since I'd rather have them as possible classes without spells, but I can't figure out how to restrict their spells but allow them later.

I'll take any further suggestions...