Jump to content

Home

Modding questions


Osuirof

Recommended Posts

I want to mod some stuff in TSL, than annoy me the most:

difference between handled equipment and dropped.

But I need some help:

1. List of used characters models (.utc files I think) and where to find them, (because i.e.

 

Benok, Luxa

 

are not in the "Blueprint, Character", I found them elsewhere with help from search option in KT).

Edited

I don`t know where to post this, so if there`s a better place... :

4. It`s possible to drop item with inserted upgrades (i.e. Lightsaber with Ossus lens etc.) ?

Link to comment
Share on other sites

To moderators:

Thank you.

 

Explanation:

0. I must modify a whole module because some lazy people doesn`t make a uniqe name for each NPC, and I`m trying to modify all (more or less) NPC.

1. Because I didn`t find nothing helpfull (in this case) i used Trial and Error (rulz :laugh6: ) method of modding, but:

- I`ve extracted a 201TEL.rims17nx.th.jpg

->on next screen I "ticked" all -> cleaned .GIT of non-extracted entries -> modifed

Lt. Grenn

.utc file -> saved it -> run ERF\MOD builder choose all extacted files, filter out unknow files -> named file 201TEL.MOD, output file MOD -> build it -> in Modules, backup-ed other 201TEL files (with them it "worked" the same) -> TSL, fly to

Telos

, and I find no cut scene (after first arriving), and no

Lt. Grenn, other TSF personnel

.

How to do it right ?

Link to comment
Share on other sites

Did you pack ALL files into the .mod?

If not, which did you filter???

I'm not sure from what you've said, but it could be related to "clean .git of all non-extracted entities" try extracting all files, making your modifications, and packing them all into the .mod and try it without selecting the clean option.

 

And concerning your first post, the Character Models are .mdl and .mdx I don't know much about modeling though, the .utc is for the character's template

Link to comment
Share on other sites

Did you change the name or the tag of the .utc files? If so the scripts that were looking for the original .utcs won't fire. That could explain why Grenn is not there and the cutscene doesn't fire. Otherwise, make sure you are entering the module for the first time. You need a clean save.

 

But honestly, redoing an entire module just to edit .utc files is overkill IMHO.... instead of that, you can change npcs equipment, apperance, stats, etc with some scripts. It seems to be much more appropriate in this case.

 

Have a look at this thread:

http://www.lucasforums.com/showthread.php?t=146197

Link to comment
Share on other sites

Did you change the name or the tag of the .utc files?
No, I only changed: Inventory, Statistics, Skills, Feats, Class levels, Alignment (is there a description of Minion class somewhere ?) I`m not that stupid (I hope).

 

That could explain why Grenn is not there... ...Otherwise, make sure you are entering the module for the first time.
I`ve changed, and builded .mod for Exchange module on Telos, entered it for the first time, and it was also "script free": no conversation\events\Slusk running away\etc.

 

But honestly, redoing an entire module just to edit .utc files is overkill IMHO.... instead of that, you can change npcs equipment, apperance, stats, etc with some scripts.
But there`s a "tiny" problem with this option:

I`m "alergic"\too stupid to do programming\scripting.

I try to learn VB, V©++ (syntax looks like C++), TP, but I think that`s not for me.

From this kind of things, I`m only "proud" of some basic instalators (Inno Setup), and a batch file changing file extension.

Link to comment
Share on other sites

1. I need some sugestions about PC\party level at different planets. I need this to make opponets fit to PC\party level, and because I don`t think that HK-50 is 1 lvl Combat Droid.

Edited

2. Is there a way to view different (beside creating armor\weapon\etc.) versions\numbers of:

Model\Body\Texture variations and Pallete ID ?

Link to comment
Share on other sites

Edited

3. How to increase Broken Items worth in components ?

4. Where does autobalance.2da "kick in", and how those level (Set_1, Set_2, etc.) translate into game difficulty setting ?

5. I can`t place components in .utc files, .utp with no problem (I mean I can place, but I don`t receive them when characters are destroyed\killed\etc.).

