IAMNOTAMODDER1 1 Posted March 7, 2022 hello! i recently just finished kotor 1 and i really enjoyed the apart from deck 2, i get the vibe it blocks a lot of build if it doesn't its the most punishing aspect of the game. its weird that being outnumbered was harder than Malak and it made the suspense leading to the battle feel pretty bad. i have got kotor tool and i have opened two files that i believe are linked to dec 2. the two files are: sta_m4ab_s.rim, this one contains the turrets on two, the other file is sta_m45_s.rim, it contains all of the enemy's you cam have spawned in a section.i have looked at them and they all come under hostile faction. im also a little confused on what file contains the spawning rate. does it come under triggers or dynamic are info? any help would be appreciated. i'm not a modder but i'm passionate about the game, and i don't believe this section would go down to well especially if younger kids wanted to get into it. any help would be greatly appreciated 1 Quote Share this post Link to post Share on other sites
Salk 374 Posted March 8, 2022 I agree with you. The final part at the Star Forge with the endless respawning is by far the weakest part of the game. I can't look into it at the moment but I am pretty sure it is possible to tweak the frequency. Quote Share this post Link to post Share on other sites
DarthParametric 3,784 Posted March 8, 2022 The mooks spawned on Deck 2 and Deck 3 both use the same setup (with only minor differences in the UTCs spawned). The module heartbeat that spawns them has a check against a global number (K_STA_HORDE), which stops spawning once it hits 9 and a global boolean (K_STA_SPAWNER) which is an on/off switch. There is a trigger OnEnter that resets the global back to 0, but that has a local boolean check so that it should only fire once. However, on Deck 2 there are three reset triggers and on Deck 3 there are five reset triggers. On top of that, there's a start trigger that also sets the global back to 0 and sets K_STA_SPAWNER true to start the spawning. On Deck 3 there is only one of these triggers (which you'd expect), but on Deck 2 there are five of these, effectively acting as reset triggers. I'd guess these work in conjunction with cutscenes, but I haven't checked that. By my count, that should mean a maximum of 40 mooks on Deck 3 but 56 on Deck 2. You'd need to add a counter script to verify it though, since it's entirely possible that other resets happen during cutscenes. In terms of stopping them, the easiest solution is probably to add a new global number that increments with each spawn and then have it terminate the spawning script once it reaches whatever arbitrary cap you decide on. Alternatively, a less intrusive option would be to simply lower the K_STA_HORDE check value, so the spawner terminates sooner each timer it resets. Edit: So I just did a quick run through with some kill blasters and with a counter added to the scripts. I ran around until they stopped spawning. I got a total of 28 mooks on Deck 2 and 47 on Deck 3. I think I may have hit some reset triggers early on Deck 2, which reduced the count there, but Deck 3 gave me more than I expected, so I gather there must have been additional resets somewhere. Maybe via door OnOpen scripts or something. 1 Quote Share this post Link to post Share on other sites
Salk 374 Posted March 8, 2022 I was thinking of capping the K_STA_HORDE global check to 3 and also adding two new globals (one per deck) that count the respawning to make them stop altogether in the area once they hit 9. Might that work, DP? Quote Share this post Link to post Share on other sites
DarthParametric 3,784 Posted March 8, 2022 Sure, that's just a combination of what I suggested above. I think 9 total is a bit low though. I haven't checked what the actual trigger arrangement is yet, but an alternative approach would be to nix the heartbeat altogether and switch to the triggers each spawning a single group. 2 Quote Share this post Link to post Share on other sites
IAMNOTAMODDER1 1 Posted March 11, 2022 if you manage to change it i would be really grateful. i spent a while trying to do it on my own, i guess i was a little too ambitious. On 3/8/2022 at 4:39 PM, DarthParametric said: Sure, that's just a combination of what I suggested above. I think 9 total is a bit low though. I haven't checked what the actual trigger arrangement is yet, but an alternative approach would be to nix the heartbeat altogether and switch to the triggers each spawning a single group. i don't mean to be pedantic but what code do i change to achieve this result Quote Share this post Link to post Share on other sites
Salk 374 Posted March 11, 2022 Hello, IAMNOTAMOODER1. I have attached here a modification that should alleviate the issue (but I didn't go for the nixing the heartbeat alternative solution). It is not tested though and it will only work properly if you have not yet visited Deck 2 and Deck 3 on the Star Forge. Please feel free to give it a try and if everything goes well, we can upload it here at Deadlystream. Cheers! Sensible Star Forge Respawning.7z Quote Share this post Link to post Share on other sites
IAMNOTAMODDER1 1 Posted March 11, 2022 6 hours ago, Salk said: Hello, IAMNOTAMOODER1. I have attached here a modification that should alleviate the issue (but I didn't go for the nixing the heartbeat alternative solution). It is not tested though and it will only work properly if you have not yet visited Deck 2 and Deck 3 on the Star Forge. Please feel free to give it a try and if everything goes well, we can upload it here at Deadlystream. Cheers! Sensible Star Forge Respawning.7z 274.99 kB · 0 downloads you're an absolute legend! Quote Share this post Link to post Share on other sites
Salk 374 Posted March 11, 2022 Wait to see if it works first... 😄 I did test it a bit and it seems the respawn is well under control. Some might even feel like the nerfing is too much but for my own personal taste I think it works fine this way. 1 Quote Share this post Link to post Share on other sites
IAMNOTAMODDER1 1 Posted March 11, 2022 it works! i didn't have to much time to give it a test, i only tested it once mainly on deck 2, and the results are amazing, the un modded game spawned around 11 waves of enemies while the mod capped it to about 2. i'm really happy you've sorted me out with this mod! i would be pleased for you to upload it here! huge thanks! Quote Share this post Link to post Share on other sites
Salk 374 Posted March 11, 2022 My pleasure! 😉 1 Quote Share this post Link to post Share on other sites