[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 » Wed, 22. Jul 15, 09:29

plynak wrote:Hello, DO was set to defensive. But I think the problem was the station. It really seemed like the ship was trying to go around and got somewhat stuck. I eas hoping he would just jump to the opposite side, but maybe enemy was too close to trigger jumping.
Yes, that is possible. It looks for a place to move to a certain distance from the target, and has to find that place before it moves. Close to a station, it is possible that it couldn't find a safe spot at the correct distance. I'll see about loosening distances a bit.
plynak wrote:I made several more trials and during the last time, with DO set to offensive, my Fulmekron oliterated a Xenon K without any problem. Will try to find my savegame, but because I save before any bigger battle, I may have alread ovewrote it :-(
Would love to see that, but thanks for the station idea. I'll try to pick a fight close to a big station.
plynak wrote:By the way I am using the Better turrets MOD as you suggested it in the MOD description. Sometimes I can see my ship stops shooting completely while leaving enemy with about 30% of hull. I suppose it is because of the BT mod, right?
If DOs are set to offensive, BT will get them to shoot until the target's destroyed. If set to defensive, they will only shoot surface elements, and there's a possibility that, at that point when the ship only had 30% hull left, it simply didn't have anything to shoot at.

plynak
Posts: 3010
Joined: Fri, 12. Dec 03, 08:53
x3tc

Post by plynak » Wed, 22. Jul 15, 17:21

Hello again,

I have managed to find my save

http://ulozto.cz/xqBX4QMs/save-009-xml

You can try to attack the Titurel as well and you will see that my ship really has some trouble.
Intel Core i5 4590, 2 x 8GB DDR3 1600, MSI GTX 1060 Armor, Asus H97 Pro, Asus Xonar DG, Crucial MX100 128GB SSD + 1TB WD Caviar Blue, Seasonic S12G 550W, Corsair 550D, 22'' LG

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

Post by w.evans » Wed, 22. Jul 15, 19:38

Got it, thanks!

Oooh! Terratech.

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

Post by w.evans » Wed, 22. Jul 15, 21:07

plynak wrote:Hello again,

I have managed to find my save

http://ulozto.cz/xqBX4QMs/save-009-xml

You can try to attack the Titurel as well and you will see that my ship really has some trouble.
Update. Found the problem: your Fulmekron was out of fuel!

When you set your Fulmekron to attack the hostile Fulmekron, your Fulmekron decides:

that it can do the most damage by having the enemy on its right side,
and that it's close enough to boost rather than jump.

so it starts boost engines, and starts turning.

Problem is the Fulmekron apparently turns extremely slowly. So by the time it gets all the way around the station, the opponent Fulmekron's dead. (In my tries, it was destroyed by a neutral Olmekron, and in a later try, the station.)

Against the Titurel, problem also appears to be the Fulmekron's speed. By the time it gets to firing position, the hostile ship has moved further and the Fulmekron is again out of position.

Now, I was wondering why it didn't jump instead, especially important since the Fulmekron is such a slow ship. Actually started to write in an exception to make it jump regardless of distance as long as it has to approach, but it still didn't jump. Then realized that it was the safety I wrote in: it will not jump if it has less than 500 units of fuel. (Should be just enough to get to a gas station from the end of Maelstrom.)

Save edited some fuel in, and your Fulmekron took out both the hostile Fulmekron and the Titurel like a champ!

So, yeah, make sure your big ships are gassed up. Otherwise, well, they'll try to do their best.

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

Post by w.evans » Wed, 22. Jul 15, 22:13

22.Jul.2015 - MiscellaneousIZCombatTweaks updated to v0.14

Bugfix: Was jumping facing towards the target regardless of optimal firing angle. - FIXED

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

plynak
Posts: 3010
Joined: Fri, 12. Dec 03, 08:53
x3tc

Post by plynak » Thu, 23. Jul 15, 07:58

Hello, thanks for finding the problem. The ship was freshly build and I was eager to test her. So I thought 500 fuel cells will suffice for at least one battle jump. My mistake :-)

By the way I have captured some fighters and did not want to sell them, so I added them as an escort to my autominer Sequana. To my surprise, they somehow manage to jump with the ship. Is this because of this script? It is excellent. I was really tired of fighters using highways only making them totaly useless.

Oh and I added two fighters as a wingmen to the strongest one and that strongest one as a wingman to the Sequana. Is it a good setup? Or shall I add all fighters to the Sequana directly?
Intel Core i5 4590, 2 x 8GB DDR3 1600, MSI GTX 1060 Armor, Asus H97 Pro, Asus Xonar DG, Crucial MX100 128GB SSD + 1TB WD Caviar Blue, Seasonic S12G 550W, Corsair 550D, 22'' LG

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

Post by w.evans » Thu, 23. Jul 15, 09:00

plynak wrote:Hello, thanks for finding the problem. The ship was freshly build and I was eager to test her. So I thought 500 fuel cells will suffice for at least one battle jump. My mistake :-)
Yeah, I know how that feels. It's a very powerful ship, and your save looked like you fairly recently started your game, so I could imagine how exciting it could be to try it out. Sorry for the let-down. Performs a lot better with fuel, though.
plynak wrote:By the way I have captured some fighters and did not want to sell them, so I added them as an escort to my autominer Sequana. To my surprise, they somehow manage to jump with the ship. Is this because of this script? It is excellent. I was really tired of fighters using highways only making them totaly useless.
Yup, but shh! It's not very lore-friendly. I put that in until I find a better way to get the fighters to keep up. A much better way would be to get yourself a carrier of some sort and get Marvin's Carrier mod. Works gameplay-wise, though.
plynak wrote:Oh and I added two fighters as a wingmen to the strongest one and that strongest one as a wingman to the Sequana. Is it a good setup? Or shall I add all fighters to the Sequana directly?
Better that way than to have them individually escort the Sequana, I think. That way, they stay together until they actually break off to attack.

