[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, 15. Dec 17, 12:52

Correction, and i'm sorry, it really has been a long time since i've looked at this code.

MICT ships will neither fire missiles using forward-mounted missile launchers nor use combat drones if the Defence Officer is not set to Attack. i remember now that this was added so that you have control over when the Balor in particular fires its torpedoes since they're designed in the mod to be long-range, highly destructive, highly inaccurate artillery.

And the Defence Officer Attack/Defend setting is propagated through a whole squadron. So if you have two Balors subordinate to another Balor, setting the commander Balor's Defence Officer to Attack will have the whole squadron start firing.

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie » Fri, 15. Dec 17, 15:13

@Brinnie, Yup. Can't remember if i implemented it for engineers on stations, but engineers working on CVs, certainly. Worked on that with Marvin Martian back in the day, and wouldn't be surprised if he has something better by now.

Unless I am mistaken I have no engineers on my stations but if the CVs do repairs to ships assigned to the station it would be nice as they seems to be redundant when they have completed the stations.

What do you mean when you say that Marvin might have something better by now, I would be interested in anything that improves fleet behaviour with regards to responsiveness and general automation.

As far as your script works I must congratulate you, I had some fun yesterday. My destroyer was actually responding (quickly) to my commands to engage targets which I could not have taken myself, on top of that the Lyramekron was also automatically repairing the fighters that I managed to capture and had assigned to follow the destroyer.
A set up that made for some maintanance free entertaining fleet battles in Maelstrom .
Also when my Fulmekron jumped in to attack the enemy on my command it took the S fighters along which I presume is due to your script.

The one thing that is annoying is that the follow the Skunk or the leader instruction is taken very lazily by the subordinates (XL and L) but that is not a criticism directed at your mod which, at least on the bases of my experience last night, lessens the consequences of this issue.

Do you know if there is something for Rebirth like:

Wing Hotkeys by Cycrow
Custom wing manager by Zypherg
and a script that adds shorctuts - protect my ship, protect ship, attack my target, protect my target, etc.

Thanks

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

Post by w.evans » Fri, 15. Dec 17, 15:42

Brinnie wrote:Unless I am mistaken I have no engineers on my stations but if the CVs do repairs to ships assigned to the station it would be nice as they seems to be redundant when they have completed the stations.
There's a mod for that:

Station Engineers
Brinnie wrote:What do you mean when you say that Marvin might have something better by now, I would be interested in anything that improves fleet behaviour with regards to responsiveness and general automation.
Just meant that Marvin's a lot better than i am and, as far as i know, he kept modding when i stopped, so he might have something better. i don't know that he does, though. Haven't kept up.
Brinnie wrote:As far as your script works I must congratulate you, I had some fun yesterday. My destroyer was actually responding (quickly) to my commands to engage targets which I could not have taken myself, on top of that the Lyramekron was also automatically repairing the fighters that I managed to capture and had assigned to follow the destroyer.
A set up that made for some maintanance free entertaining fleet battles in Maelstrom .
Glad you had fun!
Brinnie wrote:Also when my Fulmekron jumped in to attack the enemy on my command it took the S fighters along which I presume is due to your script.
i don't remember implementing anything like that. i vaguely remember something like that in a different mod, though. Possibly CWIR or World War X?
Brinnie wrote:The one thing that is annoying is that the follow the Skunk or the leader instruction is taken very lazily by the subordinates (XL and L) but that is not a criticism directed at your mod which, at least on the bases of my experience last night, lessens the consequences of this issue.
i don't think i changed that behavior at all. You might want to try this mod by Oliver though:

Squad members Jump to Skunk

As the title suggests, it has Yisha's sending coordinates acting like a jump beacon so any of your direct subordinates jump directly to your location. Only capital ships and frigates though since small ships don't have jump drives.

However, haven't tried that particular mod myself in a while, so i can't tell you if it still works.
Brinnie wrote:Wing Hotkeys by Cycrow
Not to my knowledge. Don't think anyone's managed to crack custom hotkeys yet.
Brinnie wrote:Custom wing manager by Zypherg
Closest i know of is Mad Joker's UFO. Hasn't been worked on in a while, though, and getting the interface back up and running will need some work. (Think the way the mod adds its custom UI element just needs to be updated.)
Brinnie wrote:and a script that adds shorctuts - protect my ship, protect ship, attack my target, protect my target, etc.
Same problem as with wing hotkeys.

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie » Fri, 15. Dec 17, 16:28

Thanks for all the info.

It looks like the CVs are indeed fixing ships, my damaged M traders assigned to stations are not damaged anymore and I have not fixed them. So I' ll not bother, for now, with Station Engineers.

But the fighters did jump with their superior (Fulmekron), or I don't know what they did but they (more than once) appeared on the scene at the same time as mama, while funnily enough the other Capital ship - also a subordinate - was left behind in the other sector following by other means at the speed of paint drying.
If it is due to your script (meaning the fighters behaviour), whether intentional or not, please don't change it because it's marvelous .
If it isn't your script implementing it then I am baffled as I haven't got any other mods, unless of course it's what that funny looking guy was babbling about in that station, something about the advantages of AGI over AI :)

Shame about the hotkeys situation.

cheers again

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

Post by w.evans » Fri, 15. Dec 17, 16:39

Brinnie wrote:But the fighters did jump with their superior (Fulmekron), or I don't know what they did but they (more than once) appeared on the scene at the same time as mama, while funnily enough the other Capital ship - also a subordinate - was left behind in the other sector following by other means at the speed of paint drying.
Oh wait, i apparently did. i seriously have to refamiliarize myself with my own mod.

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie » Fri, 15. Dec 17, 16:53

It is a great feature.

User avatar
ezra-r
Posts: 3420
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r » Sat, 16. Dec 17, 01:11

w.evans wrote:Correction, and i'm sorry, it really has been a long time since i've looked at this code.

MICT ships will neither fire missiles using forward-mounted missile launchers nor use combat drones if the Defence Officer is not set to Attack. i remember now that this was added so that you have control over when the Balor in particular fires its torpedoes since they're designed in the mod to be long-range, highly destructive, highly inaccurate artillery.

And the Defence Officer Attack/Defend setting is propagated through a whole squadron. So if you have two Balors subordinate to another Balor, setting the commander Balor's Defence Officer to Attack will have the whole squadron start firing.
After more playing and testing variations tonight I can confirm even when Defence Officers are set to Attack, Balors 90% of the times do not shoot their missiles, disabled MICT for a test and vanilla started shooting missiles easily and with something like seemed to me an increased reload speed compared than when using MICT, 2 salvos in 1 minute perhaps, didn't count. Whereas with MICT I get lucky if they start firing.

Used a Taranis using the 3 balors as escort with defence officer set to Attack Enemies to attack an enemy Taranis.

Balors never shot missiles. My Taranis got heavily pounded, escaped once and the next it would probably had almost be gone if I wasn't there shooting astrobees like crazy to disable the enemy Taranis.

Maybe it's the linux version, not sure, but moving, jumping, MICT seems to do the intended behaviour, but shooting, reaction and results worse than vanilla. :?

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

Post by w.evans » Sat, 16. Dec 17, 09:46

ezra-r wrote:disabled MICT for a test and vanilla started shooting missiles easily and with something like seemed to me an increased reload speed
This was deliberate, but implemented in one of the supplements. The Balor's torpedo launchers were changed so they fire a larger salvo but take longer to reload such that dps is unchanged. Not sure you have that change though since you said you got just the base mod from the Nexus without any of the supplements? (Or are you using the files from the tinyupload link i posted earlier?)
ezra-r wrote:Balors never shot missiles.
Hm. Bad.
ezra-r wrote:shooting, reaction and results worse than vanilla. :?
This, on the other hand, is due to the change in tolerance. Vanilla, capships firing missiles specify a tolerance of 360 degrees so they fire even if they're facing away from their target (although there might be a hard-coded limit, not sure).

MICT capships have a tolerance of 15 degrees. The lowered tolerance is necessary with the supplements since the changed torpedoes are much less agile. If tolerance were 360, they'd fire more, but also miss a lot more. That said, maybe we can afford to increase the tolerance a bit.

Just to confirm if increased tolerance is a tenable solution, could you try this?

http://s000.tinyupload.com/index.php?fi ... 2346585526

User avatar
ezra-r
Posts: 3420
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r » Sun, 17. Dec 17, 01:12

w.evans wrote:
ezra-r wrote:disabled MICT for a test and vanilla started shooting missiles easily and with something like seemed to me an increased reload speed
This was deliberate, but implemented in one of the supplements. The Balor's torpedo launchers were changed so they fire a larger salvo but take longer to reload such that dps is unchanged. Not sure you have that change though since you said you got just the base mod from the Nexus without any of the supplements? (Or are you using the files from the tinyupload link i posted earlier?)
ezra-r wrote:Balors never shot missiles.
Hm. Bad.
ezra-r wrote:shooting, reaction and results worse than vanilla. :?
This, on the other hand, is due to the change in tolerance. Vanilla, capships firing missiles specify a tolerance of 360 degrees so they fire even if they're facing away from their target (although there might be a hard-coded limit, not sure).

MICT capships have a tolerance of 15 degrees. The lowered tolerance is necessary with the supplements since the changed torpedoes are much less agile. If tolerance were 360, they'd fire more, but also miss a lot more. That said, maybe we can afford to increase the tolerance a bit.

Just to confirm if increased tolerance is a tenable solution, could you try this?

http://s000.tinyupload.com/index.php?fi ... 2346585526
Thanks for taking the time to explain me about tolerance and such, I do appreciate it so much! That helps me understand. Perhaps my problem is I want a certainly close experience to vanilla with a tad smarter scripts,s so I wasn't interested in the supplements. Btw, If I had to choose (my opinion not really a suggestion) I'd go for a minimum 90º angle for balor missiles.

Now that you seem lost regarding the versions Ive been trying. I only used workshop/nexusmods originally, but I have been using your tinyupload versions and giving you new feedback every time based on the last one you offered.

Now I tried this new latest version and I must say I'm impressed!

Ships not only get into position perfectly to attack, Balors also promptly seem to shoot their missiles when they have the chance, even when they are just escort to Taranis, and I even seen them shooting from further than I expected they would, which is cool :)

