[WIP] X Rebirth: The New Frontier

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

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

Vectorial1024
Posts: 224
Joined: Mon, 30. Jul 18, 04:16
x4

Post by Vectorial1024 » Sat, 25. Aug 18, 18:43

Ah, it's fine. That's how comments should be made - fully objective. It's OK.

The main idea that I am adding a lot of watching and signals is that I hope to bring back the "old behavior of station destruction" - if I remember correctly, in the old CWIR, a station is removed when it is "fully destroyed".

I plan to check if all the destructible station parts are destroyed. If that is true, then the station is "fully destroyed". Since this would probably take quite some CPU power, it will be done at a regular interval, just like in my submitted code.

Now that you have briefly read my code, I will take some time to focus the code and re-submit another pull request.

It seems I have a tendency to submit half-working prototypes too early :lol: but at least I can make sure the direction is right before I commit to it.
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

User avatar
Marvin Martian
Posts: 3547
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Sat, 25. Aug 18, 19:42

But this is not intendet to work that way
Cwir deleted station simply directly after destruction
It is not so logical ships stay wrecked and stations disapear immediatly

—-

You may welcome to create alternitive code who allow to handle partial destruction of stations (buildsteps >A0) as opt-in
Wrecks of disabled basemodules should stay a couple of hours and then get removed
But that should be smart and efficient not such an firework of calls please

aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Post by aftokinito » Sun, 26. Aug 18, 02:19

Is there any way to set the price of the items produced at building modules? Specifically, is there any way to set the prices of L/XL ships on player built shipyards?
I know how to do it for small ships since those count as wares but bigger ships count as buildings.

It is a bit weird that I have to pay 50M for a ship on my own shipyard that has all the items already.

User avatar
Marvin Martian
Posts: 3547
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Sun, 26. Aug 18, 09:17

isn't the price of the ship calculated based on actual price level of buy wares?

to skip pricing at order process i think you need to change UI-lua files

in may opinion it make sense to pay for ships you order, because trader need to buy new wares afterwards - if he earn more money then required you will get it anyway back, otherwise you can grab money of his account

if you want to make it cheaper (or 0), you may edit trade.shipyard (for queue-orders) or npc_shipdealer_pl - but this won't prevent UI to block your request in case you have not enough money

Trup2
Posts: 35
Joined: Wed, 5. Nov 14, 20:49
x4

Post by Trup2 » Mon, 27. Aug 18, 13:13

Catch some kind of bug i think.

when sratring new game as a company, game began to freeze after 20 min.

Any other game start running smooth...were can be a problem can't even imagine =)

Without NF mod everything run smooth.

User avatar
Marvin Martian
Posts: 3547
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Mon, 27. Aug 18, 13:26

new game as a company, game began to freeze after 20 min
what gamestart exactly, is it reproduceable with maybe a savegame you can provide

Trup2
Posts: 35
Joined: Wed, 5. Nov 14, 20:49
x4

Post by Trup2 » Mon, 27. Aug 18, 14:46

Freeze in game start with Plot

Found problem, it was in config on max vision distance.

Somehow the plot start are much more CPU heavy, so game was freezing

User avatar
Marvin Martian
Posts: 3547
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Tue, 28. Aug 18, 12:53

ok take a check, seems like the game can't deal with closed/inactive Gates - this results into loops in movement scripts

Kaplan
Posts: 14
Joined: Mon, 23. Feb 04, 09:34
x4

Post by Kaplan » Wed, 29. Aug 18, 10:49

Greetings,
great Mod so far i have tested and i have some questions.

1. have build all Stations via Company, but when i attach a CV to this station, becuse of some missing weapons build, they get to the first build stage. Is this a bug?
2. some Stations like the weapon Manuf have problems with the buildung of weaponparts, because of Cargo Spacehold.
3.how to rename an emty zone. I know i have rename it by clicking on the zone tab, but the rename button dont appaer.
4. Some Manager says the station range not far enough, but the radar is fully build. Sations like Trade Station and Schipdock Sation.
5. I KV(hereticvangurds) i have wipe out the Xenons at Mealstrom complettly and i bordet all Xenonstations, also the Aqueduct, lol, but now the sektor map dont show me the Highway anymore.

Installed Mods:
1. fly by loot
2. fly by lootbox
3. fly by Infoscan
4. NPCs on your Sations
5. capital Ship Bridge 4.30
6. Improved Object Menu
7. No Mouse steer in Highways
8. Erkundungssoftware
9. Radio Silence
10. show Skills
11. shut up Ren
12. Side bar extender
13. silence you all
14. STB2199 Reload Weapons
15. STB2199 x_Rep
16. STB2199 Replace Ships
17. UT CaC Erweiterung, Erweitertes Umbenennen
18. Virtual_Seminar
:oops:
so far i can play, only the Sation build seems a problem, when i fly with
Station Scan some Cargeholds are black, some cargo conected inside another Cargo.

