[MOD] Marine Rebalance

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 »

Shazbot01 wrote:The one feature from boarding options that I would love to see ported into marine rebalance is the option to have normal assistance or target weapons only, it's nice to have options to how much of a ship I need to carve up during boarding.
Agreed. However, decided that making sure that Marine Rebalance would be compatible with Boarding Options would be a better course of action.
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Post by pref »

Heyho!

Im trying to spot some possible mod incompatibility with AutoCrew (on 3.61).
Any chance this sel won't work? My code thinks it is inserted right after the ownership change and removal of the original crew.

Code: Select all

<add sel="(//cue[@name='Success']/actions/do_else/cease_fire[@object='$target'])[1]" pos="after">
Id really like to stay compatible with your mod as i plan to use it later :D
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Hey pref,

Shouldn't be a problem since I haven't gone near that do_else. (At least, I don't think I have.) MR does change stuff within cue name="Success" but that particular node shouldn't be affected.

I did add a second cease_fire within "Retreat" but your sel is specific enough that it shouldn't be affected.

Anyway, if there does prove to be a compatibility problem, let me know.
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Post by pref »

Thanks evans!
I only sel'd the cease_fire before, that must have been the reason then.
Lazy me!!
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

I rather like general sels myself. That way, if it breaks, you're at least sure that it won't land somewhere else. That can be a danger, particularly if you use "[1]" the way you did a couple of posts up.

I find it's much safer if something breaks completely by landing nowhere, doing nothing, and giving you an error message then if it breaks by landing somewhere else and changing something unanticipated.

Then again, come to think of it, the same could be said of extremely specific sel paths.
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Post by pref »

w.evans wrote:I rather like general sels myself. That way, if it breaks, you're at least sure that it won't land somewhere else. That can be a danger, particularly if you use "[1]" the way you did a couple of posts up.

I find it's much safer if something breaks completely by landing nowhere, doing nothing, and giving you an error message then if it breaks by landing somewhere else and changing something unanticipated.

Then again, come to think of it, the same could be said of extremely specific sel paths.
Yeah hard to guess :D
I was thinking if there would ever be 2 cease fire commands in that cue, those must be in a conditional, and this way at least i catch the first. Might be better without 1 though - too many assumptions...
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

13.Feb.2016 - Marine Rebalance updated to v0.52

- Suppresses notifications added in X:R 4.0 Beta 5.
- Removed sound of boarding notifications.

Marine Rebalance is now fully compatible with X Rebirth 4.0

Happy 13th, everyone!

.......
Please report if there are any issues. I usually suck when I try to code first thing in the morning.
SyberSmoke
Posts: 655
Joined: Sat, 11. Feb 12, 04:03
x4

Post by SyberSmoke »

Would it be reasonable to ask that the mod have a function added? I would like to be able to configure the options that I get when attacking. Do say disabling the Drone Bay and Cap Shields as valid targets.

Much of the time when pirating a ship, I want the drone bay intact and waiting for the time out is frustrating and causes marines to die. So could the option to skip those...or may be when one of those things come up, To choose (I will attack this / I am not going to attack this).
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Hi SyberSmoke,

Sounds like you want something like Boarding Options. This mod should work with Boarding Options without a problem.
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Hey w.evans,

I'm using the latest version with the newly released 4.0 + HoL. Boarding operations go well...possibly a little too well as I'm yet to lose a Marine.

I of course strip any ship of weapons and other surface elements first, then get the hull down so resistance is under my strength. However, even doing all this I'd expect loses. My strength is only about 10% over the ships resistance, plus I've been unable to scan it first - so boarding lasts the full 10 rounds.

Anyway, possibly you've made changes to how it works, but this does seem a little easier than maybe it should be.

Note: I had 50 recruit marines during my first boarding, all survived giving me 10 Veterans. My second boarding went equally well, I now have 25 recruits and 25 veterans!

Cheers,

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

Post by w.evans »

Hey Scoob,

Thanks for the report. Going 10 rounds with boarding strength 10% above resistance, you should've taken losses. I'll take a look at the attrition stuff.
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Thanks.

Edit: I just started another boarding operation, where I DIDN'T strip the ship, and I started loosing Marines right away. Possibly all element dead = no chance of Marine death?

Scoob.
Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Post by Requiemfang »

I had noticed this as well... I was curious about it but I shrugged it off and then I see I'm not the only one. I've done boarding ops with maybe half of the surface elements destroyed, do a drone scan and then I shoot guns on the ship to get 25% increments of the boarding op done. Only time I lost marines was during my first boarding op of a pirate cargo transport and they were all rookies anyways. Only other times I lost marines was when the boarding pods decided to go ahead and go towards the other end of the ship that had turrets alive still.
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

I did another capture last night, this time stripping the ship of surface elements. Zero Marine casualties each round once again - until an NPC blew the ship up! I reloaded :)

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

