[MOD] Miscellaneous IZ Combat Tweaks

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

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

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

Post by w.evans »

Thanks, Uni. Should work, except:
UniTrader wrote:<game_loaded/>
was changed a while back to only take effect when a game is actually loaded. So won't fire if a new game is started. event_player_created, on the other hand, runs every time the game universe is initialized and the player is created. (I think.)
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

w.evans wrote:Thanks, Uni. Should work, except:
UniTrader wrote:<game_loaded/>
was changed a while back to only take effect when a game is actually loaded. So won't fire if a new game is started. event_player_created, on the other hand, runs every time the game universe is initialized and the player is created. (I think.)
Pretty sure this works every time game is started or loaded

<event_cue_signalled cue="md.Setup.GameStart" />

edit-- Delay of 60s is working, well I didn't get any errors, haven't seen the succellus work yet, will let u know
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

BlackRain wrote:edit-- Delay of 60s is working, well I didn't get any errors, haven't seen the succellus work yet, will let u know
Cool! Yeah, if it still doesn't work, will switch triggers. Working reliably on my game, though. Has to since the movement script only calls that variable too, so ships won't run LR if it doesn't.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

w.evans wrote:
BlackRain wrote:edit-- Delay of 60s is working, well I didn't get any errors, haven't seen the succellus work yet, will let u know
Cool! Yeah, if it still doesn't work, will switch triggers. Working reliably on my game, though. Has to since the movement script only calls that variable too, so ships won't run LR if it doesn't.

It is not working. Succellus is not using Long Range movement
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

This looks like it works. Come to think of it, makes sense to wait for a cue to finish loading first if you want to check for a variable that it sets. Might be problematic if that cue isn't present, though.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<mdscript name="we_MICT_Test">
	<cues>
		<cue name="we_LR_Init" checktime="1s" checkinterval="1s">
			<conditions>
				<cue_is_complete cue="md.MICT_Init.MICT_LR_Init"/>
			</conditions>
			<actions>
				<append_to_list name="global.$MICT_LR_Ships" exact="macro.units_size_xl_red_destroyer_macro"/>
				<append_to_list name="global.$MICT_LR_Ships" exact="macro.units_size_l_single_attack_ship_macro"/>
			</actions>
		</cue>
	</cues>
</mdscript>
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Hi,

Not had much time today to play, but IZ combat with my Fulmekron and Taranis seems fairly good in the current version. However...

I've been fighting in space, not near to a station and things were going well. Moments ago I jumped to a contested sector where a RoC Outpost (CIWR) was about to fall under attack by a PMC Fleet. Now, I tackled this invasion in two ways, both with different behaviour.


First try:

I jump in and directly attack the PMC Fleet before it engages the station using "Patrol Zone" Command on my Fulmekron. The nearest enemies are attacked (fighters) then the Light Suls who moved in. Fighting goes well with ships manoeuvring as you'd expect. PMC Taranis - the fleet leader - stays on target towards the Outpost throughout, only the supporting Sul's (Light, Heavy Arbiter) move to engage my fleet along with lots of fighters. I then go after the Taranis...

At this point I reload on a whim to try something different.

Second Try:

I jump in to the Zone but just sit there watching. PMC Taranis and supporting fleet move to the RoC Outpost and engage. I then move it to attack....and here's where things get silly.

The Outpost takes out the Sul's leaving just the Taranis pounding it. However, both my Fulmekron its supporting Taranis appear to be totally unable to close on the PMC Taranis. Rather they're simply circling around waaaay out of weapons range under boost. Note: they have under 500 Fuel, so are not micro-jumping, just boosting.

I've been watching this second attempt for about 15 minutes now, and my Fulmekron and Taranis continue to circle around, they've not gotten close enough to get a single shot off yet. Meanwhile the PMC Taranis pounds the Outpost.

So, are my ships trying to get to the PMC Taranis but triggering some sort of avoidance due to the Outpost? Regardless, my ships simply will not go near that PMC Taranis.

