[MOD] Miscellaneous IZ Combat Tweaks
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 2963
- Joined: Tue, 18. Nov 14, 16:23
3.September 2015 - Miscellaneous IZ Combat Tweaks updated to v0.42.1
Minor update:
- Short range distance threshold changed. MICT Captains of ships with weapons with a maximum range of less than 7,200 meters will position their ships in very close range (20% - 50% of maximum weapons range). They will reposition if their target gets to within 15% of their weapons range, or moves beyond range.
- Structural change to the defence officer script in MICT v0.42 made a wait node when launching drones redundant. DOs should now correctly recalculate drone target acquisition and launch more drones every 3 seconds. Should be faster than in v0.42 but, for ships with less drone bays, not as fast as in pre-v0.42.
Minor update:
- Short range distance threshold changed. MICT Captains of ships with weapons with a maximum range of less than 7,200 meters will position their ships in very close range (20% - 50% of maximum weapons range). They will reposition if their target gets to within 15% of their weapons range, or moves beyond range.
- Structural change to the defence officer script in MICT v0.42 made a wait node when launching drones redundant. DOs should now correctly recalculate drone target acquisition and launch more drones every 3 seconds. Should be faster than in v0.42 but, for ships with less drone bays, not as fast as in pre-v0.42.
-
- Posts: 3614
- Joined: Sun, 8. Apr 12, 09:40
on MICT.fight.attack.object.capital.xml
my Ships with longrange Missiles don't shoot (i think) because of that code
i remove the additional_targets="$targets.list" part and that seems to resolve this for me, have someone similar problems?
my Ships with longrange Missiles don't shoot (i think) because of that code
Code: Select all
<shoot_at object="this.ship" target="$target" slot="tag.secondary_slot" tolerance="15.0deg" locktarget="true" weapontype="combat" additional_targets="$targets.list"/>
-
- Posts: 2963
- Joined: Tue, 18. Nov 14, 16:23
That's odd. I was testing with Balors in particular when I wrote that in, and the Balors were firing at surface elements and hulls.Marvin Martian wrote:on MICT.fight.attack.object.capital.xml
my Ships with longrange Missiles don't shoot (i think) because of that codei remove the additional_targets="$targets.list" part and that seems to resolve this for me, have someone similar problems?Code: Select all
<shoot_at object="this.ship" target="$target" slot="tag.secondary_slot" tolerance="15.0deg" locktarget="true" weapontype="combat" additional_targets="$targets.list"/>
Could be the tolerance attribute too. Was 30.0deg, and vanilla has it at 360.0deg. Should be more accurate at 15.0deg, but they won't fire at all unless they're oriented to within 15 degrees.
-
- Posts: 11170
- Joined: Thu, 27. Feb 03, 22:28
Hi,
I think we spoke about this one previously...
I'm seeing my ships jump to an enemy that's still boosting into the system. The result of this is that they jump to where the ship was ten seconds or so earlier. This of course puts them way out of position. It also causes ships to chase enemies who are leaving the Zone under boost too.
Is this something that can be checked for? I.e. if the enemy is boosting, wait 15 seconds then micro-jump. Possibly additional checks for whether the ship is performing an In-Zone boost might help. Though waiting until the exact destination is know is good regardless.
Now I'm using your supplement to reduce the cargo size of fuel cells, I can afford to waste a little fuel with these jumps. However, the delay before a ship can jump again an hurt defence operations.
For example, just now, the entire fleet patrolling my Station (very hostile area) jumped right to the edge of the Zone when they saw a Titurel led Capital ship fleet entering. Now said Titurel is fairly close to civilian assets, yet my defensive fleet is quite badly out of position.
Not a huge issue, just an observation for a further refinement if the engine allows.
Oh, other than this issue, it is great to see station-assigned defensive forces working effectively.
Scoob.
I think we spoke about this one previously...
I'm seeing my ships jump to an enemy that's still boosting into the system. The result of this is that they jump to where the ship was ten seconds or so earlier. This of course puts them way out of position. It also causes ships to chase enemies who are leaving the Zone under boost too.
Is this something that can be checked for? I.e. if the enemy is boosting, wait 15 seconds then micro-jump. Possibly additional checks for whether the ship is performing an In-Zone boost might help. Though waiting until the exact destination is know is good regardless.
Now I'm using your supplement to reduce the cargo size of fuel cells, I can afford to waste a little fuel with these jumps. However, the delay before a ship can jump again an hurt defence operations.
For example, just now, the entire fleet patrolling my Station (very hostile area) jumped right to the edge of the Zone when they saw a Titurel led Capital ship fleet entering. Now said Titurel is fairly close to civilian assets, yet my defensive fleet is quite badly out of position.
Not a huge issue, just an observation for a further refinement if the engine allows.
Oh, other than this issue, it is great to see station-assigned defensive forces working effectively.
Scoob.
-
- Posts: 2963
- Joined: Tue, 18. Nov 14, 16:23
Unfortunately, if there's a way to check for it, haven't found one. I know that there's a way to check for the moment a ship goes into boost, but that's probably too late (or early) for your concern.Scoob wrote:Is this something that can be checked for? I.e. if the enemy is boosting, wait 15 seconds then micro-jump. Possibly additional checks for whether the ship is performing an In-Zone boost might help. Though waiting until the exact destination is know is good regardless.
There could be a way to check indirectly for boosting ships by checking change in position in a second, or to check a ship's speed; but both situations could also hold true even if a ship isn't boosting in from out-of-zone, so probably won't work very well, and will be tricky to test for.
In any case, I haven't forgotten it, but haven't found a solution for it yet.
-
- Moderator (Script&Mod)
- Posts: 14571
- Joined: Sun, 20. Nov 05, 22:45
<do_if value="this.ship.isboostactive"> ? 

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
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