Thanks :wink: !

Vectorial1024
Posts: 224
Joined: Mon, 30. Jul 18, 04:16
x4

Post by Vectorial1024 » Thu, 30. Aug 18, 05:13

Just to clarify as a X-Rebirth player, you have to find your station to rename your zone.

Open up the details menu of the station that you built inside the empty zone. (Do this by either through Main Menu -> 2 -> 2 -> Station, or by Map -> Zone -> Station) Click on the station location row. There should be a "rename zone" button below the screen.

As for others, gotta wait for Marvin...
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

Vectorial1024
Posts: 224
Joined: Mon, 30. Jul 18, 04:16
x4

Post by Vectorial1024 » Thu, 30. Aug 18, 05:17

Ah, it's been a while. I have been fine-tuning the station destruction algorithm.

I found a problem while testing my destruction algorithm: it seems that capital ships don't pay much attention to URV Launchers on stations. They would keep firing on destroyed station components rather than disengage and re-target the working URV Launchers.

Is this fixable? Either we fix the AI combat behavior, or I have to modify the station destruction script to ignore the URV Launchers. They are interfering with the detection of "complete destruction of station".
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

Warnoise
Posts: 674
Joined: Mon, 7. Mar 16, 23:47

Post by Warnoise » Thu, 30. Aug 18, 06:48

Vectorial1024 wrote:Ah, it's been a while. I have been fine-tuning the station destruction algorithm.

I found a problem while testing my destruction algorithm: it seems that capital ships don't pay much attention to URV Launchers on stations. They would keep firing on destroyed station components rather than disengage and re-target the working URV Launchers.

Is this fixable? Either we fix the AI combat behavior, or I have to modify the station destruction script to ignore the URV Launchers. They are interfering with the detection of "complete destruction of station".
It seems similar problem when they Target Xenon K. They ignore surface elements and they all aim at the same spot (capital and fighters too). The spot they always aim at is the point between Xenon K's engines

User avatar
Marvin Martian
Posts: 3547
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Thu, 30. Aug 18, 08:21

i think the problem is the dronelaunchpad is mostly weak and if it got destroyed you lost all drones, this will going to be a hugh PITA finally (because it breaks much mechanics in the game)

from point of tactic you are right, but for less PITA, this is working like intendet

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain » Thu, 30. Aug 18, 15:39

carmaster wrote:Is there any way to set the price of the items produced at building modules? Specifically, is there any way to set the prices of L/XL ships on player built shipyards?
I know how to do it for small ships since those count as wares but bigger ships count as buildings.

It is a bit weird that I have to pay 50M for a ship on my own shipyard that has all the items already.

Are you talking about when you produce a ship and sell it to a foreign faction? I don't know if Marvin changed this behavior here, but in the CWIR code, there is a percentage that ships are sold to foreign factions. If you open the corresponding file with the code in it you can edit the percentage. This is the only way to change price, it is impossible to add a price max/min to the large shipyards as far as I know (for ships)

Vectorial1024
Posts: 224
Joined: Mon, 30. Jul 18, 04:16
x4

Post by Vectorial1024 » Wed, 5. Sep 18, 14:15

I have been working on new code for station destruction, and they are mostly ready. Here's the summary:

New Concepts and Terminology
  • Surrender: The station becomes ownerless; that station also loses its control entities, i.e., Manager and DO (apparently Engineers on stations are not considered to be part of the control entities)
  • Disabled: The station is ownerless, and has no control entities.
  • Revived: The components of the station is repaired up to a certain hull percentage.; destroyed components become operational (i.e. $.isoperational = true) again.
  • Completely destroyed: All components of a station is destroyed. Generally, URV Launchers are excluded from the list of valid station components because of practical reasons.
New Features and Mechanisms
  • Landmark stations will surrender when dropping below a certain hull percentage threshold, and be disabled for some long time, gets revived and then become owned by the zone owner.
  • Weapon platforms will surrender abd be disabled when they are completely destroyed. They will stay like this until zone ownership changes (this is out of the scope.)
  • Other stations will surrender and be disabled when they are completely destroyed. Their wreck will be removed after some long time, and their original buildspot will be freed too.
Remarks
  • Code for "partial station destruction" is not included: this feature would require modification to the Architect scripts, and I cannot estimate how much those scripts has to be modified to account for the "partial destruction".
I will clean my code up a bit and make a new pull request this weekend.
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

User avatar
Marvin Martian
Posts: 3547
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Wed, 5. Sep 18, 15:00

:S you add some more state of things, but so much work for nothing really new? - seriously, what does it bring to the economy to have such more states finally, it can nothing do what that actual script do either :|

"Surrender" doesn't make much sense with your description (in my opinion)
it would nice if stations can pay or set "hacked" for a couple of time and enemies will ignore them - but the ownerless status is similar to actual "destructed" (also only temporary, in case it has a buildspot it will removed) - so for what?

