WRFan
07-19-2009, 09:09 AM
Since nobody knows when TSLRP is going to be released, I was checking out the beta 8 version and fixed some bugs along the way. Since we are actually not supposed to be using this beta, I am not going to release the bug fixes, but I would like to post some solutions for bugs that I found. It's up to you to implement them though, unless you want to wait for another 2 years until TSLRP comes out.
1) Both the Handmaiden4Females mod and the TSLRP mod are using a script with the same name, which can cause problems if you put one of them into the Override folder. The scripts are both called k_attonend.ncs, one of them is used to determine who talks to the Exile when Kreia leaves the group (Visas or Disciple, gender dependent), the other checks which party members are alive for the final conversation on the bridge leading to the forgotten Sith lands at the Trayus academy core after you defeat Kreia.
The best way to fix this is to put the scripts in appropriate *.mod files and not to leave any of them in the Override folder. Beware that scripts in the Override folder take precedence over scripts in mod files, so the game will try to use a script in the Override folder first.
If you want to leave scripts in the Override folder, merge both scripts like this:
if ( GetModuleFileName() == "006EBO") // this is after the encounter with the jedi masters in the dantooine enclave (ebon hawk, Atton injured)
{
if (IsAvailableCreature( 11 ))
{
SpawnIndividualPartyMember(NPC_DISCIPLE, "WP_650END_0");
}
else
{
SpawnIndividualPartyMember(NPC_VISAS, "WP_650END_0");
}
//bla bla first script
else // Following script controls cutscene after the Kreia fight
{
// bla bla second script
2) TSLRP has huge problems with trigger related local boolean var 30 set on triggers to mark them as "done". This is not the best way to do it anyway, it's best to destroy the trigger object as soon as it's used. In any case, sometimes the local boolean stays active and other triggers in other areas are not triggered at all. Can happen for the cutscene mentioned above, here's a code excerpt from TSLRP k_attonend.nss:
if (GetLocalBoolean(OBJECT_SELF, 30)) {
return;
}
3) The Team Gizka condition for checking if Handmaiden or Visas appears during the final cutscene of the game is somewhat weird (a_vishand_spawn.nss):
if (GetInfluence(4) > GetInfluence(9)
object1 = SpawnAvailableNPC(4, location1);
This means the Handmaiden will only be spawned on the bridge, if your influence with her is higher than your influence with Visas. Meaning, if you have influence of 100 with both Visas and the Handmaiden, Visas will be spawned, because 100 is not higher than 100. The condition should state ">=", not just ">".
Now about the Droid Factory (Telos sublevel) modules:
The Droid Factory is supposed to be accessed right after the final encounter with Atris, before returning to Telos Citadel Station. To change the module order, edit a_221load.nss and a_hand_pc_end.nss scripts:
Replace
StartNewModule("221TEL", "", "", "", "", "", "", "");
by
StartNewModule("298TEL", "", "", "", "", "", "", "");
Module 298TEL is the first floor of the droid factory. Eventually, you'll end up in 299TEL (second floor), when the mission is over, you will be automatically kicked into the 221TEL module (the destroyed Citadel station attacked by the Sith).
There are several power conduits in 298TEL that can be blown up to kill enemy droids. However, most power conduit objects haven't been added yet. You have to wait until the final version comes out, unless you want to add those objects yourself. Some of the conduits are present, but the camera angles and scripts are set wrong in the dlg files. Check out manfcon.dlg to fix (just as an example):
[Computer] Overload power conduit in 298-2TEL-A.
Camera ID 4, Camera Angle 6, associated script a_cond_overload, 1st ScriptParameter 10 (AoE), StringScript parameter cond_2tel_a (the tag of the conduit object).
There are several bugs in the 299TEL module:
1) This is not actually a bug, but if you delay the activation of the HK51 experimental droid units, the HK50 units won't be killed automatically by the new droid generation. Means you have to endure them firing on you, because for some reason the game AI always prefers your party over any other enemies in the area. For God's sake, shoot the HK51 units, don't shoot me! lol.
If you want to use the automated version even if the activation of HK51 units had been delayed before, you need to write an alternative k_hk51.ncs script:
void main() {
object oLeader = GetPartyLeader();
if ( GetGlobalBoolean("298TEL_HK51_REINIT") || GetGlobalBoolean("298TEL_HK51_DELAY") )
{
SurrenderByFaction(1,2);
AssignCommand(GetObjectByTag("hk51cs", 0), ActionStartConversation(oLeader, "hk51", 0, 0, 0, "", "", "", "", "", "", 0, 0xFFFFFFFF, 0xFFFFFFFF, 0));
}
}
You need then to bind this script to the dlg file hk47hk51.dlg:
"{[End the sequence.]}" conversation node -> associated script: insert here your own script with the code above. The HK51 units shouldn't be hostile if you delayed their activation before, but I added the SurrenderByFaction function anyway, just to be on the safe side.
2) When you approach the HK50 units in 299TEL area, the conversation will not be initiated. That's due to a bug in the k_hk50.ncs script:
SetGlobalNumber("299TEL_HK50_TRIG", (GetGlobalNumber("299TEL_HK50_TRIG") + 1))
The global number is changed too quickly, the conversation requires it to be ==1, but by the time it is checked the script already increases it by 1. This is the stupidest mistake I've ever seen! Obviously, the global number adjustment has to be delayed by at least 100 milliseconds:
DelayCommand(0.1, SetGlobalNumber("299TEL_HK50_TRIG", (GetGlobalNumber("299TEL_HK50_TRIG") + 1)));
3) The corrosive acid spray that can be activated on the HK50 terminal does nothing to the HK50 units, they will still attack you. Seems the script is not written properly, can't say for sure, since it can't be decompiled. I wrote my own script for this, called it GasThem.ncs, has to be linked to the computer terminal dlg file hk50term.dlg:
void main() {
vector vSource = GetPosition( GetFirstPC() );
object oObject = GetFirstObjectInArea(OBJECT_SELF,OBJECT_TYPE_CREAT URE);
while(GetIsObjectValid(oObject))
{
vector vTarget = GetPosition( oObject );
int SeeMe = HasLineOfSight( vSource, vTarget );
if (GetTag(oObject) == "HK50deac" && !SeeMe)
{
effect eDeath = EffectDeath();
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oObject);
}
oObject = GetNextObjectInArea(OBJECT_SELF,OBJECT_TYPE_CREATU RE);
}
}
This will kill all HK50 units that are still inside the area that gets hit by the acid spray
4) Several errors in the hk51term.dlg (the HK51 area computer terminal):
If you decide to destroy the core,the local boolean 30 is not set. Same problem as with the bridge cutscene above! Needs to be:
a_local_set ->30->HK47.
If you decide to destroy the core, all HK51 units should stop being hostile, turned to Neutral faction and become deactivated after a short cutscene conversation. Doesn't happen even if you fix the local boolean, because the script is missing. Wrote one of my own, needs to be linked to hk51.dlg (Destroyed core conversation node end):
a_hk51_disable:
void main() {
SurrenderByFaction(1,2);
DelayCommand(0.1, DestroyObject(GetObjectByTag("tr_hk51", 1), 0.0, 0, 0.0, 0));
object oObject = GetFirstObjectInArea(OBJECT_SELF,OBJECT_TYPE_CREAT URE);
while(GetIsObjectValid(oObject))
{
int oName = TestStringAgainstPattern("**hk51**", GetTag(oObject));
if (oName)
{
AssignCommand(oObject, ActionPlayAnimation(20, 1.0, (-1.0)));
}
oObject = GetNextObjectInArea(OBJECT_SELF,OBJECT_TYPE_CREATU RE);
}
}
5) For some reason, HK47, who you control in the Droid Factory, has set SetMinOneHP to 1, meaning he cannot die. Huh? Actually, I think he's supposed to be mortal, in fact, there shouldn't even be a game over, if he dies, he won't appear later on Malachor, simple as that. But it's not implemented (yet). In any case, if you want to set SetMinOneHP to 0, use k_298_enter.nss and k_299_enter.nss scripts:
SetMinOneHP(GetFirstPC(),0);
Your decisions at the Droid Factory will have a direct impact on what happens on Malachor, right after the shadow generator activation. This is controlled through the dialog file sensorfi.dlg, which is buggy as hell. It misses some of the original conversation lines spoken by HK47, the shadow generator quest has to be set to completed etc. Check out the original sensorfi.dlg created by Obsidian and adjust the Team Gizka version appropriately.
1) Both the Handmaiden4Females mod and the TSLRP mod are using a script with the same name, which can cause problems if you put one of them into the Override folder. The scripts are both called k_attonend.ncs, one of them is used to determine who talks to the Exile when Kreia leaves the group (Visas or Disciple, gender dependent), the other checks which party members are alive for the final conversation on the bridge leading to the forgotten Sith lands at the Trayus academy core after you defeat Kreia.
The best way to fix this is to put the scripts in appropriate *.mod files and not to leave any of them in the Override folder. Beware that scripts in the Override folder take precedence over scripts in mod files, so the game will try to use a script in the Override folder first.
If you want to leave scripts in the Override folder, merge both scripts like this:
if ( GetModuleFileName() == "006EBO") // this is after the encounter with the jedi masters in the dantooine enclave (ebon hawk, Atton injured)
{
if (IsAvailableCreature( 11 ))
{
SpawnIndividualPartyMember(NPC_DISCIPLE, "WP_650END_0");
}
else
{
SpawnIndividualPartyMember(NPC_VISAS, "WP_650END_0");
}
//bla bla first script
else // Following script controls cutscene after the Kreia fight
{
// bla bla second script
2) TSLRP has huge problems with trigger related local boolean var 30 set on triggers to mark them as "done". This is not the best way to do it anyway, it's best to destroy the trigger object as soon as it's used. In any case, sometimes the local boolean stays active and other triggers in other areas are not triggered at all. Can happen for the cutscene mentioned above, here's a code excerpt from TSLRP k_attonend.nss:
if (GetLocalBoolean(OBJECT_SELF, 30)) {
return;
}
3) The Team Gizka condition for checking if Handmaiden or Visas appears during the final cutscene of the game is somewhat weird (a_vishand_spawn.nss):
if (GetInfluence(4) > GetInfluence(9)
object1 = SpawnAvailableNPC(4, location1);
This means the Handmaiden will only be spawned on the bridge, if your influence with her is higher than your influence with Visas. Meaning, if you have influence of 100 with both Visas and the Handmaiden, Visas will be spawned, because 100 is not higher than 100. The condition should state ">=", not just ">".
Now about the Droid Factory (Telos sublevel) modules:
The Droid Factory is supposed to be accessed right after the final encounter with Atris, before returning to Telos Citadel Station. To change the module order, edit a_221load.nss and a_hand_pc_end.nss scripts:
Replace
StartNewModule("221TEL", "", "", "", "", "", "", "");
by
StartNewModule("298TEL", "", "", "", "", "", "", "");
Module 298TEL is the first floor of the droid factory. Eventually, you'll end up in 299TEL (second floor), when the mission is over, you will be automatically kicked into the 221TEL module (the destroyed Citadel station attacked by the Sith).
There are several power conduits in 298TEL that can be blown up to kill enemy droids. However, most power conduit objects haven't been added yet. You have to wait until the final version comes out, unless you want to add those objects yourself. Some of the conduits are present, but the camera angles and scripts are set wrong in the dlg files. Check out manfcon.dlg to fix (just as an example):
[Computer] Overload power conduit in 298-2TEL-A.
Camera ID 4, Camera Angle 6, associated script a_cond_overload, 1st ScriptParameter 10 (AoE), StringScript parameter cond_2tel_a (the tag of the conduit object).
There are several bugs in the 299TEL module:
1) This is not actually a bug, but if you delay the activation of the HK51 experimental droid units, the HK50 units won't be killed automatically by the new droid generation. Means you have to endure them firing on you, because for some reason the game AI always prefers your party over any other enemies in the area. For God's sake, shoot the HK51 units, don't shoot me! lol.
If you want to use the automated version even if the activation of HK51 units had been delayed before, you need to write an alternative k_hk51.ncs script:
void main() {
object oLeader = GetPartyLeader();
if ( GetGlobalBoolean("298TEL_HK51_REINIT") || GetGlobalBoolean("298TEL_HK51_DELAY") )
{
SurrenderByFaction(1,2);
AssignCommand(GetObjectByTag("hk51cs", 0), ActionStartConversation(oLeader, "hk51", 0, 0, 0, "", "", "", "", "", "", 0, 0xFFFFFFFF, 0xFFFFFFFF, 0));
}
}
You need then to bind this script to the dlg file hk47hk51.dlg:
"{[End the sequence.]}" conversation node -> associated script: insert here your own script with the code above. The HK51 units shouldn't be hostile if you delayed their activation before, but I added the SurrenderByFaction function anyway, just to be on the safe side.
2) When you approach the HK50 units in 299TEL area, the conversation will not be initiated. That's due to a bug in the k_hk50.ncs script:
SetGlobalNumber("299TEL_HK50_TRIG", (GetGlobalNumber("299TEL_HK50_TRIG") + 1))
The global number is changed too quickly, the conversation requires it to be ==1, but by the time it is checked the script already increases it by 1. This is the stupidest mistake I've ever seen! Obviously, the global number adjustment has to be delayed by at least 100 milliseconds:
DelayCommand(0.1, SetGlobalNumber("299TEL_HK50_TRIG", (GetGlobalNumber("299TEL_HK50_TRIG") + 1)));
3) The corrosive acid spray that can be activated on the HK50 terminal does nothing to the HK50 units, they will still attack you. Seems the script is not written properly, can't say for sure, since it can't be decompiled. I wrote my own script for this, called it GasThem.ncs, has to be linked to the computer terminal dlg file hk50term.dlg:
void main() {
vector vSource = GetPosition( GetFirstPC() );
object oObject = GetFirstObjectInArea(OBJECT_SELF,OBJECT_TYPE_CREAT URE);
while(GetIsObjectValid(oObject))
{
vector vTarget = GetPosition( oObject );
int SeeMe = HasLineOfSight( vSource, vTarget );
if (GetTag(oObject) == "HK50deac" && !SeeMe)
{
effect eDeath = EffectDeath();
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oObject);
}
oObject = GetNextObjectInArea(OBJECT_SELF,OBJECT_TYPE_CREATU RE);
}
}
This will kill all HK50 units that are still inside the area that gets hit by the acid spray
4) Several errors in the hk51term.dlg (the HK51 area computer terminal):
If you decide to destroy the core,the local boolean 30 is not set. Same problem as with the bridge cutscene above! Needs to be:
a_local_set ->30->HK47.
If you decide to destroy the core, all HK51 units should stop being hostile, turned to Neutral faction and become deactivated after a short cutscene conversation. Doesn't happen even if you fix the local boolean, because the script is missing. Wrote one of my own, needs to be linked to hk51.dlg (Destroyed core conversation node end):
a_hk51_disable:
void main() {
SurrenderByFaction(1,2);
DelayCommand(0.1, DestroyObject(GetObjectByTag("tr_hk51", 1), 0.0, 0, 0.0, 0));
object oObject = GetFirstObjectInArea(OBJECT_SELF,OBJECT_TYPE_CREAT URE);
while(GetIsObjectValid(oObject))
{
int oName = TestStringAgainstPattern("**hk51**", GetTag(oObject));
if (oName)
{
AssignCommand(oObject, ActionPlayAnimation(20, 1.0, (-1.0)));
}
oObject = GetNextObjectInArea(OBJECT_SELF,OBJECT_TYPE_CREATU RE);
}
}
5) For some reason, HK47, who you control in the Droid Factory, has set SetMinOneHP to 1, meaning he cannot die. Huh? Actually, I think he's supposed to be mortal, in fact, there shouldn't even be a game over, if he dies, he won't appear later on Malachor, simple as that. But it's not implemented (yet). In any case, if you want to set SetMinOneHP to 0, use k_298_enter.nss and k_299_enter.nss scripts:
SetMinOneHP(GetFirstPC(),0);
Your decisions at the Droid Factory will have a direct impact on what happens on Malachor, right after the shadow generator activation. This is controlled through the dialog file sensorfi.dlg, which is buggy as hell. It misses some of the original conversation lines spoken by HK47, the shadow generator quest has to be set to completed etc. Check out the original sensorfi.dlg created by Obsidian and adjust the Team Gizka version appropriately.