-
- Posts: 2963
- Joined: Tue, 18. Nov 14, 16:23
Ooh, thanks!UniTrader wrote:<do_if value="this.ship.isboostactive"> ?
Hmm. How to implement...
Wouldn't make sense to put it into the combat movement script because these should be ignored before they're set as a target. Setting them as a target, then waiting for them to stop could cause ships to ignore other targets that are already around. So should go in target acquisition.
Lemme see, targets are acquired if: a ship is escorting, or if a ship has a patrol order. Which means the escort and patrol scripts. Other target acquisition methods are explicit. Did I miss anything?
-
- Posts: 11170
- Joined: Thu, 27. Feb 03, 22:28
-
- Posts: 2963
- Joined: Tue, 18. Nov 14, 16:23
-
- Posts: 2963
- Joined: Tue, 18. Nov 14, 16:23
-
- Posts: 2963
- Joined: Tue, 18. Nov 14, 16:23
3.September 2015 - Miscellaneous IZ Combat Tweaks updated to v0.43
All ships (not just MICT ships) on patrol will not target capital ships that are boosting. Ships that were already targeted before they start boosting will stay targeted.
.......
MICT_supp2 updated to v0.35
MICT Ships in squadrons will not target capital ships that are boosting. Ships that were already targeted before they start boosting will stay targeted.
.......
NB: That tweak to ships on patrol can still target a ship that comes in boosting if it's the only ship that is detected, or if there are no other potential targets that are closer. Can make it more restrictive, but didn't want to touch move.seekenemies any more than absolutely necessary.
Nice script, that one, but the code in that script is so precisely written that it wasn't easy to alter it via a simple replacement or node addition. And the code was so pretty, didn't want to muck it up.
Thanks to Scoob for pointing out the problem, and thanks to UniTrader for the key that fixed it.
All ships (not just MICT ships) on patrol will not target capital ships that are boosting. Ships that were already targeted before they start boosting will stay targeted.
.......
MICT_supp2 updated to v0.35
MICT Ships in squadrons will not target capital ships that are boosting. Ships that were already targeted before they start boosting will stay targeted.
.......
NB: That tweak to ships on patrol can still target a ship that comes in boosting if it's the only ship that is detected, or if there are no other potential targets that are closer. Can make it more restrictive, but didn't want to touch move.seekenemies any more than absolutely necessary.
Nice script, that one, but the code in that script is so precisely written that it wasn't easy to alter it via a simple replacement or node addition. And the code was so pretty, didn't want to muck it up.
Thanks to Scoob for pointing out the problem, and thanks to UniTrader for the key that fixed it.
-
- Posts: 11170
- Joined: Thu, 27. Feb 03, 22:28
-
- Posts: 2963
- Joined: Tue, 18. Nov 14, 16:23
-
- Posts: 11170
- Joined: Thu, 27. Feb 03, 22:28
Hi w.evans,
In my testing this evening, I'm still regularly seeing ships micro-jump to boosting targets. Note: these ships are boosting in from outside of the Zone - which you said might still get targeted.
However, often the lead ship of any fleet boosting in will arrive well ahead of the others. For a defensive fleet that's by its very nature already stationed in a Zone, it causes them to jump at the first sight of a Capital-class enemy, usually leaving them out of position for a short while, allowing any supporting assets of said inbound capital ship to engage civilian units in the Zone. Defensive ship does boost back into the fight of course, but there's a window for the enemy to exploit.
Not meaning to be critical, you clearly stated this would be the case, just providing additional feedback on how this plays out in-game. However, if you were to consider delving in to move.seekenemies....
Thought: Once the ship initiated the micro-jump to the targets position at the time it was spotted, is there any was for target position to be checked again say 1 second prior to the micro-jump actually executing? Example:
- Player Capital Ship patrolling a Zone
- Enemy Capital Ship spotted (alone) boosting in
- Player Capital Ship initiates micro-jump count-down
- With one second to go on the count-down, player Capital Ship re-checks target position.
- Player Capital Ship can now either:
- i) CANCEL the jump if the target is now closer to current position than the micro-jump target position (if possible)
- ii) ADJUST the jump co-ordinates to be relative to the current position of the enemy, if it's stopped boosting at this time (possibly a bit cheaty!)
As usual, I don't know how much of this is possible.
Will continue to test.
Scoob.
In my testing this evening, I'm still regularly seeing ships micro-jump to boosting targets. Note: these ships are boosting in from outside of the Zone - which you said might still get targeted.
However, often the lead ship of any fleet boosting in will arrive well ahead of the others. For a defensive fleet that's by its very nature already stationed in a Zone, it causes them to jump at the first sight of a Capital-class enemy, usually leaving them out of position for a short while, allowing any supporting assets of said inbound capital ship to engage civilian units in the Zone. Defensive ship does boost back into the fight of course, but there's a window for the enemy to exploit.
Not meaning to be critical, you clearly stated this would be the case, just providing additional feedback on how this plays out in-game. However, if you were to consider delving in to move.seekenemies....