the problem is that cargospaces and productions need to be close to 100% otherwise they lose function very quick, so any "partial" repair is senseless
i haven't spend any time to make this possible, to dock an NPC CV and start rebuilding station (best would be to add the ability for skip buildsteps, like some "useless"smallship-productions in case), or restart open buildsteps

your primary intention to code this was IMO partial destruction, this need to be reversable by CV at FIRST step, then it will make sense to see how to integrate destruction best, otherwise you have a lot of half destructed stations and economy isn't working anymore
Anyway, if your code is ready i will take look, maybe it will be more clear - but without the solved CV problems it is not really a good idea to it like you describe your intention at last time

Vectorial1024
Posts: 224
Joined: Mon, 30. Jul 18, 04:16
x4

Post by Vectorial1024 » Wed, 5. Sep 18, 15:38

Ah... *sweaty hands*

Surrendering and Station Wrecks
It is necessary to set ownerless to a completely destroyed station, otherwise combat ships will continue to fire on the station.
When a station is completely destroyed, it is reasonable to think that the manager and the Defense Officer died in some kind of deadly explosion while still remaining in their post to fight to the death. :roll: I think it fits the combat theme of this mod.
It would break immersion if station wrecks did not stay around for long. Right now, (if there are no new features) I think it would be good if the station wrecks stayed for around 6 hours.

Partial Rebuilding
I need some clarification on this...
So you want to do this?: Get player CV or NPC CV -> the CV docks at station -> waits to buy resources -> station is rebuilt?

Other stuff
I noticed that there is an option on the CV to "Deploy to NPC Station". What does that do?
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

User avatar
Marvin Martian
Posts: 3547
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Wed, 5. Sep 18, 15:55

Surrender: my idea is (similar to tradeship mechanic) will spend money or goods to supported-attack-AI and they grab there stuff and go on (used at original plunder) [DW-Plunder you can talk/pay to DW-Ship and your stuff may not targeted for a couple of time]
but in case of an huge invasion it may also an option to evacuate a zone

by "diplomatic" it can be maybe an idea to make something at the round table (in the far future)

Deploy to NPC Station: is what it say, you connect your playerowned CV to an NPC station, may usefull in case the CV of your allied-faction-station is destroyed and station half build - you can build them to end by yourself (but without any benefit, just to fix that stations)

Partial Rebuilding:
is exactly what i write above, CV get destroyed and station won't finished never again - but in lack of idea how to handle this at the moment this is a unsolved problem
your wish at fight, ships should destroy stations with removing whole parts this problem will go to an huge problem - mostly only enemy attack and owner will defend them, but without working rebuild routine this is a real problem at the end :(

Vectorial1024
Posts: 224
Joined: Mon, 30. Jul 18, 04:16
x4

Post by Vectorial1024 » Wed, 5. Sep 18, 16:14

Trying to summarize:
  • Stations can "pay" attackers something, the attacker receives the things, and leave. But then, how much should the attacked station pay? Any factors for the amount?
  • Deploy CV to NPC station to build their station: this I understand
  • Deploy CV to stations that are (1) under construction, (2) has no CV, and (3) its initial phase is not complete: this I can try to fix
  • I have an idea: what if when a station is left as a wreck for "too long", the wreck can disappear? I was thinking, if the only possibility is { station is attacked -> station critically damaged -> wait for CV -> station is rebuilt }, then the universe can only get more crowded. Also, it feels good to actually remove a hostile station from existence 8)
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

User avatar
Marvin Martian
Posts: 3547
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Wed, 5. Sep 18, 16:43

station surrender: for pay is more interessting from pirate point of view - but here the mechanic isn't existing, it may possible if station is fully set to hacked vanilla script will ignore them - need to investigated that behavior - otherwise it would require any interacting with temporary relation_boost to stop further attacks
-> but this is something for todo list if someone will improve pirates one day (price is always last thing i'm take any care of, this can adjusted anythime in future, if mechanic work and is in use - all prices atm WIP in case someone have a better idea)
Deploy CV to stations that are (1) under construction, (2) has no CV, and (3) its initial phase is not complete: this I can try to fix
feel free to extend architect, in theorie you "only" need to find the next buildstep from station and use existing code from upgrade
connect a new CV should not be a problem so far, in case you can trigger vanilla code - maybe outstanding buildsteps will contiue
what if when a station is left as a wreck for "too long"
station is not wreck for too long, because it will removed after actually min 24h at next garbage run - only in case it is a non removable map-station it will then reactivated to actual zone-owner
this stations are Weaponplattforms, because number of Buildspots are limited and WP not make any sense at buildspots, or actual Unique stations, but latest "mapmaster" can deal to select the right buildspot meanwhile, so also unique stations could made set to buildspots, but this will require to change maps and this is not really compatible to running game, so this will used in an future "new-game-required" update

Post Reply

Return to “X Rebirth - Scripts and Modding”