[FIX] Engineers repairing too slowly if no module is damaged

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

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

bm01
Posts: 421
Joined: Wed, 22. Jul 09, 22:31
x4

[FIX] Engineers repairing too slowly if no module is damaged

Post by bm01 » Mon, 23. Mar 15, 19:22

NO LONGER NEEDED SINCE 3.60

See http://forum.egosoft.com/viewtopic.php?t=378804 for a little more detailed explanation on that issue.

Here's the fix http://s000.tinyupload.com/index.php?fi ... 8157634705

Here's the code

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<diff xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <replace sel="//attention[@min='unknown']/actions/do_if[@value='not $CurrentElement.exists'][1]/@value">not $CurrentElement.exists and this.defensible.hullpercentage gt $hulldamagelimit</replace>
</diff>
Edited with UniTrader's suggestion.
Last edited by bm01 on Wed, 22. Jul 15, 17:49, edited 6 times in total.

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

Post by UniTrader » Mon, 23. Mar 15, 19:31

i doubt your solution will be accepted because the long wait is probably not to change the repair times but to save performance when not needed.

i think a better approach is to check if there are surface elements to repair (like currently) OR if there is Hull Damage the Engineer can repair..

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<diff xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <replace sel="//attention[@min='unknown']/actions/do_if[@value='not $CurrentElement.exists'][1]/@value">not $CurrentElement.exists and this.defensible.hullpercentage gt $hulldamagelimit</replace>
</diff>
EDIT: changes or to and - see next posts
Last edited by UniTrader on Mon, 23. Mar 15, 21:23, edited 1 time in total.
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 ;)

bm01
Posts: 421
Joined: Wed, 22. Jul 09, 22:31
x4

Post by bm01 » Mon, 23. Mar 15, 19:36

Oh you're right, my condition makes them quite... Active.
I'll replace it with yours (edit: except that "or" should be "and" I think :p).
I just wanted to propose a temporary fix for the players anyway, not really suggest one to Egosoft.

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Mon, 23. Mar 15, 21:04

Thanks!

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

Post by UniTrader » Mon, 23. Mar 15, 21:22

bm01 wrote:(edit: except that "or" should be "and" I think :p).
you got me there :oops: approched this with the condition where it should go fast and forgot to twist this one around..
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: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Mon, 23. Mar 15, 21:55

Seems to be a problem with the site. Clicking the download link downloads a 0 byte file called download.php

bm01
Posts: 421
Joined: Wed, 22. Jul 09, 22:31
x4

Post by bm01 » Mon, 23. Mar 15, 22:05

With the link actually, the dot messes it :D
Try this http://s000.tinyupload.com/index.php?fi ... 8157634705

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Mon, 23. Mar 15, 22:08

Got it now. Thanks!

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

Post by Rubini » Tue, 24. Mar 15, 00:37

Thanks by the fix!

longshooterman
Posts: 13
Joined: Sat, 13. Dec 14, 13:25

Post by longshooterman » Sun, 5. Apr 15, 15:41

when i try to remove this mod, i can't load my save game. It says that i disabled the mod. How do i remove it?

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

Post by UniTrader » Sun, 5. Apr 15, 15:45

that shouldnt be the case because content.xml says save="false" :wtf:

but just open your Savegame and look for the line <patch id="GBM01" /> or similiar and delete the whole line..
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 ;)

bm01
Posts: 421
Joined: Wed, 22. Jul 09, 22:31
x4

Post by bm01 » Sun, 5. Apr 15, 15:55

As UniTrader said. Don't open it with notepad though, it doesn't handle large files well. Wordpad is a viable alternative.
Anyway, that can't be caused by this mod. Are you sure you haven't inadvertently removed another one? Are you sure it's really the same mod (there's only one link and it's on this topic)?
If that line is present in your save, it means that X Rebirth didn't read the contents.xml file properly (unlikely, I've never seen this happening) or that it was edited after you've downloaded it.

longshooterman
Posts: 13
Joined: Sat, 13. Dec 14, 13:25

Post by longshooterman » Sun, 5. Apr 15, 16:54

lol im so stupid haha. I changed the save = false to true cuz i thought the mod wasn't working :(((

bm01
Posts: 421
Joined: Wed, 22. Jul 09, 22:31
x4

Post by bm01 » Sun, 5. Apr 15, 16:57

Get one of your ship to 10% hull (without destroying any component) and let it repair, then install the mod and see the difference it makes. About a few hours in the end :D

longshooterman
Posts: 13
Joined: Sat, 13. Dec 14, 13:25

Post by longshooterman » Sun, 5. Apr 15, 18:17

Oh no even if i changed the "save = true" back to false the game still says that the mod is disabled or missing and i cant load the save :O

Post Reply

Return to “X Rebirth - Scripts and Modding”