[Question] AI rebuild key stantions (Wharfs, Shipyards)

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

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

catarix
Posts: 11
Joined: Tue, 12. Oct 10, 21:54
x4

[Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by catarix »

Does AI rebuild destroyed wharfs, shipyards? i destroyed a wharf and was waiting a day (a few hours in Seta) to check it. nothing happened. if yes could someone tell me where is the code for rebuild procedure?
aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by aftokinito »

No, both the AI and the player can only build using the "factory" buildset. All the stations that don't use that buildset are built by the god engine when the universe is generated. God spawned stations are supposed to be damageable but indestructible, so something weird definitely happened in your save.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by BlackRain »

carmaster wrote: Wed, 2. Jan 19, 10:12 No, both the AI and the player can only build using the "factory" buildset. All the stations that don't use that buildset are built by the god engine when the universe is generated. God spawned stations are supposed to be damageable but indestructible, so something weird definitely happened in your save.
Why do you say they are indestructible? I dont have the files in front of me but whether a station is indestructible or not should be in the macro file. As far as I know the only stations that are indestructible are khaak stations and the buildstorage. If you could point me to where you saw that I would appreciate it
catarix
Posts: 11
Joined: Tue, 12. Oct 10, 21:54
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by catarix »

carmaster wrote: Wed, 2. Jan 19, 10:12 No, both the AI and the player can only build using the "factory" buildset. All the stations that don't use that buildset are built by the god engine when the universe is generated. God spawned stations are supposed to be damageable but indestructible, so something weird definitely happened in your save.
i checked all files for "invulnerable". invulnerable can be asteroids, gates, debris, HQ etc. wharf and shipyard are not in the list. i destroyed wharfs and shipyards many times in vanilla.
aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by aftokinito »

BlackRain wrote: Wed, 2. Jan 19, 12:57
carmaster wrote: Wed, 2. Jan 19, 10:12 No, both the AI and the player can only build using the "factory" buildset. All the stations that don't use that buildset are built by the god engine when the universe is generated. God spawned stations are supposed to be damageable but indestructible, so something weird definitely happened in your save.
Why do you say they are indestructible? I dont have the files in front of me but whether a station is indestructible or not should be in the macro file. As far as I know the only stations that are indestructible are khaak stations and the buildstorage. If you could point me to where you saw that I would appreciate it
It's the same in Rebirth, the god system only creates indestructible but damageable stations.
The problem is that, unlike in Rebirth, in X4 the base macro that is of class "station" is an invisible one that just determines the buildset so you can visually destroy the whole station and it will still exist and be repairable.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by BlackRain »

carmaster wrote: Wed, 2. Jan 19, 15:27
BlackRain wrote: Wed, 2. Jan 19, 12:57
carmaster wrote: Wed, 2. Jan 19, 10:12 No, both the AI and the player can only build using the "factory" buildset. All the stations that don't use that buildset are built by the god engine when the universe is generated. God spawned stations are supposed to be damageable but indestructible, so something weird definitely happened in your save.
Why do you say they are indestructible? I dont have the files in front of me but whether a station is indestructible or not should be in the macro file. As far as I know the only stations that are indestructible are khaak stations and the buildstorage. If you could point me to where you saw that I would appreciate it
It's the same in Rebirth, the god system only creates indestructible but damageable stations.
The problem is that, unlike in Rebirth, in X4 the base macro that is of class "station" is an invisible one that just determines the buildset so you can visually destroy the whole station and it will still exist and be repairable.
That is not my understanding of it at all. I even specifically asked before if every station was destroyable and was told that only Khaak stations were incapable of being destroyed. I haven't tested this out fully yet so I am not saying you are wrong, but according to the other poster, he has destroyed shipyards and wharfs in his game. I know for certain that the Teladi trading posts (which are god spawned and landmark stations which can't be built) can also be destroyed because I witnessed that in game. So I am skeptical of what you are saying.
aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by aftokinito »

