Any way to remove broken station?

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

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

ScandyNav
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
x4

Any way to remove broken station?

Post by ScandyNav » Fri, 17. Jun 22, 20:56

It looks like new compactor ship from DLC can break some ingame mechanics.
ANT shipyard was destroyed and my compactor rushed to deal with this shipyard wreck. Maybe something had happened in the process, but after it finished his work with this wreck, this shipyard become a some kind of ghost.
This wreck do not want to disappear completely. And it looks like the game counts this wreck as a existing shipyard and because of this ANT do not want to start building a new shipyard.

I've tried to delete this wreck with cheat mod, but it did not detect this object as a station. You cant even target this wreck.
So, the question is: is there any way to delete this broken wreck-ghost-station? Maybe some kind of save editor?

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

Re: Any way to remove broken station?

Post by euclid » Tue, 28. Jun 22, 18:07

ScandyNav wrote:
Fri, 17. Jun 22, 20:56
It looks like new compactor ship from DLC can break some ingame mechanics.
ANT shipyard was destroyed and my compactor rushed to deal with this shipyard wreck. Maybe something had happened in the process, but after it finished his work with this wreck, this shipyard become a some kind of ghost.
This wreck do not want to disappear completely. And it looks like the game counts this wreck as a existing shipyard and because of this ANT do not want to start building a new shipyard.
If this happens in an unmodded game then you should report it, preferably with a link to an uploaded saved game.
I've tried to delete this wreck with cheat mod, but it did not detect this object as a station. You cant even target this wreck.
So, the question is: is there any way to delete this broken wreck-ghost-station? Maybe some kind of save editor?
If the remains can be detected via any script command then it can be removed. I do not recommend to edit your saved game as it may cause more problems.

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

ScandyNav
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Any way to remove broken station?

Post by ScandyNav » Tue, 28. Jun 22, 20:27

euclid wrote:
Tue, 28. Jun 22, 18:07
ScandyNav wrote:
Fri, 17. Jun 22, 20:56
It looks like new compactor ship from DLC can break some ingame mechanics.
ANT shipyard was destroyed and my compactor rushed to deal with this shipyard wreck. Maybe something had happened in the process, but after it finished his work with this wreck, this shipyard become a some kind of ghost.
This wreck do not want to disappear completely. And it looks like the game counts this wreck as a existing shipyard and because of this ANT do not want to start building a new shipyard.
If this happens in an unmodded game then you should report it, preferably with a link to an uploaded saved game.
The game is modded, so i cannot report this properly. But, i don't think that any of my mods have something to do with changing how compactor work and how it affects the wrecks despawn.
euclid wrote:
Tue, 28. Jun 22, 18:07
I've tried to delete this wreck with cheat mod, but it did not detect this object as a station. You cant even target this wreck.
So, the question is: is there any way to delete this broken wreck-ghost-station? Maybe some kind of save editor?
If the remains can be detected via any script command then it can be removed. I do not recommend to edit your saved game as it may cause more problems.

Cheers Euclid
Detected? So, if cheat mod (this is a script?) cannot detect/select this ghost object, than there is no way to remove it? This object(ghost station) can be used as guidance for autopilot, can be used as camera point of view and most interesting it has "Logical View", "Mark as hostile" and "Information" strings in right click menu.
Wrecks, which was not touched by compactor doesn't have such strings and despawn quite fast.

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

Re: Any way to remove broken station?

Post by euclid » Tue, 28. Jun 22, 20:53

ScandyNav wrote:
Tue, 28. Jun 22, 20:27
............. This object(ghost station) can be used as guidance for autopilot ..........
Then it is possible to get the object via <event_object_signalled object="player.entity" param="'set guidance'" /> in which case event.param2 is the object.

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

ScandyNav
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Any way to remove broken station?

Post by ScandyNav » Wed, 29. Jun 22, 12:39

euclid wrote:
Tue, 28. Jun 22, 20:53
ScandyNav wrote:
Tue, 28. Jun 22, 20:27
............. This object(ghost station) can be used as guidance for autopilot ..........
Then it is possible to get the object via <event_object_signalled object="player.entity" param="'set guidance'" /> in which case event.param2 is the object.

Cheers Euclid
Now i should understand how to use it. :gruebel:

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: Any way to remove broken station?

Post by alexalsp » Wed, 29. Jun 22, 14:04

Save near the station and give the save file.

Also put all the mods you use in the archive along with the save file.

ScandyNav
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Any way to remove broken station?

Post by ScandyNav » Wed, 29. Jun 22, 15:39

alexalsp wrote:
Wed, 29. Jun 22, 14:04
Save near the station and give the save file.

