[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: 1386
Joined: Sat, 20. Feb 10, 17:47
x4

Post by Aldebaran_Prime » Tue, 22. Mar 16, 21: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.

User avatar
Aldebaran_Prime
Posts: 1386
Joined: Sat, 20. Feb 10, 17: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!

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: 448
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
x4

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

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

Jaycen_Aelis
Posts: 138
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: 295
Joined: Fri, 20. Mar 09, 16:38
x4

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

Post by Taylor2008 » Thu, 6. Dec 18, 00: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, 18: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: 244
Joined: Sat, 6. Dec 03, 16:21
x4

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

Post by Shush » Fri, 7. Dec 18, 00: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: 295
Joined: Fri, 20. Mar 09, 16:38
x4

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

Post by Taylor2008 » Fri, 7. Dec 18, 02: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, 04: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.

theknapps
Posts: 17
Joined: Fri, 5. Nov 04, 18:00
xr

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

Post by theknapps » Mon, 17. Dec 18, 13:19

Hi Shush,
It is good to see that you are feeling somewhat better.
I will do a 'fly-by' over your house in celebration (in FSX anyway!)

I think there are still several of us enjoying LIFE!

Shush
Posts: 244
Joined: Sat, 6. Dec 03, 16:21
x4

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

Post by Shush » Mon, 17. Dec 18, 23:15

Taylor2008 wrote:
Fri, 7. Dec 18, 02:12
@Shush : Happy that you feel better !!! :)
Your Mod is outstanding , superior for immersion!!!
And much better than the speech of x4 pilots...
Cheers :)

Awww don't be too harsh on X4, I think Egosoft have found their way again! I'm really looking forward to spending thousands of hours in enjoyment over the next few years in X4, (once the initial teething period is over).

TechSY730 wrote:
Wed, 12. Dec 18, 04: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.
The area that you played in was always a concern for me, as different versions of X3 always reacted unexpectedly to that area of the code. Every time I thought I had come up with a reasonable solution, the next X3 update would break it. Which is not suprising really, I was using the MD and SE in ways that were never planned for or even considered by the devs.

Any external contribution to LIFE will always receive due credit, in fact I usually add hidden flavour news articles for contributors ;)

theknapps wrote:
Mon, 17. Dec 18, 13:19
I will do a 'fly-by' over your house in celebration (in FSX anyway!)

I think there are still several of us enjoying LIFE!
:)

Taylor2008
Posts: 295
Joined: Fri, 20. Mar 09, 16:38
x4

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

Post by Taylor2008 » Tue, 8. Jan 19, 12:07

Hello,

i am in desire of compatible between Life and The Galactic News System (BBS 2.0) (V.105) viewtopic.php?f=94&t=260555 and
with MBRR https://drive.google.com/open?id=1xnIRX ... uJFbztk3dm.
In addition please fix the bug , wich sometimes let Mission-Ships stopp their Engines.

I hope i am not impudent to speak out my wishes.

If I can help in any way with this , just say a word...

FiGaBo
Posts: 1
Joined: Tue, 17. Sep 19, 12:56
xrvr

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

Post by FiGaBo » Tue, 8. Oct 19, 12:56

Hello !

A small question for those of you who are using life (and in this case leveling of their pilots)

Let's say i have a pilot on a m4, who have for instance 20 kills and is level 2. As i think he is an experienced pilot, i would like to move him on a m3.
I understood that for leveling life is used on ships and not on pilots. But if i rename the m3 with the kills and level from the previous ship, is it working
(for instance : m4 kills 20 level 2 will become m3 kills 20 level2). Or there is another way to do it ?

Thanks !

User avatar
Aldebaran_Prime
Posts: 1386
Joined: Sat, 20. Feb 10, 17:47
x4

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

Post by Aldebaran_Prime » Fri, 27. Dec 19, 08:55

Shush wrote:
Fri, 7. Dec 18, 00: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.
I just saw, that you seems to be a little active again.
Yes, LIFE is a core part of my X3 AP Mod collection (see banner) and gives a lof of it's emmersion to the game - Thanks for it!

Post Reply

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