[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

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

Post by w.evans » Fri, 6. Mar 15, 12:04

6.Mar.2015 - v0.05 is up!

Bungled the conditions for range calculations. Sorry. It was set to calculate long ranges for the Sucellus only, rather than for the Sucellus and for the Balor as intended. Fixed in v0.05.

And it's playing stable on my run-down machine. So alpha status is lifted as of MiscellaneousIZCombatTweaks_v0.05.

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

Post by w.evans » Sat, 7. Mar 15, 12:57

I know that it kind of sucks to have to re-download a mod everyday, but:

7.Mar.2015 - v0.06 is up!

* Ships will boost to position if their jump drive is destroyed or if their target position is less than 30,000 meters away except if they're trying to retreat. (This comes with all of the flakyness of vanilla boosting like backwards boosting and sideways drifting.)
* Tactical jumps now need time for jump drives to charge up.
* I'm planning to have tactical jumps use jump fuel in the future. In preparation for this, ships jump much less than they used to, more often boosting or simply using their engines to maneouver.
* Front-firing long-range ships (at present, only the Sucellus and the Balor) stop when they get to their firing position, and more reliably track their targets. Still doesn't work 100%, though.
* Fine target tracking after boosting is still problematic, so long-range ships still jump to position.

Attempt to differentiate captain tactics from background and training. At the moment, only the retreat thresholds are affected:
  • Split captains are trained to attack until danger of obliteration is certain. They will retreat only if shields are completely drained, and will rejoin the fray when their shields recharge to at least 10%.
  • Teladi captains are trained to protect their assets and those of their employers. They will retreat if their shields are depleted to 40%, and will head back to the fight when their shields recharge to 80%.
  • Argon captains are trained to maintain a reasonable balance between application of pressure and protection of property. They will retreat if their shields are depleted to 20%, and will go back to the offensive when their shields recharge to 40%.
Last edited by w.evans on Sat, 7. Mar 15, 16:11, edited 1 time in total.

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

Post by w.evans » Sat, 7. Mar 15, 15:12

v0.061 is up.

Forgot to turn off the PDA and logbook spam in v0.06. Sorry about that. Nothing else changed.

oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda » Mon, 9. Mar 15, 09:58

I'm looking forward to trying your mod when 3.5 is out.

One question: Are the tactical jumps only within a zone or can my ships now jump from anywhere to the target if i give the attack order?

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

Post by w.evans » Mon, 9. Mar 15, 10:09

oliverjanda wrote:I'm looking forward to trying your mod when 3.5 is out.

One question: Are the tactical jumps only within a zone or can my ships now jump from anywhere to the target if i give the attack order?
Good question. They should only jump within a zone, but come to think of it, should check to see if the script is invoked the moment an attack order is given, or only when combat actually begins.

ps. And I don't think I did anything 3.5 specific, so this should be compatible with 3.2

oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda » Mon, 9. Mar 15, 10:26

Good to know, maybe I'll try it sooner.

Jumping to the target from ooz would be very handy but not lorefriendly, so I'd rather go without it.

How did you improve the move.attack script for the succellus? I considered to mod the behaviour myself based on CDOAIO but skipped it as I read about your mod.

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

Post by w.evans » Mon, 9. Mar 15, 10:30

oliverjanda wrote:Jumping to the target from ooz would be very handy but not lorefriendly, so I'd rather go without it.
Agreed. Should be a quick fix if it does that.
oliverjanda wrote:How did you improve the move.attack script for the succellus? I considered to mod the behaviour myself based on CDOAIO but skipped it as I read about your mod.
Most reliable is to have it jump to position since it can be made to finish its jump with its gun already oriented correctly. Starting to think that it's kinda cheap though, so I'm working on having it track its gun after moving or boosting to position. Still rather wonky at the moment, so sticking with the tactical jump for now.

oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda » Mon, 9. Mar 15, 11:18

Sounds like a good solution if jumping is not too fast.
Did you take a look at CDOAIO? The sucellus movement script is relatively easy to read.

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

Post by w.evans » Mon, 9. Mar 15, 11:29

oliverjanda wrote:Sounds like a good solution if jumping is not too fast.
Did you take a look at CDOAIO? The sucellus movement script is relatively easy to read.
Not in a while. Should probably take a look to see if there's something that's better done there. Found this in move.nohighway.xml:

Code: Select all

        <move_to object="this.ship" destination="this.zone" forceposition="false" forcerotation="true" >
          <position value="$pos" />
          <rotation value="$rot" />
        </move_to>
where $pos is this.ship.position, and $rot is where you want to be pointed. (prep for boosting) Adapted that, and that's what the Sucellus is using for target tracking right now:

Code: Select all

<do_if value="this.ship.macro.ismacro.{macro.units_size_xl_red_destroyer_macro} or this.ship.macro.ismacro.{macro.units_size_l_single_attack_ship_macro}">
	<move_to object="this.ship" destination="this.zone" forcesteering="true" forceposition="false" forcerotation="true" finishonapproach="false" sinceversion="2">
		<position value="this.ship.position"/>
		<rotation value="$MICT_AimVector"/>
		<interrupt>
			<conditions>
				<check_any>
					<event_object_destroyed object="$target"/>
				</check_any>
			</conditions>
		</interrupt>
		<interrupt_after_time time="$MICT_update"/>
	</move_to>
</do_if>
Found that the problem with tracking in previous versions of the mod is that it was coupled with a move order so the ship would plot a point to which it'll move, and it'll have to be pointed at that point while it's moving. It'll point towards its target after it gets there, but it'll then immediately plot another destination point and start moving (and facing) that way. Fine for closer-range destroyers, but not good if we want a ship pointed a particular direction. Having them not move and just face a direction while checking every so often to see if the target moved seems to have fixed that. Works most of the time. Still wonks out sometimes, though.

Another solution that worked is to have the ship jump far far away, then start moving slowly towards its target. Discarded that because I'm trying to have all of the ships jump less in general though.

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

Post by w.evans » Mon, 9. Mar 15, 12:07

oliverjanda wrote:One question: Are the tactical jumps only within a zone or can my ships now jump from anywhere to the target if i give the attack order?
Back to this question. Can't run the game to check right now, but I did take a quick peek at command.fight.attack.xml

Code: Select all

      <do_if value="$target.isoperational">

        <!-- if different zone, go there -->
        <do_if value="this.ship.zone != $target.zone">
          <run_script name="'move.generic'" sinceversion="1">
            <param name="destination" value="$target" />
            <param name="endintargetzone" value="true" />
          </run_script>
        </do_if>
        
        <run_script name="'fight.attack.object'" >
          <param name="target" value="$target" />
          <param name="escort" value="$escort" />
          <param name="pursuetargets" value="not @$escort" />
          <param name="allowothertargets" value="false" />
          <param name="checkrelation" value="$checkrelation"/>
        </run_script>

      </do_if>
So if this.ship.zone != $target.zone, then the capship should perform jumps and go through gates (move.jump) until it's at the correct sector, then boost (move.nohighway) until it's at the correct zone. It should only trigger fight.attack.object after it's at the same zone as the target; and the MICT movement script is triggered from fight.attack.object, so we should be ok in this regard.

Please do let me know if this is not the case. (If a ship can jump from Omicron Lyrae to Albion in a single bound when given an attack order.)

oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda » Mon, 9. Mar 15, 12:11

Good job!

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

Post by w.evans » Mon, 9. Mar 15, 23:58

@oliver, thanks, man!

_____
9.Mar.2015 - v0.07 is up!

Incorporated a couple of changes from vanilla X:R v3.50 RC1 (Thanks, Egosoft!)
Tightened the tolerances for boost-strafing* and tactical jumps. (Down to half: boosts when at least 5,000m away from plotted destination, was 10,000m. Jumps when at least 15,000m away from plotted destination, was 30,000m.) Probably a bit too twitchy. Feedback would be appreciated.

........
9.Mar.2015 - MICT_supp2 is up!

Squadron-level tactics.
  • Squadron subordinates act more aggressively toward nearby hostile targets.
  • They will also attack a target designated to their squadron commander if no hostiles are nearby.
  • IZ, squadron subordinates will jump to their commander if they are separated, and are not otherwise engaged.
Just extract to the extensions folder if this added behavior is desired IZ.

........
* Sorry, should probably clarify. By boost-strafing, I don't mean sideways moving. More like fly-by shooting.

Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini » Tue, 10. Mar 15, 01:32

Hi w.evans,

This could be a stupid question, but speaking about compatibility and gameplay, how this mod combine with:
- Epic capital ships,
- WWX
- UFO
- OOZ combat tweaks
- Better Turrets
- Captain Ai overhaul

- And finally are IZ and OOZ combat tweaks 3.20 compatible?

Cheers!

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

Post by w.evans » Tue, 10. Mar 15, 01:45

Hi Rubini,

yup, it's compatible with everything on your list, EXCEPT I'm not sure if it's compatible with WWX since I don't have it.

And, yes, both MICT and MOCT, as well as all supplements to both mods, should be compatible with both versions 3.20 and 3.50 of X:R.

Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini » Tue, 10. Mar 15, 02:19

w.evans wrote:Hi Rubini,

yup, it's compatible with everything on your list, EXCEPT I'm not sure if it's compatible with WWX since I don't have it.

And, yes, both MICT and MOCT, as well as all supplements to both mods, should be compatible with both versions 3.20 and 3.50 of X:R.
Thanks for the clarification mate!

About Epic Capital Ship Shields .... even with your tweaks on OOZ (and with the upcoming changes on the matter on 3.50) we yet need it for good OOZ?

oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda » Tue, 10. Mar 15, 10:47

Regarding compatibility:
Better turrets
This means you are not going to improve those (los check etc), right?
Captain AI Overhaul
Doesn't your mod make that one redundant?

Would you recommend to use those 2 mods with your mod?
I'm suprised this is all compatible!

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

Post by w.evans » Tue, 10. Mar 15, 11:11

Rubini wrote:About Epic Capital Ship Shields .... even with your tweaks on OOZ (and with the upcoming changes on the matter on 3.50) we yet need it for good OOZ?
I still have it installed, but if you're just worried about capital ships getting one-shotted OOZ, ECSS is probably unnecessary now since the OOZ calculations have been changed, especially in 3.50.
oliverjanda wrote:Regarding compatibility:
Better turrets
This means you are not going to improve those (los check etc), right?
Captain AI Overhaul
Doesn't your mod make that one redundant?

Would you recommend to use those 2 mods with your mod?
I'm suprised this is all compatible!
Yeah, this uses a separate script which fight.attack.object.xml calls instead of move.attack.object.capital.xml if certain conditions are met, so mods that modify move.attack.object.capital.xml, like cicero111's Captain AI Overhaul, are unaffected.

In a game where Captain AI Overhaul, UFO, and MICT are all present, UFO ships will use the UFO movement scripts, non-UFO ships with 4 star crews will use the MICT movement scripts, all other capital ships will use Captain AI Overhaul.

Better Turrets, yeah, haven't touched the firing stuff yet. I have included a copy of fight.attack.object.capital, renamed as MICT.fight.attack.object.capital, but only because MICT ships don't seem to fire IZ without it. Otherwise, Better Turrets, or vanilla, are ok. I was thinking of limiting the angle at which the Balor fires and adding an LOS check since its refire rate is so low, and is so inaccurate now if it isn't pointed almost directly at the target, but didn't want to break compatibility just for that.

birdtable
Posts: 2056
Joined: Sat, 7. Feb 04, 20:42
x4

Post by birdtable » Tue, 10. Mar 15, 11:53

Not sure if this relevant or not but witnessed a Balor take on 2 xenon K's, the Balor targeted the non aggressive K (to the Balor) and ignored the 2nd K which did become aggressive.
Although the Balor did eventually open fire on 2nd K it maintained missile attack on the non aggressive K.

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

Post by w.evans » Tue, 10. Mar 15, 12:58

Hi birdtable,

Thanks for the feedback! The Balor attacking a hostile that isn't aggressive is consistent with vanilla behavior when Defence Officers are set to "attacking enemies." They'll try to take potshots at any hostile ships that come into range. Just a bit more pronounced with our modded Balors since their range is now so long.

About the ship not evading the 2nd K right away, yeah, that's still a problem I'm trying to work out. At the moment, the crew focuses on one target, and maneouvers relative to that, but can, in the process, inadvertently maneouver close to a different hostile. Kind of works in that MICT Balors have to have some weakness, but I don't like it not being deliberate.

About the balance, are Balors supposed to be able to take on Xenon Ks? Haven't encountered a Xenon K in X:R yet, so I don't know. Also, if you're running supplement 2 from the OOZ mod (MOC-T_supp2_v0.01) along with MICT, there would be a pretty good chance of newly-spawned Xenon ships running MICT. Should make them all considerably more formidable.

oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda » Tue, 10. Mar 15, 13:06

@w.evans
Did you consider to make yourself a gamestart for testing purposes?
Give yourself the ships you want to test and place the enemies accordingly.
I have an example at home somewhere if you need one.

Post Reply

Return to “X Rebirth - Scripts and Modding”