lfnetwork.com mark read register faq members calendar

Thread: attaching game scripts to created dialog
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 03-19-2006, 07:47 PM   #1
mocap
Rookie
 
Join Date: Mar 2006
Location: Dark side of the moon
Posts: 15
attaching game scripts to created dialog

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.
mocap is offline   you may: quote & reply,
Old 03-19-2006, 08:12 PM   #2
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,295
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:

Code:
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.
Darth333 is offline   you may: quote & reply,
Old 03-19-2006, 08:27 PM   #3
mocap
Rookie
 
Join Date: Mar 2006
Location: Dark side of the moon
Posts: 15
Cool but would i still be able to use non-plot scripts like the k_pend_xpboost script to give my character a boost from the begining?
mocap is offline   you may: quote & reply,
Old 03-19-2006, 09:12 PM   #4
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,295
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:
Code:
//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.

Last edited by Darth333; 03-19-2006 at 09:36 PM.
Darth333 is offline   you may: quote & reply,
Old 03-20-2006, 10:33 PM   #5
mocap
Rookie
 
Join Date: Mar 2006
Location: Dark side of the moon
Posts: 15
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.
mocap is offline   you may: quote & reply,
Old 03-20-2006, 11:59 PM   #6
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,295
Quote:
Originally Posted by mocap
I also found out the teloporting script thing the hard way
Hehe that's one of the best ways to learn...you should have seen my "bloopers"

Glad you made it! If you have more questions, just ask.
Darth333 is offline   you may: quote & reply,
Old 03-25-2006, 08:00 PM   #7
mocap
Rookie
 
Join Date: Mar 2006
Location: Dark side of the moon
Posts: 15
Im currently playing with KOTOR 2 and the diolog stucture in KT is way diffrent. I was wondering do you know if there is a guide or list on what diolog goes were?
mocap is offline   you may: quote & reply,
Old 03-26-2006, 03:44 PM   #8
Elven6
Rookie
 
Elven6's Avatar
 
Join Date: Nov 2005
Location: Canada
Posts: 226
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.
Elven6 is offline   you may: quote & reply,
Old 03-26-2006, 07:45 PM   #9
mocap
Rookie
 
Join Date: Mar 2006
Location: Dark side of the moon
Posts: 15
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}
mocap is offline   you may: quote & reply,
Old 03-27-2006, 10:37 AM   #10
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,295
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 )
Darth333 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 > attaching game scripts to created dialog

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:25 PM.

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