PDA

View Full Version : Class Selection Screen


yohan
08-13-2005, 12:49 AM
~
How do you change the class you start off with at the beginning?

Sorry I've tried looking through the forums but couldn't find anything...

Any help would be greatly appreciated.
~

Darkkender
08-13-2005, 02:01 AM
~
How do you change the class you start off with at the beginning?

Sorry I've tried looking through the forums but couldn't find anything...

Any help would be greatly appreciated.
~

What you want to do is replace the entries in classes.2da with the entries of the class you want to have start.

eg. Jedi Guardian replace with soldier;
Jedi sentinel replace with scoundrel;
Jedi Counsler replace with scout;

Then replace soldiers line with the Jedi Guardians entry, etc.

cry_of_paine
08-13-2005, 02:06 AM
There is a file called "Classes.2da". My guess is that if they hold true to form, adding a new class would be as simple as adding a new line in here. The question then becomes if it's possible to select it on the character selection screen. My guess would be, not easily, if at all. However, you could make a dialog script to accomplish the change, the same way that you get Jedi class on Dt.

Back to actually adding the class, there seem to be a number of cross-references to other tables, such as which feats you gain, how quickly you gain them, what skills you have, etc. I haven't looked, but it took me about 2 seconds to find classes.2da, and the nice thing is that this seems to be pretty straight forward as far as finding things. My guess is it wouldn't be too difficult to find the other tables.

yohan
08-13-2005, 02:16 AM
~
Thank you both for your help.

BTW, does the classes.2da file effect NPCs?
~

