[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

Lord Crc
Posts: 529
Joined: Sun, 29. Jan 12, 13:28
x4

Post by Lord Crc » Sun, 5. Jun 16, 19:32

Thanks for the update.

Sadly I've got enough at work for 3-4 clones at the moment, but planning on getting back to XR during my summer vacation in a months time. I'll try to reproduce the Balor issue then.

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

Post by w.evans » Sun, 5. Jun 16, 20:22

no prob. couldn't play much either since i've been getting these really bad headaches if i stare at a computer screen too long, and i kinda sorta have to stare at a computer screen for work. anyway, if you do encounter the Balor issue again, let me know.

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

Post by w.evans » Sat, 18. Jun 16, 00:00

Tester Request:

Calling all MICT admirals with at least 1 Sucellus in their fleet.

Just uploaded the file detailed below.

As those of you who have been following this mod's development may know, we've been having some occasional problems with the Sucellus.

The problem stems from my insistence that they ought to use the y-axis because, you know, space. Also, they are much more effective above or below the ecliptic because they don't have to deal with the clutter of ships that are usually on or near the ecliptic. Plus, you know, space.

However, capital ships cannot pitch above or below a certain angle, and because the Sucellus IHC has such a narrow firing angle, they often find themselves in a position from which they simply cannot turn enough to orient their main gun onto the enemy.

MICT_supp10 should fix that by relaxing that restriction. Hopefully, remove it.

Aside from checking to see if it works, I would also appreciate any feedback as to whether or not it also looks weird. In addition to removing the pitch restriction, supp10 also removes the roll restriction, so they may be rotated at all sorts of crazy angles with respect to everything else. If there is consensus that it does look weird, it is possible to remove the pitch restriction without touching the roll restriction.

If you all think that it's fine, this will be included in the main package of both MICT and the MCT.

If you think that it's fine, but some of you think that it looks odd, it will remain an optional supp.

If I'm an idiot and it doesn't work, heh.

For those of you who do not use MICT but are curious, you can install MICT_supp10 by itself without the base mod, as with all other supplemental files associated with this mod.

As with all MICT supplemental files, MICT_supp10 is available at the Nexus (link in the OP), under "Optional Files".

.......
17.June 2016 - initial upload MICT_supp10

experimental: this should allow the Sucellus to pitch above and below their normal range of movement.

I am not sure if this is sufficient to allow them to turn up or down 90 degrees, but it will certainly allow them to use the y-axis more effectively, especially when firing from long range.

If this works, this should also make the correction jump discussed in the last couple of updates completely unnecessary.

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

Post by w.evans » Sat, 18. Jun 16, 18:04

18.June 2016 - MICT_supp2 updated to v0.49

If a member of a MICT Squadron:

- is attacked,
- or finds a hostile target

while the MICT Squadron is authorized to engage,

all members of that squadron use that ship's sensors to find and engage hostile targets.

Also did some optimization. Ships in a MICT Squadron should now respond to squadron actions faster.

.......
edit: oh, and in case the use of this update isn't apparent, placing a radar ship (a ship with long-ranged radar, even if it isn't really good for much else) in a MICT Squadron now effectively extends that Squadron's engagement range. So radar ships are now a thing.

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

Post by w.evans » Tue, 21. Jun 16, 19:59

21.June 2016 - Miscellaneous IZ Combat Tweaks updated to v0.68

Capital Ship Combat Movement

- MICT ships that attack order any ships in their respective squadrons to immediately attack as well.
+ if MICT_supp2 is also installed, this will trigger them to go on high alert and scan for any hostile targets within their squadron's radar range, and select and engage particular targets as outlined in MICT Squadron doctrine.
+ if MICT_supp2 is also installed, and no hostile targets are found, they will immediately engage their commander's target.

- Optimized station demolition.
+ when attacking a station, they will engage that station's outermost parts first, and work their way inwards. Feedback on this feature in particular most welcome.
+ when a station module they had targeted is destroyed, they should automatically switch to the next station module that is furthest from the station's center.
+ they should continue working their way inwards until they can no longer find any operational station components belonging to the station that they are attacking.
+ please bear in mind that this does not change the fact that stations are overwhelmingly powerful! be bold by all means, but carry a big gun.

- MICT Ships that have retreated will no longer disengage, but will keep their distance until they judge that they have repaired and replenished their shields to a point where they think that they can go back into the fray for more. Please do bear in mind that they might be wrong. (note that this is a revertion to earlier behavior. at some point, this was changed to have them disengage after retreating and resume previous orders.)

