Just need more time!!

Moderators: Scripting / Modding Moderators, Moderators for English X Forum
Aldebaran_Prime wrote: ↑Sun, 3. Jan 21, 22:02A pilot of the EMC4AP Mod found out, that the X3 Khaak / Final Fury plot still has a problem in the scene, where the TL should place some mines. So I needed to add some other exceptions to the improvements of TechSY730:TechSY730 wrote: ↑Sun, 5. Aug 18, 21:15Some further investigation yields the problem that in the script, plugin.LIFE.ship.signal.attacked, LIFE temporarily adds the ship to a special, hidden wing that it uses as a queue. That wing is used as a primary mechanism for communication between the scripting side and the mission director side (storing the list of ships that have been attacked and thus need to be processed).
After some finagling in the director script LIFE.Attacked.xml, it calls plugin.LIFE.mdcomms.queue on the ship, which removes the ship from the special queue wing and restores the previous wing membership. Unfortunately, removing a ship from a wing cancels its current order on task 0, the main task (engine bug maybe?).
Sadly, since that queue is pretty central to how the attacking signalling works in LIFE, I don't see a way to get around not having the wing.
So a workaround may be to not add non-race controlled ships to the queue in the first place. So, you can replace the line (around line 61) in plugin.LIFE.ship.signal.attacked.xml:
withCode: Select all
$gAttacked-> temporarily remove from wing add ship to flight wing: wing=$mdcommsQueue ship=$gAttacked
This will make it so that ships that have been reserved for other purposes cannot get "co-opted". Race logic controlled ships are unchanged, as they have their main task restored by GOD periodically, so that is why it hasn't been an issue for those ships.Code: Select all
* TechSY730 fix: Don't do special handling for special mission ships, since removing the wing later on interferes with current commands if $gAttacked-> can be controlled by race logic $gAttacked-> temporarily remove from wing add ship to flight wing: wing=$mdcommsQueue ship=$gAttacked end
Sadly, this is a little overreaching and also turns off special LIFE handling for script spawned ships too that disable race logic, even if the script can handle it by having fallback "restart" logic. But I can't really see a way around that.
However, the above will also silence such mission ships from saying "I'm under attack". I'll provide a version that preserves as a follow up post, since it makes the code much longer.Eventually there are some other commands which need to be included in the exceptions, but for the moment this solves the TL position problem.Code: Select all
... $gAttackedMoves2Position = $gAttacked-> is script '!ship.cmd.moveto.std' on stack of task=0 $gAttackedMovePosition = $gAttacked-> is script '!ship.cmd.moveposition.std' on stack of task=0 $gAttackedRetreat = $gAttacked-> is script '!ship.cmd.retreat.std' on stack of task=0 $gAttackedProtect = $gAttacked-> is script '!ship.cmd.protect.std' on stack of task=0 $gAttackedStay = $gAttacked-> is script '!ship.cmd.stay.std' on stack of task=0 $gAttackedMayBeMissionShip = !$gAttackedRaceLogicEnabled OR $gAttackedIsFollowingShip OR $gAttackedIsDeliveringFactory OR $gAttackedMoves2Position OR $gAttackedMovePosition OR $gAttackedRetreat OR $gAttackedProtect OR $gAttackedStay OR ($gAttackedNoJob AND ($gAttackedIsDocking OR $gAttackedIsAttacking)) if !$gAttackedMayBeMissionShip $gAttacked-> temporarily remove from wing add ship to flight wing: wing=$mdcommsQueue ship=$gAttacked else ...
Bugfixed version can be found here: https://1drv.ms/u/s!AleWkrAhnZL_g5hnKcf ... g?e=3YBQgi
Thank you, thank you, thank you very much...Apart from that, TechSY730's download links still work fine for me. I reuploaded them just in case: