lfnetwork.com mark read register faq members calendar

Thread: K1- How do I add feats to PCs?
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 08-18-2007, 02:45 AM   #1
redrob41
Veteran
 
redrob41's Avatar
 
Join Date: Jul 2007
Location: Edmonton
Posts: 932
Current Game: just modding TSL
Veteran Modder Helpful! 
K1- How do I add feats to PCs?

I've made a couple of Playable Characters, they are lizardlike in appearance, and I want to add a feat and/or ability for thier specific race. What I would like is for them to have a stealth bonus, and inflict poison when they hit an enemy during melee combat (preferably only when they are wearing underwear and their skin is exposed). Is there any way to add to the racialtypes.2da?

here are a couple screen shots of my third lizard. I call her Hoyne To'd.

http://img507.imageshack.us/my.php?i...enshot1zj6.jpg
http://img146.imageshack.us/my.php?i...enshot2qg1.jpg

I have also made a green female and green male character. I was inspired by the PC included in the Holowan Plug-in2 (I think it was by Colja).

Thanks to all the tutorials and posts I've looked at so far by T7nowhere, Darkkender, Stoffe, Darth333, ChAiNz.2da, and tool builders like Tk102 and others. I wouldn't have gotten this far without thier info on these forums.
redrob41 is offline   you may: quote & reply,
Old 08-18-2007, 05:42 AM   #2
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by redrob41
I've made a couple of Playable Characters, they are lizardlike in appearance, and I want to add a feat and/or ability for thier specific race. What I would like is for them to have a stealth bonus, and inflict poison when they hit an enemy during melee combat (preferably only when they are wearing underwear and their skin is exposed). Is there any way to add to the racialtypes.2da?
I don't know if it's a good idea to add new racial types since a lot of functionality in 2DAs refer to racial types, and other functionality hardcoded in the game engine is tied to this as well (like how droids can't wield lightsabers, changing inventory panels for droids, immunity to various things etc). There are only two racial types used by the game: Droid and Human, where all organics, whether human, alien or animal, are listed as Human. Various aliens and beasts sometimes have a sub-race value set though, which is for example used for such things as restricting wookiees from equipping clothing.

While you can add new feats to the game you can't make them do anything on their own. At best you could use them as either window dressing or something a script could check for the presence of and then do things. As far as I know you can't make the game grant feats depending on a certain race or sub-race, and unfortunately Kotor 1 lacks the scripting functionality to add feats to a character via scripts directly.

The skill bonuses and poisonous touch could be handled by adding a creature hide and creature slam weapons to those hidden inventory slots of the lizard characters. Doing so would only inflict the poison if the character fights unarmed though, not when wielding any weapon. You should also be able to add the window dressing feat to the character by adding it as a "Bonus Feat" item property to the creature hide.

You'd then need to modify a script that runs near the start of the game, or (preferably) add your own script to a dialog, such as the one with Trask, that gives and equips the slam and hide items on the player if they are using the appearance type of your lizard character.

stoffe is offline   you may: quote & reply,
Old 08-18-2007, 10:53 AM   #3
redrob41
Veteran
 
redrob41's Avatar
 
Join Date: Jul 2007
Location: Edmonton
Posts: 932
Current Game: just modding TSL
Veteran Modder Helpful! 
Thanks Stoffe,

This is the first that I've heard about hidden inventory slots. I'll try to find a tutorial or two that refer to the creature slam and hide (is that like "leather skin hide" or "stealth hidden"?).

I'll also try and learn how to add a dialog script. Does that involve .dlg files or the dialog.tlk? This is all new to me, but that's why I'm trying to learn.

I was originally thinking that I would have to add properties to a clothes .uti or something, but didn't know how to make it wearable by only these lizard PCs. I'm still learning how to create items too.

Yeah, poison touch when fighting barehanded would make the most sense. Skin to skin contact is usually needed for poison dart frogs and other amphibians.

While searching, I found this thread which has a lot of info:
http://www.lucasforums.com/showthrea...=creature+hide

Last edited by redrob41; 08-18-2007 at 11:47 AM. Reason: found more info in another thread
redrob41 is offline   you may: quote & reply,
Old 08-18-2007, 03:46 PM   #4
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by redrob41
This is the first that I've heard about hidden inventory slots. I'll try to find a tutorial or two that refer to the creature slam and hide (is that like "leather skin hide" or "stealth hidden"?).
The invisible inventory slots are found on the "Natural Items" tab on the Inventory screen if you use KotorTool's UTC/Creature editor. There are three slots for creature weapons and one for a creature hide. Items placed in these slots are invisible to the player and cannot be unequipped directly. They can be added and equipped via scripts though, using the inventory slot constants INVENTORY_SLOT_CWEAPON_L, INVENTORY_SLOT_CWEAPON_R, INVENTORY_SLOT_CWEAPON_B, INVENTORY_SLOT_CARMOUR as parameter to the ActionEquipItem() function.

Creature weapons are items (UTI) with one of the "Creature Weapon" base item types (there are a few for different damage types). Such items have no innate damage range, so you must add a "Monster Damage" property to them which sets how much damage they deal when striking. In your case you'll want to add either an OnHit:Poison or OnMonsterHit:Poison property as well.

Creature hides are items (UTI) with the "Creature Hide Item" base item type set. They are invisible and do nothing on their own, they are just used to grant property effects to the creature they are equipped on. They are usually used to grant monsters immunities, regeneration and such.


Quote:
Originally Posted by redrob41
I'll also try and learn how to add a dialog script. Does that involve .dlg files or the dialog.tlk? This is all new to me, but that's why I'm trying to learn.
Scripts are set in the DLG files. There are two types:
  • Conditional scripts are scripts that determine if a particular dialog node should be available. These script have a main function named StartingConditional() which should return an integer value of either TRUE (show the node) or FALSE (block the node). These scripts are used for things like controlling when quest specific dialog branches should be used, gender-specific dialog branches etc. They usually don't do anything visible, they just check for some conditions and return TRUE or FALSE. These scripts fire before a dialog node is shown (to be able to determine if it should be shown).

  • Action scripts are scripts that perform actions associated with a particular dialog node. These scripts have a main function named main() that does not return anything (void). These scripts are fired as the dialog node they are associated with is shown. This is used for things like moving NPCs around, giving/taking items or whatever else should happen during the dialog.

The dialog.tlk file contains all standard text in the game, including all text in the bioware-created DLG files. You don't need to edit this file to make your own dialogs though since the DLG files are capable of containing the text directly. (When the StrRef of a dialog node's text field is set to -1 it will use strings stored in the DLG file instead. The StrRef value otherwise refers to an entry in the dialog.tlk file.)