BlackRain wrote: Wed, 2. Jan 19, 18:11
carmaster wrote: Wed, 2. Jan 19, 15:27
BlackRain wrote: Wed, 2. Jan 19, 12:57

Why do you say they are indestructible? I dont have the files in front of me but whether a station is indestructible or not should be in the macro file. As far as I know the only stations that are indestructible are khaak stations and the buildstorage. If you could point me to where you saw that I would appreciate it
It's the same in Rebirth, the god system only creates indestructible but damageable stations.
The problem is that, unlike in Rebirth, in X4 the base macro that is of class "station" is an invisible one that just determines the buildset so you can visually destroy the whole station and it will still exist and be repairable.
That is not my understanding of it at all. I even specifically asked before if every station was destroyable and was told that only Khaak stations were incapable of being destroyed. I haven't tested this out fully yet so I am not saying you are wrong, but according to the other poster, he has destroyed shipyards and wharfs in his game. I know for certain that the Teladi trading posts (which are god spawned and landmark stations which can't be built) can also be destroyed because I witnessed that in game. So I am skeptical of what you are saying.
Trade stations are not landmarks, they have a normal base macro, what are landmarks are some of the station modules and they are only landmarks because Egosoft was too lazy to give them snap connectors.
The Kha'ak hive is exactly the same as the aqueduct, a static landmark with no base station macro.

Any object in the game that uses any of the following macros as base is NOT a landmark and therefore will have the behaviour I mentioned: assets\structures\macros
The station will visually be destroyed but if you save and then open the save in any text editor, you will see that the station has not been removed at all, the base macro is still there and the AI would eventually rebuild it like in Rebirth if it wasn't because the AI in X4 is r******* and cannot find a path to the invisible macro that has no physics collider.
cole2839
Posts: 108
Joined: Tue, 4. Dec 18, 01:43
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by cole2839 »

I've destroyed many stations and a Xenon Warf. So stations are not indestructible. The build storage is indestructible and is causing problems. Also some Kha'ak instllations are indestructible.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by BlackRain »

carmaster wrote: Wed, 2. Jan 19, 23:09
BlackRain wrote: Wed, 2. Jan 19, 18:11
carmaster wrote: Wed, 2. Jan 19, 15:27

It's the same in Rebirth, the god system only creates indestructible but damageable stations.
The problem is that, unlike in Rebirth, in X4 the base macro that is of class "station" is an invisible one that just determines the buildset so you can visually destroy the whole station and it will still exist and be repairable.
That is not my understanding of it at all. I even specifically asked before if every station was destroyable and was told that only Khaak stations were incapable of being destroyed. I haven't tested this out fully yet so I am not saying you are wrong, but according to the other poster, he has destroyed shipyards and wharfs in his game. I know for certain that the Teladi trading posts (which are god spawned and landmark stations which can't be built) can also be destroyed because I witnessed that in game. So I am skeptical of what you are saying.
Trade stations are not landmarks, they have a normal base macro, what are landmarks are some of the station modules and they are only landmarks because Egosoft was too lazy to give them snap connectors.
The Kha'ak hive is exactly the same as the aqueduct, a static landmark with no base station macro.

Any object in the game that uses any of the following macros as base is NOT a landmark and therefore will have the behaviour I mentioned: assets\structures\macros
The station will visually be destroyed but if you save and then open the save in any text editor, you will see that the station has not been removed at all, the base macro is still there and the AI would eventually rebuild it like in Rebirth if it wasn't because the AI in X4 is r******* and cannot find a path to the invisible macro that has no physics collider.
I will look into those files then and see what I can find. I really don't understand why they would do this if that is the case.
aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by aftokinito »

BlackRain wrote: Thu, 3. Jan 19, 02:03
carmaster wrote: Wed, 2. Jan 19, 23:09
BlackRain wrote: Wed, 2. Jan 19, 18:11

