[MOD] Combat Rank Bailout (ver 0.4, Jan 08 2015)

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

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

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13293
Joined: Sun, 15. Feb 04, 20:12
x4

[MOD] Combat Rank Bailout (ver 0.4, Jan 08 2015)

Post by euclid » Fri, 19. Dec 14, 02:35

Combat Ranks and Bailout (V0.4)


Defense Officer to captain: ... we got a radar bleep approaching fast ... it's the Skunk!! He is attacking !!

Captain To all crew on emergency intercom: Ren Otani is attacking .... ABANDON SHIP, I reapeat ABANDON SHIP .. this is an order!!



It will take a long time until you get the crew of a capital ship to head for the escape pods but now worries, you'll get there eventually .... once your gain a high combat rank ;-)

Have you ever wondered why you need to board an abandoned capital ship? You can dock at it without problems, so why sending marines and destroying subsystem etc. ?

This mod will allow you to "claim" an abandoned capital ship simply by docking at it! Of course there are not too many capital "freebees" around and most of them are not that desirable.

This mod provides a "chance on attack" for the crew of a capital ship to bail out. This chance depends mainly on your Combat Rank. The rank is computed from your kill statistics: the more ships, drones, turrets and, in particular, capital ships, you destroy the higher will be your combat rank, with a range from "Harmless" to "XTREME".

If you gain a new combat rank an onscreen message and a playerlog entry will inform you about it. Also your current combat rank will be visual behind your ship's name. For example if you have named the Skunk "Ragnarock" then you might find something like "Ragnarock [Veteran]" after you load a saved game (or start a new game) with this mod installed.

To gain a decent chance for the crew of a capital ship to bail out you need a very high combat rank. But even then there are odds against you which depends on the boarding resistance of the ship and the difficulty level of your current game. However, with an increased combat rank even non-capital ships have an increased chance to bail out.


  • Installation
    Extract the entire folder to your extensions folder.

    Deinstallation
    Just remove the mod folder from your extensions folder.

    Technical info
    This mod uses local variables on the player.entity: $Title, $name, $Bbail and $Combat
Download


Changelog

V0.4: Fixed a bug that gave players on difficulty 'hard' an in creased bailout chance. Added info on points until the next level to player's logbook 'mission'.

V0.3: Thanks to milytar for spotting this bug when the player changes the name of the Skunk. If you rename the Skunk then either shoot something or save & reload to get the title behind the new name.

V0.2: Replaced player.ship by player.primaryship 2 times in EuclidsCombatRank.xml. (thanks w.evans for spotting this bug).

Cheers Euclid
Last edited by euclid on Thu, 8. Jan 15, 11:43, edited 5 times in total.
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

SyberSmoke
Posts: 650
Joined: Sat, 11. Feb 12, 04:03
x4

Post by SyberSmoke » Fri, 19. Dec 14, 02:52

So when the crew of a cap ship bail...is there a spew of pods or small craft (like the traffic craft) from the ship?

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

Post by w.evans » Fri, 19. Dec 14, 02:55

Now that is cool. Downloading now.

User avatar
Freeman_79
Posts: 298
Joined: Tue, 28. Aug 07, 03:31
xr

Post by Freeman_79 » Fri, 19. Dec 14, 03:34

Nice mod, nice immersion to the game :)

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

Post by w.evans » Sat, 20. Dec 14, 17:16

Hi euclid,

getting this in my debuglog:

[=ERROR=] Error in MD cue md.EuclidsCombatRank.EuclidsCR<inst:1ac2c>: Evaluated value 'null' is not of type component
* Expression: player.ship

Should I be worried?

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13293
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid » Sat, 20. Dec 14, 18:19

Hmm... yes ... that is not correct. The expression "player.ship" is used only twice there. I've tested both with my current and with new games and all works fine.

Did it happen right after you loaded a game with the mod installed 1st time? Do you see the combat rank title behind the Skunk's name? Did you get any playerlog messages?

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

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

