[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

Scoob
Posts: 11182
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

w.evans wrote:@BlackRain, Scoob, could be due to a vanilla bug I noticed several months ago where Drostan missiles fired at close to point-blank range, but far from the Skunk, fly through certain models sometimes. Might have been fixed at some point, haven't been paying close attention to projectiles actually hitting. Suspect something about some of the collision meshes in particular circumstances, but not sure. IHC seems to be hitting ships in my game, at least, the times that I just watch the shield/hull values while it's hitting.
Yes, I have seen that particular vanilla bug in the past, however in this case - at least what I've seen - the shots visually totally miss the station, rather than pass through certain parts of it. Not saying that doesn't happen, it's just not what we're talking about here :)

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

Post by w.evans »

Oh, sorry. Mistook "goes right past" for "goes right through."

Problem in this case probably does have something to do with the outposts then. IHC doesn't fire unless it's sure that it can hit at the moment it fires. If the target's stationary, should be a sure hit. If it doesn't, it thinks that it's pointed toward the target, but isn't.

Sorry if that sounds more convoluted than it ought to be. Getting late here, and I'm getting woozy.
Scoob
Posts: 11182
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Oh, I just had another invasion fleet jump into Molten Archon. Initially both my Fulmekron and Taranis ignored the fleet as they'd wandered (I assume) out of Radar range. I issued an Attack Object order against the lead Titurel and the Fulmekron...

...did a perfect jump to within range of the target and engaged! First time I've seem that with the Fulmekron.

Anyway, thought I'd post about it as it proves that this large ship can get it right in my game, just not that often :)