Thought: Once the ship initiated the micro-jump to the targets position at the time it was spotted, is there any was for target position to be checked again say 1 second prior to the micro-jump actually executing? Example:
- Player Capital Ship patrolling a Zone
- Enemy Capital Ship spotted (alone) boosting in
- Player Capital Ship initiates micro-jump count-down
- With one second to go on the count-down, player Capital Ship re-checks target position.
- Player Capital Ship can now either:
- i) CANCEL the jump if the target is now closer to current position than the micro-jump target position (if possible)
- ii) ADJUST the jump co-ordinates to be relative to the current position of the enemy, if it's stopped boosting at this time (possibly a bit cheaty!)
As usual, I don't know how much of this is possible.
Will continue to test.
Scoob.
-
- Moderator (Script&Mod)
- Posts: 14571
- Joined: Sun, 20. Nov 05, 22:45
this should do the trick:
*copied some of my code, its just for explaination anyway*
*copied some of my code, its just for explaination anyway*
Code: Select all
<jump result="$result" object="this.ship" zone="$beacon.zone" ignorefuel="$ignorefuel">
<safepos allowyaxis="true" value="$beacon.position" radius="this.ship.size"/>
<orientation refobject="$beacon" orientation="look_away_bbox"/>
<interrupt_after_time time="$jumpdrive.chargetime - 1s"/>
</jump>
<do_if value="not $stillagoodideatojump">
<abort_jump object="this.ship" />
</do_if>
<do_else>
<wait>
<interrupt>
<conditions>
<event_object_jump_completed/>
</conditions>
</interrupt>
</wait>
</do_else>
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
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

