[SCR][MD][TC][AP] LIFE-V0.95b (update: 06-May-2014)

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

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

Post Reply
User avatar
Aldebaran_Prime
Posts: 1184
Joined: Sat, 20. Feb 10, 18:47
x4

Post by Aldebaran_Prime » Tue, 22. Mar 16, 22:07

drowningfly wrote:I don't know if this has been reported already or if the mod is still being worked on, but there is a problem with the Final Fury plot and this mod. During the mission where you have to defend the TL while it places mines in the unknown sector, if any enemy damages the TL's shields at all, it will forget what it is doing and ether stop or just fly aimlessly around the sector permanently, leaving you to never be able to complete the mission. Disabling LIFE via the menu for the duration of the mission will allow you to do the mission properly.
I have the same problem with the 0.95b version of Life, but not only in the FF missions, but in any "protect convoy" mission, too!

Maybe, there is an other experienced scripter who may help us, to solve this issue? I have a savegame for my MOD-Collection with which this bug can be debugged.
Image

User avatar
Aldebaran_Prime
Posts: 1184
Joined: Sat, 20. Feb 10, 18:47
x4

Post by Aldebaran_Prime » Sat, 16. Apr 16, 14:38

Aldebaran_Prime wrote:
drowningfly wrote:I don't know if this has been reported already or if the mod is still being worked on, but there is a problem with the Final Fury plot and this mod. During the mission where you have to defend the TL while it places mines in the unknown sector, if any enemy damages the TL's shields at all, it will forget what it is doing and ether stop or just fly aimlessly around the sector permanently, leaving you to never be able to complete the mission. Disabling LIFE via the menu for the duration of the mission will allow you to do the mission properly.
I have the same problem with the 0.95b version of Life, but not only in the FF missions, but in any "protect convoy" mission, too!

Maybe, there is an other experienced scripter who may help us, to solve this issue? I have a savegame for my MOD-Collection with which this bug can be debugged.
Hi all, mybe I found the problem. It is not MSCI-script-, but MD-script caused. In the MD script "LIFE.Attacked.xml" there are some cues, which set an explicit ship command, when a ship is attcked. As it seems, this overwrites former ship commands like "fly to sector".


Open this script with any editor and search for "Fight or flight" the first occurence will be somewhere around line 382. Exclude alle this section by comment signs "<!--" at start and "-->" at end of the whole block.

Code: Select all

 <!-- Fight or flight -->
                          <!-- Aldebaran: Conflict found with MD Plot Commands - try to disable this
                          <do_choose>
                            <do_when value="{object.class@this.attackedShip}" list="{lookup.class@m1}|{lookup.class@m2}|{lookup.class@m3}|{lookup.class@m4}|{lookup.class@m5}|{lookup.class@m6}|{lookup.class@m7}|{lookup.class@m8}">
                              <set_command object="this.attackedShip" command="attack" commandobject="this.attackerShip"/>                              
                            </do_when>
                            <do_otherwise>
                              <set_command object="this.attackedShip" command="home"/>
                            </do_otherwise>
                          </do_choose> 
                          END Aldebaran --> 
Because this MD cue is a global cue, which is active the whole game, the changes seem not to be active until you start a new game or you manually kill the old instance of the cue.

This may be done with a other cue like this:



Code: Select all

  	<cue name="LIFE.Attacked.destroy">
			     
			<condition>
        <check_value value="{player.notoriety.neutral}" exact="668"/>
      </condition>
			
			<action>
        <do_all>
        	<destroy_cue cue="LIFE.Attacked"/>
        	<destroy_cue cue="LIFE.Attacked.ShipHandler"/>
 				</do_all>
      </action>
  	</cue> 
eventually there are better MD programmers then me, which my give some addtional comments to my analysis and workaround, because I'm not sure, why the parts i commented our where in the MD script. For me they make no sense, because the game engine automatically starts to fight against the attacker, also without the explicit command.

At the moment it seems, that the workaround above will solve the problems with Live in combination with protect ship tasks. I implemend this in this way in my EMC4AP mod collection 2.x.

additional feedback is welcome!
Image

ASSTEROIDS
Posts: 38
Joined: Tue, 10. May 16, 17:00

Post by ASSTEROIDS » Wed, 18. May 16, 08:56

There are 7 derelict M5 ships (one of each faction) a thousand Km east in Kingdom End, they are called "LIFE: Boron MD Queue: 0.95b", no equipement, no guns. What are those ships? I tried salvaging one but I had to cheat to do it, then it appeared on my list of ships but I can't select it in space. But I can control it via my property, I sent it to the boron shipyard, it will take days before it gets there...

So is this a bug? Or they have some kind of function?

User avatar
OneOfMany
Posts: 435
Joined: Thu, 15. May 14, 14:25
x4

Post by OneOfMany » Thu, 19. May 16, 22:10

The ships all have functions for holding/storing variables and other coding gubbins.

Messing with them will really spoil your day.

ASSTEROIDS
Posts: 38
Joined: Tue, 10. May 16, 17:00

Post by ASSTEROIDS » Thu, 19. May 16, 22:56

Good to know, thanks.

nekoexmachina
Posts: 58
Joined: Thu, 3. Apr 14, 12:51
xr

Post by nekoexmachina » Tue, 13. Sep 16, 12:30

is there any exact info on which parts of this are incompatible with LU?
Image

Jaycen_Aelis
Posts: 134
Joined: Sat, 14. Apr 12, 18:25
x3tc

Post by Jaycen_Aelis » Wed, 21. Sep 16, 02:04

To those who were getting framerate issues, even on high end rigs, I suggest the following fixes, as proposed here:

https://www.reddit.com/r/X3TC/comments/ ... provement/