Cheers man and thanks a whole lot for your patience.

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

Post by w.evans » Sun, 17. Dec 17, 01:48

Thanks for the confirmation! Will clean up and update tomorrow.

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

Post by w.evans » Sun, 17. Dec 17, 10:58

17.December 2017 - Miscellaneous IZ Combat Tweaks updated to v0.73
Miscellaneous IZ Combat Tweaks CES Edition updated to v0.73
MICT supplement 2 updated to v0.53
MICT supplement 9 updated to v0.03

- Fixed compatibility issues with Linux.
- Increased firing angle for forward-mounted missile and torpedo launchers on capital ships.

Many thanks to ezra-r and bioscmos303 for the excellent reports and the feedback.

beaver1981
Posts: 60
Joined: Wed, 22. May 13, 23:26
x4

Post by beaver1981 » Mon, 18. Dec 17, 23:27

Miscellaneous IZ Combat Tweaks CES Edition updated to v0.73

Nice move ;)

Will test that.

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

Post by w.evans » Mon, 18. Dec 17, 23:49

Have fun!

All that really changed between MICT-CES 0.66 and 0.73 was the Linux compatibility thing, though. All of the other changes didn't affect movement so didn't apply. That is unless, err, i missed something.

beaver1981
Posts: 60
Joined: Wed, 22. May 13, 23:26
x4

