[MOD] Miscellaneous IZ Combat Tweaks

The place to discuss scripting and game modifications for X Rebirth.

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

beaver1981
Posts: 60
Joined: Wed, 22. May 13, 23:26
x4

Post by beaver1981 » Tue, 19. Dec 17, 11:58

Sounds good!
-> Tested some changes again, not working really good. Could not implement a satisfying way to change behaviour if "this.ship.availableunits.{unitcategory.attack}.count == 0". First Jump works but ship gets stuck and doesn´t do anything :(
Rather than adding a resume, might be better to add your new distance stuff to just within the do_while since it's based on changing conditions? That way, you wouldn't have to do all that stuff between start and the do_while every cycle. After the series of break checks looks about right. But yeah, i never thought of changing distance thresholds depending on drone availability. Interesting!
I wan´t the changing of distance thresholds depending on drone availability to work dynamically so that script needs rechecks.

Don´t really know how to do that. Will have to look into that.
If you got a good idea I woul appreciate that.

Changed the check-condition to

Code: Select all

<do_if value="this.ship.availableunits.{unitcategory.attack}.count gt 0 and this.ship.defencenpc.$config_attackenemies == 1">
since the original conditions for acquiring assault drone targets in the CES script are like this

Code: Select all

<do_if value="this.ship.distanceto.{$enemies.{$i}} gt 7500m and this.ship.distanceto.{$enemies.{$i}} lt 35000m" chance="$DObaseskill">
                    <do_if value="@this.$config_attackenemies == 1 or this.ship.isplayerowned == false">
                      <add_to_group groupname="$wardronetargets" object="$enemies.{$i}" />
                    </do_if>
so I need a check on if thera are assault-drones and if the DO is configured to attack. I like to have that switch allowing a normal attack or attacking with assault drones.

If we could get this working I would like that you just update the CES edition. I would like to keep that modular so that it´s an option not a must have.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Tue, 19. Dec 17, 19:01

beaver1981 wrote:I wan´t the changing of distance thresholds depending on drone availability to work dynamically so that script needs rechecks.
Yup. That's why i was suggesting you put it just inside the do_while, so drone availability would be checked every time the ship finishes a movement. Hm, would have to save the init numbers though so we could revert to those if the check fails.

Something like this. Right after:

Code: Select all

<!--MICT: sometimes getting null targets.-->
<do_if value="not $target">
	<break/>
</do_if>
insert:

Code: Select all

<do_if value="@this.ship.defencenpc.$config_attackenemies and this.ship.availableunits.{unitcategory.attack}.count gt 0">
	<do_if value="not $MICT_initbackup?">
		<set_value name="$MICT_initbackup" exact="[$MICT_MaxAimDist, $MICT_MinAimDist, $MICT_MaxJumpDist, $MICT_MinJumpDist, $MICT_MaxShortAimDist, $MICT_MinShortAimDist]"/>
	</do_if>
	<set_value name="$MICT_MaxAimDist" exact="15000m"/>
	<set_value name="$MICT_MinAimDist" exact="8000m"/>
	<set_value name="$MICT_MaxJumpDist" exact="15000m * (1.9f - ((this.skill.navigation + this.skill.morale)f / 10.0f))"/>
	<set_value name="$MICT_MinJumpDist" exact="15000m * (0.3f * (1.0f + (1.0f * ((this.skill.navigation + this.skill.morale)f / 10.0f))))"/>
	<set_value name="$MICT_MaxShortAimDist" exact="3570m * (2.0f - ((this.skill.navigation + this.skill.morale)f / 10.0f))" />
	<set_value name="$MICT_MinShortAimDist" exact="3570m * (0.1f * (1.0f + (1.0f * ((this.skill.navigation + this.skill.morale)f / 10.0f))))"/>
</do_if>
<do_elseif value="$MICT_initbackup?">
	<set_value name="$MICT_MaxAimDist" exact="$MICT_initbackup[1]"/>
	<set_value name="$MICT_MinAimDist" exact="$MICT_initbackup[2]"/>
	<set_value name="$MICT_MaxJumpDist" exact="$MICT_initbackup[3]"/>
	<set_value name="$MICT_MinJumpDist" exact="$MICT_initbackup[4]"/>
	<set_value name="$MICT_MaxShortAimDist" exact="$MICT_initbackup[5]"/>
	<set_value name="$MICT_MinShortAimDist" exact="$MICT_initbackup[6]"/>
</do_elseif>
beaver1981 wrote:If we could get this working I would like that you just update the CES edition. I would like to keep that modular so that it´s an option not a must have.
No problem. Let me know when you're ready. i will be away from a computer starting for around a week starting on Thursday though, so might not be able to update until after. And i won't have any weekends next month, so can't do any heavy-duty testing until February.

.......
hm. about "MICT: sometimes getting null targets.", just figured out why. should update that check at some point.

rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter » Sat, 3. Mar 18, 12:24

Hi - sorry if it's been answered already - I don't want to wade through 90 pages...

I'm having trouble installing the supplemental mods for this with NMM, the main one seems to be installed, but the others will not, either seperately or extracted and rezipped as a group.

I found one of them has a conflict with another mod, but the rest seem to be fine.

any ideas?

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sat, 3. Mar 18, 14:07

Hi. To be honest, i actually don't know where Nexus Mod Manager puts files nowadays. Haven't used it in a pretty long while.

What i do is just download the files (they should be simple .zip files) and extract them directly to your extensions directory. i would suggest that you delete the w.e_mict directory in \X Rebirth\extensions\ first in case NMM put the supplements in there.

rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter » Sat, 10. Mar 18, 02:06

ok - just putting it in the extensions folder without NMM seemed to do the trick, thanks.

Yonder
Posts: 322
Joined: Wed, 24. Mar 04, 22:53
x3

Post by Yonder » Tue, 27. Mar 18, 22:15

Hello, got into Rebirth recently and I've been grabbing mods as I find jank I can't tolerate. The annoyance of refueling a squad of Capital ships, as well as "escorts" twiddling thumbs while their superior officers go into battle brought me here!

I do have a few questions though, which I'm hoping you'll be able to answer, I can see from the last couple pages that you're a bit rusty.

1. Reading your mod description it seems like you're still unable to make any sort of "formation" right? The vanilla behavior is for me to order my Taranis to battle, have it show up, and then have its escorting Heavy Sul and Light Sul show up after the fighting starts. With your mod ordering the Taranis to attack will cause all three of those to Boost into battle independently at around the same time, so the Light Sul would probably show up first, but with the other two relatively quick behind it, since they did all start the journey at around the same time?

2. I really, really like the sound of your repair stuff in Supplement 8, but the behavior in the description isn't really clear. You talk about wanting the drones to follow Mass Traffic to their targets, but being unable to, so you fake it. Does that mean that the intention isn't to have them run around actually approaching repair targets, but instead they just passively help repair other faction members in the zone?

3. What is the range on your Rapid Response Squadrons? Will they only try to intervene in fights in the same Sector/System, or will they range all over the universe?

Thanks for your time!

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sat, 31. Mar 18, 18:39

Yonder wrote:1. Reading your mod description it seems like you're still unable to make any sort of "formation" right? The vanilla behavior is for me to order my Taranis to battle, have it show up, and then have its escorting Heavy Sul and Light Sul show up after the fighting starts. With your mod ordering the Taranis to attack will cause all three of those to Boost into battle independently at around the same time, so the Light Sul would probably show up first, but with the other two relatively quick behind it, since they did all start the journey at around the same time?
We're talking about capital ships, right? They fly in formation, but not if they boost across zones, and they don't stay in formation when attacking. Would probably only get in other's way if they tried. Would be easy to do, though: authorize turrets to open fire and only have the commander attack.

What you can do to keep them from attacking piecemeal is have them move to a position in the same zone as the target first so they assemble, and then have them attack.
Yonder wrote:2. I really, really like the sound of your repair stuff in Supplement 8, but the behavior in the description isn't really clear. You talk about wanting the drones to follow Mass Traffic to their targets, but being unable to, so you fake it. Does that mean that the intention isn't to have them run around actually approaching repair targets, but instead they just passively help repair other faction members in the zone?
If i remember correctly, there was a problem retrieving the mass traffic network upon loading a game if the mass traffic network is launched from one object to another. So yes, at the moment, the number of repair drones present is used to boost the rate of repair, but you won't see them visibly launch.
Yonder wrote:3. What is the range on your Rapid Response Squadrons? Will they only try to intervene in fights in the same Sector/System, or will they range all over the universe?
I vaguely remember writing a range limitation at one point but, looking at the script checked in, there isn't one. So galaxy-wide.

Yonder
Posts: 322
Joined: Wed, 24. Mar 04, 22:53
x3

Post by Yonder » Mon, 2. Apr 18, 15:50

I downloaded your mod from Nexus (the main version, not the CES compatible version) and supplements 2, 3, 7, and 8.

The mod is definitely partially working, I had been flying around slightly damaged and realized at some point that I was fully repaired, so that supplement seems fine, and my squadron leader has performed in-system jumps for attack and retreat.

However the orders don't seem to be flowing down from Squadron leaders to their escorts the way the description implies. For example when I ordered a Squadron leader to refuel only he did, not his escorts. Also, when I order the squadron to move or attack they seem to have the same behavior of letting the leader get really far ahead of them before they realize they need to move, it doesn't seem like the Squadron leader is passing that attack/move order along to them directly.

Edit: Maybe I installed the supplements incorrectly? Nexus Mod Manager was choking on them, so instead of using it I manually unzipped each of the supplements into the same tree of the main mod, and then added that main mod to my extensions directory. Was I supposed to add each supplement separately to the game extensions? I'm guessing that this doesn't matter, because repairing works, and that's an extension, and the "pass on attack order to escorts" feature that isn't working is in the main mod, as is the in-zone Jump feature, which is working.

Yonder
Posts: 322
Joined: Wed, 24. Mar 04, 22:53
x3

Post by Yonder » Wed, 4. Apr 18, 02:06

Ok, with some effort I have verified that the reason that all squad members don't start to move at the same time is because you removed your hooks from move.escort.capital. Looking at the original move.escort and the capital version, while I do see the logic that kicks capital ship escorts from move.escort, to move.escort.capital, I think you were incorrect in assuming that that is the origin of all move.escort.capital calls. I believe that is a fail safe to ensure that scripts that incorrectly call move.escort are shifted to the correct capital version.

I replaced your empty move.escort.capital patch file with a version similar to your move.escort file, sprinkling some extra logging into both, and the expected behavior did start to occur.

I haven't looked at the lack of squad refueling yet. It also occurred to me that the fact that a Warden Taranis (PMC) changed directions to fly right alongside of me, but didn't open fire until I started the fight (which took a long time, I was placing mines all over him while he flew 500 meters by the Skunk) is awfully suspicious.

Yonder
Posts: 322
Joined: Wed, 24. Mar 04, 22:53
x3

Post by Yonder » Wed, 4. Apr 18, 04:11

Since all of my Capital ships are fueled for now, I decided to reload from right before I attacked the Taranis to investigate that anomaly a little bit more. Sure enough I scan the ship and while it's Defense Officer is set to "Defend", the Captain's task is "Attack Albion Skunk", which is what you'd expect with it following me around.

Running the game with a debug statements on (Thanks UniTrader I see a lot of these errors:

Code: Select all

[=ERROR=] 90501.14 Error on AI director import: Script context move.escort on entity 0xdec3 'Aron Slamer' is blocked in run_script but no called script is running
and I mean a lot. But I'm pretty sure that's not the immediate problem, because I got a ton of those right away, first thing after loading the game and before I undocked again.

The actual problem leads to these log entries:

Code: Select all

[General] 90503.20 ======================================
[=ERROR=] 90503.20 Error in AI script move.patrol.route on entity 0x10eb5: Property lookup failed: $pos
* Expression: $pos
[General] 90503.20 ======================================
[General] 90503.20 ======================================
[=ERROR=] 90503.20 Error in AI script move.seekenemies on entity 0x10eb5: Invalid position attribute: value=null
* Expression: $pos
[General] 90503.20 ======================================
[General] 90503.20 ======================================
[=ERROR=] 90503.20 Error in AI script move.seekenemies on entity 0x10eb5: Property lookup failed: this.ship.distanceto.[component.{0x1118fL},null]
* this.ship == component.{0x10ea8L} (name='XEN Fighter Squadron M', class=ship_s)
* Expression: this.ship.distanceto.[$destination, $pos]
[General] 90503.20 ======================================
[General] 90506.05 ======================================
[=ERROR=] 90506.05 Error in AI script MICT.move.escort.capital on entity 0x3adc: Property lookup failed: $target.pilot.$escortgroup
* $target.pilot == component.{0x3a8eL} (name='Thalia Braks', class=npc)
* Expression: $target.pilot.$escortgroup
[General] 90506.05 ======================================
[General] 90506.05 ======================================
[=ERROR=] 90506.05 Error in AI script MICT.move.escort.capital on entity 0x3adc: Evaluated value 'null' is not of type group
* Expression: $target.pilot.$escortgroup
[General] 90506.05 ======================================
Now move.patrol.route, where the problem begins, is not modified by your mod (or any of my other mods), but before I installed MICT the Warden patrol ships were indeed opening fire on me even before I started the fight.

here is a section of that script:

Code: Select all

      <label name="find_destination" />

      ***Stuff***

      <!-- If there is no defined position, create a random one -->
      <do_if value="not $pos?">
        <create_random_position_in_boundingbox name="$pos" component="$destination" />
        <set_value name="$y" min="-5km" max="5km"/>
        <get_safe_pos result="$pos" radius="this.ship.size * 2" value="position.[$pos.x, $y, $pos.z]" zone="$destination" />
        <remove_value name="$y" />
      </do_if>

      <debug_text text="'New destination: %1 in %2'.[$pos, $destination.knownname]" chance="$debugoutputchance" />

      <label name="patrol" />

      <do_if value="$destination.sector != this.sector">
        <run_script name="'move.generic'" sinceversion="2">
          <param name="destination" value="$destination"/>
          <param name="endintargetzone" value="true"/>
        </run_script>
      </do_if>

      <!-- Move and seek enemeis -->
      <run_script name="'move.seekenemies'">
        <param name="destination" value="$destination"/>
        <param name="pos" value="$pos"/>
        <param name="engageenemies" value="$engageenemies"/>
        <param name="onlyinrange" value="$onlyinrange" />
        <param name="pursuedistance" value="$pursuedistance" />
        <param name="allowstations" value="$allowstations" />
        <param name="debugoutputchance" value="$debugoutputchance" />
      </run_script>

      <remove_value name="$pos" />
Since that stuff in the label "find_destination" seems to really clearly be ensuring that $pos will always have a value leaving that label (and the "New destination" debug text doesn't appear in my log) I am pretty sure that what is happening is something in your mod is calling into this method right at the "patrol" label, without ensuring that the earlier code has run.

Which, uh, I assume is a thing that can happen, I don't really know what all you can do with labels.

Unfortunately that's where the trail runs cold for me (or my assumption about what is happening is off), as I can't see anything in your code that would be doing such a thing. You never even call move.patrol.route directly, let along set a particular label. (You do call move.patrol, but I don't think that's the issue).

Do you have any ideas?

Oh, on the off chance all of that position stuff is a red herring, and that's actually a non-essential variable, this Taranis is flying all by itself with no apparent escorts. I thought I'd mention that in case the last error message, about a null escort group, is the entire problem, rather than the result of position issues earlier on.

Oh, also my experience with the passive Taranis happened before I did any of my manipulations to get squad movement to happen again. At that point it was your mod unaltered.

Edit: Alright, looks like that was all a false alarm, I don't think your script is at fault at all! I was mulling over how it really didn't seem like your script had the mechanism to cause this error when I had a hunch. I reloaded, undocked, and ran for a highway. I took a loop around the whole sector, and then came around to reenter the zone and approach the Taranis. After a few seconds the Taranis indeed shot at me!

So I think it's a Vanilla bug, based on me docking after it had chosen me as its patrol target. I think that doing that caused it to somehow lose track of the route it was patrolling, but still remember that it was running patrol.route, even after losing some of the state from earlier in the method. When I came out of the station again it was in a bad state in patrol.route which caused the described errors with patrol and seekenemies. Once the Taranis went OS and then refreshed back IS those patterns were reinitialized, and at some point there it went back to correctly patrolling its route again, so when I reappeared seekenemies was able to successfully run and it was able to shoot at me.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Wed, 4. Apr 18, 18:51

Hi. i quickly scanned your messages, but i have to apologize, haven't read them in detail yet. Crazy hectic at work. i will do so when i have a bit of time to breathe, hopefully on Saturday.

rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter » Fri, 6. Apr 18, 22:59

Where is supplement 4 on the DLs' for nexus mods please?

rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter » Sat, 7. Apr 18, 00:44

Yonder wrote:Ok, with some effort I have verified that the reason that all squad members don't start to move at the same time is because you removed your hooks from move.escort.capital. Looking at the original move.escort and the capital version, while I do see the logic that kicks capital ship escorts from move.escort, to move.escort.capital, I think you were incorrect in assuming that that is the origin of all move.escort.capital calls. I believe that is a fail safe to ensure that scripts that incorrectly call move.escort are shifted to the correct capital version.

I replaced your empty move.escort.capital patch file with a version similar to your move.escort file, sprinkling some extra logging into both, and the expected behavior did start to occur.

I haven't looked at the lack of squad refueling yet. It also occurred to me that the fact that a Warden Taranis (PMC) changed directions to fly right alongside of me, but didn't open fire until I started the fight (which took a long time, I was placing mines all over him while he flew 500 meters by the Skunk) is awfully suspicious.
Yonder - I have noticed the same delayed movement and it's got me killed more than once when my titurel attack fleet has taken its sweet time to reform on a taranis or arawn target I've been kiting that's outside the killzone I've designated.

Can you tell me what you did please and where - I can edit .xml's but will need clear instructions.

Edit NVM, ignore next, you've posted why. - I've sometimes noticed the delayed attacks of PMC ships - but others not - I've had taranis' whack me with thier laser beams** without any provocation from me.

**and now I have Frankie goes to Hollywood's "relax" going on in my head.

W.evans - does your engineer.ai.xml merge with the vanilla when put in extentions or replace it?

I don't really know how the extention system implements them, and I already have one engineer mod - I've looked at the files in notepad and most parts of each of them look different (the other one is basically a mod to stop engineers being idle constantly) - so would I have to merge them manually?

Why was the file move.generic.carrier.xml in supplemental 2 in another "extensions" sub folder inside the main folder? Does it need to be moved to activate it? Will it have an impact on the storyline carrier that the mod CDOai seems to cause at certain parts of the storyline (that caused me to lose TWO DAYS playtime to get the pre-exodus station fight working - cheers for that CDOai).

Edit PS thanks for the mod - it's excellent - seeing 5 balors all firing torpedo's at the PMC Overwatch ship was just beautiful. It's a real shame Egosoft didn't build in the possibility that both the overwatch ship and the PMC ships blocking the gate were being utterly spanked - the PMC ships on the Albion side of the DeVries gate were unkillable - I wasn't happy about that.

Edit: I've just told my fleet to refuel and only the primary of each sub group did so instead of all escorts also refuelling.

Is there also a way to make the ships fly FORWARD after refuelling, instead of backing into the next queued ship behind? I mean the fueling station is open ended, why are they backing up???

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sat, 7. Apr 18, 22:01

rafezetter wrote:W.evans - does your engineer.ai.xml merge with the vanilla when put in extentions or replace it?
Merge, sort of. It patches the vanilla file, adding several lines to very specific places.

Example. This:

Code: Select all

	<add sel="//do_if[@value='not $CurrentElement.exists and this.defensible.hullpercentage ge $hulldamagelimit']" pos="before">
		<do_if value="not $Defensible? or not @$Defensible.isoperational or @$Defensible.iswreck or (@$Defensible != this.defensible and @$Defensible.hullpercentage ge $hulldamagelimit and not @$CurrentElement.exists)">
			<do_if value="$networkid? and @$Defensible != this.defensible">
				<end_mass_traffic network="$networkid"/>
				<remove_value name="$networkid"/>
			</do_if>
			<set_value name="$Defensible" exact="this.defensible"/>
			<set_command command="command.repair"/>
		</do_if>
	</add>
inserts this:

Code: Select all

		<do_if value="not $Defensible? or not @$Defensible.isoperational or @$Defensible.iswreck or (@$Defensible != this.defensible and @$Defensible.hullpercentage ge $hulldamagelimit and not @$CurrentElement.exists)">
			<do_if value="$networkid? and @$Defensible != this.defensible">
				<end_mass_traffic network="$networkid"/>
				<remove_value name="$networkid"/>
			</do_if>
			<set_value name="$Defensible" exact="this.defensible"/>
			<set_command command="command.repair"/>
		</do_if>
here:

Code: Select all

sel="//do_if[@value='not $CurrentElement.exists and this.defensible.hullpercentage ge $hulldamagelimit']" pos="before"
theqmann's old but still excellent guide is available here:

http://forum.egosoft.com/viewtopic.php?t=354310

You could manually patch it into your other engineer mod, but that could quickly turn into a real PitA if one or the other of us updates.
rafezetter wrote:so would I have to merge them manually?
Would depend on what the two mods do, how they do them, and if they conflict. Sorry, i know that "it depends" can be very frustrating, but there really is no easy answer to that.
rafezetter wrote:Why was the file move.generic.carrier.xml in supplemental 2 in another "extensions" sub folder inside the main folder?
Because it mods another mod, namely, Marvin Martian's Carriers mod. Should only affect ships running that mod which, unless Marvin changed things, should only be player-owned Arawns and, possibly, Suls if you have the submod to make Suls carriers as well. So, no, the plot ships should be untouched by that.
rafezetter wrote:Edit: I've just told my fleet to refuel and only the primary of each sub group did so instead of all escorts also refuelling.
Will have to look into this and the other issues that Yonder mentioned. Problem is my laptop's getting old and now refuses to run some games, X Rebirth among them, for longer than a few minutes, and that extremely slowly. i am saving up for a new machine, though. Should be able to check then.
rafezetter wrote:Is there also a way to make the ships fly FORWARD after refuelling, instead of backing into the next queued ship behind? I mean the fueling station is open ended, why are they backing up???
Can't remember for sure, but i don't think so. If i remember correctly, the asset, can't remember if it's the station or the dock attached to the station, has a position which defines where ships should move to when undocking. Problem is, again if i remember correctly, it is the same point ships should go to if docking. If they're defined as two different points which just happen to be at the same position, should be possible to just switch the other point to a different position. If both docking and undocking actions use the same point, however, not possible without touching the exe in addition to modding the asset.

Hmm. Unless you replace this line:

Code: Select all

<move_undocking object="this.ship" dock="$olddockslot" finishonapproach="true" forceposition="false" commandaction="false" />
in move.undock with a simple move_to if this.ship is a bigship and we're docked at a station. No idea what that would do though since it doesn't actually undock until after doing that. Plus collision detection for normal manoeuvering might go haywire since the ship'll find potential collisions everywhere. Would be simple enough to test if you could find someone who's handy with a text editor and has a computer that actually works. Just replace the above line with something like:

Code: Select all

<move_to object="this.ship" destination="this.zone" >
  <position z="this.ship.length * 1.5" object="this.ship"/>
</move_to>
Yonder wrote:Sure enough I scan the ship and while it's Defense Officer is set to "Defend", the Captain's task is "Attack Albion Skunk", which is what you'd expect with it following me around.
Hm. If the captain is attacking, the defence officer should fire, shouldn't matter that they're set to defend, regardless of whether the ship is running MICT or not.

Could be related to this, though.
Yonder wrote:[=ERROR=] 90501.14 Error on AI director import: Script context move.escort on entity 0xdec3 'Aron Slamer' is blocked in run_script but no called script is running
which could be bad. It means that, when the game was saved, Captain Slamer was in a run_script from move.escort running another script but, upon loading the game, that script could either not be found, was invalid, or could not be parsed. It should just go back to running move.escort, but whatever caused that problem could lead to other anomalies.

This is weird:
Yonder wrote:[=ERROR=] 90503.20 Error in AI script move.patrol.route on entity 0x10eb5: Property lookup failed: $pos
* Expression: $pos
Looking at the vanilla script, that can't happen because this failsafe

Code: Select all

      <do_if value="not $pos?">
        <create_random_position_in_boundingbox name="$pos" component="$destination" />
        <set_value name="$y" min="-5km" max="5km"/>
        <get_safe_pos result="$pos" radius="this.ship.size * 2" value="position.[$pos.x, $y, $pos.z]" zone="$destination" />
        <remove_value name="$y" />
      </do_if>
initializes the variable if it doesn't exist, and the error says that the variable doesn't exist.

Anyway, it's unrelated to the MICT errors. Different entity. However, the MICT errors are also anomalous.
Yonder wrote:[=ERROR=] 90506.05 Error in AI script MICT.move.escort.capital on entity 0x3adc: Property lookup failed: $target.pilot.$escortgroup
* $target.pilot == component.{0x3a8eL} (name='Thalia Braks', class=npc)
* Expression: $target.pilot.$escortgroup
says that the variable $escortgroup does not exist in their commander's (Thalia Braks') blackboard. That variable is initialized in the escort script, and not removed, so it's extremely odd that the script checks for it and finds that it doesn't exist further down in the same script that created it. A different mod removed the variable, savegame edit, bad memory, your guess is as good as mine. Will check to see if the problem lies in MICT when i can.

EDIT: just spotted this:
Yonder wrote: I am pretty sure that what is happening is something in your mod is calling into this method right at the "patrol" label, without ensuring that the earlier code has run.
Can't. Can't call a script and have it start at a particular label without also modding the called script.

Yonder
Posts: 322
Joined: Wed, 24. Mar 04, 22:53
x3

Post by Yonder » Sun, 8. Apr 18, 04:34

rafezetter wrote: Yonder - I have noticed the same delayed movement and it's got me killed more than once when my titurel attack fleet has taken its sweet time to reform on a taranis or arawn target I've been kiting that's outside the killzone I've designated.

Can you tell me what you did please and where - I can edit .xml's but will need clear instructions.
Sure, I changed the move.escort.capital.xml file in the MICT extension to this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
	<add sel="//attention[@min='visible']//do_if[@value='$target.isoperational and @$target.pilot']" pos="after">
		<do_if value="(not this.ship.isclass.ship_xs or not this.ship.isclass.drone) and (($target.pilot.combinedskill ge 80 and @$target.defencenpc.combinedskill ge 80 and @$target.engineer.combinedskill ge 80) or ((this.ship.isclass.ship_l or this.ship.isclass.ship_xl) and (this.combinedskill ge 80 and @$this.ship.defencenpc.combinedskill ge 80 and @$this.ship.engineer.combinedskill ge 80)) or ((this.ship.isclass.ship_m or this.ship.isclass.ship_s) and (this.combinedskill ge 80)))">
		<!--<do_if value="($target.pilot == $MICT_Commodore) or ($target.$target.pilot == $MICT_Admiral) and ($target.isclass.ship_l or $target.isclass.ship_xl)">-->
			<!--<do_if value="(this.ship.trueowner != faction.player)">
				<write_to_logbook category="general" text="'Performing IS MICT Escort.Capital'"/>
			</do_if>-->
			<debug_text text="' Performing IS MICT Escort.Capital'" chance="$debugoutputchance" />
			<run_script name="'MICT.move.escort.capital'" sinceversion="5">
				<param name="target" value="$target"/>
				<param name="timeout" value="$timeout"/>
				<param name="formationparam" value="$formationparam"/>
				<param name="formationparam2" value="$formationparam2"/>
				<param name="debugoutputchance" value="$debugoutputchance"/>
			</run_script>
			<resume label="finish"/>
		</do_if>
	</add>
	<add sel="//attention[@min='unknown']//do_if[@value='this.zone != $target.zone']" pos="before">
		<do_if value="(not this.ship.isclass.ship_xs or not this.ship.isclass.drone) and (($target.pilot.combinedskill ge 80 and @$target.defencenpc.combinedskill ge 80 and @$target.engineer.combinedskill ge 80) or ((this.ship.isclass.ship_l or this.ship.isclass.ship_xl) and (this.combinedskill ge 80 and @$this.ship.defencenpc.combinedskill ge 80 and @$this.ship.engineer.combinedskill ge 80)) or ((this.ship.isclass.ship_m or this.ship.isclass.ship_s) and (this.combinedskill ge 80)))">
		<!--<do_if value="($target.pilot == $MICT_Commodore) or ($target.$target.pilot == $MICT_Admiral) and ($target.isclass.ship_l or $target.isclass.ship_xl)">-->
			<!--<do_if value="(this.ship.trueowner != faction.player)">
				<write_to_logbook category="general" text="'Performing OS MICT Escort.Capital'"/>
			</do_if>-->
			<debug_text text="' Performing OS MICT Escort.Capital'" chance="$debugoutputchance" />
			<run_script name="'MICT.move.escort.capital'" sinceversion="5">
				<param name="target" value="$target"/>
				<param name="timeout" value="$timeout"/>
				<param name="formationparam" value="$formationparam"/>
				<param name="formationparam2" value="$formationparam2"/>
				<param name="debugoutputchance" value="$debugoutputchance"/>
			</run_script>
			<resume label="finish"/>
		</do_if>
	</add>
</diff>
I haven't looked at why the entire squad isn't refueling yet, and I probably won't for a bit, because my ships are all fueled now! Once I need to refuel a squad again I'll probably take a look.

Edit: It looks like the above fix gets squad refueling working again too.

w_evans:
I think that you missed my Edit, I determined (or at least suspect) that the pacifist Defense Officer was caused by a vanilla bug that causes the patrol routine to get messed up if you dock while a ship is chasing you.

rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter » Sat, 14. Apr 18, 20:40

Hmm - yonder you altered the Move.escort.capital.xml - but that that file for me is now empty since the introduction of supplemental 2 - and the code is different and I don't know nearly enough to know what to look for.

right now to get them all to act I'm having to have them all in my squad and use "squad attack" from another mod - it's incredibly clunky and awful when it's over 20 ships in my fleet.

It's so bad and annoying it's made me stop playing until today, and I had to deal with it again which reminded me of this post.

W.Evans when you have the time, could you take a look at what his fix says and tell me where to put it please?



Edit after some big battles tonite I've noticed a few things:

Balors firing in all directions instead of keeping thier nose pointed at the intended target before firing, thus their missile salvo's missing quite often or being essentially worthless because the missiles take so long re-orientate to the target, it's been destroyed.

Even with all cap ships being under my direct squad instead of escorting (because something is wrong with the escort.move commands) they boost instead of jump when I am OOZ - but make correction jumps for IZ combat as normal, they have plenty of fuel.

This means my Balors being the fastest always get there first, they are also the weakest and thus I've lost several taking on Xenon I.

I'm now having to micromanage the move commands of a large fleet of 18 ships ONE BY ONE and do them in order of speed.

This is not fun, it feels like I've taken on the task of what your mod says it does (I re-read the nexus page and the info for the supplements just to make sure I had my info straight), so I've quit the game, writing this and now I'm going to play something else until you've had a chance to reply.

In just tonites couple of hours Xenon hunting I noticed several Balors having a major derp. When enacting the boost away evasion, but were pointing AT the xenon I's, they just rammed right into them instead of turning, THEN boosting AWAY, 1 died from the I's turrets fire, the other 2 just bounced off the hull, then turned a bit and boosted..... but they didn't turn very much so they both just skimmed past.

1 got killed when it then rammed one of my titurels while still close to the Xenon I, the other made it away.

ALL THREE ARE ELITE CREWS - because I mark all my ships that have elite crews - so thus this behaviour was done under the MICT scripts.

I've seen others of my ships do it too, but Balors are squishy enough for it to be a problem.

I've cheated back in some Balors to compensate for the annoyance - I'd rather not have to.

I'm not using any other mod that might interfere with MICT - I removed CDOai mod as it had bugged out my storyline - the bit attacking the drone fab and the exodus of HoA ships to devries.

Oh yeah - "captains locking onto a hostile and chasing them until its destroyed..."

can you tell me how to disable that? I've lost several more cap ships like titurels who've locked on to ships with more firepower and hull strength than themselves and got themselves killed.

I'm guessing there's no way to have some sort of combat check along the lines of "can I actually win this fight", before chasing an enemy capship away from the main fleet.

Re-engaging after being badly damaged is an exercise in futility.

I'm sorry this post comes across a bit harsh and accusatory, but the last few hours were not what I'd call enjoyable.

Using my fleet against a few weaker targets there was no issues, but now I'm taking on Xenon ships and some places might have 4 or 5 with a couple of I's, the micromanagement required to keep them alive is just putting me right off playing.

Quite a lot of that is down to the movements not working as what I assumed was intended.

I would really appreciate any help you might be able to give so having a fleet large enough to invade Xenon areas doesn't continue to be a micro management PITA.[/u]

Yonder
Posts: 322
Joined: Wed, 24. Mar 04, 22:53
x3

Post by Yonder » Sat, 21. Apr 18, 03:00

Sorry I missed this. My post back on the 8th is the entire replacement file. If you copy it and paste it so that move.escort.capital.xml is exactly equal to what I've posted you should be fine.

Greg_G
Posts: 110
Joined: Tue, 26. Apr 05, 19:15
xr

Post by Greg_G » Sat, 30. Jun 18, 02:21

I just wanted to report a strange issue I just had. I'm generally of the opinion I reap what I sow because I run a significant number of mods, so I'm not really seeking assistance. But in case others run into this in the future, I felt it was good to report it.

About 48 hours into this play-through, which hasn't had any form of crash or lock-up, I decided to install MICT with supplements 3 and 8. I enjoyed using it for about 6 hours before my troubles began. I decided at one point to reload a save I'd made a few minutes before. It loaded fine, but after 10-15 seconds the game would just freeze and require an end task. So I tried a save from 15 minutes before, same thing. I tried another save 30 minutes before which was in a different sector, same thing again. I tried this about 8 times. Every time the game froze after 10-15 seconds of loading.

So I disabled MICT, since it was the most recent addition, and was able to load and play any of these saves without issue, giving each load a good 2 minutes to feel confident in this. I then re-enabled it, and tried the same saves, and the freezes resumed, same MO.

Next I disabled MICT, restarted, loaded and immediately saved my game, re-enabled MICT, restarted and then loaded that newest save. It loaded fine and had no freeze after 10 minutes of play. I then tried loading one of the saves that didn't have this disable-resave-enable treatment, and the freeze happened. I then restarted and once again loaded my new save, which got that treatment, and it continues to play just fine.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sat, 30. Jun 18, 13:47

@Greg_G, thanks for the report. Could you post a link to the save that freezes? Can't test it right now since i unfortunately still don't have a PC that can run the game, but would like to take a look at the file and test when able.

Could you also post a list of mods you have installed? Could come in handy to check for conflicts.

And just so it's clear, you got base MICT from the Nexus with just supplements 3 and 8, no MOCT? Would help narrow down the problem.

Greg_G
Posts: 110
Joined: Tue, 26. Apr 05, 19:15
xr

Post by Greg_G » Sat, 30. Jun 18, 22:19

@w.evans: I'd be happy to do so. I just hope I'm not wasting your time with something I managed to muck up that no one else ever sees. :)

The linked 7z file contains two saves that exhibit the problem (saves 3 and 4) and one from after I worked around it using the steps above (save 6):
https://secure.lumacs.org/nc/index.php/ ... XcYYm9pPfB

I do indeed run MOCT as well, although that one has been in since the beginning of this playthrough. My mod list:

Code: Select all

alexalsp_ya_crewfixonfired
AutoCrew
AutoLooter
autoresupply
AutoTrain
avoidfoo
BetterStationScanMode
CombatRankBailout
do_not_shoot_non-combat_drones
ego_dlc_2
ego_dlc_teladi_outpost
emy_gmsc
improved_log
loltak_ICIM_V401_St
marinerebalance
mej_improved_object_menu
minigame_hack
MoreCrew
nidaren_titurel_engine_fix
NoSteeringModeNotification
no_killtarget_in_xenon_space
npcsgainxp
remove_tips_from_the_log
shiprecycle
shortname_generator
show resources
Show Skills
showmeyourfactionplease
sidebarextender
simooms_galactic_dress_code
simooms_lantern
skunkengineer
trade menu cargo hold filter
utcac_ext_advanced_renaming
utcac_ext_advanced_renaming_user
UTCommandAndControl-master
w.e_betterautoaim
w.e_diffhack
w.e_engineerdronefix
w.e_mict
w.e_moc-t
w.e_TradeRelations
yat2
yorricksyisha
Almost all are known 4.30 compatible, and those very few that aren't have run well for me so far (with the exception of Simoom's Lantern for which I only use one function which does still work fine). All have been in without noticeable issue for at least 24 hours of play-time. Note that I run the GOG version of X:R.

Obviously I'm a fan of your mods, and thank you for them. :)

Post Reply

Return to “X Rebirth - Scripts and Modding”