Is there a way to fix this without scripting ?

6. On Nar Shaddaa (probably in other places too) when you fight with Red Eclipse their items (modded .utc) are only there until the cut scene with their leader.

Is there a way to fix this.

Link to comment
Share on other sites

3. How to increase Broken Items worth in components ?

 

If I remember correctly the component worth of an item is based on its cost value. Increase the cost value in the "broken item" UTI.

 

4. Where does autobalance.2da "kick in", and how those level (Set_1, Set_2, etc.) translate into game difficulty setting ?

 

I'm not sure what you mean by "kick in"? The autobalancer has a series of multiplier categories defined in autobalance.2da, which will increase the character level (but not class levels), Vitality, Force, Attack, weapon damage and saving throws of the character accordingly.

 

How those multiplier values are used vary a bit for each thing they boost, some of the formulas appear a bit complex. I believe I posted an attempt at analyzing how some of those calculations are done a few months ago.

 

A creature is assigned to an autobalancer multiplier category with their MultiplierSet field, which determine which set of multipliers will be used to boost that character (if any, multiplier set 0 turns off the autobalancer for that creature).

 

As far as I know the game difficulty adjustments are made on top of this and is not taken into concideration by the autobalancer specifically. (Though I may be wrong since I always play on Normal difficulty.)

 

5. I can`t place components in .utc files, .utp with no problem (I mean I can place, but I don`t receive them when characters are destroyed\killed\etc.).

 

Make sure the item is set to be Droppable if you want them to end up on the corpse of the creature after you kill them. There's an optional field for it in a GFF editor, and it can be set by right-clicking an equipped item in KotORTool's inventory editor (or checking the box to the right for non-equipped items).

 

6. On Nar Shaddaa (probably in other places too) when you fight with Red Eclipse their items (modded .utc) are only there until the cut scene with their leader.

Is there a way to fix this.

 

You are not in the standard Ebon Hawk module when you are fighting the Red Eclipse. There's a separate module for that, which is free of party members and full of slavers. After you kill their leader (or negotiate with him if you are into slavery, I suppose) you will be transported back to the "normal" Ebon Hawk module.

 

You can't transfer their corpses from the Red Eclipse Ebon Hawk area to the Normal Ebon Hawk area. The only way to do something like that would be to modify the scripts firing after dealing with the RE captain so that you aren't automatically transfered to the normal Ebon Hawk. Then you'd have to modify the RE Ebon Hawk area (004EBO) to add an exit ramp transition that leads you off the ship so you can leave when you are done looting.

 