Also put all the mods you use in the archive along with the save file.
2.7 Gb in 58 mods :mrgreen: : https://www.dropbox.com/s/91rsyojlekzfp ... s.rar?dl=0
Save: https://drive.google.com/file/d/1F0qPxY ... sp=sharing

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: Any way to remove broken station?

Post by alexalsp » Wed, 29. Jun 22, 16:35

What is the language of the game?

If the station stood out, it would be easier. Perhaps the station will disappear after a while. If not, then the option is to somehow edit the save file. But the file may not open, it's too big.

You should sort out the mods, disable those that are old and may not work correctly with the new version of the game. And start a new game.

ScandyNav
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Any way to remove broken station?

Post by ScandyNav » Wed, 29. Jun 22, 17:54

alexalsp wrote:
Wed, 29. Jun 22, 16:35
What is the language of the game?
EN - 44
alexalsp wrote:
Wed, 29. Jun 22, 16:35
Perhaps the station will disappear after a while.
It's in this state for more than 24h.
alexalsp wrote:
Wed, 29. Jun 22, 16:35
You should sort out the mods, disable those that are old and may not work correctly with the new version of the game.
All of these old mods are small cosmetic ones, such as disable chair sound, increase LOD, or skins. Plus couple of DeadAir Jobs and Ware, which he said should work properly with 5.10.

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

Re: Any way to remove broken station?

Post by euclid » Wed, 29. Jun 22, 20:35

ScandyNav wrote:
Wed, 29. Jun 22, 12:39
euclid wrote:
Tue, 28. Jun 22, 20:53
ScandyNav wrote:
Tue, 28. Jun 22, 20:27
............. This object(ghost station) can be used as guidance for autopilot ..........
Then it is possible to get the object via <event_object_signalled object="player.entity" param="'set guidance'" /> in which case event.param2 is the object.

Cheers Euclid
Now i should understand how to use it. :gruebel:
Tricky if you do not have some experience in xml scripting. Here is a quick (and dirty) MD script that should do the job BUT be very careful, save your game (backup)! It does not do any sanity checks (meaning you might destroy something else!). Place the script in an md folder of any of your mods, start the game, set guidance to the "ghost station" and it should be gone. Save (new save!!) your game, exit and remove the script. Load your recent saved game and check if it's really gone. If not then load the backup saved game.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<mdscript name="DestroyGuidanceTarget" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
 <cues>
     <cue name="DestroyGuidanceTargetTrigger" instantiate="true" namespace="this">
		<conditions>
			 <event_object_signalled object="player.entity" param="'set guidance'" />
		</conditions>
		<actions>
			<do_if value="@event.param2.{1}">
                             <do_if value="not event.param2.{1}.isclass.zone">
                                 <destroy_object object="event.param2.{1}"/>
                             </do_if>
                        </do_if>
                 </actions>
     </cue>
 </cues>
</mdscript>
I have no time to test it. Please let me know if it works.

Cheers Euclid

Edit1: Typo in code corrected.E.
Edit2: *sigh* another typo corrected.E.
"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

ScandyNav
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Any way to remove broken station?

Post by ScandyNav » Wed, 29. Jun 22, 22:44

euclid wrote:
Wed, 29. Jun 22, 20:35
I have no time to test it. Please let me know if it works.

Cheers Euclid
No, it didn't work. I've created new xml file in random mod/md folder. Copied these string there.
This mod is active. I've started a guidance to this wreck.
But it cannot delete this broken wreck and even any other station too.

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

Re: Any way to remove broken station?

Post by euclid » Wed, 29. Jun 22, 23:29

ScandyNav wrote:
Wed, 29. Jun 22, 22:44
euclid wrote:
Wed, 29. Jun 22, 20:35
I have no time to test it. Please let me know if it works.

Cheers Euclid
.............. I've created new xml file in random mod/md folder..........
Did you name the file DestroyGuidanceTarget.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

ScandyNav
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Any way to remove broken station?

Post by ScandyNav » Thu, 30. Jun 22, 00:03

euclid wrote:
Wed, 29. Jun 22, 23:29
ScandyNav wrote:
Wed, 29. Jun 22, 22:44
euclid wrote:
Wed, 29. Jun 22, 20:35
I have no time to test it. Please let me know if it works.

Cheers Euclid
.............. I've created new xml file in random mod/md folder..........
Did you name the file DestroyGuidanceTarget.xml ?

Cheers Euclid
No, at first not. But now i've renamed it and the result is the same: stations, which i choose as guidance, not become destroyed, any station. Nothing is happening with this bugged wreck.

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: Any way to remove broken station?

Post by alexalsp » Sat, 2. Jul 22, 09:34