- The Sucellus now moves with roll and pitch unlocked. (What used to be MICT_supp10 is now included in the main mod). They might move funny. Feedback welcome. However, this makes the next entry possible:

- The correction jump for the Sucellus to compensate for going to positions where it cannot pitch enough to bring its big gun to bear on target has been removed.

Capital Ship Target Acquisition and Firing

- Capital Ships consider all hostile station modules, capital ship engines, and capital ship jump drives as valid targets for the Sucellus IHC and the Balor torpedoes. Contrary to some reports, the Balor should not purposely fire their torpedoes on fighters and surface elements other than capital ship engines and jump drives, although the individual torpedoes may acquire fighters or surface elements on their own.

- Minor change to supress pointless debug spew due to a wrong assumption. Behavior wasn't changed as it is fine.

...
MICT_supp2 (MICT escort script) updated to v0.50

- MICT Squadrons should respond much more quickly and reliably to the following orders:
+ Disengage - give a MICT Squadron Commander any order while any member of the Squadron is engaged in combat. Please note that Split pilots can be stubborn about complying with this order.
+ Refuel - giving a MICT Squadron Commander an order to refuel will order the whole squadron to refuel. Only reason i have seen this fail is if a gas station is out of gas.
+ Go - telling a MICT Squadron Commander to go somewhere will order the entire squadron to go there. (not nearly as tidy as UniTrader's CAC method, but they all get where they're going very quickly.)

- Some restructuring to improve responsiveness and make it more reliable. Should also improve performance.

- Fixed a small cosmetic bug that could result in MICT Squadron Subordinates showing "Escort - Jumping" even though their jump has been long finished.

- Removed vanilla code for target acquisition and response to attack as it is now redundant, and apparently has been for a while now.

- Any MICT Subordinates who have acquired a target will now chase that target regardless of how far it goes relative to the rest of the squadron. If this results in MICT Squadrons being separated for extended periods of time, please do let me know. They should catch up with each other when their respective targets are destroyed, they are destroyed, or the MICT Squadron Commander (or you) order them to disengage, whichever comes first. MICT Squadrons tend to gang up on isolated hostiles that have been acquired but have wandered off. Thing to watch out for: isolated MICT Squadron Commander on solitary patrol while everyone else in the squadron is off chasing a hostile ship that has left the immediate area. Opinions welcome.

DeadMor0z
Posts: 26
Joined: Fri, 29. Nov 13, 18:20
x4

Post by DeadMor0z » Wed, 22. Jun 16, 21:26

No CES-compatible version?

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

Post by w.evans » Wed, 22. Jun 16, 21:38

A lot of the changes in this last revision are in MICT_supp2, and that should be compatible with CES.

Didn't port the changes to the movement script to the CES edition because CES handles targeting. So ships will go after the furthermost station modules, but CES probably won't have them on the targeting list (or might. come to think of it, am not sure.) so won't fire.

Guess could add the signal to attack immediately. I hesitate though because then, the two scripts (MICT and MICT_CES) will start diverging widely, and will start becoming a pain to maintain. (Rather than maintaining a mod and a version of the same mod with a change, it will start becoming like maintaining two entirely different mods. The likelihood of errors creeping in will be much higher in that case.)

The changes to the DO script won't apply, of course, since CES does that in CES + MICT_CES.

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

Post by w.evans » Wed, 29. Jun 16, 22:34

Thinking of clearing out all of the old versions from the nexus. Anyone mind?

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

Post by Scoob » Thu, 30. Jun 16, 13:51

I assume the silence means no one minds...I don't mind either :)

Scoob.

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

Post by w.evans » Sat, 2. Jul 16, 08:39

Alright. Here goes.

edit: oh boy. have to delete them one by one!

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

Post by w.evans » Sat, 2. Jul 16, 08:58

done. whew! hope i didn't delete anything that wasn't in old files.

have local back-ups of everything, so if anyone's looking for something that's no longer in there, let me know.

BoostHungry
Posts: 122
Joined: Sat, 23. Nov 13, 20:33

Post by BoostHungry » Sun, 3. Jul 16, 20:26

If I'm spawning NPCs on game start and manually starting their scripts, do I need to specifically start MICT Scripts? My starting NPCs are all 4 stars in their respective stats so I expect them all to be MICT capable.

Here's what I'm currently doing (mostly a modification of the CWIR game start):

Code: Select all

<start_script object="$titurel4Commander" name="'player.default'"/>
<start_script object="$titurel4DefenceNPC" name="'fight.defend.capital'"/>
<start_script object="$titurel4Engineer" name="'engineer.ai'"/>
I guess the same goes for the AutoCrew mod I'm using. Crew generated by Auto Crew will be between 3-5 stars so some may be MICT compatible but others aren't until they're trained up using the AutoTrain mod.

