J_Slash Posted April 19, 2005 Share Posted April 19, 2005 Originally posted by Prime The other problem area is in the Mandalorian camp. The wierd thing here is that most times when the assassins spawn as dark jedi, they don't have their sabers equiped even though I equip it for them. They just try to fight hand to hand. I'm not sure why this is. Does anyone know if it could be related to the fact that many of the Mandalorians are fighting hand to hand? I'd love to hear any theories. Maybe u need to give them 'weapon proficiency: lightsabre" ?? i mean maybe those ones in particular don't have them?? Link to comment Share on other sites More sharing options...
Sivy Posted April 19, 2005 Share Posted April 19, 2005 how about a couple in the cantina on Nar Shaddaa? have them facing the bartender as if they're asking him your whereabouts. Link to comment Share on other sites More sharing options...
stoffe Posted April 19, 2005 Share Posted April 19, 2005 Originally posted by Prime I have most of the scripts in working order now, although a couple areas are still giving problems. In the caves on Korriban when the player crosses the bridge the assassins don't spawn when my script is used, and I haven't figured out why. Even if I just try to call the original script from a new script it doesn't work. Which script do you modify? As far as I can see there are two relevant scripts to that encounter. The trigger script that spawns them in, and their own OnSpawn event script. Are you using ExecuteScript to modify any of those? I have noticed that some scripts wont seem to work if made to run through ExecuteScript() when they originally didn't. I haven't been able to pin down exactly what it is that breaks though, but I've run into this problem on numerous occasions. If you are modifying the OnSpawn event script of the Sith Assassins, try to modify the script directly rather than using ExecuteScript() to replace it, and see if that makes any difference. Code for their OnSpawn script: // ST: k_fab_sith_si.nss // ST: (403DXN_s.rim, 701KOR_s.rim, 702KOR_s.rim, 710KOR_s.rim, 711KOR_s.rim) #include "k_inc_generic" void main() { // ST: Merged to work in Override... if (GetModuleName() == "403DXN") { GN_SetSpawnInCondition( SW_FLAG_EVENT_ON_HEARTBEAT ); GN_SetSpawnInCondition( SW_FLAG_EVENT_ON_PERCEPTION ); } GN_SetSpawnInCondition( SW_FLAG_EVENT_ON_DAMAGED ); effect eVis = EffectVisualEffect(8000); ApplyEffectToObject( DURATION_TYPE_PERMANENT, eVis, OBJECT_SELF, 2.0 ); // ST: Merged to work in Override... if (GetModuleName() == "403DXN") EnableRendering(OBJECT_SELF, TRUE); else DelayCommand(2.0, EnableRendering(OBJECT_SELF, TRUE)); DelayCommand(2.0, ChangeToStandardFaction( OBJECT_SELF, STANDARD_FACTION_HOSTILE_1 )); DelayCommand(2.0, GN_DetermineCombatRound()); GN_SetDayNightPresence( AMBIENT_PRESENCE_ALWAYS_PRESENT ); GN_SetListeningPatterns(); GN_WalkWayPoints(); } Originally posted by Prime The other problem area is in the Mandalorian camp. The wierd thing here is that most times when the assassins spawn as dark jedi, they don't have their sabers equiped even though I equip it for them. They just try to fight hand to hand. I'm not sure why this is. Does anyone know if it could be related to the fact that many of the Mandalorians are fighting hand to hand? I'd love to hear any theories. Make sure you've given them the proficiency to equip it (if they don't already have it) before you give them the equip command. To be safe you could delay the equip command by half a second or so to make sure the feat is registered if you grant it with GrantFeat(). If that isn't the problem, the bioware written AI's have been notoriously unreliable when it comes to switching weapons. If Another AI event clears the action queue before they have time to equip the new weapon they will happily engage the enemy bare-handed. Check that your equip-command isn't issued right before a call to GN_DetermineCombatRound(), since that function uses ClearAllActions() quite liberally. Unfortunately the standard OnPerception event is likely a greater problem in that regard, since if the NPC isn't already fighting someone when they perceive a hostile creature, they will call DetermineCombatRound(). And when a creature spawn in, this OnPerception event code will trigger for every creature within their visual range. This might cause trouble on Dxun since there are a lot of hostile Mandalorians around, but more importantly, the Sith Assassins there spawn already hostile, while they spawn neutral and then go hostile after 2 seconds everywhere else. Though somewhat dangerous, you could try to briefly disable the creature AI for a short while to give them time to equip the weapon without interruptions. You'll have to experiment a bit to see that it won't cause trouble though. Use: // Blocks out the creature's AI SetLocalBoolean(OBJECT_SELF, SW_FLAG_AI_OFF, TRUE); // Unblocks the AI again. SetLocalBoolean(OBJECT_SELF, SW_FLAG_AI_OFF, FALSE); I suppose you could also solve it by changing the Dxun Sith Assassins back from being hostile when they spawn. You could try adding... ChangeToStandardFaction( OBJECT_SELF, STANDARD_FACTION_NEUTRAL ); ...to their OnSpawn script since it will set them back to Hostile after 2 seconds at any rate. Hopefully a faction change in the spawn script should take effect before their OnPerception event fires. As for the fact that most Mandalorians in the sith ambush are fighting hand to hand, that's probably due to the fact that they don't have any weapons in their inventory. Seems they're so eager to repel the Sith invaders they have no time to visit the armory. Originally posted by Prime I'm in the middle of looking at where other potential replacements could be. There are whole planets without any Sith, but I really don't want to put Sith where they would be out of place story wise. I'd be interested in any suggestions for possible additional candidates for replacement. In my humble opinion you shouldn't put any lightsaber wielding Sith in any public places where there are common people around. The TSL Sith are supposed to operate under strict secrecy, the Republic and Jedi aren't even sure that they exist. Going around flashing red lightsabers in public places would be rather counterproductive to keeping to the shadows and remaining unknown. EDIT: Elaborated some more... Link to comment Share on other sites More sharing options...
DarthSilius Posted April 19, 2005 Share Posted April 19, 2005 In regards to lightsabers not equipping, could you add a double-check to one of the other events: OnDamaged, OnHeartbeat, etc? If it's not equipped try equipping again. Link to comment Share on other sites More sharing options...
stoffe Posted April 19, 2005 Share Posted April 19, 2005 Originally posted by DarthSilius In regards to lightsabers not equipping, could you add a double-check to one of the other events: OnDamaged, OnHeartbeat, etc? If it's not equipped try equipping again. The combat AI already has a function for equipping appropriate weapons running each combat round. The problem is that this is just as suceptible to being interrupted by a ClearAllActions() call triggered by another AI event in the heat of battle. Link to comment Share on other sites More sharing options...
Prime Posted April 19, 2005 Author Share Posted April 19, 2005 Originally posted by stoffe -mkb- Which script do you modify? As far as I can see there are two relevant scripts to that encounter. The trigger script that spawns them in, and their own OnSpawn event script. I've been using the a_sith_att script, IIRC. Since that hasn't been working, I'm going to try the OnSpawn route instead. Originally posted by stoffe -mkb- Are you using ExecuteScript to modify any of those? I have noticed that some scripts wont seem to work if made to run through ExecuteScript() when they originally didn't. I haven't been able to pin down exactly what it is that breaks though, but I've run into this problem on numerous occasions. That would explain a hell of a lot. Like I said, I couldn't even get just an ExecuteScript() call to work. But at least that means I am not going crazy. Originally posted by stoffe -mkb- If you are modifying the OnSpawn event script of the Sith Assassins, try to modify the script directly rather than using ExecuteScript() to replace it, and see if that makes any difference. Code for their OnSpawn script: [i]snipped for space[/i] Where is the k_fab_sith_si.nss script located? I found the compiled versions in the scripts for the associated modules, but I didn't see the source in the big group of sources. Did I just miss it? Originally posted by stoffe -mkb- Make sure you've given them the proficiency to equip it (if they don't already have it) before you give them the equip command. To be safe you could delay the equip command by half a second or so to make sure the feat is registered if you grant it with GrantFeat(). Yep, I've given them both the lightsaber proficiency and focus feats. And the script is the same that is run for the other modules, and the assassins there use their lightsabers just fine. But I will try the delay in a few places to see if that makes a difference. On rare occassions the assassins actually use their lightsabers, so maybe it is a timing issue. Originally posted by stoffe -mkb- If that isn't the problem, the bioware written AI's have been notoriously unreliable when it comes to switching weapons. If Another AI event clears the action queue before they have time to equip the new weapon they will happily engage the enemy bare-handed. Dark Jedi are dumb. But good to know that this is the case. Originally posted by stoffe -mkb- Check that your equip-command isn't issued right before a call to GN_DetermineCombatRound(), since that function uses ClearAllActions() quite liberally. Unfortunately the standard OnPerception event is likely a greater problem in that regard, since if the NPC isn't already fighting someone when they perceive a hostile creature, they will call DetermineCombatRound(). And when a creature spawn in, this OnPerception event code will trigger for every creature within their visual range. This might cause trouble on Dxun since there are a lot of hostile Mandalorians around, but more importantly, the Sith Assassins there spawn already hostile, while they spawn neutral and then go hostile after 2 seconds everywhere else. It may turn out that there are too many obsticles in the Dxun case. I'll try what you mentioned above, and see if that helps. If not, then I will abandon altering this area. Originally posted by stoffe -mkb- Though somewhat dangerous, you could try to briefly disable the creature AI for a short while to give them time to equip the weapon without interruptions. You'll have to experiment a bit to see that it won't cause trouble though. Use: // Blocks out the creature's AI SetLocalBoolean(OBJECT_SELF, SW_FLAG_AI_OFF, TRUE); // Unblocks the AI again. SetLocalBoolean(OBJECT_SELF, SW_FLAG_AI_OFF, FALSE); I'll give this a try as well if the other options are unsuccessful. Originally posted by stoffe -mkb- In my humble opinion you shouldn't put any lightsaber wielding Sith in any public places where there are common people around. The TSL Sith are supposed to operate under strict secrecy, the Republic and Jedi aren't even sure that they exist. Going around flashing red lightsabers in public places would be rather counterproductive to keeping to the shadows and remaining unknown. I agree completely. I do not want to really alter the story and add Dark Jedi randomly. That is why I went the replacement route instead of trying to spawn additional ones. I kind of view as the evil version of the Jedi and clones. I want a Dark Jedi to lead a group of assassins like the Jedi lead the troopers. Link to comment Share on other sites More sharing options...
stoffe Posted April 19, 2005 Share Posted April 19, 2005 Originally posted by Prime I've been using the a_sith_att script, IIRC. Since that hasn't been working, I'm going to try the OnSpawn route instead. The a_sith_att script, which is fired by the trigger at the bridge, is fairly simple. All it does it spawn a bunch of assassins with varying delays. Here's code for that, if you need it: // ST: a_sith_att.nss (710KOR_s.rim) #include "k_inc_fab" void SpawnSithAss(int nNum) { FAB_Spawn("sith_ass", nNum); } void main() { object oEnter = GetEnteringObject(); if (oEnter == GetFirstPC()) { object oTrigger = GetObjectByTag("tr_sith_ass"); if (GetIsObjectValid(oTrigger)) { if (!GetLocalBoolean(oTrigger, 40)) { SetLocalBoolean(oTrigger, 40, TRUE); SpawnSithAss(0); SpawnSithAss(1); DelayCommand(7.0, SpawnSithAss(2)); DelayCommand(8.0, SpawnSithAss(3)); DelayCommand(3.0, SpawnSithAss(4)); DelayCommand(10.0, SpawnSithAss(5)); DelayCommand(12.0, SpawnSithAss(6)); } } } } Note however that there's a script with the same name in 403DXN_s.rim, so putting the above a_sith_att.ncs in Override would be a bad idea. (The one in 403DXN is the script that controls all the mini-cutscenes in the ambush.) I haven't had time to make code for that one yet, so it can be merged with the above script with an area check added, but I can do it if you need it. Originally posted by Prime Where is the k_fab_sith_si.nss script located? I found the compiled versions in the scripts for the associated modules, but I didn't see the source in the big group of sources. Did I just miss it? Unfortunately there is no source code available in the game for the scripts present in the RIM files, only for the global scripts in Scripts.bif. I create code for those scripts by hand when I need it by decompiling them to bytecode, reading it and writing source from that which exactly matches the original script when compiled. Won't be the exact source that Obsidian wrote, but since it compiles down to the exact same bytecode it doesn't matter. Originally posted by Prime It may turn out that there are too many obsticles in the Dxun case. I'll try what you mentioned above, and see if that helps. If not, then I will abandon altering this area. I updated my post above with one additional thing you could try, ie making them non-hostile for a couple of seconds after they spawn, like the Sith Assassins do everywhere else in the game (except Trayus, but those are pre-placed in the area and not spawned in). Link to comment Share on other sites More sharing options...
Prime Posted April 19, 2005 Author Share Posted April 19, 2005 Originally posted by stoffe -mkb- The a_sith_att script, which is fired by the trigger at the bridge, is fairly simple. All it does it spawn a bunch of assassins with varying delays. Here's code for that, if you need it: // ST: a_sith_att.nss (710KOR_s.rim) #include "k_inc_fab" void SpawnSithAss(int nNum) { FAB_Spawn("sith_ass", nNum); } void main() { object oEnter = GetEnteringObject(); if (oEnter == GetFirstPC()) { object oTrigger = GetObjectByTag("tr_sith_ass"); if (GetIsObjectValid(oTrigger)) { if (!GetLocalBoolean(oTrigger, 40)) { SetLocalBoolean(oTrigger, 40, TRUE); SpawnSithAss(0); SpawnSithAss(1); DelayCommand(7.0, SpawnSithAss(2)); DelayCommand(8.0, SpawnSithAss(3)); DelayCommand(3.0, SpawnSithAss(4)); DelayCommand(10.0, SpawnSithAss(5)); DelayCommand(12.0, SpawnSithAss(6)); } } } } Great. That should help a lot. Originally posted by stoffe -mkb- Note however that there's a script with the same name in 403DXN_s.rim, so putting the above a_sith_att.ncs in Override would be a bad idea. (The one in 403DXN is the script that controls all the mini-cutscenes in the ambush.) I haven't had time to make code for that one yet, so it can be merged with the above script with an area check added, but I can do it if you need it. I appreciate the offer, but I wouldn't worry about it at this point. I still need to see if I can get the assassins working properly. If that goes OK, maybe then it will be worth looking into. But I don't want you to go through the trouble if it isn't going to be used anyway. Originally posted by stoffe -mkb- Unfortunately there is no source code available in the game for the scripts present in the RIM files, only for the global scripts in Scripts.bif. I create code for those scripts by hand when I need it by decompiling them to bytecode, reading it and writing source from that which exactly matches the original script when compiled. Won't be the exact source that Obsidian wrote, but since it compiles down to the exact same bytecode it doesn't matter. I was worried that was the way you did it. Originally posted by stoffe -mkb- I updated my post above with one additional thing you could try, ie making them non-hostile for a couple of seconds after they spawn, like the Sith Assassins do everywhere else in the game (except Trayus, but those are pre-placed in the area and not spawned in). I saw that, thanks. I'll add that to the list of tests... Link to comment Share on other sites More sharing options...
Prime Posted April 20, 2005 Author Share Posted April 20, 2005 Thanks to stoffe -mkb- I now have the replacement working in the Korriban caves. I'm still having issues with Dxun so I'm going to skip doing that part. I'm happy with where the mod is now. So now all that remains is to clean up and add more comments to my code and compile the scripts for each area with the appropriate parameters, then do some final testing. Hopefully this won't take too long. Link to comment Share on other sites More sharing options...
Keiko Posted April 22, 2005 Share Posted April 22, 2005 This will be sweet when its done Prime! Link to comment Share on other sites More sharing options...
FunSolo Posted April 22, 2005 Share Posted April 22, 2005 btw will it be compatible with your other mods? like the stormtrooper thing? Link to comment Share on other sites More sharing options...
SoNico717 Posted April 22, 2005 Share Posted April 22, 2005 Originally posted by Prime Thanks to stoffe -mkb- I now have the replacement working in the Korriban caves. I'm still having issues with Dxun so I'm going to skip doing that part. I'm happy with where the mod is now. So now all that remains is to clean up and add more comments to my code and compile the scripts for each area with the appropriate parameters, then do some final testing. Hopefully this won't take too long. Thats great prime, can't wait to try it out. Is this mod going to kill my FPS?, right now i'm not having any problems with it.... in one way or another this mod is going to finish in my overdrive folder, so i don't know why i'm asking this... well... i'm confuse myself... maiday, maiday..... BTW, Great job here... i really like your mods. In fact i use most of them. So thanks . Link to comment Share on other sites More sharing options...
Dark_Ansem Posted January 26, 2006 Share Posted January 26, 2006 when this will be ready? will it conflict with the Dark jedi conversion mod on pcgamemods? Link to comment Share on other sites More sharing options...
Ghost Down Posted January 26, 2006 Share Posted January 26, 2006 Eum..its the same.. - Dream Evil Link to comment Share on other sites More sharing options...
Dark_Ansem Posted January 26, 2006 Share Posted January 26, 2006 I was going to add that, man that was stupid... but why wan's listed here as finished? Link to comment Share on other sites More sharing options...
RedHawke Posted January 26, 2006 Share Posted January 26, 2006 I was going to add that, man that was stupid... but why wan's listed here as finished? Because it has it's release thread here in the Taris Upper City Mod release forum... Link to comment Share on other sites More sharing options...
Dark_Ansem Posted January 26, 2006 Share Posted January 26, 2006 ... oh well I s'pose that things could happen.... What? Could you clairify this please. -RH Link to comment Share on other sites More sharing options...
Prime Posted January 26, 2006 Author Share Posted January 26, 2006 I can answer any questions you have, but the other thread is probably better for that... Link to comment Share on other sites More sharing options...
.:DSX:. Posted January 28, 2006 Share Posted January 28, 2006 Is that a new module in the first screens? If not, how did you get your party in there (Trayus Academy)? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.