Post by w.evans » Sat, 20. Dec 14, 18:23

I do get the rank with the name of the ship. [Novice], I think. I didn't notice it right after I installed, but I wasn't monitoring it right then. Just noticed it today, right after launching the game exe. Didn't notice anything in the playerlog.

edit: sorry, my mistake. Entry in the debuglog appears after exit. Saved while I was in a station, then exited, if that helps.

User avatar
NZ-Wanderer
Posts: 1623
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer » Sat, 20. Dec 14, 18:53

Oooo, I like the sound of this..

(Heads over to Nexus to download) - Added to my Mods list as well :)
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13293
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid » Sat, 20. Dec 14, 18:55

w.evans wrote:,,,,,Entry in the debuglog appears after exit. Saved while I was in a station, then exited, if that helps.
Yes, thanks for the info. I was able to reproduce it. You get the error message when loading a games saved while the player is not on the Skunk.

Fix is on the way.


Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

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

Post by w.evans » Sat, 20. Dec 14, 19:00

Cheers!

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13293
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid » Sat, 20. Dec 14, 19:42

New version uploaded (see OP).

No big thing (it will not break anything) and you may want to do edit it in your current version yourself. Just replace the two

Code: Select all

player.ship 
by

Code: Select all

player.primaryship
in EuclidsCombatRank.xml. ;-)

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

vadiolive
Posts: 337
Joined: Wed, 18. Dec 13, 04:36
x4

Post by vadiolive » Sat, 20. Dec 14, 19:42

/bow

More one awesome mod

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

Post by w.evans » Sat, 20. Dec 14, 21:06

Thanks! Downloaded the update. Will take a peek in the code some time, but looking for something I really can't find in the code at the moment.

User avatar
NZ-Wanderer
Posts: 1623
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer » Sun, 21. Dec 14, 00:19

Well according to my status I am a "Sharpshooter", I am guessing that is not too bad :P
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13293
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid » Wed, 24. Dec 14, 03:00

New version uploaded.

Thanks milytar :-) for reporting this bug that occurs when the player changes the name of the Skunk.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

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

Post by w.evans » Wed, 24. Dec 14, 10:30

Thanks for the update!

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

Post by w.evans » Thu, 25. Dec 14, 16:55

Hi euclid,

You're probably off on holiday, but I got a rather funny error message for when you get back:

[General] ======================================
[=ERROR=] Error in MD cue md.EuclidsBailout.EuclidsBailoutInit<inst:15c99>: Property lookup failed: player.entity.$Combat
* player.entity == component.{0x34e2L} (name='Ren Otani', class=player, invalid context)
* Expression: player.entity.$Combat
[General] ======================================
[General] ======================================
[=ERROR=] Error in MD cue md.EuclidsBailout.EuclidsBailoutInit<inst:15c99>: Property lookup failed: player.entity.$Bbail
* player.entity == component.{0x34e2L} (name='Ren Otani', class=player, invalid context)
* Expression: player.entity.$Bbail
[General] ======================================

That was when I was in a losing battle (ultimately lost) with 5 fighters where I had Mk1 everything. I think it was trying to compute the chances that I would bail? I don't think that it actually did anything wrong. Just had a big laugh when I checked my debuglog after I blew up.

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13293
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid » Thu, 25. Dec 14, 18:05

Heheh .. the player never bails :p

Indeed a funny bug that seems to occur if the player dies. Not sure why else the local variables on the player are not found. Maybe I should make them globals to avoid those debug errors.

Thanks for reporting this w.evans :-)

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

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

Post by w.evans » Thu, 25. Dec 14, 18:16

I was seriously thinking of bailing!

Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini » Wed, 7. Jan 15, 17:25

Thanks by this awesome mod!

Just a question: is it compatible with "Boarding Options" mod?
Thanks again!

Post Reply

Return to “X Rebirth - Scripts and Modding”