Jump to content

Home

Important Warning concerning .utc editing!


Darth333

Recommended Posts

When you edit a .utc file in Kotor 2, verify thouroughly if there are no other .utc with the same filename or tag in another module other wise you could end up overwriting other files when you drop you newly edited .utc file in the Override folder...and cause some important bugs.

 

Obsidian re-used many .utc files from Kotor 1 and simply changed the FirstName field of the .utc file. Many files are re-used from a module to another but may not have the same contents (such as dialogue, scripts attached to the .utc file, feats, powers,etc...). If you edit a .utc file without making sure it is completely unique, your mod could cause serious problems later in the game such as game crashes or preventing the player from advancing the plot and complete quests. Here is an example that popped out tonight.

 

There are plenty of new scripting functions in TSL that allows you to do a lot via scripting. Try to edit .utc files only if you are creating a new .utc file with a custom filename and tag or when there is no other recourse.

 

here is just a sample of practical functions in nwscript:

 

Give a new feat to a creature:

[size=1]
// DJS-OEI 1/13/2004
// 786: Grants the target a feat without regard for prerequisites.
void GrantFeat( int nFeat, object oCreature ); [/size]

Give a new Force power to a Creature:

// DJS-OEI 1/13/2004
// 787: Grants the target a spell without regard for prerequisites.
void GrantSpell( int nSpell, object oCreature );

Change the appearance of a creature:

[size=1]
// 850
// ChangeObjectAppearance
// oObjectToChange = Object to change appearance of
// nAppearance = appearance to change to (from appearance.2da)
void ChangeObjectAppearance( object oObjectToChange, int nAppearance );[/size]

Adjust attributes:

 [size=1]
// 833
// AWD-OEI 7/06/2004
// This function adjusts a creatures stats.
// oObject is the creature that will have it's attribute adjusted
// The following constants are acceptable for the nAttribute parameter:
// ABILITY_STRENGTH
// ABILITY_DEXTERITY
// ABILITY_CONSTITUTION
// ABILITY_INTELLIGENCE
// ABILITY_WISDOM
// ABILITY_CHARISMA
// nAmount is the integer vlaue to adjust the stat by (negative values will work).
void AdjustCreatureAttributes(object oObject, int nAttribute, int nAmount);[/size]

Adjust skills:

[size=1]// 869
// DJS-OEI 10/9/2004
// This function adjusts a creature's skills.
// oObject is the creature that will have its skill adjusted
// The following constants are acceptable for the nSkill parameter:
// SKILL_COMPUTER_USE
// SKILL_DEMOLITIONS
// SKILL_STEALTH
// SKILL_AWARENESS
// SKILL_PERSUADE
// SKILL_REPAIR
// SKILL_SECURITY
// SKILL_TREAT_INJURY
// nAmount is the integer value to adjust the stat by (negative values will work).
void AdjustCreatureSkills(object oObject, int nSkill, int nAmount);[/size]

 

You can also easily equip/unequip/change equipment, change alignment, change classes, give xp, etc using scripts... check this thread for more useful functions ;)

Link to comment
Share on other sites

Originally posted by RedHawke

I'm glad you posted this Darth333! :D

 

I was noticing this myself... it looks like in TSL scripting things is the only way to go, the days of the easy .utc edit are gone...

Tell me about it...

 

After my.. ahem... (wip) items spawned about 15-20 times during Peragus.... even on a "thought to be unique placeable" (the corpse in the morgue where you get your plasma torch)... :rolleyes:

 

looks like Darth333 & tk102 are going to get their wish... time to learn some scripting... ;) hehe

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...