RedHawke
08-13-2005, 02:47 AM
There is a file called "Classes.2da". My guess is that if they hold true to form, adding a new class would be as simple as adding a new line in here.
Believe me, we have all messed with these 2da files in the past, and if it were as easy as all that you would have seen many new class mods. Unfortunately some aspects of the games classes are hard-coded. :(

Det. Bart Lasiter
08-13-2005, 03:20 AM
Set this to trigger at some event right at the start of the game, for instance Trask's entrance, or Kreia's 'Awaken' dialog.

void main()
{
object oPC = GetFirstPC();
AddMultiClass(class's number, oPC);
}

I don't have K2 installed on my machine now, and I can't remember if there's a 'RemoveClass()' function. But the script above set to run at whatever point in the game will add whatever class you set it to. For your reference the classes are the following:
Soldier: 0
Scout: 1
Scoundrel: 2
Jedi Guardian: 3
Jedi Consular: 4
Jedi Sentinal: 5
Combat Droid: 6
Expert Droid: 7
Minion (CUT): 8
So just replace 'class's number' with one from above. Also in case you don't have any expirience scripting you'll have to compile it.

Note: If you need it, I could make an archive of this mod for you to DL.

cry_of_paine
08-13-2005, 03:52 AM
I'll defer to your experience that when you say it can't be done (although technically, you didn't say that), it probably can't be done. However, I figured I'd at least do my own research and try and find out why. Here's what I've come up with so far.

classes.2da - Basic info about the class (name, icon, etc.) and links to tables with more specific info.
classpowergain.2da - Level up info for gaining powers as a jedi (# per level)
cls_atk_#.2da - bonus given to your attacks at each level (#1 is soldier/guardian, 2 is other, 3 is NPC)
cls_spgn_jedi.2da - still not sure
cls_st_*.2da - class specific saves table (fortitude/will/reflex gains)
featgain.2da - #feats you gain at each level - here's a problem, since each column is a specific class, and I'm not sure if you can add a column. Also not sure what <class>_bon does, since they're all 0's.
feat.2da - give all the feats, has special columns for recommended/granted/list(not sure what list is) settings for classes
skills.2da - skills, with recommended and class skill columns for each class
spells.2da - force spells (plus other effects) with the required jedi level for each.

Here's where I see problems:
featgain, feat, skills, and spells - all have specific columns for each class. If you can't add columns and have the program recognize them, then you're stuck with having to make your custom class match existing classes in those respects. And that's assuming you can get the custom class to reference the correct column.

So it doesn't look like it's "hard coded", as in part of the game engine. It is hard coded though in that I don't know if it's possible to add columns to the tables. Or how to establish a link to specific columns in the other tables. But that doesn't mean you shouldn't give it a try anyway if you're really interested. I know I plan on taking a look at the 2da files to first see if it is possible to somehow add a column. Maybe using something like a 2da->Excel converter (I thought I saw one of those somewhere).

RedHawke
08-13-2005, 04:15 AM
I'll defer to your experience that when you say it can't be done (although technically, you didn't say that), it probably can't be done.
You noticed that huh? :D I said it that way because there are things that can be done and things that cannot be done with making new classes in KOTOR.

However, I figured I'd at least do my own research and try and find out why. Here's what I've come up with so far.

classes.2da - Basic info about the class (name, icon, etc.) and links to tables with more specific info.
classpowergain.2da - Level up info for gaining powers as a jedi (# per level)
cls_atk_#.2da - bonus given to your attacks at each level (#1 is soldier/guardian, 2 is other, 3 is NPC)
cls_spgn_jedi.2da - still not sure
cls_st_*.2da - class specific saves table (fortitude/will/reflex gains)
featgain.2da - #feats you gain at each level - here's a problem, since each column is a specific class, and I'm not sure if you can add a column. Also not sure what <class>_bon does, since they're all 0's.
feat.2da - give all the feats, has special columns for recommended/granted/list(not sure what list is) settings for classes
skills.2da - skills, with recommended and class skill columns for each class
spells.2da - force spells (plus other effects) with the required jedi level for each.
You are correct on your descriptions as far as I can tell.

Here's where I see problems:
featgain, feat, skills, and spells - all have specific columns for each class. If you can't add columns and have the program recognize them, then you're stuck with having to make your custom class match existing classes in those respects. And that's assuming you can get the custom class to reference the correct column.
You cannot add colums to most all 2da files in the game... rows yes, colums no... there is no way to tell the game that the new colums are there and what to do with them, that I know of anyway.

So it doesn't look like it's "hard coded", as in part of the game engine.
Where I get the hard-coded part, is that, for example; you cannot make a new custom class have Force powers, even if refrencing the same exact 2da calls as one of the standard Jedi classes... this means something is hard-coded somewhere and not refrenced by any 2da. ;)

stoffe
08-13-2005, 05:00 AM
Here's where I see problems:
featgain, feat, skills, and spells - all have specific columns for each class. If you can't add columns and have the program recognize them, then you're stuck with having to make your custom class match existing classes in those respects. And that's assuming you can get the custom class to reference the correct column.

So it doesn't look like it's "hard coded", as in part of the game engine.

You can add a new non-force user class to the game. I have added a Bounty Hunter class for Mira and a Mandalorian Warrior class for Mandalore that they start out with rather than Scout and Soldier. You can add new columns to those 2DA files (excepts spells.2da) and have the game recognize them if you set the column labels correctly. I have done this for the above mentioned custom classes to give them their own progressions and it works fine. :)

You can not, as Redhawke said, add new force-using classes to the game. This is, for some peculiar reason, hardcoded. I'd guess it's due to the way the core game engine is designed, since the same thing is true about adding new spell casting base classes in NWN.

You can also not add new starting classes the player can pick from at character creation. This is too tied to the character creation GUI I suppose, which only has room for the 6 variations that the game comes with.

You can add one of the new classes as a secondary class with the AddMultiClass() scripting function to the player. But since you can't add new force using classes to the game I doubt that would be very popular thing to do, since you can only have two classes. Repeated calls of AddMultiClass() will only replace the second class, not add a third one. :)

You can change the starting class of your party members to a custom one by altering their creature templates though.

shamelessposer
08-17-2005, 02:43 PM
Does anyone know how to make a new class name? You can label a class whatever you want, but the displayed name for a class seems to be part of another .2da that I haven't been able to find. Anyone know what's up?

Mono_Giganto
08-17-2005, 02:53 PM
The name is a line in dialog.tlk, and the line is referenced in a 2da file, probably clases.2da. (That 5 digit number right by the name.)

stoffe
08-17-2005, 03:03 PM
Yes, the name column in classes.2da is where you set the name of the class as it will be displayed on the game screens when you play.

The number in this column is a StrRef into the dialog.tlk file, which contains the string to use. If possible I would suggest using an already existing string to name your class, since it's a lot easier.

If you can't find anything suitable though you'll have to add a new entry to dialog.tlk and point to that entry in your classes.2da line.

You can use KotorTLK (http://www.starwarsknights.com/mtools/kotortlk_22.zip) or TalkEd (http://www.algonet.se/~stoffe/TalkEd.rar) to search for existing dialog.tlk entries and to add new ones.

shamelessposer
08-17-2005, 04:07 PM
It works!

Should have an 0.1 of the mod I'm doing up by this evening. Thanks for the help.