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

BlackRain wrote:Player ships do not run br.move.patrol, they run the vanilla move.patrol. Only NPC ships run br.move.patrol, also, I am removing the attack handler from the patrol script anyway as it is exactly like vanilla, I never actually was able to figure out what I wanted with it (how to get escorts to fight back when the leader is out of zone)
Thanks for the clarification. In that case, looks like Saquavin's ship was running vanilla move.patrol, then triggered fight.attack.object -> move.attack.object.capital/fight.attack.object.capital. Odd that it was boosting.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

3.Aug.2015 - MICT_supp4 updated to v0.08


Station-based Defence Officers now purchase combat drones.


Since they started actually using their combat drones five days ago, defence officers watched their drone reserves deplete steadily, and started wondering why they weren't restocking them. So they put their heads together, asked their managers how those market-buyer-thingers work, and now they've started ordering them by the hundred!

ALL NPC stations with defence officers will now purchase combat drones. They will fill up their stations' drone storage to almost full capacity, leaving a reserve of 100 drones for silly things like cargolifters and construction URVs. They will purchase all combat drone types, with most targeted stocks being of type Interceptor URV Mk1 and Intrepid URV Mk1.

Defence Officers of player-owned stations will do the same IF you tell them to automatically manage their AMMO. (The tick box telling them to manage defence drones doesn't work.) They will fill up their stations' drone storage to the same proportions as NPC stations. If you do not want your Defence Officers to do this for you and prefer to do it manually, tell them to stop stocking up on ammo. You can change this decision at will.


A couple of things to think about before downloading this update:

1. Do you want your stations stocked up on combat drones of different types?
- If not, make sure that all of your station-based Defence Officers are not set to manage their stations' ammunition reserves.

2. Do you want to make a crapton of money at the expense of arming your enemies?
- If not, order your drone production facilities to stop trading with NPCs.

3. Are you just starting out, and are you finding the plot just too dang hard?
- Do not download this update.


Another note: existing drone production facilities in the game are not nearly enough to satisfy demand for combat drones. This means that drone stocks in shipyards will probably dry up very soon, and the drone shortage will persist so long as YOU don't fill it. The game's economy simply isn't equipped to handle demand for combat drones at this level.

There are dangers to this situation, but there are also many opportunities, and it is important to go into this aware of what they are.


As always, comments, suggestions, questions, clarifications, and criticism welcome.


For the curious, the development of this part of MICT is documented here:

http://forum.egosoft.com/viewtopic.php?t=381599


Note: This update is NOT YET UP in the Steam version of this mod. Putting the changelog up now because some preparation is advised before downloading, and you'll download it as soon as I upload the update. The update will be up at Steam at around Friday, the 7th of August. If you want it now, you can get it at the Nexus.
Last edited by w.evans on Mon, 3. Aug 15, 22:19, edited 4 times in total.
Saquavin
Posts: 486
Joined: Thu, 22. Aug 13, 17:12
xr

Post by Saquavin »

Ok thanks for your post.
I think I was a bit confused, because I have read we need 4 stars for crew to run MICT, but in CWIR there is a part of MICT that doesn't need any stars.
Thanks for clarifying my Taranis prime behaviour, so I don't feel too much crazy :)
I already had this behaviour, happens sometimes. I will work to promote my crew so all my ships will run MICT !

Any possibility to add a mention on a ship so that we know if he uses MICT ? (without checking crew 1 by 1)
Saquavin
Posts: 486
Joined: Thu, 22. Aug 13, 17:12
xr

Post by Saquavin »

w.evans wrote: The game's economy simply isn't equipped to handle demand for combat drones at this level.
Same for vanilla. My urv facility sells drones immediately. Every types of drones are bought at +20-30%
(I'm building a second urv station :D )
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Saquavin wrote:Ok thanks for your post.
...
Thanks for clarifying my Taranis prime behaviour, so I don't feel too much crazy :)
I already had this behaviour, happens sometimes. I will work to promote my crew so all my ships will run MICT !
Glad it helped. I have been thinking of activating some of my notifications, at least for in-zone battles, so that you know exactly what they're trying to do (and how well or not-so-well they're doing at it!), but I've been hesitating because I'm sure not everyone will like MICT's taking over the Skunk's multi-function display. I'll think it over some more.
Saquavin wrote:Any possibility to add a mention on a ship so that we know if he uses MICT ? (without checking crew 1 by 1)
Change the ships' names you mean? To be honest, I don't know how to go about doing that, although I imagine it's not all that hard. It might override existing names, though, and that's something players like me wouldn't enjoy much since I name ALL of my ships except for some fighters.

On this:
Saquavin wrote:I think I was a bit confused, because I have read we need 4 stars for crew to run MICT, but in CWIR there is a part of MICT that doesn't need any stars.
Just the escort script is included with CWIR. I think it was mostly because that was the only thing conflicting with BlackRain's already existing escort script. So all ships in CWIR will act like MICT ships when actively escorting and doing nothing else. Once they enter combat, MICT ships will run MICT, non-MICT ships will run the vanilla combat scripts.

Tip, by the way: you could squad some ships under the excellent crew of your Arawn. They will then form a MICT Squadron, and the non-MICT ships will try to run MICT. Be ware, though, that the errors you saw with the Arawn will be even more pronounced with worse crews.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Saquavin wrote:
w.evans wrote: The game's economy simply isn't equipped to handle demand for combat drones at this level.
Same for vanilla. My urv facility sells drones immediately. Every types of drones are bought at +20-30%
(I'm building a second urv station :D )
Sorry, missed this.

Yeah, kind of like Fusion Reactors and Reinforced Metal Plating when starting out, but worse! Made me wonder about the pricing in the game, though. It's based on supply within the station without regard to market supply and demand. I mean, if I have a LOT of drones, and nobody else has it, and everybody wants it, then that ought to make me rich, shouldn't it? Shouldn't matter that my station's filled up to the brim with the things.
Saquavin
Posts: 486
Joined: Thu, 22. Aug 13, 17:12
xr

Post by Saquavin »

w.evans wrote: Tip, by the way: you could squad some ships under the excellent crew of your Arawn. They will then form a MICT Squadron, and the non-MICT ships will try to run MICT. Be ware, though, that the errors you saw with the Arawn will be even more pronounced with worse crews.
This is what I just tried, and this works better ! They stay in close group and fight together, this is what I wanted.

I was not thinking about renaming, but something in the radar monitor, when we have the ship selected, which would display "command : MICT attack subjugation fleet" instead of "command : attack subjugation fleet", or something like this. The notification of what the ship is doing could be in the radar monitor when we select the ship. (not the flashing alert, only the selected target informations) So the same way it could displays when the ship is trying to flee, or trying to jump/boost on target, etc.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

sadly these cannt be defined freely afaik,
for the first line we have these:
attackenemies command Attack Enemies Command (no param)
attackobject command Attack Object Command (param = the target to attack)
buildexpansion command Build Expansion Command (no param)
buildship command Build Ship Command (no param)
buildstation command Build Station Command (no param)
buildupgrades command Build Upgrades Command (no param)
collect command Collect Command (param = the object to collect)
dockat command Dock at Command (param = the object to dock at)
freemining command Free Mining Command (no param)
freetrade command Free Trading Command (no param)
follow command Follow Command (param = the object to follow)
escort command Escort Command (param = the object to escort)
mining command Mining Command (param = the zone where stuff is mined)
move command Move Command for object (param = the object to fly to)
movetozone command Move Command for zone (param = the zone to fly to)
patrol command Patrol Command (no param)
police command Police Command (no param)
protect command Protect Command (param = the object to protect)
refuel command Refuel Command (param = amount of fuel)
repair command Repair Command (no param)
scan command Scan Object Command (no param)
support command Support Command (param = the object to support)
searchresources command Search for Resources Command
searchtrades command Search for Trades Command
trade command Trade Command (param = the object to trade with)
wait command Wait Command
explore command Explore Command
withdrawbattle command Withdraw from Battle Command
and for the second these:
standingby commandaction Stand By Command action (no param)
calculating commandaction Calculating parameters action (no param)
repairingto commandaction Reparing to component Command action (param = component to repair)
repairchecking commandaction Stand By Command action (no param)
scanningto commandaction Scanning to component Command action (param = component to scan)
searchingresources commandaction Searching resources Command action (no param)
executingtrade commandaction Executing Trade Command action (no param)
docking commandaction Docking Command action (no param)
undocking commandaction Undocking (also detach from masstraffic) Command action (no param)
waitingtodock commandaction Waiting for a free dock Command action (no param)
attacking commandaction Attacking Enemies Command action (no param)
attackingto commandaction Attacking to Enemy Command action (param = enemy object)
flying commandaction Flying Command action (no param)
flyingto commandaction Flying to zone Command action (param = destination zone)
jumping commandaction Jumping Command action (no param)
searchingtrades commandaction Searching for trades Command action (no param)
waitingdrones commandaction Waiting for drones to dock (detach from masstraffic) Command action (no param)
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 ;)
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Saquavin wrote:This is what I just tried, and this works better ! They stay in close group and fight together, this is what I wanted.
They'll still break formation and attack once a target comes into radar range, though. This is as intended. They need room to maneouver, especially if it's a mixed squadron.

And wait 'til you get your hands on a Sucellus!

@Uni, yup. Sigh. I'll think about activating the notifications, at least for MICT ships in-zone.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

BlackRain wrote:(how to get escorts to fight back when the leader is out of zone)
Just remembered, adding your attack handler to MICT.move.escort.capital might do it. I've had the vanilla attack handler active on my personal version for a while now, but got distracted by other things, so didn't notice if that did the trick. Might also cause conflicting orders, though, because almost everyone's flying formation now, unless they have orders to break and attack.

Also, remembered your question about having all NPC ships in CWIR flying MICT: you could tweak just the fleet commanders' crews' stats. Reasonable, I think, since they're in command of such large formations.
Saquavin
Posts: 486
Joined: Thu, 22. Aug 13, 17:12
xr

Post by Saquavin »

I had so many nightmares and lost time with sucellus...
Never seen main weapon fire btw...
I will buy one and test (and destroy it myself if he doesn't work correctly after 5 minutes)
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Transfer your Arawn's crew over and let 'er rip. Not sure how well it'll do in CWIR's busy environment, though. I'd assign a couple of close-range escorts just in case someone gets too close for comfort.
kelmenwong
Posts: 197
Joined: Sat, 17. Mar 12, 17:40
x3tc

Post by kelmenwong »

w.evans wrote: Essentially, yeah. And set it to be dependent to MICT or MCT (whichever package you use) so that your tweak loads after the mod that it mods.
...
hi, do u know any mod do this kind of "dependent " thingy? so i can take a peek
and please tell me the keyword, so i can focus on the peeking
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Hi kelmenwong,

I don't think any mod does that at the moment, but should work. In your extensions folder you should have:

\[Your_mod_name]\aiscripts\

In aiscripts, place two files named:

MICT.move.attack.object.capital.xml
MICT.move.escort.capital.xml

MICT.move.attack.object.capital.xml should contain something like:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
  <replace sel="//set_value[@name='$MICT_JumpActive']/@exact">false</replace>
</diff>
In MICT.move.escort.capital.xml:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
  <replace sel="//do_if[@value='this.ship.distanceto.{$target} gt this.ship.size + $target.size + 10km']/@value">false</replace>
</diff>
In \[your_mod_name]\ you should have a content.xml. Make sure that one of these lines is in your content.xml:

Code: Select all

<dependency id="w.e_MICT" version="019"/>
if you're using MICT (the version in the Nexus)

OR

Code: Select all

<dependency id="ws_478790162" version="015"/>
if you're using the MCT (the version in Steam)

This will make sure that your mod is loaded after the mod that it's modifying -- necessary to make sure that the files that you want to modify are already present.
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Re: [MOD/WIP] Miscellaneous IZ Combat Tweaks

Post by Sparky Sparkycorp »

Hi there,

The following thread gave me a couple of ideas for your mod by way of addressing the idea that xrook had.

http://forum.egosoft.com/viewtopic.php?t=381631

Related info for your mod (questions/ideas follow):
w.evans wrote: supplement 2:

Squadron-level tactics.

If:
  • a MICT Squadron Commander acquires a target and attacks (whether actively via attack command, or passively via attack all enemies or patrol command), or
  • MICT ships are escorting a civilian ship, and that ship's shields get reduced by a single Joule,
MICT Squadrons will actively seek out enemies and engage according to MICT doctrine.
  • MICT ships in squadrons will only engage ships detected within their radar range, and will stay within radar range of their Squadron Commander.
  • MICT Squadrons warping or moving to stay close to their commander tightened and made more reliable. When not engaging, they should try to stay within a kilometer of their Squadron Commander.
  • If separated from their squadron commander by at least 5km, in-zone, and when not engaged in combat, MICT ships will jump to within 1km of their squadron commander.
  • If separated from their squadron commander by at least 5km, out-of-zone, and when not engaged in combat, MICT ships will warp to within 1km of their squadron commander.
  • Squadron subordinates will now attack only if an attack or patrol order is given to their squadron commander.
  • Squadron subordinates refuel when their commanders do.
Enhanced target acquisition (both IZ and OOZ):
  • Long-ranged MICT ships will only acquire hostile capital ships, and will fight from, and stay at, long range. They will prefer the most dangerous ships that they detect.
  • Short-ranged MICT ships will close to engage acquired hostile capital ships and fighters. They will prefer ships or fighters that are closer to their Squadron Commander.
  • MICT squadron ships will individually engage one ship at a time, and will stick with an acquired target until it's destroyed.
This file is available in optional files as MICT_supp2.
w.evans wrote: MICT_supp2 updated to v0.17

MICT Fighter Squadrons* now move in very tight formation unless breaking off to engage targets.
Bugfix: Short-ranged squad followers were acquiring targets far beyond radar range. - FIXED (although harmless because they weren't actually engaging those targets until they get within radar range.)

* A MICT Fighter Squadron is a squadron of fighters (m- or s-class) with at least 4-star ratings in all primary skills led by another fighter with a 4+ star pilot.
Would it be possible, perhaps by way of allowing a DO to work on the Skunk, for fighters assigned to the Skunk Squad to act as a MICT Fighter Squadron? As noted in that thread, I think vanilla Skunk Squad fighters either follow the Skunk around, require attack orders on a per-target basis, or follow individual an Attack All/Patrol orders.

A way for them to properly escort the Skunk would be cool and add a lot of utility. I guess the "at least 4-star ratings" could apply like elsewhere where I think it works best if all fighters would have it, or with degrees of success if only the Skunk DO had it.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Hi Sparky,

Could probably be done. I'd have to figure out which scripts they're running, but I have a pretty good idea. (Without the DO, though. That could complicate things, although not impossible.)

Problem however is one of control.

Right now, attack permissions of MICT Squadrons depend on the Squadron Commander's settings:

If the Commander has an order to attack a target, attack all enemies, or patrol,

-> all Squadron ships actively scan for targets, and engage when they detect a hostile target.

Otherwise, MICT Squadrons stick with their Commander.

This is extremely useful, I think, for when the player wants to do a coordinated attack, or if you want your Balors to hold fire, or just generally control when your ships start going berserk.

However, there is no way to do that with the Skunk because no one issues orders to the Skunk. (Except Yisha, when boarding without Marine Rebalance, but that's a different story.)

One thing that can be done is to assign a number of ships in a Squadron, and assign the Squadron Commander to follow the Skunk. It will operate like a regular MICT Squadron, and aggression can be controlled via commands. Things like jump order can be controlled via Squadron hierarchy keeping in mind that carriers with deployed fighters, especially with Marvin's Carrier mod, take longer to jump.
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

Yeah, it sounds tricky. My thinking was that perhaps in this case A Skunk DO could replace the commander aspect. If the DO was set to Defensive, it could default the Skunk Squad fighters' behaviour to a reactive escort. Whereas if set to Attack Enemies, the fighters could do their crazy think on stuff in [fighter-like rather than Skunk] radar range as if they were escorting a capital with an active attack order.

I imagine that assigning multiple MICT squads to the Skunk would still incorporate the issue of requiring multiple attack orders to keep them near the Skunk rather than wondering off over time?

As an aside, if squads (fighter or otherwise) could automatically appoint a new Squad Commander in the event of a loss, that could be epic. Perhaps randomly from among the largest ship class ikn the Squad with MICT-capable crews.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Sparky Sparkycorp wrote:Yeah, it sounds tricky. My thinking was that perhaps in this case A Skunk DO could replace the commander aspect. If the DO was set to Defensive, it could default the Skunk Squad fighters' behaviour to a reactive escort. Whereas if set to Attack Enemies, the fighters could do their crazy think on stuff in [fighter-like rather than Skunk] radar range as if they were escorting a capital with an active attack order.
The DO idea is a good idea, actually. I'll look into it, but no promises.
Sparky Sparkycorp wrote:I imagine that assigning multiple MICT squads to the Skunk would still incorporate the issue of requiring multiple attack orders to keep them near the Skunk rather than wondering off over time?
In that the squads you tell to go off and do their thing will move off while others will stay close, yup.
Sparky Sparkycorp wrote:As an aside, if squads (fighter or otherwise) could automatically appoint a new Squad Commander in the event of a loss, that could be epic. Perhaps randomly from among the largest ship class ikn the Squad with MICT-capable crews.
They already do, or should. Vanilla feature. They won't cherry-pick a MICT ship, though, so if you're relying on a MICT Commander to propagate MICT doctrine, and that commander's ship gets destroyed, non-MICT ships could stop running MICT if the new commander isn't MICT-capable.
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

w.evans wrote:
Sparky Sparkycorp wrote:As an aside, if squads (fighter or otherwise) could automatically appoint a new Squad Commander in the event of a loss, that could be epic. Perhaps randomly from among the largest ship class ikn the Squad with MICT-capable crews.
They already do, or should. Vanilla feature. They won't cherry-pick a MICT ship, though, so if you're relying on a MICT Commander to propagate MICT doctrine, and that commander's ship gets destroyed, non-MICT ships could stop running MICT if the new commander isn't MICT-capable.
Ooh, interesting - I will have to test! I thought back in the Rebirth 1.25/1.30 era this didn't occur and I didn't think about it again in all this time :)
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

w.evans wrote: The DO idea is a good idea, actually. I'll look into it, but no promises.
None needed, thanks for your thought time.

In case it helps, the following mod added a DO to the Skunk in some way.

Skunk Turrets (iforgotmysocks, 2014):
http://forum.egosoft.com/viewtopic.php?t=372229

The Katana mod (Lander1979, 2015) was based on that but I cannot remember if a DO was added or not. Link to that is here:
http://forum.egosoft.com/viewtopic.php?t=377888

Return to “X Rebirth - Scripts and Modding”