-
- Posts: 2963
- Joined: Tue, 18. Nov 14, 16:23
Sorry guys. Just got back and am bone-tired. Will try to take a look tomorrow, but no promises as I have to head out again tomorrow evening, so will probably have to wait until Sunday.
@Scoob, am I right in assuming that just the patrolling ship(s) tried to engage the lead ship boosting in? Escorting ships should ignore it until it's settled.
@Uni, thanks for the code, but unfortunately, won't be able to use it because of how I've implemented patrolling ships ignoring ships coming in on boost. The target acquisition code vs capships in move.seekenemies goes like this:
What I did was change the sorting part of it to this:
which works except, of course:
still catches the very first ship boosting in if there aren't any other targets closer at the time. Planning on changing that to:
But will have to wait until I'm a bit more rested. But thanks for the code! Will try to work it in somewhere to incorporate it into my bag of tricks.
@Scoob, am I right in assuming that just the patrolling ship(s) tried to engage the lead ship boosting in? Escorting ships should ignore it until it's settled.
@Uni, thanks for the code, but unfortunately, won't be able to use it because of how I've implemented patrolling ships ignoring ships coming in on boost. The target acquisition code vs capships in move.seekenemies goes like this:
Code: Select all
<do_elseif value="$capitalenemies?">
<!-- Select nearest capship -->
<debug_text text="'capitalenemies: ' + $capitalenemies" chance="$debugoutputchance"/>
<set_value name="$enemy" exact="$capitalenemies.{1}"/>
<set_value name="$NearestDistance" exact="this.ship.distanceto.{$enemy}"/>
<do_all exact="$capitalenemies.count" counter="$DistanceCounter">
<do_if value="$DistanceCounter" min="2">
<set_value name="$tempdist" exact="this.ship.distanceto.{$capitalenemies.{$DistanceCounter}}" />
<do_if value="$tempdist" max="$NearestDistance">
<set_value name="$enemy" exact="$capitalenemies.{$DistanceCounter}"/>
<set_value name="$NearestDistance" exact="$tempdist"/>
</do_if>
</do_if>
</do_all>
</do_elseif>
Code: Select all
<do_if value="$DistanceCounter" min="2">
<do_if value="not $capitalenemies.{$DistanceCounter}.isboostactive">
<set_value name="$tempdist" exact="this.ship.distanceto.{$capitalenemies.{$DistanceCounter}}" />
<do_if value="$tempdist" max="$NearestDistance">
<set_value name="$enemy" exact="$capitalenemies.{$DistanceCounter}"/>
<set_value name="$NearestDistance" exact="$tempdist"/>
</do_if>
</do_if>
</do_if>
Code: Select all
<set_value name="$enemy" exact="$capitalenemies.{1}"/>
Code: Select all
<do_all exact="$capitalenemies.count" counter="$num">
<do_if value="$capitalenemies.{$num}.isboostactive">
<set_value name="$enemy" exact="$capitalenemies.{$num}"/>
</do_if>
<do_if value="$enemy?">
<break/>
</do_if>
</do_all>
-
- Posts: 11170
- Joined: Thu, 27. Feb 03, 22:28
No worries mate, rest up.w.evans wrote:Sorry guys. Just got back and am bone-tired. Will try to take a look tomorrow, but no promises as I have to head out again tomorrow evening, so will probably have to wait until Sunday.
@Scoob, am I right in assuming that just the patrolling ship(s) tried to engage the lead ship boosting in? Escorting ships should ignore it until it's settled.
Yeah, seemed to work that way.
Scoob.
-
- Posts: 285
- Joined: Sat, 18. Oct 14, 13:10