[MOD] Miscellaneous IZ Combat Tweaks

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

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

Post by w.evans »

Hey Scoob,

no go with boost, I'm afraid, at least none that I've found so far.

The problem is that the command to start boost and the command to start the move are two separate commands, and anything that interrupts movement while the ship's boosting interrupts boost as well. So boost is intermittent: boost stops and starts every time the crew has to take a peek at what's happening, and they don't get anywhere very quickly. Only way to keep it from being intermittent is to give the order to boost, give the order to move, then strap in until the movement order's done.

My solution to that problem is in-zone tactical jumps and, especially with the latest update, ships shouldn't boost much at all unless they can't jump and the captain decides that the distance they have to traverse is too long to go with normal engine power. But, yeah, what probably happened was that the crew was completely oblivious that their boost engines were destroyed after boost was already active. (I keep telling them that self-contained stasis pods don't help much when the ship gets blown up, but they're all "I don't see you risking your arse out there! We'll be perfectly safe in here, thanks.)

Open to solutions, if you can think of any.
Scoob
Posts: 11182
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Thanks for the reply. I'm guessing this is something that ES should tweak ideally, so the Boosting works better.

I must admit, in this current 3.60 beta, I'm getting a lot of ships with the sticky boost effect. For example, a ship will arrive in-Zone and can sit there for a minute or two still showing the boost effect before it turns off, and it continues its orders. Very frustrating when it's my Taxi.

However, it's not always just the effect playing! I ordered a ship that I thought was just visibly boosting to do something, and it zoomed off like a pinball!

Still, not to worry :)

Scoob.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

havent looked at your scripts but you are using the $ship.canboost property to check before engaging boost right? problem may be to try boosting without checking this value..
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 »

UniTrader wrote:havent looked at your scripts but you are using the $ship.canboost property to check before engaging boost right? problem may be to try boosting without checking this value..
Hey Uni,

nope, but I do check for working boosters:

Code: Select all

<set_value name="$MICT_BoostActive" exact="false"/>
<find_object_component class="class.enginebooster" object="this.ship" name="$MICT_Booster"/>
<do_if value="$MICT_Booster.isoperational">
	<set_value name="$MICT_BoostActive" exact="true"/>
</do_if>
<remove_value name="$MICT_Booster"/>
Actually, wasn't aware of that property. Will add that to this do_if and see if it's more reliable as a result.

As it is, though, ships won't try to boost if they don't have working boosters, but they won't know it, nor much anything else, if their boosters are blown up while they're already boosting.

edit: Thanks, UniTrader. Missed this whole section in the documentation:

Code: Select all

  <datatype name="enginebooster" type="destructible">
    <property name="chargetime" result="Charge time until the boost starts" type="time" />
    <property name="boostduration" result="The duration of the current boost" type="time" />
    <property name="boostefficiency" result="The efficiency of the current boost as a percentage" type="float" />
    <property name="canboost" result="true iff the booster can be activated right now" type="boolean" />
    <property name="isboostactive" result="true iff the booster is currently active" type="boolean" />
    <property name="maxduration" result="The maximum duration possible" type="time" />
    <property name="minshield" result="The minimum percentage of shields required to start boosting" type="integer" />
    <property name="potentialduration" result="The duration if the boost was activated now" type="time" />
    <property name="potentialefficiency" result="The efficiency if the boost was activated now" type="float" />
    <property name="rechargetime" result="Time required to recharge after a boost" type="time" />
  </datatype>
Some of it seems odd, though. Looks like boost functions for the Skunk and for other ships are all mixed in there. Looking up this.ship.minshield for a capital ship probably won't output anything useful, would it?
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

i think since back when EGO added Capital Shieldgens it will - and i think they used this when or after every capital ship got these...
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 »

Testing will have to wait a bit. Game's been taking longer to load since upgrading to Win 10, so trying a complete reinstall to see if that'll improve things. In the meantime, I'm off playing Doorkickers.
Scoob
Posts: 11182
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

w.evans wrote:Testing will have to wait a bit. Game's been taking longer to load since upgrading to Win 10, so trying a complete reinstall to see if that'll improve things. In the meantime, I'm off playing Doorkickers.
Recently switched to W10 myself, load times remain unchanged for me. In fact, I'd say my W10 experience is largely the same as my W8.1 one, in regards to how games play, load times etc.

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

Post by Scoob »

An observation of ship behaviour:

I'm seeing some odd behaviour with my ships, here's an example, but a similar thing has happened several times now:

I order my Light Sul to engage an enemy Sennin Frigate Raider. My Light Sul initiates a jump as it's not close by. It arrives reasonably close and shots are exchanged. Despite being minimally damaged (not even below 90% shields) the Sennin does an emergency in-zone jump.

My Light Sul, even though the Sennin is 20+ km away, decides to boost. However, it simply boosts in a HUGE circle, never actually getting close to the Sennin - it really is just running rings around it. This is because it's boosting while still turning. If it actually waited until it was facing the target before boosting, it'd be fine. It's turn rate is simply too low at boost speeds to actually line up!

My Light Sul is stuck in this situation until I order it to halt, then re-issue the attack command.

Another oddity - linked to the above if you bear with me - is how the ships turn to face a target, be it a hostile OR just their destination Zone. This also happens much of the time. Here's an example.

My Light Sul has been commanded (via an attack command) to fly towards a target Ship. Now let's say that my ship would need to turn 30 degrees CLOCKWISE to face the target or 330 degrees ANTI-CLOCKWISE. Almost every time it chooses the wrong way, i.e. in the above example my Light Sul chooses to turn ANTI-CLOCKWISE. it also performs this turn very slowly, NOT at the full speed I know my Light Sul can turn at - it's actually very manoeuvrable.

Another example, I'm sat on my Light Sul in DV > Molten Archon > Lava Flow. I'm facing roughly EAST. I ask the ship to fly to the Zone Vapour Stream, which is EAST and very slightly to the South of Lava Flow. What does my Light SUL do? It turns anti-clockwise doing an almost complete 360 degree turn, before facing back in almost the original direction, before finally boosting to Vapour Stream.

This is really weird behaviour right? First time it happened I dismissed it, but it's happened many times now. I'm finding this most confusing!

Not meaning to criticise your work, just attempting to explain - likely poorly - what I'm seeing happen in-game at this moment.

Edit: some more testing...I think the "Run away" threshold during combat having issues.

After re-issuing the command, my Light Sul successfully jumped to near the hostile Sennin and attacked it. However, the moment my Light Suls shields dropped below 90% it boosted away.

Once it's shields rose above 90% - which didn't take long - my Light Sul jumped back to the Sennin and attacked again... then it's shields dropped below 90% and it boosted away. And repeat! One time the Light Sul boosted away despite its shields not dropping, before once again jumping to the Sennin! Crazy! While I've been typing this edit, my Light Sul has done this half a dozen times...needless to say that Sennin ain't dead & it's shields fully recharge between jousts.

Note: I'm using the CWIR Mod by BlackRain, which contains Rubini's work too. I wonder if there's some odd behavioural clash here? For example, the Reiver ships, because they're all technically FREIGHTERS, even if well-armed, they appear to use Rubini's In-Zone jumping to escape from danger - that's danger, not necessarily an attack. These ships then get stuck until the player leaves the SECTOR. I've reported this on BR's thread, and there's a fix due shortly.

I know you guys all talk and help each other out, so I hope my feedback here is of use to all of you. Something freaking is going on, I think you'll agree! :)

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

Post by w.evans »

That is odd behavior.

In my copy, I had code that's supposed to point ships to where they're going before initiating boost. It's since been commented out because I never got it to work, but I've learned a couple of things since then, and I think I may have found a trick that will work. Testing now.

Re: conflict with Rubini's code, both from CWIR and the Conquer mod, they both include code adapted from cicero111's Better Turrets that affects Defence Officer stuff: firing logic and capital ship drone launch. I didn't touch those scripts partly to maintain compatibility, partly because I find the vanilla implementation ok. But yeah, there shouldn't be any conflicts. Only thing I'm really unfamiliar with is Rubini's code that warps mining ships out of harm's way. However, since mining ships which are actively mining or trading ships on trading runs won't run any of the MICT scripts, shouldn't be any conflicts there either. Mining ships and trading ships can only run MICT scripts IF they either:

escort other ships,
or actively attack.

So, basically, if they act like combat ships rather than civilian ships.

Also, haven't heard any opinions on whether added feedback via the in-game multi-function display is a good thing. Planning on adding that in an interim update. I'll announce that interim update when it's up, and have it up parallel to the regular update, and it'll only be a nexus thing. Please try that interim update out when it's up. If I hear nothing against adding that feedback, I'll include it in the main update after.

Re: retreat shield thresholds: they are at 20% for argon and canteran captains, 40% for teladi, and 0% for split.