No particular benefit to have your fighters follow the most powerful fighter, though. Good idea would be to have the fighters escort the slowest fighter (keeps them together when moving), or the fighter with the largest radar range (makes them detect hostile ships sooner). Preferably both.

.......
@All, found that this still doesn't work 100%:
MICT changelog wrote:Bugfix: Was jumping facing towards the target regardless of optimal firing angle.
Problem is that it calculates optimal firing angle from where the ship is before it jumps/boosts/moves, and uses that. After it jumps, it recalculates, and then uses the correct angle, but that first jump is almost always off. Working on it, but it's possible that there is no way to calculate orientation from the projected destination rather than from present position. Only situation where it really works is the second move of the Sucellus and Balor, where they orient towards the target without moving, and projected destination == present position.

edit: testing

Code: Select all

<orientation refobject="$target" orientation="$MICT_AimVector"/>
instead of

Code: Select all

<rotation value="$MICT_AimVector"/>
but that'll have to wait until later today.

plynak
Posts: 3010
Joined: Fri, 12. Dec 03, 08:53
x3tc

Post by plynak » Thu, 23. Jul 15, 09:59

Thanks for all the information. Well the slowest of those three fighters is an N. I did want that to be the squad leader :-) But it is o.k. Sequanna is mining in OL and it is mostly safe sector. I plan to get a carrier and a proper MOD after I finsh the campaign. I still find fighters somewhat lacking however. Espceially against that Fulmekron of mine.
Intel Core i5 4590, 2 x 8GB DDR3 1600, MSI GTX 1060 Armor, Asus H97 Pro, Asus Xonar DG, Crucial MX100 128GB SSD + 1TB WD Caviar Blue, Seasonic S12G 550W, Corsair 550D, 22'' LG

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Thu, 23. Jul 15, 11:44

Having fighters jump in this context is OK for me lore-wise. We have the wake effect for boosting capitals and now that jumpdrive usage by fighters has mysteriously been removed between X3 and Rebirth, retaining a wake-stile jump with capitals they escort seems like a fair halfway house to me.

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

Post by w.evans » Thu, 23. Jul 15, 13:57

Sparky Sparkycorp wrote:Having fighters jump in this context is OK for me lore-wise. We have the wake effect for boosting capitals and now that jumpdrive usage by fighters has mysteriously been removed between X3 and Rebirth, retaining a wake-stile jump with capitals they escort seems like a fair halfway house to me.
Good point! One could argue that the small ships losing their jump drives could be due to something related to the jump gates that was being exploited to use the jump drives in the first place (guidance information that was incidentally accessible via tapping into jump gate frequencies, but never fully understood?), and, er, the jump drives that capital ships use now require much more energy to power their guidance systems to home in on jump beacons, and while jump drives can be mounted on small ships, they can't generate enough energy to power these guidance systems, hence have to sort of tap into capital ships' jump drive guidance systems. (?)

Sorry, I really like science fiction. Fun!

.......
And I think I cracked the problem with ships consistently orienting with their most pointy ends toward a target! (Yay!) They have to:
  • resolve the projected destination first,
  • then calculate an orientation from the target to their projected destination,
  • then flip the intended orientation 180 degrees.