Watching some more, the PMC Taranis takes out the Radar and connecting tube on the Outpost, leaving just the "main" part of the station intact. Moments later, my Taranis starts to turn more sharply towards the PMC Taranis - where it had been flying parallel to it previously in a lazy arc - at the same time my Fulmekron pulls UP slightly - it had been going very slowly, despite the boost effect showing - better approaching it too. After a few seconds, BOTH my ships are within weapons range and open fire. The PMC Taranis dies quickly.

So, this is basically a running commentary on my latest engagement. Not sure what to read into this.

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

Post by w.evans »

Scoob wrote: they're simply circling around waaaay out of weapons range under boost. Note: they have under 500 Fuel, so are not micro-jumping, just boosting.

I've been watching this second attempt for about 15 minutes now, and my Fulmekron and Taranis continue to circle around, they've not gotten close enough to get a single shot off yet. Meanwhile the PMC Taranis pounds the Outpost.

So, are my ships trying to get to the PMC Taranis but triggering some sort of avoidance due to the Outpost? Regardless, my ships simply will not go near that PMC Taranis.
Been mulling this over and around in my head while playing catch-up with my hunter-killer squadron in an effort to verify that they are, indeed, running the LR code (they are!); and I think I figured out what might have happened.

I think that the ship plotted a course somewhere into the outpost, or somewhere between the outpost and the PMC Taranis. It then started to boost there because it didn't have enough jump fuel in reserve, but couldn't get to that point.

Hm, maybe should write a time-out for boost. Can't be too short though, because then we'd have start-stop problems.

Would it be safe to assume that your Fulmekron (from ship orders and from the MICT display) is actively attacking the PMC Taranis?
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Yep, my Fulmekron was certainly after the PMC Taranis, as was my own Taranis.

Interestingly, I'm now in a Zone where an Outpost of mine is under siege, I'm going to see how my Fulmekron & Taranis combo do helping out...so far the Fulmekron is just sitting there, turning so very very slowly, while the boost effect plays...

Going to see how this one turns out.

Scoob.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

Getting a million of these errors:

Code: Select all

[=ERROR=] Error in MD cue md.brlongrange.br_LR_Init: Property lookup failed: md.MICT_Init
* Expression: md.MICT_Init.MICT_LR_Init
[General] ======================================
[General] ======================================
[=ERROR=] Error in MD cue md.brlongrange.br_LR_Init: Evaluated value 'null' is not of type cue
* Expression: md.MICT_Init.MICT_LR_Init
[General] ======================================
[General] ======================================
[=ERROR=] Error in MD cue md.brlongrange.br_LR_Init: Property lookup failed: md.MICT_Init
* Expression: md.MICT_Init.MICT_LR_Init
[General] ======================================
[General] ======================================
[=ERROR=] Error in MD cue md.brlongrange.br_LR_Init: Evaluated value 'null' is not of type cue
* Expression: md.MICT_Init.MICT_LR_Init
[General] ======================================

I can't figure out what I am doing wrong here

Code: Select all

<?xml version="1.0" encoding="utf-8"?> 
 <mdscript name="brlongrange"> 
    <cues> 
       <cue name="br_LR_Init" checktime="1s" checkinterval="1s"> 
          <conditions> 
             <cue_is_complete cue="md.MICT_Init.MICT_LR_Init"/> 
          </conditions> 
          <actions> 
             <append_to_list name="global.$MICT_LR_Ships" exact="macro.units_size_xl_van_destroyer_macro"/>             
          </actions> 
       </cue> 
    </cues> 
 </mdscript>
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

md cue looks good. just a sec. just fixed a couple of issues with supp2, update incoming.
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Another couple of observations if I may.

i) Often when ships boost to a target, they seem to cut boost way too late. They come within range while under boost, get a few shots off, then fly past. As a result, by the time they're back on normal drives, they've drifted out of range.

ii) I regularly see my ships fly to the exact X Y co-ordinate of their target enemy ship, however the Z axis is way off. This usually causes the ship to perform a jump, which then gets the Z axis right, but generally sees the ships far out of range in the X/Y axis.

Another one, might be vanilla though.

