PDA

View Full Version : TSLRP related - bug fixing


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.

Shem
07-19-2009, 09:34 AM
This thread is wrong is so many ways.

Qui-Gon Glenn
07-19-2009, 01:04 PM
This thread is wrong is so many ways.

Yes and no.

WRFan, you seem to be a very knowledgable modder, for someone who *poof* just instantiated yourself... if you are a unique individual, then I commend you for all the work you are doing at bug fixing.

As for the leaked beta you are working on... if you used the updater after downloading the beta, your game will be bugged worse than it actually should be. Some of what you are perceiving as bugs were/are already fixed in subsequent builds.

With your talent for bug finding and fixing, it seems like you could collaborate with the Deadly kids and help them with their ongoing restoration mod - it seems to me, at this point, more likely to be released in the relevant future.

As for actually working on the stuff from the beta, and also logging in to the TG forums to announce this same fixing - you have a lots of balls, and may want to consider that regardless of intent, this is cheeky behavior.

I applaud you for your fixing, hope that you keep up the good work, but I for one as a beta for TSLRP and long-time supporter of their project, I would ask that you work on your own original fixes, and leave anything done by TG alone. Original work is your friend!!!!!

Lex.mkr
07-19-2009, 01:31 PM
With your talent for bug finding and fixing, it seems like you could collaborate with the Deadly kids and help them with their ongoing restoration mod - it seems to me, at this point, more likely to be released in the relevant future.
Ditto. You can find out more about their project here (http://www.deadlystream.com/tsl-restored-content-mod-f123.html). :thmbup1:

Zerimar Nyliram
07-19-2009, 04:37 PM
Thank you for making this thread! I have been going apecrap over the incompatibility of these two mods for years. Unfortunately, I am not a modder, so that technical stuff you just posted is way over my head. I hope you or anyone of like talent can work on reconciling a number of the more popular mods.

Here's a list of the ones I've come across that I think would be nice if they were compatible:

*Kreia cutscene fix (the one that makes it an in-game cutscene rather than an FMV) and Handmaiden4Females: kreia.dlg
*M478 and Handmaiden4Females: k_sup_galaxymap
*USM and Handmaiden4Females: 904kreia.dlg and k_enter_601
*tsl_urc_final, USM, and Handmaiden4Females: disk_enc.dlg
*M478/USM (they use a compatibility patch) and lr_pc_lightsaber_01: globalcat
*Handmaiden fix, rzf_262imprison_csfix, USM, and Handmaiden4Females: handmaiden.dlg
*OndMus1 and USM: k_mus_treasure and talia.dlg
*Dantooine/Telos Restoration and USM: kreatris.dlg
*Visas Force site and USM: Visasmarr.dlg

Those are all from my "conflicting files" folder, so I'm sorry I don't have any information on them other than their names. Later, I will do searches on them and find out the names of the authors as well as which ones came from Filefront or PCGamemods.

CrisG
07-20-2009, 02:19 AM
So is TSLRP a differnt project from Team Gizka? i am eager to see ...somehow, a fixed verson of KOTR II and have waited paitently for years now. will these two projects compliment each other? thanks for any info.

FaZzZa99
07-20-2009, 03:12 AM
So is TSLRP a differnt project from Team Gizka? i am eager to see ...somehow, a fixed verson of KOTR II and have waited paitently for years now. will these two projects compliment each other? thanks for any info.

Team Gizka was the team making the TSLRP

Lord of Hunger
07-20-2009, 01:36 PM
I agree with Shem's statement. WRFan should not be modding stolen work, but on the other hand he is accomplishing what has usually taken a year to do. :(

WRFan, while you are obviously one of the most brilliant KOTOR/TSL scripters I have ever seen, I hope you'll understand that modding stolen work (even just providing scripts that are solutions for problems in stolen work) is wrong under every circumstance and nobody working on TSLRCM supports this at all. Thus, please do not approach us offering help on TSLRCM. We would have loved to have it before, but doing this unfortunately severely reduces your trustworthiness.

Perhaps you meant no harm and did not understand the rules. That may be understandable. But as much as we would like TSLRP to be bug free and available to the community, doing so in this manner is simply unethical. Frankly one should either get Dashus' permission to work on the project or do what we have done and do a restoration of our own from scratch.

VarsityPuppet
07-20-2009, 08:39 PM
Hm. This is a tricky issue.

I for one don't see what's wrong with WRfan fixing bugs with a very outdated leaked Beta of the TSLRP, if he isn't releasing the fixes. In the long run, none of it will matter anyways.
The TSLRCP will be released sooner than the latter and we can all enjoy restored content then.

Ha, what if WRFan was another Darth Balor alias? Oh the thought of it makes me giggle.

I dunno. I'm outta here before I get infracted. ZIP!

Q
07-21-2009, 06:42 AM
While this thread is certainly inappropriate, it at least serves one positive purpose. It shows that the tragedy that TSLRP has become is due to the continued inertia (and ineptitude, perhaps?) of one person.

It should hardly come as a surprise to anyone who has followed this drama and played around with the beta that the part of the mod that is the least complete was that person's responsibility to begin with, and that the entire project, along with explaining why it still isn't done, was dumped into that particular person's lap by the other team members whose work was mostly done.

Score one for epic slackassery. Yay. :dozey:

Zerimar Nyliram
07-21-2009, 02:25 PM
Oh, he's tweaking the leaked TSLRP data! Man, don't know how I missed that. I thought he was just talking about the compatibility issues with it and Shem's lesbian romance mod. (I noticed it conflicted with a few mods from K2RP - not TSLRP - myself.)

Well, I do hope someone can take it upon themselves to patch a number of mods to insure that they are compatible with each other and with TSLRP. (I thought that was the purpose of this thread but I guess I didn't read carefully.) Perhaps I should repost my list in the TSL Restored Content Project mod?

WRFan
07-23-2009, 02:38 PM
Some of what you are perceiving as bugs were/are already fixed in subsequent builds.


I am sure they are. But since the betas are not public, there's no way to know, so don't blame me. I can only work on something that is available.

And if you all are so concerned with legal issues and ethics concerning the ownership of a particular product then maybe you should consider the fact that Bioware does not endorse KOTOR 1 modding and doesn't allow any threads on their forums concerned with modding. Yet you have no problems modding original Bioware resources.

In any case, it's utterly up to you to implement my suggestions. If you think it's unethical, wait for the final TSLRP version. I am sure it will be released within the next 50 years or so. lol

VarsityPuppet
07-23-2009, 09:50 PM
I wonder what exactly the TSLRP team is doing right now... other than not posting updates?

The thing I find funny about these script fixes is that even if anyone implements them, no one will likely admit to it--because doing so would give it away that they have acquired the leaked beta which I would presume is a breach of contract. (the contract between modders and users... I think?)

Det. Bart Lasiter
07-23-2009, 10:29 PM
I am sure they are. But since the betas are not public, there's no way to know, so don't blame me. I can only work on something that is available.

And if you all are so concerned with legal issues and ethics concerning the ownership of a particular product then maybe you should consider the fact that Bioware does not endorse KOTOR 1 modding and doesn't allow any threads on their forums concerned with modding. Yet you have no problems modding original Bioware resources.

In any case, it's utterly up to you to implement my suggestions. If you think it's unethical, wait for the final TSLRP version. I am sure it will be released within the next 50 years or so. lolHaha, I love how you show up and post something that benefits the community and people are all over you because THAT'S TEAM GIZKA'S WORK THERE BUCKO YOU STOLE IT HURF DURF >:|

hang on I have to add some bull**** copyright notices to the bottom of the readme of my latest mod

N**
07-24-2009, 12:05 AM
Just a nitpick to correct what was probably a typo, but BioWare transferred all copyrights to LucasArts for KotOR. I think BioWare does not support modding K1 because either they were asked not to, they didn't want to risk infringement on the Star Wars franchise, or because they didn't want competition with their beloved child, NWN. As K1 is basically the bastard child in the relationship, #3 is perhaps the most likely, but the other reasons are also equally valid.

hang on I have to add some bull**** copyright notices to the bottom of the readme of my latest mod
:thumbsup:

Q
07-24-2009, 11:27 PM
Haha, I love how you show up and post something that benefits the community and people are all over you because THAT'S TEAM GIZKA'S WORK THERE BUCKO YOU STOLE IT HURF DURF >:|

hang on I have to add some bull**** copyright notices to the bottom of the readme of my latest mod
Yeah, all of the hostility would be a little bit more understandable if this involved a mod that might actually get released or something. ::

RedHawke
07-25-2009, 03:16 AM
Ok folks off-topic fun over, fat infractions for any posters that persist. And I mean fat infractions.

Comments/feedback on the bug fixes are ok, but this is not a morality discussion forum, take that elsewhere. Kavar's is a good choice and talk about it and why this thread makes you feel 'icky' all you want.

Fact is that WRFan hasn't broken any rule here by posting code fixes, and that is the bottom line.

Edit: I see someone decided to "push it" and made an off-topic post... I'm not joking here folks, I'm tired of your needless 'drama' crap in this thread. Keep your posts to business only or don't post here, any little bit of your post is off-topic and I delete it and infract you. I hope this clarifies things... -RH