PDA

View Full Version : Help with combining a TK102 mod's scripts with a Redhawke mod's scripts, please


Simbacca
10-09-2005, 02:38 PM
hello

i am currently still playing KotOR (as i do not yet own KotOR: TSL) and i have about 50 or so different mods installed. i have most all of them to work together fine, but i have one issue left that i figured i'd ask first to be sure.

in trying to have the All-In-One Force Powers mod (specifically the files from TK's Darkside Choker) to work with RedHawke's Kamino Eugenics Chamber, there are 3 files that conflict: k_zaal_itemtlk.ncs, k_zaal_putitems.ncs, and k_hzaa_dialog.dlg.

can i just combine the lines of the scripts and recompile them or is there more to it than that?


AIOFP's k_zaal_itemtlk.ncs:
int StartingConditional() {
return (GetModuleFileName()=="ebo_m12aa") &&
(!GetLocalBoolean(GetObjectByTag("PlstcCrt"),3));
}


Kamino's k_zaal_itemtlk.ncs:
int StartingConditional() {
return (!GetLocalBoolean(GetObjectByTag("PlstcCrt"),3));
}


AIOFP's k_zaal_putitems.ncs:
void main() {
object oContainer=GetObjectByTag("PlstcCrt");
CreateItemOnObject("g_i_frarmbnds51", oContainer);
SetLocalBoolean(oContainer,3,TRUE);
}


Kamino's k_zaal_putitems.ncs:
void main() {

float x=34.04f;
float y=33.58f;
float z=1.75f;
float r=180.0f;
vector MyVec = Vector(x,y,z); //line 1
location MyLoc = Location(MyVec, r); //line 2
object oNPC=CreateObject(OBJECT_TYPE_PLACEABLE, "rh_kec01", MyLoc); //line3
object oPC=GetFirstPC();
AssignCommand(oNPC,ActionStartConversation(oPC,"rh_kec01"));

object oContainer=GetObjectByTag("PlstcCrt");
CreateItemOnObject("g_i_upgrade001", oContainer,24);
CreateItemOnObject("g_i_upgrade002", oContainer,24);
CreateItemOnObject("g_i_upgrade003", oContainer,24);
CreateItemOnObject("g_i_upgrade004", oContainer,24);
CreateItemOnObject("g_i_upgrade005", oContainer,24);
CreateItemOnObject("g_i_upgrade006", oContainer,24);
CreateItemOnObject("g_i_upgrade007", oContainer,24);
CreateItemOnObject("g_i_upgrade008", oContainer,24);
CreateItemOnObject("g_i_upgrade009", oContainer,24);
CreateItemOnObject("g_w_thermldet01", oContainer,24);

SetLocalBoolean(oContainer,3,TRUE);
}

now i would of just PM'd one of the creators with this question, but to included the script examples made the PM too long. thanks in advance to anyone for looking this over.

Darth333
10-09-2005, 09:07 PM
Simply add the following line in Redhawke's script:


CreateItemOnObject("g_i_frarmbnds51", oContainer);


Which gives:

Kamino's k_zaal_putitems.nss:

void main() {

float x=34.04f;
float y=33.58f;
float z=1.75f;
float r=180.0f;
vector MyVec = Vector(x,y,z); //line 1
location MyLoc = Location(MyVec, r); //line 2
object oNPC=CreateObject(OBJECT_TYPE_PLACEABLE, "rh_kec01", MyLoc); //line3
object oPC=GetFirstPC();
AssignCommand(oNPC,ActionStartConversation(oPC,"rh_kec01"));

object oContainer=GetObjectByTag("PlstcCrt");
CreateItemOnObject("g_i_upgrade001", oContainer,24);
CreateItemOnObject("g_i_upgrade002", oContainer,24);
CreateItemOnObject("g_i_upgrade003", oContainer,24);
CreateItemOnObject("g_i_upgrade004", oContainer,24);
CreateItemOnObject("g_i_upgrade005", oContainer,24);
CreateItemOnObject("g_i_upgrade006", oContainer,24);
CreateItemOnObject("g_i_upgrade007", oContainer,24);
CreateItemOnObject("g_i_upgrade008", oContainer,24);
CreateItemOnObject("g_i_upgrade009", oContainer,24);
CreateItemOnObject("g_w_thermldet01", oContainer,24);
CreateItemOnObject("g_i_frarmbnds51", oContainer);
SetLocalBoolean(oContainer,3,TRUE);
}


and use tk102's k_zaal_itemtlk.ncs: both files do exactly the same thing. The only difference is that the conversation branch will be available only in the Ebon Hawk, which makes sense since the container is located there.

Simbacca
10-09-2005, 11:28 PM
Thank you very much for your help Darth333!

so it was exactly how i thought it was. i hesitated only because of my lack of experience with scripting, though it seems i shouldn't have. thanks again