Rejoin at 40%, 80%, and 10% respectively.
Scoob
Posts: 11182
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Hi,

Odd indeed. I know it sounds crazy, but just reporting what I observed. As it's obviously working well for you, I was trying to think what might be different about my build. Checking my installed mods:

CIWR
MICT
Marine Repairs
Capital Ship Bridges
TAF
Yorrik Auto Trade

That last one I've never had much success with, so I have no ships actively running it. Might remove entirely.

Interestingly, I tested removing MICT and the weird behaviour stopped. Sure, my ships no longer jumped / boosted to targets, but they did appear to line up normally and fly correctly - need to observe more though.

Further info on the Jump to / boost away looped behaviour. Not sure if it's relevant, but the fight was occurring near the edge of a Zone. So, my Light Sul would JUMP out of the Zone to engage the Sennin - which micro-jumped there, likely under the control of Rubini's scripts included with CWIR - before boosting back to the original Zone in which the Attack/Patrol command was issued.

My thought was that if my Light Sul was asked to Patrol a Zone, it got confused when it left the Zone. It's one of these weird border things. While the Sennin was shown as in my Light Suls current Zone, when it jumped to it, both the Sennin and I (on the Light Sul of course) were shown as in a temp Zone.

Hope that explanation helps narrow down what might be happening. In short, it's classic weird edge of Zone behaviour methinks.

So, in summary, what I think is going on is follows:

1) My Light Sul is ordered to Attack the Reiver Sennin.
2) Your MOD takes over and jumps my Light Sul to the target.
3) Combat ensues.
4) Sennin Micro-jumps away, to the edge of the Zone under the control of Rubini's script, which controls Freighters (the Sennin is one technically) and Miners getting away from danger.
5) Your MOD has my Light Sul Jump to the target Sennin.
6) Underlying "Attack..." command sees I've left the Zone and want to travel back...your MOD does this efficiently by boosting there.
7) As the Attack command is still running, we jump to step 5) above.

Make sense? This whole the Sennin is in the Zone I'm in, but when I fly to it we're both in a temp Zone is a nightmare!

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

Post by w.evans »

Possible.

*snip* Cut out a long confusing dig through move.patrol to move.seekenemies to fight.attack.object to MICT.move.attack.object.capital which ultimately led nowhere.

Long story short, that they're at the border between zones shouldn't make a difference unless the target ship changes zones. The combat movement script always moves the ship to the target's zone. If the target quickly switches zones, then yeah, it can get confused. Not sure, though, since I haven't seen it happen yet.

About the new boost code: man, I love Stromvoks. And when a Sucellus and two Stromvoks (ok, with help from my stations' drones, but still!) with really good crews can whip 4 Taranis and 2 Suls, you know that you're doing something right! Just tested with jump turned off, and they did rather well. Will clean up the code and upload in a half hour or so.
Scoob
Posts: 11182
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Cool. Looking forward to testing it out :)

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

Post by w.evans »

Sorry. Broke something while playing around with the escort script. Although the main combat movement script looks like it's good, not paying attention to it while working on the escort thing. Will figure out the problem with the escort script, fix that, then test the movement script properly.
Scoob
Posts: 11182
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

No worries mate, getting quite late here so I'll not be able to test until tomorrow anyway. Though I'm sure plenty of others are eager to get their hands on the next version :)

Catch you tomorrow.

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

Post by w.evans »

6.Aug.2015 - Miscellaneous IZ Combat Tweaks updated to v0.21

Ships whose crews decide to boost will turn before doing so.
Sindrali
Posts: 28
Joined: Sat, 28. Feb 09, 11:56
x3tc

Post by Sindrali »

Hello, thank for your great job !
I have a question :
Is it normal that all stations are sending a message on my interface when they launching drones ?
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Hi Sindrali,

Yes. Although that's partly to see if people like the added feedback or not in preparation for adding similar feedback to the movement script. Is it too much?
Sindrali
Posts: 28
Joined: Sat, 28. Feb 09, 11:56
x3tc

Post by Sindrali »

A little x) I restart a new savegame for fun, with your mod and other and... I have a message from your mod every 5 - 30 sec ^^

Edit : I think it would be better if this concerned only our station
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Sorry about that. I'll take it out in the next update. For the nexus version, that should be sometime tonight. For the steam version, tomorrow.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

6.Aug.2015 - MICT_supp4 updated to v0.09

Removed notifications of drone launch from cockpit display.

Return to “X Rebirth - Scripts and Modding”