[MINI MOD REQ] Engineer AND pilots repair to 100% - all ships stuck at 75%

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

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

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

Post by UniTrader »

bm01 wrote:Ideally I feel that they shouldn't even be able to repair the hull, only modules. We should also have some simple commands to make them go for repair to the nearest shipyard instead of having to manually go there. And if we want make engineer able to repair the hull, it should be slow and not free (for example it could requires a construction vessel with some resources).

All of this is quite difficult to implement I think.
i have put some thoughts into this and my solution would be to make the hull which can be repaired less over time/sustained damage, something along the lines of:

-> Engineer Skill determines how much repairs can be done, like 5 Stars give a 90% cap (NOT the way currently is, see next points)

-> the last Max Hull Value is stored at the end of each repair run for comparision (or 100% for a visit at a Shipyard - they dont do half-assed jobs ;) )

-> when repairs begin the difference between the current value and the stored max hull value is repaired e.g your Ship came out of a Shipyard (100% max hull), got a 5* Engi (90% repairs) and has been damaged down to 80% - the Engineer can repair 90% ot that Damage, so he can go up to 98%, if your Ship was down to 50% before an Attack and got damaged to 10% the Engi could repair up to 46% (remaining 10% + 36% ( 90% of the 40% difference ) )

-> as bonus every Repair which goes over 97 to 99% would default to 100% to avoid unnecesary degrading by scratch damage (but once it goes below that it will always go down)
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 ;)
JESS 246
Posts: 574
Joined: Mon, 3. Jul 06, 03:24
x3

Post by JESS 246 »

Hi swatti

Try this Engineer mod link.

http://www.nexusmods.com/xrebirth/mods/409/?
Last edited by JESS 246 on Mon, 13. Oct 14, 18:22, edited 1 time in total.
User avatar
Tamina
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 4623
Joined: Sun, 26. Jan 14, 09:56

Post by Tamina »

UniTrader wrote:
bm01 wrote:Ideally I feel that they shouldn't even be able to repair the hull, only modules. We should also have some simple commands to make them go for repair to the nearest shipyard instead of having to manually go there. And if we want make engineer able to repair the hull, it should be slow and not free (for example it could requires a construction vessel with some resources).

All of this is quite difficult to implement I think.
i have put some thoughts into this and my solution would be to make the hull which can be repaired less over time/sustained damage, something along the lines of:

-> Engineer Skill determines how much repairs can be done, like 5 Stars give a 90% cap (NOT the way currently is, see next points)

-> the last Max Hull Value is stored at the end of each repair run for comparision (or 100% for a visit at a Shipyard - they dont do half-assed jobs ;) )

-> when repairs begin the difference between the current value and the stored max hull value is repaired e.g your Ship came out of a Shipyard (100% max hull), got a 5* Engi (90% repairs) and has been damaged down to 80% - the Engineer can repair 90% ot that Damage, so he can go up to 98%, if your Ship was down to 50% before an Attack and got damaged to 10% the Engi could repair up to 46% (remaining 10% + 36% ( 90% of the 40% difference ) )

-> as bonus every Repair which goes over 97 to 99% would default to 100% to avoid unnecesary degrading by scratch damage (but once it goes below that it will always go down)
I did just completed my mod by increasing hull repair value to 60%(0star)-100%(5star) and decreasing repair-speed to (I think! It is hard to differ) 1/5 (based on management skill).

You know I was proud for half minute that I actually did something and then you hardcore modders came by with ideas and plans and other stuff you would do... :P

Code: Select all

Und wenn ein Forenbösewicht, was Ungezogenes spricht, dann hol' ich meinen Kaktus und der sticht sticht sticht.
  /l、 
゙(゚、 。 7 
 l、゙ ~ヽ   / 
 じしf_, )ノ 
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