iii) After I'd cleared the Zone (Twilight Sentinel) I asked my Fulmekron to fly to the RoC owned Zone of Sparse Warmth. My ship refuses to obey this order, not moving after it's issued. I did the usual remove/add to squad along with issuing other move orders - none of these move orders were obeyed. After testing for a while, I then issued a Patrol order to the target Zone, ship started boosting almost right away. Most odd eh?

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

Post by w.evans »

21.August 2015 - MICT_supp2 updated to v0.29

Bugfix

- MICT Ships in MICT Squadrons now join formations only if they are within 5 kilometers of their squadron commander. Otherwise, they should use faster means to get closer to their squadron commander.
- If not attacking, and squadron commander is not attacking, MICT Squadron ships will stand down and rejoin their commander.
- After interruptions of squadron movement (via combat, refueling, squadron commander docking, etc.), MICT Squadron members will now more reliably rejoin formation.

Between these three, should iron out any lingering problems with squadron members slowing down after boost between zones is interrupted, or sometimes taking a long time to rejoin their squadrons after separation via combat engagement.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

I have tried a few things and I just can't get this ship to run the LR code. Any other suggestions?
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

BlackRain wrote:Getting a million of these errors:

Code: Select all

[=ERROR=] Error in MD cue md.brlongrange.br_LR_Init: Property lookup failed: md.MICT_Init
* Expression: md.MICT_Init.MICT_LR_Init
[General] ======================================
[General] ======================================
[=ERROR=] Error in MD cue md.brlongrange.br_LR_Init: Evaluated value 'null' is not of type cue
* Expression: md.MICT_Init.MICT_LR_Init
[General] ======================================
[General] ======================================
[=ERROR=] Error in MD cue md.brlongrange.br_LR_Init: Property lookup failed: md.MICT_Init
* Expression: md.MICT_Init.MICT_LR_Init
[General] ======================================
[General] ======================================
[=ERROR=] Error in MD cue md.brlongrange.br_LR_Init: Evaluated value 'null' is not of type cue
* Expression: md.MICT_Init.MICT_LR_Init
[General] ======================================
means MICT_Init hasn't loaded.
BlackRain wrote:I can't figure out what I am doing wrong here

Code: Select all

<?xml version="1.0" encoding="utf-8"?> 
 <mdscript name="brlongrange"> 
    <cues> 
       <cue name="br_LR_Init" checktime="1s" checkinterval="1s"> 
          <conditions> 
             <cue_is_complete cue="md.MICT_Init.MICT_LR_Init"/> 
          </conditions> 
          <actions> 
             <append_to_list name="global.$MICT_LR_Ships" exact="macro.units_size_xl_van_destroyer_macro"/>             
          </actions> 
       </cue> 
    </cues> 
 </mdscript>
Are you sure that the copy of MICT you have installed has \md\mict_init.xml? In testing I cut the copy I have up into two. I have this installed in MICT:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<mdscript name="MICT_Init" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<cues>
		<cue name="MICT_LR_Init">
			<conditions>
				<event_player_created/>
			</conditions>
			<actions>
				<create_list name="global.$MICT_LR_Ships"/>
			</actions>
		</cue>
	</cues>
</mdscript>
and I made this in a scratch mod I have to test things.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<mdscript name="we_MICT_Test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<cues>
		<cue name="we_LR_Init" checktime="1s" checkinterval="1s">
			<conditions>
				<cue_is_complete cue="md.MICT_Init.MICT_LR_Init"/>
			</conditions>
			<actions>
				<append_to_list name="global.$MICT_LR_Ships" exact="macro.units_size_xl_red_destroyer_macro"/>
				<append_to_list name="global.$MICT_LR_Ships" exact="macro.units_size_l_single_attack_ship_macro"/>
				<show_notification caption="'=== MICT INIT ==='" details="'MICT initialized. \n %1 ships added.'.[global.$MICT_LR_Ships.count]" queued="false" priority="9"/>
				<write_to_logbook category="tips" text="'MICT initialized. \n %1 ships added.'.[global.$MICT_LR_Ships.count]"/>
			</actions>
		</cue>
	</cues>