(Not really worth all the effort if you ask me. It's easier to finish looting his cronies before you deal with the leader. :) )

Link to comment
Share on other sites

stoffe -mkb-

Nice to see, that someone wants to see my mod finished

If I remember correctly the component worth of an item is based on its cost value. Increase the cost value in the "broken item" UTI.

Nope, didn`t work, it`s stuck at 5 credits cost, (even when its written 500, its value in componets is that of 5 credits: 2 components). Additional cost is higher, but it dosen`t change anything.

Other ideas ?

I'm not sure what you mean by "kick in"? The autobalancer has a series of multiplier categories...

So autobalance is always on if creature has MultiplierSet value ?

 

Added\Modifed 24.02.06

 

"Solved" problems with not dropping components, and chemicals from character files.

Solved problem with not breaking down item (Survival Rations ).

 

But other problems (those above, and higher above too) still wait to be solved, so please help me out:

1. Could someone make a script for robe\armor that will check for players head, and apply it so even when using disquise thing, you will have your own head.

2. I want to make robe\armor use\block other items slots (i.e., Chest, Head, and Waist). Any idea how to do this ?

3. Please write how to make working .mod files.

 

Gulp

 

I`m sorry, I thought that posting after more than 24h from last post isn`t bumping.

I`m impatient because I want to finish my mod project, but to do that I need your help. But that`s probably every newbie problem. I`ll try not to do this again.

 

Thank you for answering.

 

Osuirof, please do not bump threads, especially since you edited this post today as well. I'm sorry if you aren't getting responses, but any impatience you show will serve to drive off those who would help you. -RH

Link to comment
Share on other sites

  • 2 weeks later...

Now on to your questions...

 

1. It is possible but it is an advanced modding project. There is the heartbeat script, but changes wouldn't be instantanious, you would need massive additions to the appearance.2da and know scripting well enough to be able to detect what PC appearance you have and change it to the new one while a certain item is equipped, and unless you know what you are doing you can really bog the game down with script additions as the game runs it over and over. ChAiNz WIP thread has him doing something like this to Kreia.

 

2. Equipping an item cannot block another item slot, that I know of, but you might want to browse baseitems.2da just in case. At least that's where I would look first. ;)

 

3. For building .mod files I strongly suggest you read one of the new area module creation tutorials (like DoomDealers) as those are what we have. Put simply, you use KT's ERF Builder, type in your filename, select MOD as the save type, then select all the files to pack in your module and create it.

Link to comment
Share on other sites

Argh, I know why my .mod was "script free": I forgot to extract dialogs from ERFs -> Modules.

Stupid, stupid, stupid...

But, if I remember right, in earlier versions of KT\K1, dialogs was in RIMs section.

1. It is possible but it is an advanced modding project.

Advanced ? I think I pass for now.

2. Equipping an item cannot block another item slot...

But maybe something like this:

http://lucasforums.com/showthread.php?t=161255

3. For building .mod files I strongly suggest you read one of the new area module...

Done that, but didn`t know that:

a. .mod file completly overrides those in modules (all files from module must be in it, trial and error rulz)

b. those damn dialogs are in ERFs\Modules section.

 

"Hamlet" question about modules:

1. Delete, or not to delete other module files (*.rim, *_s.rim, *_dlg.erf) if .mod file is present ?

2. To put item files in .mod, or not to, if I want them later in game ?

Link to comment
Share on other sites

But maybe something like this:

http://lucasforums.com/showthread.php?t=161255

About that thread of yours in the mod requests forum, if you don't put exactly what you need the mod to do no one can readily help you, or understand what you want.

 

Also, if you just want the disguise property to display your PC's head no matter what for all the differant appearances in the game when applied, then this is simply impractical to attempt due to the way the game handles these things. You would have to add so many lines to appearance.2da, one for each PC head per appearance, that it just isn't really feasable, not to mention a nightmare scripting wise.

 

Most NPC' models are also one-piece meaning there is no way to disply your PC's head while using them anyway.

 

What exact appearances are you talking here? That is important info to give people. ;)

 

1. Delete, or not to delete other module files (*.rim, *_s.rim, *_dlg.erf) if .mod file is present ?

Since the .mod file overrides the others why bother?

 

Personally I would never install a mod that actually deletes a part of the game files, it means you have to re-install the game to remove the mod.

Link to comment
Share on other sites

About that thread of yours in the mod requests forum, if you don't put exactly what...

Done that.

 

Also, if you just want the disguise property to display your PC's head no matter what for all the differant appearances...

0. Remember that I`m a newbie in modding, so don`t yell at me, if what I`m about to write is stupid\impossible.

But the game somehow knows what head I`ve got.

Is there a way to use that ?

 

Party members would be probably tougher to do.

 

And how about this question:

2. To put item files in .mod, or not to, if I want them later in game ?

(i.e. I`ll put (custom) item in 101PER, but want to use them later too).

Link to comment
Share on other sites

And how about this question:

2. To put item files in .mod, or not to, if I want them later in game ?