stoffe is offline   you may: quote & reply,
Old 08-18-2007, 06:28 PM   #5
redrob41
Veteran
 
redrob41's Avatar
 
Join Date: Jul 2007
Location: Edmonton
Posts: 932
Current Game: just modding TSL
Veteran Modder Helpful! 
ok, so far I have edited the end_trask01.dlg file so that right after Trask says:
"I'm Trask Ulgo, ensign with the Republic Fleet. I'm your bunk mate here on the Endar Spire. We work opposite shifts; I guess that's why you haven't seen me before."
he will then say:
"Untill seeing you face to face, I've never really known what race you were."
and the PC can respond with a bunch of different races. So far I have 12 listed. After the PC answers, Trask will continue with his next line:
"Now hurry up, we have to find Bastila! We have to make sure she makes it off the ship alive!"

The theory would be that whichever race the PC chooses, it would load a different set of hidden items with different stats, modifiers and feats. Thus, there would be a reason to play as a different race.

So far, I've only made two .uti files. One for a camoflage belt and the other for creature attack poison. I was able to get the belt working, but the attack only added the feat (no poison for me). I also don't know how to write the script so that it loads both hide items.

The script I'm using is from a 2005 post by StormSinger in this thread:
http://www.lucasforums.com/showthread.php?t=143380

If sombody could help me figure out how to do the scripting, I could make files for all the races available as PCs in the Holowan Plug-in. A PC could have Mandalorian regeneration, or Wookiee toughness, or Cathars stealth etc. Of course, I'd need a lot of input on how to keep things balanced so that no one race is totally superior to the others, but that each race was unique. Humans of course would not add any new hide items and play through the game normally (they would be the baseline comparison for all the others).

Thanks Stoffe for stimulating my braincells. Otherwise I'm just a monkey mashing buttons.
redrob41 is offline   you may: quote & reply,
Old 08-21-2007, 08:53 AM   #6
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by redrob41
I also don't know how to write the script so that it loads both hide items.

The script I'm using is from a 2005 post by StormSinger in this thread:
http://www.lucasforums.com/showthread.php?t=143380