Well that was odd. Fulmekron continued to engage enemies very effectively. However, a little while later it did something silly again. It had boosted to engage a Titurel perfectly, it closed in, weapons opened up and boost turned off. After a couple of seconds though it jumped. Now, this just must have been initiated while the ship was already shooting the target. The jump took it way out of range, allowing the Titurel (which shouldn't have stood a chance) to engage my CV in the Zone. Luckily my Taranis is coming to the rescue!

So, some very good behaviour mixed in with odd behaviour here - I will snag a save, the Fulmekron has just jumped away...will upload in a bit.

Here's a link to my saved game for when you get a moment.

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

Post by w.evans »

Scoob wrote:Oh, I just had another invasion fleet jump into Molten Archon. Initially both my Fulmekron and Taranis ignored the fleet as they'd wandered (I assume) out of Radar range. I issued an Attack Object order against the lead Titurel and the Fulmekron...

...did a perfect jump to within range of the target and engaged! First time I've seem that with the Fulmekron.

Anyway, thought I'd post about it as it proves that this large ship can get it right in my game, just not that often :)

Well that was odd. Fulmekron continued to engage enemies very effectively. However, a little while later it did something silly again. It had boosted to engage a Titurel perfectly, it closed in, weapons opened up and boost turned off. After a couple of seconds though it jumped. Now, this just must have been initiated while the ship was already shooting the target. The jump took it way out of range, allowing the Titurel (which shouldn't have stood a chance) to engage my CV in the Zone. Luckily my Taranis is coming to the rescue!

So, some very good behaviour mixed in with odd behaviour here - I will snag a save, the Fulmekron has just jumped away...will upload in a bit.

Here's a link to my saved game for when you get a moment.

Scoob.
Good to hear! Just checked the target distances, and problem might be that the max distances are set to maximum range plus error. Let's try shifting everything closer by 20%.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

21.August 2015 - Miscellaneous IZ Combat Tweaks updated to v0.33.2

Target distances shifted closer by 20%.
Scoob
Posts: 11182
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

w.evans wrote: Good to hear! Just checked the target distances, and problem might be that the max distances are set to maximum range plus error. Let's try shifting everything closer by 20%.
Cool.

Did you notice, about 30 seconds or so into that save, how the Taranis jumped away (out of weapons range) of the Titurel despite being in perfect range & engaging nicely with all weapons?

Also, did you see the Fulmekron showing the order "Attack REI Titurel" which in fact it boosted to engage the Sennin assigned to the Titurel "leader"?

Just interesting to confirm that this save unfolds in a similar way to how it has for me.

Edit: I've just updated to 33.2 - will continue to test.

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

Post by w.evans »

Scoob wrote:
w.evans wrote: Good to hear! Just checked the target distances, and problem might be that the max distances are set to maximum range plus error. Let's try shifting everything closer by 20%.
Cool.

Did you notice, about 30 seconds or so into that save, how the Taranis jumped away (out of weapons range) of the Titurel despite being in perfect range & engaging nicely with all weapons?

Also, did you see the Fulmekron showing the order "Attack REI Titurel" which in fact it boosted to engage the Sennin assigned to the Titurel "leader"?

Just interesting to confirm that this save unfolds in a similar way to how it has for me.

Edit: I've just updated to 33.2 - will continue to test.

Scoob.
Sorry, haven't actually gotten to take a look yet. Unfortunately, likely won't be able to take a peek at your save until the weekend. Proposed solution was best guess from your descriptions. Let me know how it goes.
Scoob
Posts: 11182
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

w.evans wrote: Sorry, haven't actually gotten to take a look yet. Unfortunately, likely won't be able to take a peek at your save until the weekend. Proposed solution was best guess from your descriptions. Let me know how it goes.
No worries. Behaviour does seem somewhat improved with 33.2.

Bit knackered here so likely gonna call it a night myself shortly.

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

Post by w.evans »

BlackRain wrote:adding in the macro name worked, the succellus vanguard is now using the LR script as it should.
A rather labor-intensive solution since it will require someone loading up my script whenever I update and adding the relevant condition. Let's see if this works:

can you please try replacing:

this.ship.maxcombatrange.primary ge 8000 or this.ship.macro.ismacro.{macro.units_size_l_single_attack_ship_macro}

with

this.ship.maxcombatrange.all gt 8000

I remembered some trouble that Uni had with custom ships not registering dps changes and such OOZ, and I think that a similar problem with the Sucellus Vanguard isn't registering the correct primary weapons range when polled.

Problem with this setting is that it will catch ships like the Xenon I that have long-ranged weapons, but aren't particularly well-suited to fighting long-range.
Scoob wrote:No worries. Behaviour does seem somewhat improved with 33.2.
Please let me know if it's now good, or if it requires further tweaking. Have a gut feeling that all it needs is tweaking the distance values rather than major changes since I think the only relevant difference between a Fulmekron and a Taranis movement-wise are their relative sizes; and since the Fulmekron is such a large ship, moving to extreme range can put the bulk of the ship outside of effective range. Relative speed shouldn't be all that relevant since the problems are most visible when they're jumping, right?
User avatar
Marvin Martian
Posts: 3616
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian »

just an idea
besides
this.ship.macro.ismacro.units_size_l_single_attack_ship_macro or this.ship.macro.ismacro.units_size_l_another_ship_macro

it could be working also
this.ship.macro.ismacro.[macro.units_size_l_single_attack_ship_macro, macro.units_size_l_another_ship_macro]

in that case why not
this.ship.macro.ismacro.{global.$LR_macros_list} or something similar will work, i worst case a do_all of the list

so you can make an md-cue to make this global.$LR_macros_list on every start, and other mods can add there macros to your cue
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Marvin Martian wrote:just an idea
besides
this.ship.macro.ismacro.units_size_l_single_attack_ship_macro or this.ship.macro.ismacro.units_size_l_another_ship_macro

it could be working also
this.ship.macro.ismacro.[macro.units_size_l_single_attack_ship_macro, macro.units_size_l_another_ship_macro]

in that case why not
this.ship.macro.ismacro.{global.$LR_macros_list} or something similar will work, i worst case a do_all of the list

so you can make an md-cue to make this global.$LR_macros_list on every start, and other mods can add there macros to your cue
Good idea. Thanks. Let's see if the trick above works first, though; although your solution will provide better long-term compatibility with everything that might come.
User avatar
Marvin Martian
Posts: 3616
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian »

if .ismacro. won't work with a list, maybe .indexof. will
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Marvin Martian wrote:if .ismacro. won't work with a list, maybe .indexof. will
Thanks. Testing now.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

@Marvin, looks like simply making a list of macros and placing that in this.ship.macro.ismacro.{global.$MICT_LR_Ships} works. I'll clean up and upload in a bit. This battle's getting interesting.

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

Post by w.evans »

21.August 2015 - Miscellaneous IZ Combat Tweaks updated to v0.34

Target distances for LR ships pushed back to extreme range.
Improved compatibility with modded ships.

Modders:

The movement script in this mod has long-ranged ships act differently to other ships, namely:

They always orient forward,
And they use the maximum range of all of their weapons to determine range, rather than maximum turret range.

If you have a ship that you want to use this LR code, please make an md cue, and add the following line:

<append_to_list name="global.$MICT_LR_Ships" exact="macro.units_size_xl_van_destroyer_macro"/>

replace "units_size_xl_van_destroyer_macro" with the macro name of your ship.

The init cue that generates the list in MICT is set to run immediately upon <event_player_created/>. I would suggest that you use that same condition, and apply a short delay to make sure that the MICT init cue is run first.

Thanks to Marvin Martian for pointing out that this would be a really good solution to the compatibility problem.

.......
Thanks, Marvin!

@BlackRain, the above should get your Sucellus Vanguard running the LR code.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain »

Do you mean like this?

Code: Select all

<cue name="InitializeLRShips" instantiate="false" namespace="this"> 
      <conditions> 
        <check_any> 
          <event_player_created />            		  
        </check_any> 
      </conditions> 
	  <delay min="30s"/>
      <actions>
		<append_to_list name="global.$MICT_LR_Ships" exact="macro.units_size_xl_van_destroyer_macro"/> 
	  </actions>
	 </cue>
That isn't working, probably did something wrong?
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

BlackRain wrote:Do you mean like this?

Code: Select all

<cue name="InitializeLRShips" instantiate="false" namespace="this"> 
      <conditions> 
        <check_any> 
          <event_player_created />            		  
        </check_any> 
      </conditions> 
	  <delay min="30s"/>
      <actions>
		<append_to_list name="global.$MICT_LR_Ships" exact="macro.units_size_xl_van_destroyer_macro"/> 
	  </actions>
	 </cue>
That isn't working, probably did something wrong?
Yup, just like that. Anything in your debug log about global.$MICT_LR_Ships ?
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:Do you mean like this?

Code: Select all

<cue name="InitializeLRShips" instantiate="false" namespace="this"> 
      <conditions> 
        <check_any> 
          <event_player_created />            		  
        </check_any> 
      </conditions> 
	  <delay min="30s"/>
      <actions>
		<append_to_list name="global.$MICT_LR_Ships" exact="macro.units_size_xl_van_destroyer_macro"/> 
	  </actions>
	 </cue>
That isn't working, probably did something wrong?
Yup, just like that. Anything in your debug log about global.$MICT_LR_Ships ?

Yes

Code: Select all

[=ERROR=] Error in MD cue md.Warstarter.InitializeLRShips: Property lookup failed: global.$MICT_LR_Ships
* Expression: global.$MICT_LR_Ships
[General] ======================================
[General] ======================================
[=ERROR=] Error in MD cue md.Warstarter.InitializeLRShips: Evaluated value 'null' is not of type list
* Expression: global.$MICT_LR_Ships
[General] ======================================
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

BlackRain wrote:Yes

Code: Select all

[=ERROR=] Error in MD cue md.Warstarter.InitializeLRShips: Property lookup failed: global.$MICT_LR_Ships
* Expression: global.$MICT_LR_Ships
[General] ======================================
[General] ======================================
[=ERROR=] Error in MD cue md.Warstarter.InitializeLRShips: Evaluated value 'null' is not of type list
* Expression: global.$MICT_LR_Ships
[General] ======================================
Try increasing the delay. Looks like the variable hasn't been initialized yet, so the md file from MICT hasn't run yet. No idea what delay would work, but MICT_init doesn't have one.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

why not do it like EGO does it for everything which depends on md.Setup.Start ?

here an example:

Code: Select all

<mdscript name="Damage_Stations" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
  <cues>
    <cue name="Start" checktime="5s" checkinterval="5s">
      <conditions>
        <cue_is_complete cue="md.Setup.Start"/>
        <check_value value="player.galaxy.macro.ismacro.{macro.xu_ep1_universe_macro}" />
        <!-- <check_value value="false" comment="Remove to enable"/> -->
      </conditions>
      <actions>
        <set_value name="$Debugchance" exact="0"/>
      </actions>
maybe increase the checkinterval time or leave that out and instead use the <game_loaded/> event instead as check interval - may require one save-load-cycle more to take effect if both mods are added at the same time, but it will work ;)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

Return to “X Rebirth - Scripts and Modding”