That is not my understanding of it at all. I even specifically asked before if every station was destroyable and was told that only Khaak stations were incapable of being destroyed. I haven't tested this out fully yet so I am not saying you are wrong, but according to the other poster, he has destroyed shipyards and wharfs in his game. I know for certain that the Teladi trading posts (which are god spawned and landmark stations which can't be built) can also be destroyed because I witnessed that in game. So I am skeptical of what you are saying.
Trade stations are not landmarks, they have a normal base macro, what are landmarks are some of the station modules and they are only landmarks because Egosoft was too lazy to give them snap connectors.
The Kha'ak hive is exactly the same as the aqueduct, a static landmark with no base station macro.

Any object in the game that uses any of the following macros as base is NOT a landmark and therefore will have the behaviour I mentioned: assets\structures\macros
The station will visually be destroyed but if you save and then open the save in any text editor, you will see that the station has not been removed at all, the base macro is still there and the AI would eventually rebuild it like in Rebirth if it wasn't because the AI in X4 is r******* and cannot find a path to the invisible macro that has no physics collider.
I will look into those files then and see what I can find. I really don't understand why they would do this if that is the case.
The god system is a literal copy and paste from Rebirth and in Rebirth, stations were supposed to work like this.
Please, do keep in mind that the station will visually disappear, it's not like in Rebirth where station modules remain in a wrecked state forever. In X4 the modules can be destroyed, the only thing that cannot be destroyed is the base module of the station, which for god spawned stations is not deleted when the last module of the station dies.
cole2839 wrote: Wed, 2. Jan 19, 23:59 I've destroyed many stations and a Xenon Warf. So stations are not indestructible. The build storage is indestructible and is causing problems. Also some Kha'ak instllations are indestructible.
Sorry if I sound a bit of an asshole but you do not seem to know the difference between god spawned stations and stations built by the faction logic after the game has started so this thread does not seem to be for you.
cole2839
Posts: 108
Joined: Tue, 4. Dec 18, 01:43
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by cole2839 »

Pretty sure the Xenon warf I destroyed was spawned when the game started by the "god" engine. So they are destroyable. Nothing weird going on.
aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by aftokinito »

cole2839 wrote: Fri, 4. Jan 19, 14:51 Pretty sure the Xenon warf I destroyed was spawned when the game started by the "god" engine. So they are destroyable. Nothing weird going on.
Pretty sure you haven't read my previous explanation on how non landmark stations work.
The Xenon Shipyard is not a landmark, it's a normal station using the "xenon_shipyard" buildset.
cole2839
Posts: 108
Joined: Tue, 4. Dec 18, 01:43
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by cole2839 »

carmaster wrote: Fri, 4. Jan 19, 17:06
cole2839 wrote: Fri, 4. Jan 19, 14:51 Pretty sure the Xenon warf I destroyed was spawned when the game started by the "god" engine. So they are destroyable. Nothing weird going on.
Pretty sure you haven't read my previous explanation on how non landmark stations work.
The Xenon Shipyard is not a landmark, it's a normal station using the "xenon_shipyard" buildset.
Well since the OP asked about WARFS and SHIPYARDS then they aren't indestructible. The only indestructible bases are some Kha'ak installations and build storage modules. I've seen every other type of station be destroyed, either directly by me or by streamers.

I'll believe my own eyes over what you think "should" happen.
aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by aftokinito »

cole2839 wrote: Fri, 4. Jan 19, 17:14
carmaster wrote: Fri, 4. Jan 19, 17:06
cole2839 wrote: Fri, 4. Jan 19, 14:51 Pretty sure the Xenon warf I destroyed was spawned when the game started by the "god" engine. So they are destroyable. Nothing weird going on.
Pretty sure you haven't read my previous explanation on how non landmark stations work.
The Xenon Shipyard is not a landmark, it's a normal station using the "xenon_shipyard" buildset.
Well since the OP asked about WARFS and SHIPYARDS then they aren't indestructible. The only indestructible bases are some Kha'ak installations and build storage modules. I've seen every other type of station be destroyed, either directly by me or by streamers.