BoostHungry
Posts: 122
Joined: Sat, 23. Nov 13, 20:33

Post by BoostHungry » Mon, 4. Jul 16, 02:58

Judging from experience, I don't need to start any special MICT scripts as my ships seem to be behaving correctly.

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

Post by w.evans » Mon, 4. Jul 16, 07:28

Yup. The main AI scripts that MICT uses are the captain combat script, the defence officer script, the escort script, and the engineer script. The captain, DO, and escort scripts are separate from the vanilla scripts and are called from the same points that their vanilla counterparts are called.

The captain combat script is called from fight.attack.object which is where the other combat movement scripts are selected when a ship enters combat.

The DO script is called from fight.defend.capital.

The escort script is called from move.escort from which vanilla branches out into the other escort scripts.

Didn't feel that the changes in the engineer script are extensive enough to warrant branching it out so that works by directly diff patching engineer.ai.

iforgotmysocks
Posts: 1244
Joined: Fri, 8. Nov 13, 22:35
x4

Post by iforgotmysocks » Fri, 8. Jul 16, 10:39

Hm... i have a couple really critical issues. :/

1. Defense Officer settings don't do much. On defensive they still keep killing ships, they don't stop with their assigned target. Also drones get launched no matter if defensive or not.
2. My Xenon I's suddenly don't use missiles anymore. (Not sure if that goes for other missile boats aswell)
3. 1 fight actually streched over 8 times the enemy cap jumped away. And my cap jumped after it.
4. It's kinda odd when i tell my ships to patroll a sector or kill things in a sector and they jump-follow an enemy in the neighbour system and fight him there, while completely ignoring their purpose. :/

Edit: I found the issue of the missiles:
MICT.fight.attack.object.capital.xml:
<shoot_at object="this.ship" target="$target" slot="tag.secondary_slot" tolerance="15.0deg" locktarget="true" weapontype="combat" additional_targets="$MICT_PrimTargets.list"/>

U set a 15 degree limit for secondary cap weapons, which are usually missiles. That means they will almost never be able to use them. :o

Edit2: Seems bad DOs regulary launch missile slavos while experienced ones only fire missiles now and then (after fixing the tolerance).
I didn't dig into your files deep enough yet, but maybe the vanilla script calls the "shoot secondary" command alot more often than your mict script.

Maybe this can be improved to get experienced DOs to use missiles effectivly too.

Edit3:
Regarding the ship going on a rampage even on defensive.
Maybe i'm just rusty in coding, but ... in MICT.fight.attack.object.capital.xml at the end of the script when checking if other targets should be allowed:

I couldn't find anything that stops the ship from going on a rampage because $allowothertargets simply stays enabled.
If i'm just wrong, let me know. As i said, has been years since i worked with this code. :D

Edit4: Hmm, seems ships don't move, but their turrets aggress everything red even on defensive without any aggression towards themselfs.

Edit5: There also seems to be a problem with fighter squads. In Vanilla fighters (m) engage the enemy, if one set as squadleader gets the order to engage. However with this mod installed, they simply don't.

They keep "escorting" without attacking until the squadleader dies and then try to follow a nonexistent ship.

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

Post by w.evans » Fri, 8. Jul 16, 19:42

Hey iforgotmysocks. Good to see you're back. I think I started about the time you left so we haven't really met, but I've heard good things.

First off: which distribution did you go with? Did you get the mod from the Steam Workshop or the Nexus? If the Nexus, which optional files did you install with it?
iforgotmysocks wrote:1. Defense Officer settings don't do much. On defensive they still keep killing ships, they don't stop with their assigned target.
No, DOs do not stop shooting once they have started. Most of the time, they're running fight.defend.capital, and only go into fight.attack.object.capital (or the MICT version in this case) if they are either:

set to Attack,
or the ship is attacked.

Once they go into the attack script, they stay there until they run out of enemies to attack.

If all of the attack actions in the attack script are made dependent on the DO setting, and they come under attack, they will endlessly loop between fight.defend.capital and fight.attack.object.capital without doing anything.

It would be possible, as you said, to make $allowothertargets dependent on that setting, in which case they will not add anything to their target lists if the DO setting is then set to Defend. But why would you want to do that? They will then still keep attacking the things in their target list and ignore any additional targets unless they shoot first.