Post by beaver1981 » Tue, 19. Dec 17, 02:48

Just tested it a bit...

...with activated jumps.

Edited mict.move.attack.object.capital a bit.

Added a check for drones (unitcategory.attack) just after

/attention/actions/do_if @value="this.ship.macro.ismacro.{global.$MICT_LR_Ships}" (line 51-60)

looking like this

Code: Select all

<do_elseif value="this.ship.availableunits.{unitcategory.attack}.count gt 0">
        <set_value name="$MICT_MaxAimDist" exact="15000m" />
        <set_value name="$MICT_MinAimDist" exact="8000m" />
        <set_value name="$MICT_MaxJumpDist" exact="15000m * (1.9f - ((this.skill.navigation + this.skill.morale)f / 10.0f))" />
        <set_value name="$MICT_MinJumpDist" exact="15000m * (0.3f * (1.0f + (1.0f * ((this.skill.navigation + this.skill.morale)f / 10.0f))))" />
        <set_value name="$MICT_MaxShortAimDist" exact="3570m * (2.0f - ((this.skill.navigation + this.skill.morale)f / 10.0f))" />
        <set_value name="$MICT_MinShortAimDist" exact="3570m * (0.1f * (1.0f + (1.0f * ((this.skill.navigation + this.skill.morale)f / 10.0f))))" />
        <!--<set_value name="$MICT_MaxShortAimDist" exact="this.ship.maxcombatrange.turrets"/>
				<set_value name="$MICT_MinShortAimDist" exact="this.ship.maxcombatrange.turrets * 0.75f"/>-->
      </do_elseif>