Seems to work consistently, but the code could probably be much more efficient. Still, no slowdowns that I'm noticing. (Good thing about this game is that it runs through scripts extremely quickly as long as there aren't any paradoxes.) Testing now to make sure that the improvement didn't break anything.

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

Post by w.evans » Thu, 23. Jul 15, 15:12

23.Jul.2015 - MiscellaneousIZCombatTweaks updated to v0.15

All MICT Ships are now much better at orienting their most damaging side toward targets.
When running Marvin Martian's Carriers mod, and a carrier with deployed fighters is ordered to attack a target in a different zone, carriers will now wait until all fighters dock before jumping/boosting/heading to a jump gate. (Marvin's script. This just calls it now, if the mod is present.)

edit: wrong version number
Last edited by w.evans on Thu, 23. Jul 15, 17:24, edited 1 time in total.

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Thu, 23. Jul 15, 16:11

Hi there,

Sounds cool. How might that behaviour compare to capitals with fighter escorts, which jump with non-carrier mod capital? Do those no-carrier mod capitals wait until their escort are close before jumping? If they don't, maybe they could, or maybe carrier mod capitals could have their fighters auto-docked (to help carrier-mod capitals not be less responsive than non-mod, escorted capitals).

Regards,
Sparks

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

Post by w.evans » Thu, 23. Jul 15, 16:53

Sparky Sparkycorp wrote:Hi there,

Sounds cool. How might that behaviour compare to capitals with fighter escorts, which jump with non-carrier mod capital? Do those no-carrier mod capitals wait until their escort are close before jumping? If they don't, maybe they could, or maybe carrier mod capitals could have their fighters auto-docked (to help carrier-mod capitals not be less responsive than non-mod, escorted capitals).

Regards,
Sparks
Hey Sparks,

At the moment, capital ships with fighter escorts are actually, unfortunately, more responsive than carriers with the Carrier mod. What keeps the fighters close to the ships that they're escorting is something in the escort script that checks to see if they're a certain distance (more than 5km) away from the lead ship, and warps them to within 1km of the lead ship. So visually, they don't actually look like they jump with their lead ship, rather the lead ship jumps, then the fighters follow. Just doesn't happen very often when doing IZ maneouvers because fighters are faster and more maneouverable than capships. (Actually wrote that in to keep capital ship formations together. Later including small ships in the script led to this side-effect where small ships quasi-jump-with-their-lead ship.)

Could write in a wait to mimic carriers waiting for fighters to dock, but that is very variable. It can take a very long time to dock fifty fighters to the two docks that the Arawn has!