I'll believe my own eyes over what you think "should" happen.
How much time have you been working with the Rebirth engine, you say?
Because I'm quite sure I've put 100 more times effort and time into the engine to know how it works.

And you don't even have to take my word for it, note down where the station was and its name, save your game after destroying the station and then open the save file in a text editor and look for it. The station will still be there without modules, just the base macro (WHICH IS REPAIRABLE BY THE AI).
cole2839
Posts: 108
Joined: Tue, 4. Dec 18, 01:43
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by cole2839 »

carmaster wrote: Fri, 4. Jan 19, 17:16
cole2839 wrote: Fri, 4. Jan 19, 17:14
carmaster wrote: Fri, 4. Jan 19, 17:06

Pretty sure you haven't read my previous explanation on how non landmark stations work.
The Xenon Shipyard is not a landmark, it's a normal station using the "xenon_shipyard" buildset.
Well since the OP asked about WARFS and SHIPYARDS then they aren't indestructible. The only indestructible bases are some Kha'ak installations and build storage modules. I've seen every other type of station be destroyed, either directly by me or by streamers.

I'll believe my own eyes over what you think "should" happen.
How much time have you been working with the Rebirth engine, you say?
Because I'm quite sure I've put 100 more times effort and time into the engine to know how it works.

And you don't even have to take my word for it, note down where the station was and its name, save your game after destroying the station and then open the save file in a text editor and look for it. The station will still be there without modules, just the base macro (WHICH IS REPAIRABLE BY THE AI).
I don't care how long you worked with it. I've SEEN every type of station be destroyed besides the Kha'ak installations.

The reason the base is repairable is because the BUILD STORAGE is indestructible. Even defense platforms will come back because of this. If you mod the game to make the build storage destroyable the stations WILL NOT come back.
aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by aftokinito »

cole2839 wrote: Fri, 4. Jan 19, 17:20
carmaster wrote: Fri, 4. Jan 19, 17:16
cole2839 wrote: Fri, 4. Jan 19, 17:14

Well since the OP asked about WARFS and SHIPYARDS then they aren't indestructible. The only indestructible bases are some Kha'ak installations and build storage modules. I've seen every other type of station be destroyed, either directly by me or by streamers.

I'll believe my own eyes over what you think "should" happen.
How much time have you been working with the Rebirth engine, you say?
Because I'm quite sure I've put 100 more times effort and time into the engine to know how it works.

And you don't even have to take my word for it, note down where the station was and its name, save your game after destroying the station and then open the save file in a text editor and look for it. The station will still be there without modules, just the base macro (WHICH IS REPAIRABLE BY THE AI).
I don't care how long you worked with it. I've SEEN every type of station be destroyed besides the Kha'ak installations.

The reason the base is repairable is because the BUILD STORAGE is indestructible. Even defense platforms will come back because of this. If you mod the game to make the build storage destroyable the stations WILL NOT come back.
The build storage is a child macro connected to the base macro of the station but having a build storage is not a requirement for the station to exist. It's no different from destroying the engines of a ship, it doesn't destroy the macro the subsystem is connected to. The same applies to station, nothing you do will remove the base macro from where it was, making it repairable by the AI even without a buildstorage (the AI just spawns a new one).
cole2839
Posts: 108
Joined: Tue, 4. Dec 18, 01:43
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by cole2839 »

carmaster wrote: Fri, 4. Jan 19, 17:29
cole2839 wrote: Fri, 4. Jan 19, 17:20
carmaster wrote: Fri, 4. Jan 19, 17:16

How much time have you been working with the Rebirth engine, you say?
Because I'm quite sure I've put 100 more times effort and time into the engine to know how it works.

And you don't even have to take my word for it, note down where the station was and its name, save your game after destroying the station and then open the save file in a text editor and look for it. The station will still be there without modules, just the base macro (WHICH IS REPAIRABLE BY THE AI).
I don't care how long you worked with it. I've SEEN every type of station be destroyed besides the Kha'ak installations.

The reason the base is repairable is because the BUILD STORAGE is indestructible. Even defense platforms will come back because of this. If you mod the game to make the build storage destroyable the stations WILL NOT come back.
The build storage is a child macro connected to the base macro of the station but having a build storage is not a requirement for the station to exist. It's no different from destroying the engines of a ship, it doesn't destroy the macro the subsystem is connected to. The same applies to station, nothing you do will remove the base macro from where it was, making it repairable by the AI even without a buildstorage (the AI just spawns a new one).
Pretty sure killing the build storage stops the stations from coming back since I've done so and the stations don't come back hundreds of hours later. Before the build storage was destroyed the station would come back minutes later.
aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by aftokinito »

cole2839 wrote: Fri, 4. Jan 19, 17:31
carmaster wrote: Fri, 4. Jan 19, 17:29
cole2839 wrote: Fri, 4. Jan 19, 17:20

I don't care how long you worked with it. I've SEEN every type of station be destroyed besides the Kha'ak installations.

The reason the base is repairable is because the BUILD STORAGE is indestructible. Even defense platforms will come back because of this. If you mod the game to make the build storage destroyable the stations WILL NOT come back.
The build storage is a child macro connected to the base macro of the station but having a build storage is not a requirement for the station to exist. It's no different from destroying the engines of a ship, it doesn't destroy the macro the subsystem is connected to. The same applies to station, nothing you do will remove the base macro from where it was, making it repairable by the AI even without a buildstorage (the AI just spawns a new one).
Pretty sure killing the build storage stops the stations from coming back since I've done so and the stations don't come back hundreds of hours later. Before the build storage was destroyed the station would come back minutes later.
That's because the AI pathfinding gets completely messed up when trying to approach a macro with no physics collider, it has nothing to do with whether the station is repairable or not.
cole2839
Posts: 108
Joined: Tue, 4. Dec 18, 01:43
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by cole2839 »

carmaster wrote: Fri, 4. Jan 19, 17:37
cole2839 wrote: Fri, 4. Jan 19, 17:31
carmaster wrote: Fri, 4. Jan 19, 17:29

The build storage is a child macro connected to the base macro of the station but having a build storage is not a requirement for the station to exist. It's no different from destroying the engines of a ship, it doesn't destroy the macro the subsystem is connected to. The same applies to station, nothing you do will remove the base macro from where it was, making it repairable by the AI even without a buildstorage (the AI just spawns a new one).
Pretty sure killing the build storage stops the stations from coming back since I've done so and the stations don't come back hundreds of hours later. Before the build storage was destroyed the station would come back minutes later.
That's because the AI pathfinding gets completely messed up when trying to approach a macro with no physics collider, it has nothing to do with whether the station is repairable or not.
The result is the same. The station doesn't come back, ever...
aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [Question] AI rebuild key stantions (Wharfs, Shipyards)

Post by aftokinito »

cole2839 wrote: Fri, 4. Jan 19, 17:39
carmaster wrote: Fri, 4. Jan 19, 17:37
cole2839 wrote: Fri, 4. Jan 19, 17:31

Pretty sure killing the build storage stops the stations from coming back since I've done so and the stations don't come back hundreds of hours later. Before the build storage was destroyed the station would come back minutes later.
That's because the AI pathfinding gets completely messed up when trying to approach a macro with no physics collider, it has nothing to do with whether the station is repairable or not.
The result is the same. The station doesn't come back, ever...
The result is NOT the same because the moment they fix the pathfinding, the stations WILL be repaired.

Return to “X4: Foundations - Scripts and Modding”