[script] Improved Kha'ak 2: The Revenge [Updated: 2013.05.17]

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Wed, 18. Jul 18, 04:46

Well, I suppose with two people reproducing it, it can't be explained as a unique set of circumstances.

My current game doesn't have any big ships that I could fight them off with, but I can cheat myself one in (for debugging purposes) and start killing off some eggs and see if I can reproduce it.


EDIT: Ok, yeah, there is definitely something screwy with egg lasertowers. Got two crashes and a freeze. Just forced on infinite loop detection, and I'll see if anything comes of that.

EDIT2: One way of triggering the crash is to pull up the sector map after killing an egg lasertower. Onely sometimes though.

SirDeathwalker
Posts: 385
Joined: Fri, 6. Aug 10, 03:15
x4

Post by SirDeathwalker » Wed, 18. Jul 18, 06:49

In the manager for the plugin, try changing the model for that egg to not be a laser tower to see if it is related to the model in use.

TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Wed, 18. Jul 18, 17:12

So, I noticed that Lasertowers spawned by this script run the !ship.cmd.killenemies.std script, but regularly spawned Lasertowers do not. Maybe the engine's handling of Lasertowers conflicts with this script?

I've disabled egg Lasertowers from using this script, and it seems to help. No crashes so far, but I am still encountering freezes, just less of them.

I'll keep debugging.

TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Thu, 19. Jul 18, 05:21

Well, this doesn't fully fix the issue (there is still an infinite loop hang lurking somewhere), but I haven't been able to reproduce a crash to desktop. Let me know if you still encounter such a thing. But also let me know if it helps reduce how often it seems to happen.

r13:

Bug Fixes:
* Potential partial fix for a crash and/or hang when killing eggs (possibly only happens when in the same sector as the eggs)
> Please let me know if this fix at least helps reduce the amount of crashing and/or freezing
> I'm not fully confident that I really solved the crash to desktop however
> If you already have eggs (which you probably do if the script has been running for any length of time), you MUST to run the "reset egg hatching scrips" option in the debugging options in the config menu for the fix to take effect.
> The hatching logic does have "on new version of the script" checking, but it won't cancel out the errant "attack enemies" commands that this explicit reset command will do.
* Bullet proofed the management of swarms logic against any possible source of an infinite loop hang

Balance changes:
* Reduced the chance that a wild Khaak ship will abandon eggs even when there aren't enough defenders from 25% -> 12% (keep in mind this is on top of the chance to even think about wandering at all, so in total the chance is pretty darn small)


ImprovedKhaak2_IK2_r13_TechSY730_hack.zip:
https://drive.google.com/open?id=1k04a7 ... iKySg0SCte[/b]

SirDeathwalker
Posts: 385
Joined: Fri, 6. Aug 10, 03:15
x4

Post by SirDeathwalker » Thu, 19. Jul 18, 19:32

I also tend to customize the swarm forces, set all the ships except queen/guardian to ships added from Jorkin's shipyards (shadow battle crab, shadow fighter, shadow scout, all from Babylon 5) and don't see any real issues I've noticed.

I also made the egg models something smaller than laser towers (I think I used the mine models)

now if I can only get the sound for the battle crab recreated, I know the how they built it, I am just looking for a good original scream to mod.

(take a scream track, duplicate in several times, stretch/compress and offset each track to be different, apply echo effect, then reverse so echo happens before the sounds)

SirDeathwalker
Posts: 385
Joined: Fri, 6. Aug 10, 03:15
x4

Post by SirDeathwalker » Thu, 19. Jul 18, 19:33

I also tend to customize the swarm forces, set all the ships except queen/guardian to ships added from Jorkin's shipyards (shadow battle crab, shadow fighter, shadow scout, all from Babylon 5) and don't see any real issues I've noticed.

I also made the egg models something smaller than laser towers (I think I used the mine models)

now if I can only get the sound for the battle crab recreated, I know the how they built it, I am just looking for a good original scream to mod.

(take a scream track, duplicate in several times, stretch/compress and offset each track to be different, apply echo effect, then reverse so echo happens before the sounds)

TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Fri, 10. Aug 18, 02:54

r14:

Balance changes:
* Made it so that ships that hatch from eggs or are spawned in swarms don't just have their most powerful missile, but some other missiles to (probabilistically)

Bug Fixes:
* Reconnected some scripts with commands (this is purely an internal change, no user visible impact)

ImprovedKhaak2_IK2_r14_TechSY730_hack.zip:
https://drive.google.com/open?id=1T4kVr ... Mi8oPMS67p

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”