[MOD] Mobile Repair Service

The place to discuss scripting and game modifications for X4: Foundations.

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

Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

[MOD] Mobile Repair Service

Post by Assailer »

Mobile Repair Service
--------------------------

Using this mod allows you to assign ships for repair duty. Each hull point repaired will cost you 10 credit, while 20 for NPCs.

Hail the selected player owned ship (preferably a fast ship!) and tell the pilot to 'Start Repair Service'.

The ship name should get a [MRS] tag at this point, and the pilot will look for the closest damaged player ship in the sector.
Once it finds a ship it will fly there and will repair it for some credits.

It's important to mention it will only repair ships with at least 20% charged shield.
Having shields up a little usually means that ship has been out of combat for some time, so it's safe to approach.

To stop the repair mode, hail the pilot again and select 'Stop Repair Service'.

Changes:
1.01 - moved command texts to T files to support other languages.
1.02 - removed unused highway parameter from move_to command. added boost option the same time.
1.03 - in case target moves away, the repair ship will try to chase it for some time before marking it 'unreachable'
1.04 - added interrupt handlers
1.05 - repair service will take orders from friendly NPC and charge them double cost. Repair cost can be edited in mobilerepairservice.xml file line 14: $credit_per_hull. Thanks TheEarl for the NPC idea!
1.06 - added Russian translations. Thanks Alexalsp!
1.07 - fixed on START the pilot will set new home sector. Thanks RudolphleBreton for reporting!
1.08 - added German translations. Thanks X2return! Changed the way credits are calculated.

http://game.mage-online.com/public/mrs.zip

https://www.nexusmods.com/x4foundations/mods/147

Enjoy!

Find install instructions at: viewtopic.php?f=181&t=402821
Last edited by Assailer on Fri, 21. Dec 18, 06:25, edited 11 times in total.
User avatar
alexalsp
Posts: 1894
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [MOD] Mobile Repair Service

Post by alexalsp »

md /mrsa.xml

Code: Select all

		<add_player_choice text="{314152, 3}" section="mrs_p_start"  comment="Start Repair Service" />  
							
		<add_player_choice_sub text="{314152, 4}" section="mrs_p_stop" comment="Stop Repair Service" /> 


Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Mobile Repair Service

Post by Assailer »

Almost got the text separation right... but you see, at least i tried this time :) Thanks again Alexalsp!
Dalia
Posts: 15
Joined: Tue, 19. Jan 10, 12:48
x4

Re: [MOD] Mobile Repair Service

Post by Dalia »

Nice idea,

How change the credits cost?

thanks
alexringess
Posts: 41
Joined: Tue, 25. Sep 18, 23:57
x4

Re: [MOD] Mobile Repair Service

Post by alexringess »

That's a very good idea ^^

Why didn't you publish your mod on nexus ?
I know that some ppl don't like it but it's a bit confortable for the users because once you've downloaded a mod, you can check easily if it have an update.

Anyway, this feature was missing and I'm gonna try your mod to see how it work and giving you my feedback.
User avatar
alexalsp
Posts: 1894
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [MOD] Mobile Repair Service

Post by alexalsp »

Code: Select all

[General] 0.00 ======================================
[=ERROR=] 0.00 LookupKeyName::LookupName(): The key name "usehighways" is not recognized in lookup 'ScriptXML'. Originated from: ""
[General] 0.00 ======================================
[General] 0.00 ======================================
[=ERROR=] 0.00 LookupKeyName::LookupName(): The key name "usehighways" is not recognized in lookup 'ScriptXML'. Originated from: ""
[General] 0.00 ======================================
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Mobile Repair Service

Post by Assailer »

alexalsp wrote: Fri, 14. Dec 18, 14:15

Code: Select all

[General] 0.00 ======================================
[=ERROR=] 0.00 LookupKeyName::LookupName(): The key name "usehighways" is not recognized in lookup 'ScriptXML'. Originated from: ""
[General] 0.00 ======================================
[General] 0.00 ======================================
[=ERROR=] 0.00 LookupKeyName::LookupName(): The key name "usehighways" is not recognized in lookup 'ScriptXML'. Originated from: ""
[General] 0.00 ======================================
Indeed! I reused my other X:RB Missionary mod here, and it seems the usehighways has been removed for X4. I will fix this asap.
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Mobile Repair Service

Post by Assailer »

1.02 - removed unused highway parameter from move_to command. added boost option the same time.
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Mobile Repair Service

Post by Assailer »

1.03 - in case target moves away, the repair ship will try to chase it for some time before marking it 'unreachable'
TR0LL
Posts: 45
Joined: Tue, 6. Jan 04, 04:12
x4

Re: [MOD] Mobile Repair Service

Post by TR0LL »

alexringess wrote: Fri, 14. Dec 18, 13:03 That's a very good idea ^^

Why didn't you publish your mod on nexus ?
I know that some ppl don't like it but it's a bit confortable for the users because once you've downloaded a mod, you can check easily if it have an update.

Anyway, this feature was missing and I'm gonna try your mod to see how it work and giving you my feedback.
I agree I like using nexus as well, and it shouldn't be long before they add X4 support to the Vortex manager.
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Mobile Repair Service

Post by Assailer »

1.04 - added interrupt handlers
TheEarl
Posts: 352
Joined: Fri, 3. Aug 07, 17:27
x3ap

Re: [MOD] Mobile Repair Service

Post by TheEarl »

Another interessting thing would be npcs hire the repair ship and pay money.
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Mobile Repair Service

Post by Assailer »

TheEarl wrote: Sat, 15. Dec 18, 16:51 Another interessting thing would be npcs hire the repair ship and pay money.
Nice idea, i will think about it. Perhaps if there is no player ship around, but there are friendlies in need we could serve them :)
warjager
Posts: 51
Joined: Wed, 21. Mar 07, 01:23
x4

Re: [MOD] Mobile Repair Service

Post by warjager »

TheEarl wrote: Sat, 15. Dec 18, 16:51 Another interessting thing would be npcs hire the repair ship and pay money.
Lolll thats cool idea!!

I will then start a space mecanix buisness instead of a trade one!

think ill call it: Warjager's Ultra Space mechanix... ''We repair what you failed'' lol
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Mobile Repair Service

Post by Assailer »

I have done this, but need to test it before uploading the update.
siath70
Posts: 459
Joined: Sun, 11. Jan 04, 03:03
x4

Re: [MOD] Mobile Repair Service

Post by siath70 »

Just a suggestion

But, how about making a setting we can make it more expensive.

Almost all ships I checked their chassis/hp = a range between 54 - 60 cr an hp.

Just seems to me to be a bit cheap at 1 cr per hp.
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Mobile Repair Service

Post by Assailer »

I have alrady raised repair cost to 10Cr for player, and you get 20Cr per hull for NPC repairs. Player only pays for materials :)
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Mobile Repair Service

Post by Assailer »

1.05 - repair service will take orders from friendly NPC and charge them double cost. Repair cost can be edited in mobilerepairservice.xml file line 14: $credit_per_hull.Thanks TheEarl for the NPC idea!
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Mobile Repair Service

Post by Assailer »

Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Mobile Repair Service

Post by Assailer »

1.06 - added Russian translations. Thanks Alexalsp!

Return to “X4: Foundations - Scripts and Modding”