</mdscript>
and the movement script is now looking for:

this.ship.macro.ismacro.{global.$MICT_LR_Ships}

so if the cue didn't work, none of my ships should be running LR; but I've been in and back a couple of times now, testing game loads and custom game starts, and they are running LR. Dunno what's wrong, but I'll try some other things.

.......
@Scoob,

i) Often happens when they're boosting toward a ship that's coming towards them. Should happen less now that they aren't targeting max range. Does it still happen a lot?
ii) I'll look into it, but scratching my head over this one because I don't specify x/y/z coordinates. They look for a safe spot relative to their target, in an angle where the target can do them the least damage, within a certain distance, in a spot where the ship can fit; then figure out a way to go there. Could be just from the target ship maneouvering between the time they plot the destination and the time they get to the destination? Jump's often fastest, but even that has some delay.
iii) If it's not actively engaged in combat, and it isn't escorting anything else, then it isn't running MICT at that particular moment.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

I am using the steam version of MOCT (with all your stuff in one package) so I am assuming it has the file?

edit- Looked through the catalog, and the file isn't there. Did you not include it on steam?


edit2- Doesn't seem like you included it in your steam version which I redownloaded so it must be latest
Last edited by BlackRain on Fri, 21. Aug 15, 23:17, edited 1 time in total.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Oh! No, I haven't updated that yet. Will in a bit. Just want to get the MOCT stuff in.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Just updated the steam version to current.
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

w.evans wrote: @Scoob,

i) Often happens when they're boosting toward a ship that's coming towards them. Should happen less now that they aren't targeting max range. Does it still happen a lot?
ii) I'll look into it, but scratching my head over this one because I don't specify x/y/z coordinates. They look for a safe spot relative to their target, in an angle where the target can do them the least damage, within a certain distance, in a spot where the ship can fit; then figure out a way to go there. Could be just from the target ship maneouvering between the time they plot the destination and the time they get to the destination? Jump's often fastest, but even that has some delay.
iii) If it's not actively engaged in combat, and it isn't escorting anything else, then it isn't running MICT at that particular moment.
Hi,

Yes, I'd be ok with it if it happened while ships were moving at speed, however in these cases the target ships were moving slowly on normal drives.

Yeah, I just used X/Y/Z to explain the positioning of the ships, I've no idea how the game or you changes calculate this :)

It appears that your code worked just fine - the Patrol Zone order made the ship fly to the target Zone right away after all - but the vanilla (I assume) Fly To Zone command was failing.

Btw: what does it mean when a ship that's trying to jump closer to a target says it cannot jump? Fuel levels are over 500. I thought it may just be trying to jump again too soon and the drive is on cool-down?

Incidentally, I'm engaged in another me vs. Outpost fight. My Taranis is working very well, getting in close enough, doing damage, retreating as needed. Very good indeed. My Fulmekron on the other hand hasn't actually gotten close enough yet. It's doing lots of jumping around, but basically goes from well out of range on one side of the Outpost to well out of range on the other. Sorta wishing I'd gone for the Arawn when I had the dosh now lol.

Scoob.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

K, working now, sorry about the goose chase ugh
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Scoob wrote:Btw: what does it mean when a ship that's trying to jump closer to a target says it cannot jump? Fuel levels are over 500. I thought it may just be trying to jump again too soon and the drive is on cool-down?
Yeah, happens sometimes. Honest answer: I don't know. Best guess is that it couldn't find a spot to jump to. I added a 10 second timer a long while ago to lessen this: ships won't try to jump at all unless the timer is up. That and lack of fuel are the only reasons they boost nowadays since the thresholds were changed.
Scoob wrote:My Fulmekron on the other hand hasn't actually gotten close enough yet. It's doing lots of jumping around, but basically goes from well out of range on one side of the Outpost to well out of range on the other.
Hm. I'll look at the distance settings again. Is it fine against other ships now?

edit: Also, does the display say that it's out of range?

@BR, no prob.

Return to “X Rebirth - Scripts and Modding”