(i.e. I`ll put (custom) item in 101PER, but want to use them later too).

 

The template is needed to spawn the item (in a container, on a creature or in the party inventory). Thus, if you place the UTI template in a module file you can only spawn the item with scripts (or pre-place it) within that module.

 

However, once the player has picked it up and placed it in their inventory the UTI template is no longer needed or used and the item will stay in your inventory as you go to other modules/areas.

 

So, if you only want the item to be spawnable within a particular area you can put the template within that module. If you want it to be spawnable from anywhere in the game you'll have to put it in a global namespace (the override folder).

Link to comment
Share on other sites

0. Remember that I`m a newbie in modding, so don`t yell at me, if what I`m about to write is stupid\impossible.

Who here has yelled at you?

 

But the game somehow knows what head I`ve got.

Is there a way to use that ?

PC's appearances are defined by their lines in appearance.2da, so once you have chosen your head it assigns you the appearance line for that head, when you change armor/clothes/robes in game it changes your actual body model completely to that of the item class you are wearing. You have a limited number of body model slots to use (A-N), and we cannot add more.

 

So if you want to add the Republic Uniform body model so the player can wear it, you will need to replace one of the currently existing models, like clothing, but whenever you were to put on clothes you would appear as wearing a Republic Uniform.

 

If something like this is what you mean, let me know. ;)

Link to comment
Share on other sites

Thank you for answering.

 

Who here has yelled at you?

Be yell I meant yelling, or other sign of being annoyed with me :D .

 

If something like this is what you mean, let me know.

Yes\O.K.

 

1. I want to take and read Datapad from placeble, after that, run the workbench script (k_workbench.ncs) attached to this placeble, and after use of workbench destroy it.

How to do that, because the "OnClosed" field + k_workbench.ncs doesn`t work that way.

 

2. In tabletop DnD the D(amage) R(eduction) worked like this:

25/+3: Soak 25 points of damage everytime, unless weapon with enhacment >= +3, or magic.

How does this works in TSL ?

 

3. Universal Damage: what protects from it. Only Universal Damage Immunity\Resistance ?

 

4. Is there a way to make an item, that could separately pass for Workbench, Lab Station.

 

Just and only for this, so no Hak Pad, Defenders Wrist Console. etc.

Link to comment
Share on other sites

If you want to replace the Republic Soldier body model with one of the PC's appearance slots, this one is a rather easy task... you need not even edit appearance.2da.

 

While clothing is a simple option, some of the NPC's in TSL use the PC's appearances, so replacing the clothing can lead to NPC's appearing incorrectly in some areas.

 

My suggestion is to use the bad looking Armored Flight Suit model column (K). As there are only like 2 or 3 actual game uti files that use this appearance, so you have little chance of having the game glitch up.

 

You will first need to extract the body models and textures for the Male and Female Republic Soldier models (8 files), that is 2 .mdl, 2 .mdx, and 4 .tga files...

 

Found in BIFs/models.bif/Aurora Model

 

N_RepSold.mdl

N_RepSold_F.mdl

 

Found in BIFs/models.bif/Aurora Model Extension

 

N_RepSold.mdx

N_RepSold_F.mdx

 

Found in ERFs/TexturePacks/swpc_tex_tpa.erf/N

 

N_RepSold01.tga

N_RepSold_F01.tga

N_TSFOff01.tga

N_TSFOff_F01.tga

 

They show as .tpc files but you only need to double click on them and KT will open them up in a viewer and you can save them as tga files from there.

 

Now simply rename the files as the following...

 

N_RepSold.mdl ---> PMBKM.mdl

N_RepSold.mdx ---> PMBKM.mdx

N_RepSold01.tga --> PMBK01.tga (And a copy named PMBK03.tga)

N_RepSold_F.mdl --> PFBKM.mdl

N_RepSold_F.mdx --> PFBKM.mdx

N_RepSold_F01.tga --> PFBK01.tga (And a copy named PFBK03.tga)

 

N_TSFOff01.tga ----> PMBK02.tga

N_TSFOff_F01.tga --> PFBK02.tga

 

What you will have is 3 texture variations (The game has 3 so you will need 3), with this set up you will have Texture 1 having the normal Republic Uniform Texture, Texture 2 will have the TSF's Texture, Texture 3 will have the Normal Republic Uniform Texture (Though you can edit the 03 tga files to taste later on.) ;)

 

You will then need 6 identical texture txi files that contain...

xbox_downsample 256

Copy the above code line to notepad and save the files as the following...

 

PMBK01.txi

PMBK02.txi

PMBK03.txi

PFBK01.txi

PFBK02.txi

PFBK03.txi

 

The txi files aren't necissary unless you want to have the uniform show up at the workbench properly later on.

 

Final file list, what you should have if you did things as I instructed...

 

PMBKM.mdl

PMBKM.mdx

PMBK01.tga

PMBK01.txi

PMBK02.tga

PMBK02.txi

PMBK03.tga

PMBK03.txi

PFBKM.mdl

PFBKM.mdx

PFBK01.tga

PFBK01.txi

PFBK02.tga

PFBK02.txi

PFBK03.tga

PFBK03.txi

 

Now drop these 16 files into override load a game and cheat for, then put on, one of the games armored Flight Suits and you should see the Republic Uniform.

 

If you wish to edit the base Armored Flightsuit properties, you need only edit row 98 in baseitems.2da to taste. To get rid of the feat requirements or dex restrictions, base AC, etc.

 

You can create new Clothes/Armor item uti files that use that baseitem (98), and you can also set the texture variations in the uti files as well, 1 for Normal Republic Uniforms, 2 for TSF Uniforms, 3 for Normal Republic Uniforms or whatever you alter the 03 tga colors to on your end.

 

The invantory Icon filename for that baseitem is ia_ClassFlt_00X.tga.

 

The X indicates the texture variations, just like the files your renamed above, so 1 would corrispond to texture 1, 2 would corrispond to texture 2, and so on, the game only uses 3, but you can add and make more, many more.

 

Found in ERFs/TexturePacks/swpc_tex_gui.erf/I

 

They are just like any other tga file, so you will need to adjust them to look Republic Uniform-like. But this I leave to you. (Note: You do not need to rename these Icon files, just edit them to match the new Republic/TSF Uniform appearances.)

 

There you go. :D

Link to comment
Share on other sites

RedHawke

Thank you, I`ll try your method, but I ned Flight Suit, so I wil have to use other armor type (yes I know how to do that, I think).

 

But I got other problem:

1. I want to make my own poison so I added\edited entries in poison.2da, dialog.tlk (I`ve used KotOR TLK), but when I make item and want to use that poison I get this:

 