Either going through the Control Panel or through setting up a .bat file, set your X3AP Task Process to High and its Core Affinity to only one of your "real" cores--this varies depending on whether you have an Intel or an AMD processor, so check your manufacturers' specs before proceeding.

In addition, and this is something that's not discussed in that thread, but something I discovered, that if you disable the GOD-related news in LIFE, your performance improves *significantly*.

Also, I would like to ask a question to any fellow LIFE-users. Did the latest update disable or alter the dynamic combat related missions? As per a trailer I discovered on Youtube, if you comm a ship while it's under attack, you can offer aid. But even if you destroy the attackers around the ship, I'm getting no reward or any kind of subsequent communications. Did I do something wrong, or maybe mess up my LIFE install? I'm running XRM, IEX, and LIFE, and as far as I knew, all of those mods played well together...
Argon Explorer

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

Post by TechSY730 » Sun, 5. Aug 18, 08:59

Sadly, the workaround given by Aldebaran_Prime seems to be insufficient. I tried commenting out all instances of "Fight or flight" (the "set_command" actions inside LIFE.Attacked and elsewhere), added the new queue "LIFE.attacked.destroy".
While LIFE.attacked.destroy is active, the issue seems to be fixed. But when I allow LIFE.Attacked to be recreated by commenting out the new LIFE.Attacked.destroy, the problem reemerges. So either there is something else in LIFE.Attacked that causes it to plow over commands of ships, or somehow the engine is reinstating the old version of the cue, and I am not sure which.

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

Post by TechSY730 » Sun, 5. Aug 18, 21:15

Some 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:

Code: Select all

$gAttacked-> temporarily remove from wing
add ship to flight wing: wing=$mdcommsQueue ship=$gAttacked
with

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
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.

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.
Last edited by TechSY730 on Wed, 8. Aug 18, 06:02, edited 2 times in total.

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

Post by TechSY730 » Sun, 5. Aug 18, 21:53

As promised, here is the version of the replacement that preserves mission ships saying "I'm under attack".

First a download link, since it is so long. Copy this into
TC: X3 Terran Conflict\scripts\
AP: X3 Terran Conflict\addon\scripts\
(ONLY unpack this into the game you have LIFE installed into, not both, unless you installed life into both TC and AP) (Forward slashes instead if on Linux or Mac)

plugin.LIFE.ship.signal.attacked.xml:
https://drive.google.com/open?id=1Ze-O1 ... zhrA7gG_pJ

And I noticed that LIFE's MD's script skipped over the cases of TM and M8 in their script, so they will never have the "I'm under attack" chatter. Here is a version of that script that fixes it. It also has Aldebaran_Prime's fix described above. As with his above script, you will still need to go through the LIFE.Attacked.destroy cue for a save and then comment it back out (the download has the destroy cue, but commented out)
Copy into:
TC: X3 Terran Conflict\director\
AP: X3 Terran Conflict\addon\director\
(ONLY unpack this into the game you have LIFE installed into, not both, unless you installed life into both TC and AP) (Forward slashes instead if on Linux or Mac)

LIFE.Attacked.xml:
https://drive.google.com/open?id=10Sf_i ... Xu7SxNcWKD

If someone wants me to post just the changed bits as text, let me know. They are pretty long, so I didn't want to clutter up the thread with them if no one cares.

Taylor2008
Posts: 260
Joined: Fri, 20. Mar 09, 17:38
x4

Re: [SCR][MD][TC][AP] LIFE-V0.95b (update: 06-May-2014)

Post by Taylor2008 » Thu, 6. Dec 18, 01:51

Thank you for that solution !

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

Re: [SCR][MD][TC][AP] LIFE-V0.95b (update: 06-May-2014)

Post by TechSY730 » Thu, 6. Dec 18, 19:26

Your welcome.
But actually I have a newer version of this script that fixes even more cases, so please download again.
plugin.LIFE.ship.signal.attacked.xml:
https://drive.google.com/open?id=1Ze-O1 ... zhrA7gG_pJ

I also took the time and updated the "figure out what race the pilot script" to be compatible with Lucike's scripts (Commodity Logistics, CODEA, and many others). It will now properly detect the race of pilots it manages (assuming player ships are set to "actor name" race voice in settings). Also included is a bugfix where the script wouldn't check again if the pilot changes.

plugin.LIFE.get.race.page.xml:
https://drive.google.com/open?id=1t006K ... OaEor8SP6s

Shush
Posts: 242
Joined: Sat, 6. Dec 03, 17:21
x4

Re: [SCR][MD][TC][AP] LIFE-V0.95b (update: 06-May-2014)

Post by Shush » Fri, 7. Dec 18, 01:05

I didn't realise people were still using LIFE.

I was never happy leaving it in the state I left it, but my health really did knock me about for a good 18 months.

Over the next few weeks I'll start incorporating a bunch of unfinished work, (station missions, advanced shaders, etc), and bug fixes from TechSY730 and others, (with their blessings).

I'm having a ball in X4 and it has rekindled my love for the series.

Taylor2008
Posts: 260
Joined: Fri, 20. Mar 09, 17:38
x4

Re: [SCR][MD][TC][AP] LIFE-V0.95b (update: 06-May-2014)

Post by Taylor2008 » Fri, 7. Dec 18, 03:12

@TechSY730: Thanks again!

@Shush : Happy that you feel better !!! :)
Your Mod is outstanding , superior for immersion!!!
And much better than the speech of x4 pilots...

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

Re: [SCR][MD][TC][AP] LIFE-V0.95b (update: 06-May-2014)

Post by TechSY730 » Wed, 12. Dec 18, 05:58

Sure, feel free to upstream any of my changes. Credit would be nice, if nowhere else but in the release notes, but not required.

Post Reply

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