Another way would be to make the attack script quit if the DO setting is set to Defend, and keep it there by making the setting an absolute requirement for getting into the attack script in the first place. But in that case, attacked ships won't fire back at all unless their DO's setting is changed.
iforgotmysocks wrote:Also drones get launched no matter if defensive or not.
Yes, drone launch is not connected to the DO setting either. That said, a ship with a DO set to defend shouldn't go into the attack script in the first place unless set to attack or the ship is attacked.
iforgotmysocks wrote:2. My Xenon I's suddenly don't use missiles anymore. (Not sure if that goes for other missile boats aswell)

Edit: I found the issue of the missiles:
MICT.fight.attack.object.capital.xml:
<shoot_at object="this.ship" target="$target" slot="tag.secondary_slot" tolerance="15.0deg" locktarget="true" weapontype="combat" additional_targets="$MICT_PrimTargets.list"/>
This was done because of how capital ship torpedoes were changed in MICT, which won't make as much sense if you don't have those changes. (Hence my question above as to which distribution you went with.) In the full package, torpedoes are extremely long-range, very destructive, and very inaccurate, so they should only be fired if there is a reasonable chance of hitting the target. In this case, it is dependent on the DO setting because a way to control when the DO fires those torpedoes is necessary due to their nature, and their role.

Particular to the Xenon I, the torpedo launchers are on the sides, and your captain might have judged that they would do more damage from a different angle, hence not firing their torpedoes. As I'm writing this however, the thought occurred to me that they might orient a different side to their target but still try and maintain torpedo range, in which case they won't fire. Was that the case?
iforgotmysocks wrote:3. 1 fight actually streched over 8 times the enemy cap jumped away. And my cap jumped after it.
If they're both running MICT, or if the enemy ship tries to vanilla flee, yes, that can happen.
iforgotmysocks wrote:4. It's kinda odd when i tell my ships to patroll a sector or kill things in a sector and they jump-follow an enemy in the neighbour system and fight him there, while completely ignoring their purpose. :/
I actually recently changed that back, but only for escorts. The squadron commander should only stay as long as the target is within radar range. If that happens to be in the next zone over, why should that matter? They are authorized to attack and they found a target.
iforgotmysocks wrote:U set a 15 degree limit for secondary cap weapons, which are usually missiles. That means they will almost never be able to use them. :o
As long as they're oriented properly, they fire often enough that I had to add an additional restriction that you can control.
iforgotmysocks wrote:Edit2: Seems bad DOs regulary launch missile slavos while experienced ones only fire missiles now and then (after fixing the tolerance).
I didn't dig into your files deep enough yet, but maybe the vanilla script calls the "shoot secondary" command alot more often than your mict script.
If you have a bad DO, chances are your ship's crew isn't using MICT at all. That means that they would use the old tolerances. (I believe that is full 360 degrees? So they would fire whenever the weapon cycles regardless if they can actually hit.)
iforgotmysocks wrote:Maybe this can be improved to get experienced DOs to use missiles effectivly too.
If firing anytime regardless of chance to hit is an improvement? Sure.
iforgotmysocks wrote:Edit3:
Regarding the ship going on a rampage even on defensive.
Maybe i'm just rusty in coding, but ... in MICT.fight.attack.object.capital.xml at the end of the script when checking if other targets should be allowed:

I couldn't find anything that stops the ship from going on a rampage because $allowothertargets simply stays enabled.
If i'm just wrong, let me know. As i said, has been years since i worked with this code. :D
Above. And yes, $allowothertargets isn't connected to the DO attack/defend setting.
iforgotmysocks wrote:Edit4: Hmm, seems ships don't move, but their turrets aggress everything red even on defensive without any aggression towards themselfs.
Sounds like they aren't running MICT. Is this with your example above with the bad DO?
iforgotmysocks wrote:Edit5: There also seems to be a problem with fighter squads. In Vanilla fighters (m) engage the enemy, if one set as squadleader gets the order to engage. However with this mod installed, they simply don't.

They keep "escorting" without attacking until the squadleader dies and then try to follow a nonexistent ship.
You either went with the Nexus distro and didn't install MICT_supp2 (which is the escort package), or your ships aren't running MICT.

iforgotmysocks
Posts: 1244
Joined: Fri, 8. Nov 13, 22:35
x4

Post by iforgotmysocks » Fri, 8. Jul 16, 21:18

w.evans wrote:Hey iforgotmysocks. Good to see you're back. I think I started about the time you left so we haven't really met, but I've heard good things.
Hey there, ya, i guess. :D Was quite tired back then. Keeping everything up to date while the game didn't rly get any better dispite all the frequent patches kinda drove me away. Nice to meet you know, though. :)
Thought i'm gonna give it another try, now that 4.0 and the expansions are out.
w.evans wrote:First off: which distribution did you go with? Did you get the mod from the Steam Workshop or the Nexus? If the Nexus, which optional files did you install with it?
I tried both but ended up testing the combined version further.
w.evans wrote:No, DOs do not stop shooting once they have started. Most of the time, they're running fight.defend.capital, and only go into fight.attack.object.capital (or the MICT version in this case) if they are either:

set to Attack,
or the ship is attacked.

Once they go into the attack script, they stay there until they run out of enemies to attack.

If all of the attack actions in the attack script are made dependent on the DO setting, and they come under attack, they will endlessly loop between fight.defend.capital and fight.attack.object.capital without doing anything.

It would be possible, as you said, to make $allowothertargets dependent on that setting, in which case they will not add anything to their target lists if the DO setting is then set to Defend. But why would you want to do that? They will then still keep attacking the things in their target list and ignore any additional targets unless they shoot first.

Another way would be to make the attack script quit if the DO setting is set to Defend, and keep it there by making the setting an absolute requirement for getting into the attack script in the first place. But in that case, attacked ships won't fire back at all unless their DO's setting is changed.
Honestly, talking with me too much about the different jobs that the ai scripts have is pointless, i don't remember much at all and seeing how many bugs are still around, i'm not gonna start again. ^^

If i'm not mistaken, the vanilla script actually stops firing with a defensive DO, when the attacking ship was destroyed, even if there are more enemies around (and commands like "hold position" make them stop even with the engaged enemy still being alive). And i think ur script even started firing on defensive without any aggression happening.
That stuff just drove me mad when i tried ship boarding. ^^ And on defense u kinda only wanna shoot what shoots you. Otherwise the defensive mode would be kinda pointless. That was my thought there.
w.evans wrote:Yes, drone launch is not connected to the DO setting either. That said, a ship with a DO set to defend shouldn't go into the attack script in the first place unless set to attack or the ship is attacked.
Hm, if i recall right u stated somewhere that drones wouldn't be launched with a defensive DO setting. ^^ - Gonna look it up later.
w.evans wrote:This was done because of how capital ship torpedoes were changed in MICT, which won't make as much sense if you don't have those changes. (Hence my question above as to which distribution you went with.) In the full package, torpedoes are extremely long-range, very destructive, and very inaccurate, so they should only be fired if there is a reasonable chance of hitting the target. In this case, it is dependent on the DO setting because a way to control when the DO fires those torpedoes is necessary due to their nature, and their role.

Particular to the Xenon I, the torpedo launchers are on the sides, and your captain might have judged that they would do more damage from a different angle, hence not firing their torpedoes. As I'm writing this however, the thought occurred to me that they might orient a different side to their target but still try and maintain torpedo range, in which case they won't fire. Was that the case?
Ah i see. I suspected something like that. However, if you wanna keep it "balanced" you should change the regular script too.
Because right now a bad DO, who is not using ur script and flying an I will destroy an I with a DO using ur script just because he can spam the 2 variations of missilelauncher types and your pilot can not. :D
(I don't know how many other Cap ships actually suffer from that missile restriction, so maybe it't not much of an issue, concidering the i was never ment to be owned by the player)
iforgotmysocks wrote:3. 1 fight actually streched over 8 times the enemy cap jumped away. And my cap jumped after it.
w.evans wrote:If they're both running MICT, or if the enemy ship tries to vanilla flee, yes, that can happen.
I was just suggesting that a cooldown on the jd might be an idea cause it rly wasn't fun chasing down those ships the entire time. ^^
w.evans wrote:I actually recently changed that back, but only for escorts. The squadron commander should only stay as long as the target is within radar range. If that happens to be in the next zone over, why should that matter? They are authorized to attack and they found a target.
Well, the idea to patroll a sector is kinda to keep it safe. ^^
If your caps jump off and fight some enemies in another system u couldn't care less about while ur stations get wrecked, it's a little silly. :D
w.evans wrote:If you have a bad DO, chances are your ship's crew isn't using MICT at all. That means that they would use the old tolerances. (I believe that is full 360 degrees? So they would fire whenever the weapon cycles regardless if they can actually hit.)
Nah all my ships had a 5 star crew and they used the old tolerance, cause i changed it back to test further. Thats when i noticed that caps running the vanilla script still are able to fire missiles alot more frequently than ships running ur script. But that doesn't rly matter much then, anyway. ^^
iforgotmysocks wrote:Edit4: Hmm, seems ships don't move, but their turrets aggress everything red even on defensive without any aggression towards themselfs.
w.evans wrote:Sounds like they aren't running MICT. Is this with your example above with the bad DO?
All with ships running ur script. In vanilla, that actually wouldn't happen, cause they do stop firing. ^^
iforgotmysocks wrote:Edit5: There also seems to be a problem with fighter squads. In Vanilla fighters (m) engage the enemy, if one set as squadleader gets the order to engage. However with this mod installed, they simply don't.