Not sure but maybe this mod will help

viewtopic.php?f=181&t=421227

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

Re: Any way to remove broken station?

Post by euclid » Sat, 2. Jul 22, 14:30

ScandyNav wrote:
Thu, 30. Jun 22, 00:03
euclid wrote:
Wed, 29. Jun 22, 23:29
ScandyNav wrote:
Wed, 29. Jun 22, 22:44

.............. I've created new xml file in random mod/md folder..........
Did you name the file DestroyGuidanceTarget.xml ?

Cheers Euclid
No, at first not. But now i've renamed it and the result is the same: stations, which i choose as guidance, not become destroyed, any station. Nothing is happening with this bugged wreck.
Sorry, there was a typo in the code (now corrected). Originally it was

Code: Select all

<cue name="DestroyGiudanceTargetTrigger" instantiate="true" namespace="this">
but it (obvious now) should read

Code: Select all

<cue name="DestroyGuidanceTargetTrigger" instantiate="true" namespace="this">
Please try again.

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

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: Any way to remove broken station?

Post by alexalsp » Sat, 2. Jul 22, 18:35

euclid wrote:
Sat, 2. Jul 22, 14:30
ScandyNav wrote:
Thu, 30. Jun 22, 00:03
euclid wrote:
Wed, 29. Jun 22, 23:29

Did you name the file DestroyGuidanceTarget.xml ?

Cheers Euclid
No, at first not. But now i've renamed it and the result is the same: stations, which i choose as guidance, not become destroyed, any station. Nothing is happening with this bugged wreck.
Sorry, there was a typo in the code (now corrected). Originally it was

Code: Select all

<cue name="DestroyGiudanceTargetTrigger" instantiate="true" namespace="this">
but it (obvious now) should read

Code: Select all

<cue name="DestroyGuidanceTargetTrigger" instantiate="true" namespace="this">
Please try again.

Cheers Euclid
Does not work.

Code: Select all

[=ERROR=] 1760084.47 Error in MD cue md.DestroyGuidanceTarget.DestroyGuidanceTargetTrigger<inst:1f04ab>: Property lookup failed: event.parameter2
* Expression: event.parameter2.{1}
* Action: <destroy_object>, line 11
[General] 1760084.47 ======================================
[General] 1760084.47 ======================================
[=ERROR=] 1760084.47 Error in MD cue md.DestroyGuidanceTarget.DestroyGuidanceTargetTrigger<inst:1f04ab>: Evaluated value 'null' is not of type component
* Expression: event.parameter2.{1}
* Action: <destroy_object>, line 11
[General] 1760084.47 ======================================


User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: Any way to remove broken station?

Post by alexalsp » Sat, 2. Jul 22, 18:48

ScandyNav wrote:
Wed, 29. Jun 22, 17:54
All of these old mods are small cosmetic ones, such as disable chair sound, increase LOD, or skins. Plus couple of DeadAir Jobs and Ware, which he said should work properly with 5.10.

There are a lot of errors in the log.

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

Re: Any way to remove broken station?

Post by euclid » Sat, 2. Jul 22, 19:07

Thanks alexalsp, I'll look into it ;-)

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

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

Re: Any way to remove broken station?

Post by euclid » Sat, 2. Jul 22, 19:37

Another typo

Code: Select all

<destroy_object object="event.param2.{1}"/>
sorry :oops:

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

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: Any way to remove broken station?

Post by alexalsp » Sat, 2. Jul 22, 22:07

euclid wrote:
Sat, 2. Jul 22, 19:37
Another typo

Code: Select all

<destroy_object object="event.param2.{1}"/>
sorry :oops:

Cheers Euclid
The station has been removed.
ScandyNav wrote:
Wed, 29. Jun 22, 17:54
DestroyGuidanceTarget.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<mdscript name="DestroyGuidanceTarget" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
 <cues>
     <cue name="DestroyGuidanceTargetTrigger" instantiate="true" namespace="this">
		<conditions>
			 <event_object_signalled object="player.entity" param="'set guidance'" />
		</conditions>
		<actions>
			<do_if value="@event.param2.{1}">
                             <do_if value="not event.param2.{1}.isclass.zone">
								 <destroy_object object="event.param2.{1}"/>
                             </do_if>
                        </do_if>
                 </actions>
     </cue>
 </cues>
</mdscript>

1) Just in case, cancel the laid route.
2) If the route is not laid, save the script and load the game.
3) Set the guidance to the station from the map, it will be deleted.
4) Save the game and delete the script.
5) Load up the game.

Save File


Say thanks to Euclid...

:D

Post Reply

Return to “X4: Foundations - Scripts and Modding”