to make my ship jump right outside of firing range and launch assault drones I like to use as first strike weapons.
CES allows launch of assault drones if your ship is 7,5km-30km away from enemy so I tried to make it move to a right position.

additionally I added

Code: Select all

<resume label="start" />
just after

/attention/actions/do_while/set_flight_control_model (line 1013)

to recheck for assault drones

The result was that the ship first jumpend to outside of firing range, launched assault drones, changed behaviour when all assault drones were launched and engaged directly or jumped/boosted into firing range, and changed behaviour again after the first assault drone docked again.

You know your script better by far... ...is there a really good way to implement a recheck if there are assaoult drones (unitcategory.attack) onboard and cause that kind of change of behaviour?

If there is a good way to implement this MICT_CES and CES would integrate perfectly... ...even with activated jumps and boost. ;)

...and sorry for my bad english... ...got quite late...

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

Post by w.evans » Tue, 19. Dec 17, 08:35

Sounds good!

About availableunits, yeah, think that's the way to go. At least, it's the same method i use to check for defence drones.

Rather than adding a resume, might be better to add your new distance stuff to just within the do_while since it's based on changing conditions? That way, you wouldn't have to do all that stuff between start and the do_while every cycle. After the series of break checks looks about right. But yeah, i never thought of changing distance thresholds depending on drone availability. Interesting!

i can update the CES edition with the changes that you specified. Or would you like to integrate it directly onto CES?

beaver1981
Posts: 60
Joined: Wed, 22. May 13, 23:26
x4

Post by beaver1981 » Tue, 19. Dec 17, 11:58

Sounds good!
-> Tested some changes again, not working really good. Could not implement a satisfying way to change behaviour if "this.ship.availableunits.{unitcategory.attack}.count == 0". First Jump works but ship gets stuck and doesn´t do anything :(
Rather than adding a resume, might be better to add your new distance stuff to just within the do_while since it's based on changing conditions? That way, you wouldn't have to do all that stuff between start and the do_while every cycle. After the series of break checks looks about right. But yeah, i never thought of changing distance thresholds depending on drone availability. Interesting!
I wan´t the changing of distance thresholds depending on drone availability to work dynamically so that script needs rechecks.

Don´t really know how to do that. Will have to look into that.
If you got a good idea I woul appreciate that.

Changed the check-condition to

Code: Select all

<do_if value="this.ship.availableunits.{unitcategory.attack}.count gt 0 and this.ship.defencenpc.$config_attackenemies == 1">
since the original conditions for acquiring assault drone targets in the CES script are like this

Code: Select all

<do_if value="this.ship.distanceto.{$enemies.{$i}} gt 7500m and this.ship.distanceto.{$enemies.{$i}} lt 35000m" chance="$DObaseskill">
                    <do_if value="@this.$config_attackenemies == 1 or this.ship.isplayerowned == false">
                      <add_to_group groupname="$wardronetargets" object="$enemies.{$i}" />
                    </do_if>
so I need a check on if thera are assault-drones and if the DO is configured to attack. I like to have that switch allowing a normal attack or attacking with assault drones.

If we could get this working I would like that you just update the CES edition. I would like to keep that modular so that it´s an option not a must have.

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

Post by w.evans » Tue, 19. Dec 17, 19:01

beaver1981 wrote:I wan´t the changing of distance thresholds depending on drone availability to work dynamically so that script needs rechecks.
Yup. That's why i was suggesting you put it just inside the do_while, so drone availability would be checked every time the ship finishes a movement. Hm, would have to save the init numbers though so we could revert to those if the check fails.

Something like this. Right after:

Code: Select all

<!--MICT: sometimes getting null targets.-->
<do_if value="not $target">
	<break/>
</do_if>
insert:

Code: Select all

<do_if value="@this.ship.defencenpc.$config_attackenemies and this.ship.availableunits.{unitcategory.attack}.count gt 0">
	<do_if value="not $MICT_initbackup?">
		<set_value name="$MICT_initbackup" exact="[$MICT_MaxAimDist, $MICT_MinAimDist, $MICT_MaxJumpDist, $MICT_MinJumpDist, $MICT_MaxShortAimDist, $MICT_MinShortAimDist]"/>
	</do_if>
	<set_value name="$MICT_MaxAimDist" exact="15000m"/>
	<set_value name="$MICT_MinAimDist" exact="8000m"/>
	<set_value name="$MICT_MaxJumpDist" exact="15000m * (1.9f - ((this.skill.navigation + this.skill.morale)f / 10.0f))"/>
	<set_value name="$MICT_MinJumpDist" exact="15000m * (0.3f * (1.0f + (1.0f * ((this.skill.navigation + this.skill.morale)f / 10.0f))))"/>
	<set_value name="$MICT_MaxShortAimDist" exact="3570m * (2.0f - ((this.skill.navigation + this.skill.morale)f / 10.0f))" />
	<set_value name="$MICT_MinShortAimDist" exact="3570m * (0.1f * (1.0f + (1.0f * ((this.skill.navigation + this.skill.morale)f / 10.0f))))"/>
</do_if>
<do_elseif value="$MICT_initbackup?">
	<set_value name="$MICT_MaxAimDist" exact="$MICT_initbackup[1]"/>
	<set_value name="$MICT_MinAimDist" exact="$MICT_initbackup[2]"/>
	<set_value name="$MICT_MaxJumpDist" exact="$MICT_initbackup[3]"/>
	<set_value name="$MICT_MinJumpDist" exact="$MICT_initbackup[4]"/>
	<set_value name="$MICT_MaxShortAimDist" exact="$MICT_initbackup[5]"/>
	<set_value name="$MICT_MinShortAimDist" exact="$MICT_initbackup[6]"/>
</do_elseif>
beaver1981 wrote:If we could get this working I would like that you just update the CES edition. I would like to keep that modular so that it´s an option not a must have.
No problem. Let me know when you're ready. i will be away from a computer starting for around a week starting on Thursday though, so might not be able to update until after. And i won't have any weekends next month, so can't do any heavy-duty testing until February.

.......
hm. about "MICT: sometimes getting null targets.", just figured out why. should update that check at some point.

rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter » Sat, 3. Mar 18, 12:24

Hi - sorry if it's been answered already - I don't want to wade through 90 pages...

I'm having trouble installing the supplemental mods for this with NMM, the main one seems to be installed, but the others will not, either seperately or extracted and rezipped as a group.

I found one of them has a conflict with another mod, but the rest seem to be fine.

any ideas?

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

Post by w.evans » Sat, 3. Mar 18, 14:07

Hi. To be honest, i actually don't know where Nexus Mod Manager puts files nowadays. Haven't used it in a pretty long while.

What i do is just download the files (they should be simple .zip files) and extract them directly to your extensions directory. i would suggest that you delete the w.e_mict directory in \X Rebirth\extensions\ first in case NMM put the supplements in there.

rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter » Sat, 10. Mar 18, 02:06

ok - just putting it in the extensions folder without NMM seemed to do the trick, thanks.

Post Reply

Return to “X Rebirth - Scripts and Modding”