[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: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Fri, 6. Mar 15, 13: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: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Sat, 7. Mar 15, 13: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, 17:11, edited 1 time in total.

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Sat, 7. Mar 15, 16: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: 308
Joined: Sun, 14. Feb 10, 18:47
xr

Post by oliverjanda » Mon, 9. Mar 15, 10: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: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Mon, 9. Mar 15, 11: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: 308
Joined: Sun, 14. Feb 10, 18:47
xr

Post by oliverjanda » Mon, 9. Mar 15, 11: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: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Mon, 9. Mar 15, 11: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: 308
Joined: Sun, 14. Feb 10, 18:47
xr

Post by oliverjanda » Mon, 9. Mar 15, 12: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: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Mon, 9. Mar 15, 12: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: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Mon, 9. Mar 15, 13: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: 308
Joined: Sun, 14. Feb 10, 18:47
xr

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

Good job!

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Tue, 10. Mar 15, 00: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, 02: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: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Tue, 10. Mar 15, 02: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, 03: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?

Post Reply

Return to “X Rebirth - Scripts and Modding”