Post by w.evans »

Alright. Looking at what changed in 4.0, saw this:

Code: Select all

<do_else>
  <set_value name="$outcomedecider" min="$fightoutcome" max="$fightoutcome + 10"/>
  <do_if value="$outcomedecider gt 0">
    <debug_text text="'marines may be lost due to close fight'" chance="$debugoutputchance"/>
    <!--player loss-->
    <set_value name="$losschancemin" exact="2" chance="$debugoutputchance"/>
    <set_value name="$losschancemax" exact="5" chance="$debugoutputchance"/>
    <include_actions ref="LoseMarines"/>
  </do_if>
  <do_else>
    <!--Player wins-->
  </do_else>
</do_else>

Code: Select all

<do_if value="$outcomedecider gt 0">
was

Code: Select all

<do_if value="$outcomedecider gt 10">
and

Code: Select all

    <set_value name="$losschancemin" exact="2" chance="$debugoutputchance"/>
    <set_value name="$losschancemax" exact="5" chance="$debugoutputchance"/>
was

Code: Select all

    <set_value name="$losschancemin" exact="5"/>
    <set_value name="$losschancemax" exact="10"/>
$fightoutcome is defined as:

Code: Select all

<set_value name="$fightoutcome" exact="$defencestrength - $attackstrength"/>
If I understood that correctly, what this means is that there is a greater chance of getting casualties if in close fight range (boarding resistance - boarding strength between -10 and 10), but you get less casualties when you do get casualties at all within that range.

In the mod, close fight range is extended to -100 to 10.

Which means, you should still be seeing casualties in the range that Scoob mentioned, albeit lighter casualties than in 3.61; but you aren't. Now, why could that be?

edit: corrected was for set_value name="losschancemin" and "losschancemax" Did NOT have chance="$debugoutputchance" and didn't notice at all. Thanks to pref for spotting it.
Last edited by w.evans on Mon, 29. Feb 16, 22:08, edited 1 time in total.
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Post by pref »

Why setting $losschancemin/max depends on $debugoutputchance?
Seems weird.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Holy crap! That's it! Thanks, pref.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

29.Feb.2016 - Marine Rebalance updated to v0.53

- Fixed attrition. Many thanks to pref for spotting the waldo!
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Post by pref »

Happy to help!

This was the most debugproof bug i met so far :D
Valhalla Awaits
Posts: 36
Joined: Wed, 18. Mar 15, 15:40

Post by Valhalla Awaits »

Not sure why, but this mod currently breaks the game for me, that or another mod I have conflicts with it to cause the game breakage.

Currently after boarding 1-2 capital ships the marine officer becomes bugged and no longer responds to ANY commands, or even has the option to give him commands other than "your fired" and "show me your skills".

Disabling the mod returns the game to working order, though I have to start from a save back before the office became bugged.

Also one other minor issue, the progress screen during boarding doesn't show unless radar is enabled.

Return to “X Rebirth - Scripts and Modding”