Have to admit that it kinda nerfs carriers. Upshot to using carriers, however, is that you can choose when to deploy fighters, (they're really not always useful to have around) and Marvin's carriers repair fighters when docked so they're still a lot more useful in the long-term. Without that, I didn't bother with fighters at all.

ps. and they're cool!

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

Post by w.evans » Thu, 23. Jul 15, 17:22

23.Jul.2015 - MiscellaneousIZCombatTweaks updated to v0.16

In the initial jump/boost/move to targets, ships were pointing toward targets rather than orienting optimal firing vector.* - FIXED
Ships were sometimes becoming temporarily unresponsive when their present target gets blown to smithereens while the ship is undergoing a boost maneouver. - FIXED

.......
* seems that this.ship.dps.turrets.fortarget.{$target}.front/right/left sometimes resolves to "0"

now uses this.ship.dps.turrets.front/right/left which resolves accurately and reliably. am guessing that this.ship.dps.turrets.fortarget.{$target}.front/right/left checks to see how much damage each side can do to that particular target right now, and since "right now" is often out of range before a ship moves to range, then they can't do any damage. or might be something else entirely.

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

Post by w.evans » Thu, 23. Jul 15, 17:38

Sparky Sparkycorp wrote:or maybe carrier mod capitals could have their fighters auto-docked (to help carrier-mod capitals not be less responsive than non-mod, escorted capitals).
Sorry, missed this. They do. Feature of the Carrier mod. They even keep squad assignments.

plynak
Posts: 3010
Joined: Fri, 12. Dec 03, 08:53
x3tc

Post by plynak » Thu, 23. Jul 15, 19:06

Hello w.evans,

I have jsut finished the mission where I was given back my property including my Taranis. I ordered it to attack and it was acting strange. Like flying 10km away from the enemy and then turning back. I then found out that my engineer was set to NONE. I docked, send engineer and DO back to ship and redeplyed them and it seems fince now. Did the game somehow stopped the crew from working?
Intel Core i5 4590, 2 x 8GB DDR3 1600, MSI GTX 1060 Armor, Asus H97 Pro, Asus Xonar DG, Crucial MX100 128GB SSD + 1TB WD Caviar Blue, Seasonic S12G 550W, Corsair 550D, 22'' LG

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

Post by w.evans » Thu, 23. Jul 15, 19:54

There it is.

When PMC takes your ships, this is done:

Code: Select all

<do_all exact="$ControlEntities.count" counter="$EntityCounter">
  <set_owner object="$ControlEntities.{$EntityCounter}" faction="faction.ownerless"/>
  <abort_scripts entity="$ControlEntities.{$EntityCounter}"/>
</do_all>
The ships and their crews are set to faction.ownerless, and their scripts are stopped.

When you get them back, this is done:

Code: Select all

<do_all exact="$ControlEntities.count" counter="$EntityCounter">
  <set_owner object="$ControlEntities.{$EntityCounter}" faction="faction.player"/>
  <do_if value="$actor.type" exact="entitytype.engineer">
    <start_script object="$actor" name="'engineer.ai'"/>
  </do_if>
  <do_elseif value="$actor.type" exact="entitytype.defencecontrol">
    <start_script object="$actor" name="'fight.defend.capital'"/>
  </do_elseif>
</do_all>
Scripts are restarted on the crews, and all should be well.

That said, <start_script object="$actor" name="'engineer.ai'"/> should work fairly reliably in restarting your engineer. I guess that it's possible that those variables were interfered with between the first part and the second, but I don't see how unless the plot script itself was altered in the meantime somehow. Don't know of any mods that do that, though.

Dunno. Bug? Can't remember if my crew were all working last time I was at that point in the plot. I think they were.

plynak
Posts: 3010
Joined: Fri, 12. Dec 03, 08:53
x3tc

Post by plynak » Thu, 23. Jul 15, 20:08

Thanks. I bet it was a bug. Maybe the game did not expect me to have a fleet of ships to return :-)
Restarting ENGs and DOs manually seems to do the trick.
Intel Core i5 4590, 2 x 8GB DDR3 1600, MSI GTX 1060 Armor, Asus H97 Pro, Asus Xonar DG, Crucial MX100 128GB SSD + 1TB WD Caviar Blue, Seasonic S12G 550W, Corsair 550D, 22'' LG

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Thu, 23. Jul 15, 21:35

Thanks for the detailed and interesting responses!

By auto-dock, I was thinking of a teleport thing to get carrier mod ships to respond a bit faster. Sort of like having the carrier and fighters in space jump (like your mod's fighter escorts), and then have them either still be in space and/or be magicked into the carrier bays, depending on your preference.

Anyhow, thanks again - I understand both mods much better and love 'um :)

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

Post by w.evans » Sat, 25. Jul 15, 14:11

25.Jul.2015 - MiscellaneousIZCombatTweaks updated to v0.17

- drones were getting orphaned when parent ship moves while drones are on final approach to dock. - FIXED*

* Working theory is that <move_docking ... /> relies on actual contact with a particular functional area on the dock (or relative to the dock) for the docking maneouver to work. Problem is that MICT ships move a lot so there's a very high likelihood that the ship's dock has moved between the time when a drone initiates docking maneouver, and the time when it finishes said maneouver.

Options to fix are:
  • have the ship wait until all drones are docked (this has thus far been consistently Egosoft's solution to such problems)
  • or make the docking procedure faster (a bit hacky, especially when drones are directly observed while docking, but works without impeding capship mobility, particularly important when under fire)
Opted for the second solution. Hurts immersion a bit, but decided that mobility is more important. Besides, if it's good enough for Lucike, it's most certainly good enough for me.

.......
MICT_supp2 updated to v0.18

- All MICT Squadron subordinates, except for MICT Fighters squadded directly under MICT Capital Ships, now move in formation except when breaking off to attack.*
- Warp to keep up with MICT Squadron restricted to this.zone, and warp threshold increased to 10km from 5km.

* Problem with vanilla squadron movement is that squadron escorts plot a point relative to the lead ship, then move there. If the lead ship is constantly moving (for example, when the lead ship is on patrol), the lead ship would have already moved further by the time that squadron subordinates get to their points, hence they always lag behind. Having them move in formation should improve this. Still doesn't work 100% because capital ships are huge, lumbering things that don't move nor turn on a dime (which I kinda like, to be honest). Fighters escorting capships are excluded to allow for Marvin's carrier-based fighters going on patrol.
  • Capships use the inverted point guard formation, and maintain the vanilla offset distance of 400 meters.
  • Fighter squadrons use the x shape forward formation, and tighten their formations to 100 meters.

Post Reply

Return to “X Rebirth - Scripts and Modding”