If sombody could help me figure out how to do the scripting, I could make files for all the races available as PCs in the Holowan Plug-in.
You'd have to make a bunch of scripts to trigger from your modified DLG file, each adding natural weapons and hides to the player as needed for that particular species. For example, if you have a claw item named lizardclaw.uti (with properties Monster Damage: 1d8 and OnHitProperties: Item Poison - Average Damage DC 20) and a hide item named lizardhide.uti (with properties Skill Bonus: Stealth) a script like this should work to give and equip those on the player:

Code:
void main() {
    object oPC = GetFirstPC();
    AssignCommand(oPC, ActionEquipItem( CreateItemOnObject("lizardhide", oPC), INVENTORY_SLOT_CARMOUR, TRUE ));
    AssignCommand(oPC, ActionEquipItem( CreateItemOnObject("lizardclaw", oPC), INVENTORY_SLOT_CWEAPON_L, TRUE ));
    AssignCommand(oPC, ActionEquipItem( CreateItemOnObject("lizardclaw", oPC), INVENTORY_SLOT_CWEAPON_R, TRUE ));
}
The parts in yellow is the name of the UTI files to create the items from (excluding the .uti extension), the parts in red is the inventory slot number to equip the item in. In this case the script equips the item made from lizardhide.uti in the creature hide slot, one creature weapon made from lizardclaw.uti in the left hand creature weapon slot and another in the right hand creature weapon slot.

Since there is only one hide slot you can only equip one creature hide at a time, so you'll need to give this hide all the bonus/penalty properties that should be applied to the player.