They keep "escorting" without attacking until the squadleader dies and then try to follow a nonexistent ship.
w.evans wrote:You either went with the Nexus distro and didn't install MICT_supp2 (which is the escort package), or your ships aren't running MICT.
Was the steam version and yes, they did. (Simple fighters though, so pilots also with a fighter-pilot as leader. Not sure if you adjusted them, cause with ur script they can't attack.) ^^


Hm, i hope u could follow some of my thoughts there. :D
I also hope to be around long enough to see where this mod is going. I like the start, but right now i feel more like i wanna keep half of the vanilla options and half of what ur script is offering. xD

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

Post by w.evans » Fri, 8. Jul 16, 22:45

iforgotmysocks wrote:
w.evans wrote:First off: which distribution did you go with? Did you get the mod from the Steam Workshop or the Nexus? If the Nexus, which optional files did you install with it?
I tried both but ended up testing the combined version further.
Hope you deactivated the Nexus install then. Come to think of it, nothing bad should happen if both are installed. Part of the mod would be loaded from one folder, part from the other, but since they're identical, should still work. But haven't tried so don't know.
iforgotmysocks wrote:If i'm not mistaken, the vanilla script actually stops firing with a defensive DO, when the attacking ship was destroyed, even if there are more enemies around (and commands like "hold position" make them stop even with the engaged enemy still being alive). And i think ur script even started firing on defensive without any aggression happening.
That bit was actually stolen straight from vanilla. Been trying to keep things working with vanilla until i bother to change something so that all the rest of it keeps vanilla functionality at least.

Looking at the vanilla script, $allowothertargets is true by default and is called from fight.defend.capital with allowothertargets set to "@this.$config_attackenemies or @$allowothertargets". Didn't change that. It does have a bunch of interrupt handlers that configure $allowothertargets depending on different conditions, the DO Attack setting being one of them, but those should also hold true with MICT since i didn't change those.

Unless. This looks interesting:

Code: Select all

    <handler comment="update the configuration attack">
      <conditions>
        <event_object_signalled object="this" param="'update config'" />
      </conditions>
      <actions>
        <remove_value name="$allowothertargets" />
        <remove_value name="$attacker" />
        <set_value name="$checkrelation" exact="true" comment="check relation by default" />
        <abort_called_scripts />
      </actions>
    </handler>
No. Thought the signal might be called from the captain's attack script and i didn't include it, but it isn't. Which means that this signal, wherever it's called from, should still be called and work. It would mean that the DO should stop firing if he/she was set to 'defend' to begin with then the ship was ordered to do something other than attack or patrol.

Won't stop them going postal if the DO was set to 'attack' to begin with though.
iforgotmysocks wrote:That stuff just drove me mad when i tried ship boarding. ^^ And on defense u kinda only wanna shoot what shoots you. Otherwise the defensive mode would be kinda pointless. That was my thought there.
Yeah. There actually is code in there that makes them stop firing when their target is being boarded, but i kept it commented out because i don't really like the idea. The best implementation of that that I'm aware of was in cicero111's Better Turrets where, if DO is set to defend and a target is being boarded, they would keep firing but only on surface elements. I think beaver1981's CES has something similar.

You could activate it yourself if you want to play around with it. It's the bit that starts with:

<do_elseif value="@$enemies.{$i}.boarder">
iforgotmysocks wrote:Hm, if i recall right u stated somewhere that drones wouldn't be launched with a defensive DO setting. ^^ - Gonna look it up later.
Was connected with the "Resupply Drones" checkbox in the DO's settings, but that checkbox was taken out with 4.0.
iforgotmysocks wrote:Ah i see. I suspected something like that. However, if you wanna keep it "balanced" you should change the regular script too.
You mean the change to the torpedo? Wasn't so much a balance thing as much as i wanted to change its role somewhat drastically.

If you mean the DO firing, having them fire all the time with those torpedoes is dangerous, to any friendly factions or stations that might be close by and to your own ships. (which eMYNOCK would probably attest to)
iforgotmysocks wrote:Because right now a bad DO, who is not using ur script and flying an I will destroy an I with a DO using ur script just because he can spam the 2 variations of missilelauncher types and your pilot can not. :D
Just a small correction. They would fire the same torpedoes. Launcher's the same too.

Think the fix in this case would be that the MICT ship should avoid those teeth, unless that IS the I's weakest spot. That thing's bristling with weaponry.
iforgotmysocks wrote:(I don't know how many other Cap ships actually suffer from that missile restriction, so maybe it't not much of an issue, concidering the i was never ment to be owned by the player)
None. Not in vanilla anyway. Just the Balor and the I.
iforgotmysocks wrote:I was just suggesting that a cooldown on the jd might be an idea cause it rly wasn't fun chasing down those ships the entire time. ^^
They actually do have a jump drive cool down. Think the only place that's skipped is in the escort script for escorts who have to jump to keep up. That's sorta cheaty though.
iforgotmysocks wrote:Well, the idea to patroll a sector is kinda to keep it safe. ^^
If your caps jump off and fight some enemies in another system u couldn't care less about while ur stations get wrecked, it's a little silly. :D
Agreed. Squadron leader (or the MICT ship, if not in a squadron) shouldn't pursue beyond radar range, and should go back to patrol when it's done.

If it doesn't, got a save? Have some time to debug this weekend.
iforgotmysocks wrote:Nah all my ships had a 5 star crew and they used the old tolerance, cause i changed it back to test further. Thats when i noticed that caps running the vanilla script still are able to fire missiles alot more frequently than ships running ur script. But that doesn't rly matter much then, anyway. ^^

Code: Select all

<do_if value="@this.$config_attackenemies">
	<shoot_at object="this.ship" target="$target" slot="tag.secondary_slot" tolerance="15.0deg" locktarget="true" weapontype="combat" additional_targets="$MICT_PrimTargets.list"/>
</do_if>
It's identical except for wrapping it around the DO Attack setting, changing tolerance, and adding some additional_targets. Guess it is possible that the script just takes longer to get to that spot again since it has to get through more code before it cycles again.
iforgotmysocks wrote:
iforgotmysocks wrote:Edit4: Hmm, seems ships don't move, but their turrets aggress everything red even on defensive without any aggression towards themselfs.
w.evans wrote:Sounds like they aren't running MICT. Is this with your example above with the bad DO?
All with ships running ur script. In vanilla, that actually wouldn't happen, cause they do stop firing. ^^
Were they in a position to fire? They used to move around a lot more, but that was changed a while back. They now tend to try and find a good position and orientation, and stay there relative to their target.

If they weren't, could this be the case with the I i described earlier where it goes to torpedo range but with some other side oriented?

Otherwise, it's a bug and should be fixed. Save would be nice. Haven't seen that happen, and don't know what could cause it.
iforgotmysocks wrote:Was the steam version and yes, they did. (Simple fighters though, so pilots also with a fighter-pilot as leader. Not sure if you adjusted them, cause with ur script they can't attack.) ^^
They would if the leader of the squad is a MICT ship (4/4/4 or better skills). In this case, wanted them to stick with their squad until they're fairly close to their target, so they use their leader's radar and don't engage until they come to within half of their leader's radar range.

Oh crap. Found it. Fix coming up.
iforgotmysocks wrote:Hm, i hope u could follow some of my thoughts there. :D
I also hope to be around long enough to see where this mod is going. I like the start, but right now i feel more like i wanna keep half of the vanilla options and half of what ur script is offering. xD
Heh. Fair enough. To be honest though, I haven't actively been working on the mod since the last update, although that wasn't very long ago. Not much more planned, although there are some optimizations in the DO script that i've been meaning to do.

edit: about that boarding thing, it's missing this bit at the end, right before that do_elseif closes:

<remove_from_group group="$enemies" object="$enemies.{$i}"/>

Getting rid of the <break/> right before the end of that do_elseif makes it so that they don't stop firing on anything else hostile in the vicinity.

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

Post by w.evans » Fri, 8. Jul 16, 23:18

8.July 2016 - MICT_supp2 updated to v0.51

Fix: Fighters in a MICT squadron subordinate to another small or medium ship should now attack when their commander does.

Thanks to iforgotmysocks for pointing out that they didn't.

iforgotmysocks
Posts: 1244
Joined: Fri, 8. Nov 13, 22:35
x4

Post by iforgotmysocks » Sat, 9. Jul 16, 00:03

w.evans wrote:Hope you deactivated the Nexus install then. Come to think of it, nothing bad should happen if both are installed. Part of the mod would be loaded from one folder, part from the other, but since they're identical, should still work. But haven't tried so don't know.
Course i did. ^^
w.evans wrote:That bit was actually stolen straight from vanilla. Been trying to keep things working with vanilla until i bother to change something so that all the rest of it keeps vanilla functionality at least.

Looking at the vanilla script, $allowothertargets is true by default and is called from fight.defend.capital with allowothertargets set to "@this.$config_attackenemies or @$allowothertargets". Didn't change that. It does have a bunch of interrupt handlers that configure $allowothertargets depending on different conditions, the DO Attack setting being one of them, but those should also hold true with MICT since i didn't change those.

Unless. This looks interesting:

Code: Select all

    <handler comment="update the configuration attack">
      <conditions>
        <event_object_signalled object="this" param="'update config'" />
      </conditions>
      <actions>
        <remove_value name="$allowothertargets" />
        <remove_value name="$attacker" />
        <set_value name="$checkrelation" exact="true" comment="check relation by default" />
        <abort_called_scripts />
      </actions>
    </handler>
No. Thought the signal might be called from the captain's attack script and i didn't include it, but it isn't. Which means that this signal, wherever it's called from, should still be called and work. It would mean that the DO should stop firing if he/she was set to 'defend' to begin with then the ship was ordered to do something other than attack or patrol.

Won't stop them going postal if the DO was set to 'attack' to begin with though.
Hm, gonna test again then, was pretty sure about it though. :s
Cause i basicly boarded my entire fleet by simply giving my ships the "hold position" command and they'd stop. With ur script u can only try to make them jump out and hope they leave fast enough. ^^
Gonna check it again.
iforgotmysocks wrote:That stuff just drove me mad when i tried ship boarding. ^^ And on defense u kinda only wanna shoot what shoots you. Otherwise the defensive mode would be kinda pointless. That was my thought there.
w.evans wrote:Yeah. There actually is code in there that makes them stop firing when their target is being boarded, but i kept it commented out because i don't really like the idea. The best implementation of that that I'm aware of was in cicero111's Better Turrets where, if DO is set to defend and a target is being boarded, they would keep firing but only on surface elements. I think beaver1981's CES has something similar.

You could activate it yourself if you want to play around with it. It's the bit that starts with:

<do_elseif value="@$enemies.{$i}.boarder">
That was actually just about the defense mode, not about boarding. ^^
Why would a ship aggress more enemy ships and taking on more fire if they wanna stay defensive? :p
Thats why i'm under the impression that they should stop firing once the target is gone and noone else is shooting it.

iforgotmysocks wrote:Ah i see. I suspected something like that. However, if you wanna keep it "balanced" you should change the regular script too.
w.evans wrote:You mean the change to the torpedo? Wasn't so much a balance thing as much as i wanted to change its role somewhat drastically.

If you mean the DO firing, having them fire all the time with those torpedoes is dangerous, to any friendly factions or stations that might be close by and to your own ships. (which eMYNOCK would probably attest to)
Nah, i ment I's themselfs. Read my post again, i think u were missing the point. :D Right now I's with the bad DOs(vanilla) script are stronger cause they can apply their missile and torp dps (around a third) while MICT DOs can't use them at all if not perfectly aligned down.

So basicly if the game spawns stronger I's which would apply ur script, they'd loose a shittone of damage, while the "worse" ones still have it.
w.evans wrote:Agreed. Squadron leader (or the MICT ship, if not in a squadron) shouldn't pursue beyond radar range, and should go back to patrol when it's done.

If it doesn't, got a save? Have some time to debug this weekend.
Nooot anymore. Gonna try to reproduce it soon-ish.

w.evans wrote:Sounds like they aren't running MICT. Is this with your example above with the bad DO?
iforgotmysocks wrote:All with ships running ur script. In vanilla, that actually wouldn't happen, cause they do stop firing. ^^
Were they in a position to fire? They used to move around a lot more, but that was changed a while back. They now tend to try and find a good position and orientation, and stay there relative to their target.

If they weren't, could this be the case with the I i described earlier where it goes to torpedo range but with some other side oriented?

Otherwise, it's a bug and should be fixed. Save would be nice. Haven't seen that happen, and don't know what could cause it.
That happend to a Fulmekron actually and ya, it was in position to fire. ^^
Don't have them anymore, overwrote them when i was done testing. Gonna make new ones and send them your way.

w.evans wrote:Heh. Fair enough. To be honest though, I haven't actively been working on the mod since the last update, although that wasn't very long ago. Not much more planned, although there are some optimizations in the DO script that i've been meaning to do.

edit: about that boarding thing, it's missing this bit at the end, right before that do_elseif closes:

<remove_from_group group="$enemies" object="$enemies.{$i}"/>

Getting rid of the <break/> right before the end of that do_elseif makes it so that they don't stop firing on anything else hostile in the vicinity.
Alright, gonna check out the boarding stuff.
Thanks for your help. :p

Post Reply

Return to “X Rebirth - Scripts and Modding”