Jump to content

Home

attaching game scripts to created dialog


mocap

Recommended Posts

I was wondering if you could add a dialog aption to use the script for onother dialog (ex. Trask at door that reqires you to level up uses "ex_boost" or somthing like that for its script, and add it to onother dialog)

 

What im going for is having trask make me a jedi at the begining using the script from dantooine.

Link to comment
Share on other sites

Well the answer is yes and no. It depends of the contents of the script. Blindly attaching scripts to a dialogue without verifying the contents can lead to unwanted "side effects" immediately or later in the game.

 

In the present case, you would have to create your own scripts as the Dantoine scripts calls for plot items and sets/checks for some globals so it won't work and it will mess up the Dantoine part. You will find a decompiled version of most of the Dantoine scripts here: http://www.lucasforums.com/showthread.php?t=158687

 

 

To make your pc a JEdi from the beginning, all you need is a script like this one:

 

void main()
{
object oPC = GetFirstPC();
//give some xp to your pc:
GiveXPToCreature(oPC,1500);
//this is what turns your pc into a jedi:
AddMultiClass(CLASS_TYPE_JEDIGUARDIAN ,oPC);
//add whatever item you want - a lightsaber is always a good idea...
CreateItemOnObject("object_template",oPC);
}

 

You can replace CLASS_TYPE_JEDIGUARDIAN by CLASS_TYPE_JEDICONSULAR OR CLASS_TYPE_JEDISENTINEL.

 

Replace object_template by the template of the item you want to add to your inventory.

 

Btw, several modders, including Talchia, Lil Jawa, Achilles and Griff have made similar mods in the past.

Link to comment
Share on other sites

k_pend_xpboost is the script that fires from the starboard door to allow your character to level up if he hasn't already. It also teleports your party so using it at the beginning is not recommended.

 

Here is the exact content of k_pend_xpboost.ncs:

//k_pend_xpboost.ncs decompiled by d333
#include "k_inc_end"

void main() {
object oPC = GetFirstPC();
if (((GetXP(oPC) < 1000) && (GetHitDice(oPC) <= 1))) 
            {
         SetXP(oPC, 1000);
            }
UT_TeleportWholeParty(GetObjectByTag("wp_end_room8_1"), GetObjectByTag("wp_end_room8_1"), OBJECT_INVALID);
}

 

The code I gave you in my previous post already adds the necessary xp so you don't need anything more.

 

Edit: Don't use existing scripts unless you know exaclty what they do and their effects on the game. Those you can use safely are the scripts to check the alignment of your PC, add DS/LS points, check some skills, who is with you. All those scripts can be found in the BIFs>scripts.bif>scripts, source. Note that not all the scripts listed in the BIFs are useable at any moment/location in the game. In doubt, create your own.

Link to comment
Share on other sites

Thanks for the help, I mad the little droid out side the first door turn my PC into a jedi.(small 2 line diolog) I also found out the teloporting script thing the hard way:) I got my lightsaber from him to. Thanks agian for helping me out.

Link to comment
Share on other sites

Try to use dlgeditor 225 which you can get from the starwars.com website (Just click the logo at the top) its easier to use and I don't thing Dialouge made with KT works with kotor 2.

 

Has for the tutorial I will try to find you one but use the dlgeditor 225 program since it will make things easier.

Link to comment
Share on other sites

Thanks, Kotor Tool works fine for editing the dlg files for KOTOR 2 but the tree file system is a lot diffrent than the KOTOR version. {i used kt to give my PC the lightsaber i made whene she looks at the plant in the ithorian apt}

Link to comment
Share on other sites

Note that the KotOR tool .dlg editor is no completely compatible with KotOR 2. If you edit KotOR 2 .dlg files with the KotOR tool .dlg editor, you will loose some data and it will screw up the dialogues. You'll loose al the parameters which will result in skill checks not working, global and local variables will be messed out, etc.

 

Unless you are making your own .dlg from scratch, you'll have to use tk102's DLGeditor to edit KotoOR 2 DLG files ( http://www.starwarsknights.com/tools.php )

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...