stoffe is offline   you may: quote & reply,
Old 08-21-2007, 10:08 AM   #7
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Fallout 2
Forum Veteran Helpful! Notable contributor 
Quote:
Originally Posted by redrob41
"Untill seeing you face to face, I've never really known what race you were."
and the PC can respond with a bunch of different races. So far I have 12 listed.
If I remember correctly (it's been awhile), I think the game will only display up to 9 or 10 replies at a time. This was to allow the player to press the number of the response I believe. If you have more than 9 responses, you may want to break them into two sets of Replies.

Maybe something like this

Code:
E1 - I've never known what race you are -> R0
 - R0 (blank) ->E2
E2 (blank) 
 - R1 I'm an A -> E4
 - R2 I'm a B -> E4
 - R3 I'm a C -> E4
 - R4 I'm a D -> E4
 - R5 I'm an E -> E4
 - R6 View more choices... --> E3
E3 (blank) --> R7
 - R7 I'm an F -> E4
 - R8 I'm a G -> E4
 - R9 I'm an H -> E4
 - R10 I'm an I -> E4
 - R11 View previous choices... -> E2
E4 - Now hurry up, we have to find Bastila!
tk102 is offline   you may: quote & reply,
Old 08-21-2007, 12:59 PM   #8
Tupac Amaru
Junior Member
 
Tupac Amaru's Avatar
 
Join Date: Mar 2005
Location: Tahuantinsuyu
Posts: 273
Quote:
Originally Posted by tk102
If I remember correctly (it's been awhile), I think the game will only display up to 9 or 10 replies at a time. This was to allow the player to press the number of the response I believe. If you have more than 9 responses, you may want to break them into two sets of Replies.
The game can display more than 10 replies. K1 only won't number them anymore after the 9th reply.

Ah, I stand corrected. Thanks, Tupac. ~tk

Last edited by tk102; 08-21-2007 at 01:23 PM.
Tupac Amaru is offline   you may: quote & reply,
Old 08-22-2007, 04:34 AM   #9
redrob41
Veteran
 
redrob41's Avatar
 
Join Date: Jul 2007
Location: Edmonton
Posts: 932
Current Game: just modding TSL
Veteran Modder Helpful! 
Quote:
Originally Posted by stoffe
You'd have to make a bunch of scripts to trigger from your modified DLG file, each adding natural weapons and hides to the player as needed for that particular species.
Thanks for the script Stoffe, it's a little simpler than the other one I found. I've made all the script files and uti files for each race, and they seem to be working fine. Next I want to add some "passive" or "dummy" feats that will give a description of each race. I know how to edit 2da files with TSLPatcher, but from what I understand, the actual text is done in the dialog.tlk. I haven't been able to find a tutorial on how to add (in my case 12 lines) to the tlk file in a similar way to TSLPatcher (without including the whole tlk file in the DL). I've done a lot of searching the forums, and I haven't found a tutorial that goes through feat creation step by step. I usually just find refernces to it, and a statement that new feats can't be done. If there is a tut out there, I apologize for bringing it up again.

As for the species modifications to the abilities, feats, and such, I would really appreatiate any opinions on how much they should change. So far, I've started with these stats:

AB=Attribute Bonus
DAS=Decreased Attribute Score
SB=Skill Bonus
DSM=Decreased Skill Modifier
DV=Damage Vulnerability
DI=Damage Immunity
DB=Damage Bonus
BF=Bonus Feat

Mandalorians: Regeneration Melee 4
Cathar: Monster Damage 1d8; On Hit Properties Fear DC 18; DV Sonic 25% for 2 Rounds; AB Dex +1; AB Str +1; AB Con +1; DAS Int -1; DAS Wis -1; SB Stealth +6
Wookies: Monster Damage 1d8; On Hit Properties Stun DC 18; DV Sonic 25% for 2 Rounds; AB Str +2; AB Con +2; DAS Int -1; DAS Wis -1
Twilek: AB Charisma +2; DSM Awareness -1
Rakatan: AB Con +1; DAS Wis -1; DI Dark Side 25%; DB vs Light Side 1d8
Nikto: DI Fire 10%; AB Con +1; DSM Persuade -2
Duros: AB Int +1; AB Wis +1; BF Gear Head; DAS Dex -1; DV Dark Side 25% for 2 Rounds
Zabrak (Darth Maul): AB Con +2; DB vs Blugeoning 2; DSM Repair -2
Ratataki (Asajj Ventress): AB Dex +1; Regeneration 2; DV Cold 25% for 2 rounds; DSM Computer Use -1
Yoda: AB Wis +3; AB Int +3; DAS Con -2; DAS Cha -2; DAS Str -2; Improved Force Resistance Bonus 10
my Lizards: Monster Damage 1d8; On Hit Properties Poison DC 18; SB Stealth +4; DV Cold 25% for 2 rds; DSM Persuade -1; DSM Computer Use -1

I want to try and keep things kind of balanced, so that if some things go up, others go down. I've seen most of these races as mods for K1 already, so if there are other PCs out there (like Rodian and Trandoshan), I can add those to this text mod. And also, the Monster Hit feats only work when the PC is not using a weapon, so they are really only for show.
redrob41 is offline   you may: quote & reply,
Old 08-22-2007, 05:47 AM   #10
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by redrob41
Next I want to add some "passive" or "dummy" feats that will give a description of each race. I know how to edit 2da files with TSLPatcher, but from what I understand, the actual text is done in the dialog.tlk. I haven't been able to find a tutorial on how to add (in my case 12 lines) to the tlk file in a similar way to TSLPatcher (without including the whole tlk file in the DL).
Adding dialog.tlk entries and linking them up with a 2DA was the primary reason TSLPatcher was created. You should be able to do that like this:
  1. Using TalkEd.exe create a new TLK file. Add entries for the name and description of your feats to this file, and then save it as append.tlk in the tslpatchdata folder of your mod installation.

  2. In ChangeEdit.exe load the configuration INI file for your mod (or create one if you haven't already). Click on the TLK Entries option in the treeview to the left. In the panel that opens click on the button with a folder icon above the right list box and select your newly created append.tlk file in the dialog box that opens. This will load all entries in the file into the list box below the button. Select each entry and press the left-pointing arrow button to create StrRef# entry tokens for them (adding them to the left list box).

  3. Open the 2DA files panel via the treeview to the left and open one of your modifiers that adds a new line to feat.2da. For the name and description column of each such line set the corresponding StrRef# token that refers to the TLK entry with its name and description. Those tokens should be available in the dropdown menu of the Value field.

  4. (If you aren't already you'll also need to store the RowIndex of your new feat.2da lines into 2DAMEMORY# tokens and then assign those to the corresponding creature hide UTI file's PropertyList, so that the Bonus Feat property adding the feat to the player refers to the correct line even if the player has an already modded feat.2da file.)

This will cause the TSLPatcher to add the entries in the append.tlk file to the game's dialog.tlk file (unless identical entries already exist, in which case those will be used instead), keep track of the resulting StrRef indexes they are added as, and insert those indexes into the name and description columns of your new lines it adds to the feat.2da file.

Quote:
Originally Posted by redrob41
As for the species modifications to the abilities, feats, and such, I would really appreatiate any opinions on how much they should change. So far, I've started with these stats:
Mandalorians: Regeneration Melee 4
Yoda: AB Wis +3; AB Int +3; DAS Con -2; DAS Cha -2; DAS Str -2; Improved Force Resistance Bonus 10
Perhaps there should be some penalty for mandalorians as well, Regen +4 without any drawback is a pretty strong advantage, in particular before you get any healing force powers since you don't need medpacks for anything other than emergencies in the heat of battle.

I'd also say Yoda is pretty charismatic for a little green goblin, though I suppose that could be in spite of his race, not because of it.


Last edited by stoffe; 08-22-2007 at 02:45 PM. Reason: typo
stoffe is offline   you may: quote & reply,
Old 08-22-2007, 08:44 AM   #11
darthcarth
Junior Member
 
darthcarth's Avatar
 
Join Date: Nov 2004
Location: On the USD Imperium
Posts: 265
I agree also i dont think that a zabrak should have a pentalty to repair as we have seen in kotor2 bao dur is quite the mechanic.


EmpireFTW!!!!!!!!!!!!!!!!!!!
darthcarth is offline   you may: quote & reply,
Old 08-23-2007, 06:29 AM   #12
redrob41
Veteran
 
redrob41's Avatar
 
Join Date: Jul 2007
Location: Edmonton
Posts: 932
Current Game: just modding TSL
Veteran Modder Helpful! 
Quote:
Originally Posted by stoffe
Adding dialog.tlk entries and linking them up with a 2DA was the primary reason TSLPatcher was created.
*smacks head* When I originally looked at the ReadMe pdf for TSLPatcher, I skipped over a lot of stuff. At the time, I was just trying to get my PCs into the game. Thanks for the step by step, I've got the first 3 steps done. I've also got all my icons ready.

Quote:
Originally Posted by stoffe
(If you aren't already you'll also need to store the RowIndex of your new feat.2da lines into 2DAMEMORY# tokens and then assign those to the corresponding creature hide UTI file's PropertyList, so that the Bonus Feat property adding the feat to the player refers to the correct line even if the player has an already modded feat.2da file.)
I've been using KotorTool's Item Editor to add properties to the uti files, but of course the new ones won't be available. I'm not sure if you mean that I have to add the RowIndex to the uti file or to the nss file and re-process them in TSLPatcher's Script Source option. Looking at the ReadMe again, I see there is a lot of GFF editing that can be done.I'm not 100% sure how I should be adding the RowIndex for the dummy feat.

I'm guessing that in TSLPatcher I click GFF files; add GFF file; select my uti file from the patchdata folder; click the button that is to the left of the info button; click add a new field button; give it a name; THEN I'm not sure what's next. I could guess (structs), but I'd rather do it right the first time.

Quote:
Originally Posted by stoffe
Perhaps there should be some penalty for mandalorians as well, Regen +4 without any drawback is a pretty strong advantage, in particular before you get any healing force powers since you don't need medpacks for anything other than emergencies in the heat of battle.

I'd also say Yoda is pretty charismatic for a little green goblin, though I suppose that could be in spite of his race, not because of it.
You're right about the Regen, but I can't decide on what kind of penalty to balance it out with. As for the Yoda stats, I'm actually calling the species "frogling" because their race is unknown (acording to Wookieepedia). I heard George Lucas call Yoda a frogling on some of the DVD extras. I admit, I think that Yoda is kinda cute (in a puppy sorta way) but these stats are for any frogling PC. If you have a better penalty idea, please let me know.

Quote:
Originally Posted by darthcarth
I agree also i dont think that a zabrak should have a pentalty to repair as we have seen in kotor2 bao dur is quite the mechanic.
Well, this is why I'm asking for people's opinions. If you've got a better idea to balance out AB Con +2; DB vs Blugeoning 2, then I'm all ears.
redrob41 is offline   you may: quote & reply,
Old 08-23-2007, 07:14 AM   #13
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by redrob41
I've been using KotorTool's Item Editor to add properties to the uti files, but of course the new ones won't be available. I'm not sure if you mean that I have to add the RowIndex to the uti file or to the nss file and re-process them in TSLPatcher's Script Source option.
For each of the modifiers that add a line to feat.2da, assign RowIndex to a 2DAMEMORY# token, like this:


You'll need to use a separate number in 2DAMEMORY# for each line (i.e. 2DAMEMORY1, 2DAMEMORY2, 2DAMEMORY3 etc). This will store the line number your new line got inserted as for future use. You'll need this number to update the Bonus Feat property of your creature hide so the player will be given the proper feat. This is necessary since you don't know in advance what line number the new rows gets added as in feat.2da, since each player could have an already modded feat.2da file with extra lines in it.

Then add your creature hide UTI files that should grant the bonus feats to the GFF Files list, and add a modifier that changes the Subtype field of the item property that grants the bonus feat to the line number of the feat.2da line of the feat that should be granted, in this case the corresponding 2DAMEMORY# token, like:


If your hide has more than one item property (which it probably does) you'll need to find which index within the PropertiesList field that particular property has. You'll need to open your UTI file with a GFF editor for this and check inside the PropertiesList field. Look for a struct where the PropertyName field is set to 9, this is the Bonus Feat property. Take note of its position within the PropertiesList list, starting at 0 counting up.


In this example the property was in the first struct within the PropertiesList, as shown in the screenshot above, so we get the field path PropertiesList\0\Subtype that should be modified. (You can press the button with a folder icon to the right of the GFF Field input box to load all the field paths of your UTI file into the dropdown menu, which can be useful to avoid typos):


This will make TSLPatcher modify the value of the Subtype field within the first struct in the PropertiesList field of the GFF file, and assign to it the value stored in the 2DAMEMORY1 token (i.e. the line number in feat.2da of your newly inserted feat). I.e. you don't need to make the TSLPatcher add new GFF fields, it's enough to make it modify the value of a field already added by KotorTool's UTI/Item editor to make sure everything is linked properly.

Then repeat the above process for the other feats/hides you add. Remember that you need to use a separate 2DAMEMORY# token to store the line number of each row you add to feat.2da, so you'll need to remember which token holds the line number for what feat, and assign them to the correct creature hide UTI you want to grant the feat.

Quote:
Originally Posted by redrob41
You're right about the Regen, but I can't decide on what kind of penalty to balance it out with.
You could give them some points of Blaster Bolt deflection penalty or something like that, since Mandalorians seem to think that the best defense is a good offense.

stoffe is offline   you may: quote & reply,
Old 08-23-2007, 07:25 AM   #14
redrob41
Veteran
 
redrob41's Avatar
 
Join Date: Jul 2007
Location: Edmonton
Posts: 932
Current Game: just modding TSL
Veteran Modder Helpful! 
Quote:
Originally Posted by stoffe
If your hide has more than one item property (which it probably does) you'll need to find which index within the PropertiesList field that particular property has. You'll need to open your UTI file with a GFF editor for this and check inside the PropertiesList field. Look for a struct where the PropertyName field is set to 9, this is the Bonus Feat property. Take note of its position within the PropertiesList list, starting at 0 counting up.

This will make TSLPatcher modify the value of the Subtype field within the first struct in the PropertiesList field of the GFF file, and assign to it the value stored in the 2DAMEMORY1 token (i.e. the line number in feat.2da of your newly inserted feat). I.e. you don't need to make the TSLPatcher add new GFF fields, it's enough to make it modify the value of a field already added by KotorTool's UTI/Item editor to make sure everything is linked properly.

You could give them a couple of points of Blaster Bolt deflection penalty or something like that, since Mandalorians seem to think that the best defense is a good offense.
So, I should already have an extra Bonus Feat in the Properties of the uti file, then overwrite that with the GFF Modifications using the 2DAMEMORY token?

And that's a great penalty. Thanks for the input.
redrob41 is offline   you may: quote & reply,
Old 08-23-2007, 07:33 AM   #15
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by redrob41
So, I should already have an extra Bonus Feat in the Properties of the uti file, then overwrite that with the GFF Modifications using the 2DAMEMORY token?
Yes, you create the hide UTIs as usual with KotorTool and set their desired properties. Then just make the patcher modify the existing SubType value of the Bonus Feat property to make sure it refers to the correct feat (i.e. the new line your mod adds to the feat.2da file).

Just make sure any UTI files you add to the GFF Files list to be modified like this are not present in the Install files list as well, since the GFF patcher copies the files to the override folder already (or modifies them in place if they already exist there and you haven't told it to replace existing files. Replacing might be the safest thing to do in this case though since it's your own custom files).


Last edited by stoffe; 08-23-2007 at 08:22 AM. Reason: typo
stoffe is offline   you may: quote & reply,
Old 08-23-2007, 08:13 AM   #16
redrob41
Veteran
 
redrob41's Avatar
 
Join Date: Jul 2007
Location: Edmonton
Posts: 932
Current Game: just modding TSL
Veteran Modder Helpful! 
Ok, so I've changed all my uti files so that the Bonus Feat that I want to be changed is in the first (top) spot on the Properties list. Then I changed the field with the 2damemory token.

With the Override folder empty, I've just run the TSLPatcher, and it went smoothly. I started a new game and tried 3 different races, all of which had all the bonuses and penalties, as well as the dummy feat that describes the race. I feel triumphant!

I'll have to try it out with an existing Override folder and mods. Could I PM a 7zip file to you Stoffe to check it over? Since you've led me through this whole process, I'd really appreciate your stamp of approval before releasing the mod.
redrob41 is offline   you may: quote & reply,
Old 08-23-2007, 03:51 PM   #17
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by redrob41
I'll have to try it out with an existing Override folder and mods. Could I PM a 7zip file to you Stoffe to check it over? Since you've led me through this whole process, I'd really appreciate your stamp of approval before releasing the mod.
I've had a look at the file you sent and noticed a few relatively minor things:

You should remove the entries listed below from the Install Files list, since they are already installed by the GFF patching that updates the Bonus Feat property subtype:
PC_HIDE_RR41_MAN.uti
PC_HIDE_RR41_TWI.uti
PC_HIDE_RR41_CAT.uti
PC_HIDE_RR41_WOK.uti
PC_HIDE_RR41_ZAB.uti
PC_HIDE_RR41_RAK.uti
PC_HIDE_RR41_NIK.uti
PC_HIDE_RR41_DUR.uti
PC_HIDE_RR41_RAT.uti
PC_HIDE_RR41_YDA.uti
PC_HIDE_RR41_LIZ.uti

The .NDB files are not needed since they just contain script debugger data and aren't used by the game. You can delete them from the tslpatchdata folder and the Install Files list (in the config file) and save some space.

Likewise, nwnnsscomp.exe and nwscript.nss does not need to be included since you are not making the patcher compile any scripts.

The biggest potential incompatibility problem is the end_trask01.dlg file, which you just install as it is. A fair number of other mods use this file for various things.

It should be possible to set up TSLPatcher to insert your new dialog nodes into this file if it already exist instead of just copying the whole file, though it will be somewhat complex to configure, and it would not be 100% assured to work in all cases. There would still be problems if another mod makes major changes to this DLG file, so it's not quite as sure a fix as 2DA/TLK and (usually other) GFF patching tend to be. If you don't think it's worth the effort to try to patch this DLG file you should put in your readme or info.rtf that your mod is incompatible with other mods that modify this file.

Other than that everything looked OK so far.

stoffe is offline   you may: quote & reply,
Old 08-24-2007, 08:01 PM   #18
redrob41
Veteran
 
redrob41's Avatar
 
Join Date: Jul 2007
Location: Edmonton
Posts: 932
Current Game: just modding TSL
Veteran Modder Helpful! 
Quote:
Originally Posted by stoffe
The biggest potential incompatibility problem is the end_trask01.dlg file, which you just install as it is. A fair number of other mods use this file for various things.

It should be possible to set up TSLPatcher to insert your new dialog nodes into this file if it already exist instead of just copying the whole file, though it will be somewhat complex to configure, and it would not be 100% assured to work in all cases. There would still be problems if another mod makes major changes to this DLG file, so it's not quite as sure a fix as 2DA/TLK and (usually other) GFF patching tend to be. If you don't think it's worth the effort to try to patch this DLG file you should put in your readme or info.rtf that your mod is incompatible with other mods that modify this file.
I tried playing around with the TSLPatcher to insert dialog nodes, but its a little too tough for me to do. I'll probably just put the note in the info.rtf about possible incompatability like you suggest.

Other than that, I'm adding a few more races to the list (Transdoshans and Rodians etc), so that if someone out there makes a PC for them, the extra race description feat will be ready for them.

On a side note, would it be possible to change the PC's soundset through the TSLPatcher and a dlg fired script? I'd like to change their voices at the same time as I add these racial feats. I've searched the forums, and only found threads that refer to K2:TSL and changing soundsets with the Kotor Savegame Editor, or changing an NPCs. Here is one thread where I found:
Quote:
Originally Posted by stoffe
This is set in the character data (UTC file) for the party members in the SoundSetFile field. The number here is a reference to the soundset.2da file.

The soundset.2da file in turn contains links to SSF (Soundset) files. The resref column contains the name of the SSF file (without the .ssf suffix).

The SSF file in turn is a table with a collection of "event" slots (such as Attack, Die, Open Lock, disarm mine etc) with a corresponding StrRef that refers to the dialog.tlk file for each sound event. It essentially tells the game "what this happens in the game, use this strref".

Finally, the dialog.tlk file holds a reference to the sound file to play and any subtitle text associated with that sound (usually not shown).
Here is another thread where I found:
Quote:
Originally Posted by darth333
The files you are looking for are located in Swkotor/Data/sounds.bif.

If you open the utc for the npc, you will notice that there is a SoundSetFile field that contains a reference to a line in soundset.2da

Here is a document about the sounset file format: http://nwn.bioware.com/developers/B..._SSF_Format.doc
And this thread seems to ask the same question as me, but didn't get a favorable answer.

If it can be done with the TSLPatcher, I'd have to take into acount that the PC is male or female, and that some of the soundsets already exist (like Zaalbar), others partially exist (like Duros) and some would have to be completely made from scratch (like my lizards). I've got experience editing waves, and I can even record some new ones, but I need help with the scripting and patching.

On a final note, should the title of this thread be changed? How do I do that?
redrob41 is offline   you may: quote & reply,
Old 08-24-2007, 08:12 PM   #19
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by redrob41
On a side note, would it be possible to change the PC's soundset through the TSLPatcher and a dlg fired script? I'd like to change their voices at the same time as I add these racial feats.
Unfortunately you can't manipulate what soundset a character uses via script. This is set in the UTC template for NPCs, and set by the character creation process for a player character. The only way to change them for the player is through a savegame editor, as far as I know. So while a patch application could be used to modify a savegame depending on what feat they know I don't think there is any possible in-game solution for handling it.

Quote:
Originally Posted by redrob41
On a final note, should the title of this thread be changed? How do I do that?
You can only change the title of a thread for about an hour (I think) after it has been posted. After that you'll need to ask a moderator to change it for you.

stoffe is offline   you may: quote & reply,
Old 08-25-2007, 07:05 PM   #20
redrob41
Veteran
 
redrob41's Avatar
 
Join Date: Jul 2007
Location: Edmonton
Posts: 932
Current Game: just modding TSL
Veteran Modder Helpful! 
Quote:
Originally Posted by stoffe
The only way to change them for the player is through a savegame editor, as far as I know. So while a patch application could be used to modify a savegame depending on what feat they know I don't think there is any possible in-game solution for handling it.
So how exactly does KSE access specific fields within a saved game? I can see that in the Kotor Saves directory there are 5 files, and that savegame.sav is probably the one where all the relevant info is stored and that it can be viewed with a hex editor. I'm not a programmer, so I wouldn't know if specific fields can be changed in game. Perhaps tk102 would know?

Probably, the best I can hope for is to create some soundsets, use TSLPatcher to install them. Then after the first dialog with Trask (which will install the species modifiers) I would save the game and use KSE to change the soundset manually. It's a bit of a long process, but it does work. It sure would be nice to have an elegant in game method though. Ah well, I guess I'll keep dreaming.

(btw, my only programming experience comes from 1st year engineering at the University of Alberta 15 years ago where we learned Fortran 77. I have and idea how scripting works, I just don't know any languages. )
redrob41 is offline   you may: quote & reply,
Old 08-25-2007, 07:33 PM   #21
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Fallout 2
Forum Veteran Helpful! Notable contributor 
Quote:
Originally Posted by redrob41
So how exactly does KSE access specific fields within a saved game? I can see that in the Kotor Saves directory there are 5 files, and that savegame.sav is probably the one where all the relevant info is stored and that it can be viewed with a hex editor. I'm not a programmer, so I wouldn't know if specific fields can be changed in game. Perhaps tk102 would know?
Um, yes I might have some insight as to how KSE works. But I don't think that's the real question that your asking and answering it in full would confuse matters more I suspect.

As far as soundsets go, KSE only concerns itself with reading the soundset.2da file from the override folder (if it exists) or from 2da.bif and then reading the SoundSetFile field of your PC and NPCs in your savegames. KSE allows you to change the PC and NPC SoundSetFile field which is a pointer to a certain row of the soundset.2da file. The list that KSE displays comes from the label fields of the soundset.2da file. The value stored in your savegame is the rownumber.

Hope that helps.
tk102 is offline   you may: quote & reply,
Old 11-01-2007, 05:38 PM   #22
redrob41
Veteran
 
redrob41's Avatar
 
Join Date: Jul 2007
Location: Edmonton
Posts: 932
Current Game: just modding TSL
Veteran Modder Helpful! 
Thanks for all the help. I've finally finished my mod (until I get another idea to add to it). You can see the fruits of my labor in this thread in the Taris Upper City Emporium.
redrob41 is offline   you may: quote & reply,
Old 11-01-2007, 06:00 PM   #23
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Fallout 2
Forum Veteran Helpful! Notable contributor 
Good job Redrob41! Nice integration into the Feat page.

Also, thanks for posting that here. It's always nice to see a happy ending to a thread.


tk102 is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > K1- How do I add feats to PCs?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:36 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.