blinkyzero 15 Posted December 7, 2014 Hi folks. I'm working on a mod for KotOR1 that does a number of things to increase the difficulty and replayability of the game, and one of the features is a "call for help" mechanic that lets enemies summon in reinforcements. I've got this working perfectly now in the scripts...with one exception: certain scripted scenes don't seem to like having enemies around and in combat. A good example of this is the very first encounter with the Sith soldiers on the Endar Spire. If you kill the two soldiers, a script automatically fires that has Trask talk to you about medpacs -- and any seemingly unexpected live enemies in range will cause the conversation to rush to its completion (or the enemies will take periodic whacks at you as you stand there chatting). I thought active conversations automatically disabled combat from proceeding, but apparently this isn't quite the case. I've tried inserting checks into the master heartbeat script to disable combat when a conversation is active, but it's unreliable at best. I think my next step is to actually disable the AI flag of enemies when a conversation's ongoing...but I'm afraid this might have unintended consequences. Any ideas? edit: well, I did come up with one solution -- removing the "reinforcement" enemies with DestroyObject() if their heartbeat scripts detect them being in combat during a conversation. This seems to work. Not the prettiest fix, but probably best when it comes to compatability. Still very much open to other methods though. Quote Share this post Link to post Share on other sites
Hassat Hunter 571 Posted December 7, 2014 If they did it anyway like KOTOR2 it's because each enemy killed increments a global (or local) counting towards the proper number killed. So after it received "2" it notes all enemies are dead (since 2 are what it's in vanilla) and the conversation triggered. A sollution would be to change it to living enemies on the map (although as Dxun learns us that can also be glitchy), or if you always summon a fixed number of extra foes simply increase the killcount before the conversation triggers. If not, the best I could think of would be to have a new global increment per additional enemy spawned, and alter the original dialogue from being "2" to "2+NEWGLOBAL", and having it reset the global as it triggers the conversation so it could be re-used during the next encounter. Might still be quite some scripts to alter... Quote Share this post Link to post Share on other sites
blinkyzero 15 Posted December 7, 2014 If they did it anyway like KOTOR2 it's because each enemy killed increments a global (or local) counting towards the proper number killed. So after it received "2" it notes all enemies are dead (since 2 are what it's in vanilla) and the conversation triggered. A sollution would be to change it to living enemies on the map (although as Dxun learns us that can also be glitchy), or if you always summon a fixed number of extra foes simply increase the killcount before the conversation triggers. If not, the best I could think of would be to have a new global increment per additional enemy spawned, and alter the original dialogue from being "2" to "2+NEWGLOBAL", and having it reset the global as it triggers the conversation so it could be re-used during the next encounter. Might still be quite some scripts to alter... Yeah, I glanced at the globals and it looks like there's variables used all over the place to determine the kill count before a conversation is triggered. Messing with those would probably be a massive headache. I figure there's probably few enough of them though that having the reinforcements fade out (which doesn't look bad at all) when a conversation starts won't be too ridiculous. I suppose I could always EffectDeath() them too with a message saying they gave up the will to live now that their friends and allies have perished. Quote Share this post Link to post Share on other sites
Hassat Hunter 571 Posted December 7, 2014 Eh, forgot to mention the spawned in enemies would also need to increment the global the script referes in their ONDEATH, otherwise it wouldn't work. But yeah, it wont be a small task going around it like this 'properly' Not to mention compatibility with other mods... Quote Share this post Link to post Share on other sites