I'm trying to install both Stoffe's "Handmaiden Choice for Females" mod and envida's "Ebon Hawk Lab Station" mod, but they both use k_003ebo_enter.ncs.
From what I can tell all I need to do to make a k_003ebo_enter.ncs that works for both would be to add the line
ExecuteScript("ev_ebo_medbench", OBJECT_SELF);
to the main method of Stoffe's k_003ebo_enter.nss and compile it with NSS KOTOR Script Editor, but I'm not 100% sure.
Is this the right way to do it? And if it is am I supposed to add that line as the first line or the last line of the main method?
The readme for the "Ebon Hawk Lab Station" mod mentions a glitch with the Red Eclipse boarders and Visas being fixed. Is that something specific to the mod, or is it one of the game's normal glitches? If it's specific to the mod could somebody please take a look at the mod and tell me what I'd have to change in Stoffe's k_003ebo_enter.ncs to make them both work?
I'd really appreciate any help/info you guys can offer me about this.
First off, welcome to the Forums....
You could ask one of the Mods creators to use tslpatchdata to patch that file, so it'll work w/ both mods..... although, you should be able to overrite it and it should work fine... just not that time that your on the Ebon Hawk
:edit:
or if it's like like the Recruit Dustil and the Kriea's Assorted Robe Collection mod, then you can put the Handmaiden one in first, recruit her, save the game, and then exit out and put the Lab Station in it, and then reload the game and viola you have the Handmaiden and the Lab Station
Thanks!
But overwrite which one? And when you say just not that time that your on the Ebon Hawk you mean that it just won't work during the time when the Red Eclipse slavers board the Ebon Hawk, correct?
no...... the Lab station is on there, by default when the Red Eclipse are on there......
Oh, okay then. Thanks again.
Which version of the Ebon Hawk Lab Station are you using?
1.1 seems to split up the scripts a bit. The k_003ebo_enter.ncs file is a lot smaller than the one in the Handmaiden choice mod and the code inside it seems to point at two different scripts. One for normal use, the other for when the Red Eclipse shows up.
Also, it looks like the creator of the Ebon Hawk Lab Station mod hasn't posted here for about a year or so now. Don't know if he/she is still around. I think the script 003ebo_enter.ncs is a copy of the normal k_003ebo_enter.ncs file, but there's no source available to look at.
I'm trying to install both Stoffe's "Handmaiden Choice for Females" mod and envida's "Ebon Hawk Lab Station" mod, but they both use k_003ebo_enter.ncs. (snip)
If you use the latest version of the Handmaiden Choice Hack it should already have a line in place to run an external script when entering the area, so you won't have to mess with the main script. If you name a script 003_onenter_hook.ncs and put it in your override folder it should automatically get run whenever the player enters the normal Ebon Hawk area.
The k_003ebo_enter script in the Handmaiden Choice already has a workaround for the Red Eclipse problem as well. (That problem is that the Red Eclipse invasion of the Hawk takes place in a separate Ebon Hawk area, but they both have OnEnter scripts that are named the same, but work quite differently, and putting a script named like that in the override folder would override both scripts, causing one of the areas to malfunction. The mod merges both scripts into one, that checks which area is being entered.)
I don't know how envida's mod works, but if you just want a medical lab workbench on the Ebon Hawk you could use the script attached below, which adds one in the medical bay, next to the bed.
The k_003ebo_enter script in the Handmaiden Choice already has a workaround for the Red Eclipse problem as well. (That problem is that the Red Eclipse invasion of the Hawk takes place in a separate Ebon Hawk area, but they both have OnEnter scripts that are named the same, but work quite differently, and putting a script named like that in the override folder would override both scripts, causing one of the areas to malfunction. The mod merges both scripts into one, that checks which area is being entered.)
I don't know how envida's mod works, but if you just want a medical lab workbench on the Ebon Hawk you could use the script attached below, which adds one in the medical bay, next to the bed.
I'm actually using the Smuggler's Compartment mod, which has the Ebon Hawk Lab Station added to it.
Anyway, what the envida's k_003ebo_enter.nss has written in it is:
//:: FileName: k_003ebo_enter.nss
//:: Author: envida@gmail.com
//:: Created: 10 FEB 2005
//:: Updated: 28 FEB 2005 - added check for a global variable and loading different scripts
//:: Updated: 13 MAR 2005 - added a new script called ev_ebo_storage
//:: Description: allows for launching extra scripts when entering a area along with the original enter script
void main() {
// launch Ebon Hawk Smugglers Compartment Mod
ExecuteScript("ev_ebo_storage", OBJECT_SELF);
ExecuteScript("ev_ebo_container", OBJECT_SELF);
ExecuteScript("ev_ebo_smugcomp", OBJECT_SELF);
ExecuteScript("ev_ebo_medbench", OBJECT_SELF);
// check for global variable
if (GetGlobalNumber("301NAR_Red_Eclipse_At") == 1)
{
// launch original "k_003ebo_enter" script
ExecuteScript("004_ebo_enter", OBJECT_SELF);
}
else
{
// launch original "k_003ebo_enter" script
ExecuteScript("003_ebo_enter", OBJECT_SELF);
}
}
...which is a LOT smaller than your mod's. My guess was that it tried to avoid the Red Eclipse bug by having it use two separate scripts, one for the Red Eclipse part, and the other for the rest of the game.
I'm not much of a coder (understatement) but I'm guessing that if I cut and pasted the section labeled "launch Ebon Hawk Smugglers Compartment Mod" into a copy of your sourcefile and compiled it, it would effectively merge the two mods.
Would that work? Or am I walking off a cliff? :sweat:
Awesome, thanks for the help everybody!
And Sinapus, I agree, it looks like he renamed the Red Eclipse Ebon Hawk file to 004_ebo_enter and the normal Ebon Hawk to 003_ebo_enter and just calls them after placing the Lab Station, but I was afraid I was wrong and that I'd mess up my game at the point with the Red Eclipse if I just set it up the way I mentioned.
And thanks again Stoffe, you rock! I'll just use your script and leave envida's out :)
I'm actually using the Smuggler's Compartment mod, which has the Ebon Hawk Lab Station added to it.
Anyway, what the envida's k_003ebo_enter.nss has written in it is:
*Snipped Code*
...which is a LOT smaller than your mod's. My guess was that it tried to avoid the Red Eclipse bug by having it use two separate scripts, one for the Red Eclipse part, and the other for the rest of the game.
I'm not much of a coder (understatement) but I'm guessing that if I cut and pasted the section labeled "launch Ebon Hawk Smugglers Compartment Mod" into a copy of your sourcefile and compiled it, it would effectively merge the two mods.
Would that work? Or am I walking off a cliff? :sweat:
Both Stoffe's Code and Envida's do basically the same thing. Envida approached it by setting a basic if else statement pointing to the 2 different on_enter scripts meanwhile Stoffe approached by putting the content of both scripts directly into the single script file. Stoffe also built in alot of fail safe programming dependant upon different conditionals. I would actually recomend making the changes to the version that Stoffe wrote as hers has less potential of bugs and glitches. I know when I built the Holowan plugin I had used hers as the foundation for merging for these reasons alone.
Both Stoffe's Code and Envida's do basically the same thing. Envida approached it by setting a basic if else statement pointing to the 2 different on_enter scripts meanwhile Stoffe approached by putting the content of both scripts directly into the single script file. Stoffe also built in alot of fail safe programming dependant upon different conditionals. I would actually recomend making the changes to the version that Stoffe wrote as hers has less potential of bugs and glitches. I know when I built the Holowan plugin I had used hers as the foundation for merging for these reasons alone.
So... paste in this part...
// launch Ebon Hawk Smugglers Compartment Mod
ExecuteScript("ev_ebo_storage", OBJECT_SELF);
ExecuteScript("ev_ebo_container", OBJECT_SELF);
ExecuteScript("ev_ebo_smugcomp", OBJECT_SELF);
ExecuteScript("ev_ebo_medbench", OBJECT_SELF);
...somewhere in the part under "void main" in Stoffe's mod?
(Or, I guess putting it in the void main section of file Stoffe suggested might work as well. Will have to think about this.)
So... paste in this part...
// launch Ebon Hawk Smugglers Compartment Mod
ExecuteScript("ev_ebo_storage", OBJECT_SELF);
ExecuteScript("ev_ebo_container", OBJECT_SELF);
ExecuteScript("ev_ebo_smugcomp", OBJECT_SELF);
ExecuteScript("ev_ebo_medbench", OBJECT_SELF);
...somewhere in the part under "void main" in Stoffe's mod?
(Or, I guess putting it in the void main section of file Stoffe suggested might work as well. Will have to think about this.)
You'll want to look through Stooffe's code is likely to be a series of If/Else statements. You'll want to put that above code snippet in the If/Else statement that points to the main Ebon Hawk module 003EBO.
If you want to edit the k_003ebo_enter script directly find the line inside the main() function that looks like... ExecuteScript("003_onenter_hook", OBJECT_SELF); ... and insert those lines directly after that line.
If you edit the 003_onenter_hook script you can put those lines anywhere within the main() function.
If you want to edit the k_003ebo_enter script directly find the line inside the main() function that looks like... ExecuteScript("003_onenter_hook", OBJECT_SELF); ... and insert those lines directly after that line.
If you edit the 003_onenter_hook script you can put those lines anywhere within the main() function.
I edited the 003_onenter_hook file. It seemed to be simpler than going into the other file. I will have to see if it works. Thank you!
The k_enter_601 script is the only other conflict I found. Envida's Khoonda Lost Room mod is the culprit. Is there any particular place where I should put the following code in your copy of the script?
// launch Khoonda Lost Room Mod
ExecuteScript("ev_kho_locker", OBJECT_SELF);
ExecuteScript("ev_kho_blood", OBJECT_SELF);
ExecuteScript("ev_kho_bag", OBJECT_SELF);
// get doors to unlock
object oTarget = GetFirstObjectInArea(GetArea(OBJECT_SELF), OBJECT_TYPE_DOOR);
// run as long as there are locked doors for specified target
while(GetIsObjectValid(oTarget))
{
if (GetTag(oTarget) == "kh_door_locked")
{
// unlock doors
SetLocked(oTarget, FALSE);
}
oTarget = GetNextObjectInArea(GetArea(OBJECT_SELF), OBJECT_TYPE_DOOR);
}
I put it right at the front, after "void main(){" and before the first "if" statement on your copy of the file, then I used KOTORTool to compile it and it gave no immediate errors. Which knowing my luck, means I guessed wrong and it'll blow up in my face the first time I try it.
Thanks again for your help. I'll have to see how these mods work out when I have a chance to play.
The k_enter_601 script is the only other conflict I found. Envida's Khoonda Lost Room mod is the culprit. Is there any particular place where I should put the following code in your copy of the script? (snip)
You could paste it in after the line... if (oEnter == GetFirstPC()) { ... so that it ends up inside that conditional check. Otherwise the scripts will be run any time any character (not just party members but any NPC) enters or is spawned into the area. If it's inside that check it will only run when the player enters.
Okay, I'll try that. Thank you for your help. I'll stop bugging you now. ;)