well, not really, i am just participating in the discussion, but i dont have any intention to actually implement something like this.. i know it is do-able, but i will stay true to my principle that i wont do any request work, because i have far more than enough ideas of my own ;) but if someone want help implementing something like this i will help ^^
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 ;)
User avatar
Tamina
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 4623
Joined: Sun, 26. Jan 14, 09:56

Post by Tamina »

Okay here is a mod which makes the engineers repair your ship up to 100% (based on engineer skill).

IMRSN - Engineers mod

I also tried reducing the repair speed but with no success.
I think the engineer script has an error.
If I am interpreting it correctly, at this point:

Code: Select all

[...]
<set_value name="$addedhullpercentage" exact="100f * $repairrate / $Defensible.maxhull" />
<!-- handle the case of the percentage being < 0 -->
<do_if value="$addedhullpercentage lt 1">
     <set_value name="$addedhullpercentage" exact="1"/>
</do_if>
<do_if value="$addedhullpercentage" min="1">
[...]
The addhullpercentage is calculated like this with vanilla versions for a Taranis:
100f * 250 / 2000000 = 0.0125
but in the next line it checks if this value is lower then "1" and increases the value to 1 again which makes the engineer repair the ship every 10 seconds by 1% no matter how big the repairrate or hull actually is.

THIS IS HOW I UNDERSTAND IT!
My mod changes the repairrate but it has no effect on the actual repair speed and this is my only explanation right now. However I do not know what

Code: Select all

if x lt y
mean, and

Code: Select all

if x min y
Regards
Tamina :D

Code: Select all

Und wenn ein Forenbösewicht, was Ungezogenes spricht, dann hol' ich meinen Kaktus und der sticht sticht sticht.
  /l、 
゙(゚、 。 7 
 l、゙ ~ヽ   / 
 じしf_, )ノ 
bm01
Posts: 421
Joined: Wed, 22. Jul 09, 22:31
x4

Post by bm01 »

lt, le, gt, ge mean <, <=, >, >= respectively.
More info here: http://www.egosoft.com/download/x_rebir ... rGuide.pdf some things are MD specific though.

min, max, exact properties mean >=, <=, == respectively. Well, in this context at least, sometimes min and max are used to get a random number. I personally try to avoid these properties when possible, as they are confusing.
This is usually explained in the aiscripts.xsd.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

<do_if value="$addedhullpercentage" min="1"> is just another way of saying if $addedhullpercentage is greater than 1. EGO seem to mix the ways of determining values freely if X == Y or if X exact=y etc... Once you get used it it you can just program fairly normally :)
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti »

Basic engi being able to repair up to 100% may feel a bit cheaty but considoring i have fleet of over dozen ships, thats way too hard to micro-manage without automation.
Also the resource cost for upkeeping fleets is waaaay off the roof and more so with economy dying so quick.
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

Code: Select all

10 PRINT hull
20 IF hull = vanilla, mulitply by 1.33
30 RUN
There you go :P
User avatar
Tamina
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 4623
Joined: Sun, 26. Jan 14, 09:56

Post by Tamina »

Thank you very much :D :D :D

Well I tried to modify the repairspeed now with my new knowledge and still no success because the engineer is really repairing the hull-"percentage" by 1% every 10seconds.

If you change the value to something lower then 1, the ship doesn't get repaired.
So all those calculations which consider the number of welder drones and other factors like engineers skill get overwritten at the end with "hull = hull+(1%/10s)"
Last edited by Tamina on Mon, 13. Oct 14, 20:59, edited 1 time in total.

Code: Select all

Und wenn ein Forenbösewicht, was Ungezogenes spricht, dann hol' ich meinen Kaktus und der sticht sticht sticht.
  /l、 
゙(゚、 。 7 
 l、゙ ~ヽ   / 
 じしf_, )ノ 
swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti »

Can i have a simple "fix mah ships" -version that just fixes the ships to 100%?
bm01
Posts: 421
Joined: Wed, 22. Jul 09, 22:31
x4

Post by bm01 »