poisonerr0my.jpg

How to make this work ?

 

2. If I want to make my own grenades, but I don`t know what to edit.

So what I must edit ?

Link to comment
Share on other sites

2. If I want to make my own grenades, but I don`t know what to edit.

So what I must edit ?

 

First write the impact script of your new grenade, that determines what will happen when the grenade explodes. Save this NCS file as whatever valid resref name you like.

 

Then you'll need to edit spells.2da to add a line for your custom grenade. Copy one of the lines with label ITEM_ABILITY_GRENADE_* to use as a template. Change the RowLabel of your line to the next number in sequence, and set the label to something unique. In the impactscript column you set the name of the script you just created. In the projmodel column, set the resref of the model you want to use for the thrown object as it flies through the air.

 

Then create an UTI (item template) for your new grenade. Add an "Activate Item" property and set the subtype to the line in spells.2da you just added.

Link to comment
Share on other sites

Thank you for answering stoffe.

Maybe any idea for the first question too ?

I`ll like to release first part of my mod (day after) tomorrow, but I need this poison.

Pretty please.

 

First write the impact script of your new grenade...

Yeah, right me and scripting.

Maybe there`s a some source script for this which I can customize ?

Link to comment
Share on other sites

Maybe there`s a some source script for this which I can customize ?

That's the right way to think about it Osuirof! :D

 

Looking at spells.2da, you can see that the other grenades have their impactscript set to k_sup_grenade. That's the place to start.

 

The first thing k_sup_grenade does is determine which type of grenade was thrown (since they all use it). For your purposes, you would want to look at the portion between the braces of the if (nSpell==...

 

so if you wanted to mimic exactly the effect of a fragmentation grenade your script would look like:

#include "k_inc_force"
void main() 
{
//-----
// this part is header info that takes into account DC calculations,
//  Grenade specialization feats, and uncanny dodge feats
//-----
   int nDamage;
   int nDC;
   int nDCCheck;
   object oTarget;
   int nVFX;
   int nFeat = GetHasFeat(FEAT_WEAPON_SPECIALIZATION_GRENADE);
   int nUnc1 = GetHasFeat(FEAT_UNCANNY_DODGE_1);
   int nUnc2 = GetHasFeat(FEAT_UNCANNY_DODGE_2);

   if(nFeat == TRUE)
   {
       nFeat = 6;
   }
//------
// end header info
//------

//-----
// the following code handle the effect from
// a fragmentation grenade (copied from lines 36 to 72 of k_sup_grenade.nss)
/-----
   ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(1044),GetSpellTargetLocation());
   nVFX = 3003;
   nDamage = 20 + nFeat;
   nDC = 15;

   //oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 4.0, GetSpellTargetLocation(), FALSE, 65);

   oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 4.0, GetSpellTargetLocation(), FALSE);
   while(GetIsObjectValid(oTarget))
   {
       if(!GetIsNeutral(oTarget))
       {
           SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), SWFP_HARMFUL));
           nDCCheck = nDC;
           nDCCheck -= GR_GetGrenadeDC(oTarget);
           if(!ReflexSave(oTarget, nDCCheck, SAVING_THROW_TYPE_NONE))
           {
               ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage, DAMAGE_TYPE_PIERCING), oTarget);
           }
           else
           {
               int nApply;
               // DJS-OEI 11/20/2003
               // If the target has the Evasion feat, the damage on a successful
               // Reflex save is 0. Otherwise, it's half the original damage.
               if( GetHasFeat( FEAT_EVASION, oTarget ) ) {
                   nApply = 0;
               }
               else {
                   nApply = nDamage / 2;
               }
           ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nApply, DAMAGE_TYPE_PIERCING), oTarget);
           }
           }
       //oTarget = GetNextObjectInShape(SHAPE_SPHERE, 4.0, GetSpellTargetLocation(), FALSE, 65);
       oTarget = GetNextObjectInShape(SHAPE_SPHERE, 4.0, GetSpellTargetLocation(), FALSE);
   }

}

//------
// an extra function for modifying the DC of the grenade
// (lines 831-846 of k_sup_grenade.nss)
//------
//Get the DC for the grenade based on the targets feats.
int GR_GetGrenadeDC(object oTarget)
{
   int nUnc1 = GetHasFeat(FEAT_UNCANNY_DODGE_1, oTarget);
   int nUnc2 = GetHasFeat(FEAT_UNCANNY_DODGE_2, oTarget);
   int nDC = 0;
   if(nUnc1 == TRUE)
   {
       nDC += 2;
       if(nUnc2 == TRUE)
       {
           nDC += 2;
       }
   }
   return nDC;
}

 

As you can see there is a lot of code just make sure the game accurately accounts for the Feats of the attacker and the target. If you take out all of that variability (for the sake of understanding the meat of the script) you'd get something like this:

void main()
{  
  int nDamage=20;  // let's say constant 20 damage
  object oTarget; 

  //create the visual effect
  ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(1044),GetSpellTargetLocation());

  //get the first target in the target sphere               
  oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 4.0, GetSpellTargetLocation(), FALSE);   
  while(GetIsObjectValid(oTarget))
  {
      if(!GetIsNeutral(oTarget))
      {
          //make the enemies react
          SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), SWFP_HARMFUL));  
      }
      //apply damage, no saving throw
      ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage, DAMAGE_TYPE_PIERCING), oTarget);

      //get next object in target sphere
      oTarget = GetNextObjectInShape(SHAPE_SPHERE, 4.0, GetSpellTargetLocation(), FALSE);
  }
}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...