swatti wrote:Can i have a simple "fix mah ships" -version that just fixes the ships to 100%?
Here it is. Note however that current running scripts will keep the original value, so you'll have to remove each engineer and assign them back.

This version should work for all engineers but could create some incompatibilies if, for some reason, another mod tries to modify that value for stations, specific ships... Whatever.

Both tested.
UniTrader wrote:i have put some thoughts into this and my solution would be to make the hull which can be repaired less over time/sustained damage, something along the lines of:

-> Engineer Skill determines how much repairs can be done, like 5 Stars give a 90% cap (NOT the way currently is, see next points)

-> the last Max Hull Value is stored at the end of each repair run for comparision (or 100% for a visit at a Shipyard - they dont do half-assed jobs ;) )

-> when repairs begin the difference between the current value and the stored max hull value is repaired e.g your Ship came out of a Shipyard (100% max hull), got a 5* Engi (90% repairs) and has been damaged down to 80% - the Engineer can repair 90% ot that Damage, so he can go up to 98%, if your Ship was down to 50% before an Attack and got damaged to 10% the Engi could repair up to 46% (remaining 10% + 36% ( 90% of the 40% difference ) )

-> as bonus every Repair which goes over 97 to 99% would default to 100% to avoid unnecesary degrading by scratch damage (but once it goes below that it will always go down)
Basically they would only be able to repair a percentage of the sustained damage, which means the cap (always 75% currently) would be dynamic, which also mean that eventually you'll have to go to the shipyard?

I like the idea but I don't think people would really understand what's going on, the current cap would have to be shown somewhere, maybe in the engineer detail window.

Anyway, it would be more complicated than all ideas so far but having some cargo space (don't need a lot) on all ships but only usable by the engineer would be nice, with a new kind of ware: "on-field repair kits / materials" (or whatever it could be called). We would have to buy them from stations or build them ourself.
- Adding cargo space and making the engineer using it to repair should be easy. Just have to find a way to balance it according to the base cost of the ship.
- Adding a new ware type can be tricky, but should be doable (after all Mission Computer does it).
- Adding them to the economy (production chain and all) and creating station modules for them seems quite complicated.
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

I'm not sure how I feel about the idea but could the process not just use RMP, BOW, etc. without resorting to a new ware?
bm01
Posts: 421
Joined: Wed, 22. Jul 09, 22:31
x4

Post by bm01 »

Sparky Sparkycorp wrote:I'm not sure how I feel about the idea but could the process not just use RMP, BOW, etc. without resorting to a new ware?
That was my idea originally, but it would be more complicated to make the engineer use the right amount of each ware type :p
For example how many fusion reactors should be used for a 2% repair? Theoretically between 0 and 1... So 0 or 1?
Making a new ware allows to use fractions of everything.
birdtable
Posts: 2128
Joined: Sat, 7. Feb 04, 20:42
x4

Post by birdtable »

What about self sacrificing construction drones, drone material used for repairs...... carry 20 const drones when gone replace.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

I seem to be onto something entertaining with the astromech idea :)
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

These are not the teases you are looking for...

...oh wait, yes they are :P
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

Ok, got 'computer' engineers going nicely that function with the usual engineer ai, so will be compatible with any 100% repair mods :) They take 10-15 secs to start working after damage is taken so dogfight difficulty should not be too badly hit by it; survivors however will patch themselves up. I need to spend a bit more time on it to add the same functionality on npc ships automatically, small shipyards to add them onboard at purchase time and auto addition for existing ships. Uploading to a workshop soon(tm).
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

Nice.

I shall dream of the following functionality:
http://www.soundboard.com/sb/R2D2_R2_D2_sounds
JESS 246
Posts: 574
Joined: Mon, 3. Jul 06, 03:24
x3

Post by JESS 246 »

Hi swatti

I have placed a 100% repair zip file in dropbox give it a try it may/may not work for you.

Return to “X Rebirth - Scripts and Modding”