[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

User avatar
Marvin Martian
Posts: 3546
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: 222
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: 3546
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: 222
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: 3546
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

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

Post by Vectorial1024 » Thu, 6. Sep 18, 02:40

Hold on... the high of taking 19 credits out of maximum allowed 18 credits in a semester in college is kicking in... :lol:

My very first objective to write code was to fix the bug that causes recently-destroyed stations to be instantly revived when the zone it is in changes ownership. I guess this behavior is intended for landmark and weapon platform stations, not for other stations (e.g. not for Energy Array).

(But, if I am not mistaken, from what you say, stations that are "already in the map from the start of the game" should also act like those landmark and weapon platform stations? (i.e. To be reactivated and given to zone owner)? This feels unfair to stations that are built after gamestart.)

I then proceeded to write code that would be able to listen to station attacks, and then distinguish the appropriate fate of those stations (turns into wreck, or do nothing, etc.)

After writing the code, I plan to compare my code against existing codes and optimize my code to be more efficient than the original codes. This I have not completed yet. Maybe this will take another week or so...

I can include the Architect scripts as my next objective.

EDIT: some clarifications
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: 3546
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Thu, 6. Sep 18, 08:39

Vectorial1024 wrote:My very first objective to write code was to fix the bug that causes recently-destroyed stations to be instantly revived when the zone it is in changes ownership. I guess this behavior is intended for landmark and weapon platform stations, not for other stations (e.g. not for Energy Array).
i haven't notice this behavior yet - are you sure this wasn't a boarded station? (yes Xenon do this also)
please do not missunderstand, i'm happy somebody share coding work - but sometimes users misinterpret situations and take impossible conclusions, but i try to reproduce such situations and check problems

anyway, to fix this problem (if it is one) it might good enough to check existing code (IMO) - you write a whole book to fix a probably wrong sorted condition line :roll: so i assume you want to add more features too
Vectorial1024 wrote:But, if I am not mistaken, from what you say, stations that are "already in the map from the start of the game" should also act like those landmark and weapon platform stations? (i.e. To be reactivated and given to zone owner)? This feels unfair to stations that are built after gamestart.
you can't remove this stations, they spawn always again, so this is the only possible behavior (beside delete them after game loading), you might call it workaround
the mod is intendet to work also with not "supported" spaces, and there stations are classic placed at map/zone
Vectorial1024 wrote:I then proceeded to write code that would be able to listen to station attacks, and then distinguish the appropriate fate of those stations (turns into wreck, or do nothing, etc.)
yes so far i understand, but like i discribe last page(s) it is a lot of signal stuff you use - sure a valid way, but whats wrong at actual solution, check at attack_event and if hull is low destroy ????? you dot it most similar, but with a lot of overhead, this is only nescessary if you will do more then now
and if there is this mysterious bug, that might be in resore routine, not in destroy behavior - isn't it?!
Vectorial1024 wrote:After writing the code, I plan to compare my code against existing codes and optimize my code to be more efficient than the original codes. This I have not completed yet. Maybe this will take another week or so...
but always think this way: "perfect" is if you can't remove anymore, not if you might able to add something
Vectorial1024 wrote:I can include the Architect scripts as my next objective.
feel free to extend existing Architect code, but do use npc_architect_np, i may tell you a lot of "why" ... belive me, use this file

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

Post by Vectorial1024 » Thu, 6. Sep 18, 14:36

:roll: So Xenon can board stations... Talking about boarding...

Can we players board NPC stations? If players can board stations, then is it practical? I am imagining a situation where when a capital ship sends in the Marines from its drone bay, the Boarding Pods are getting shot by station turrets; you know, there are turrets everywhere on stations...

So, uh... I will pause for a while, and really start working on the Architect scripts later.
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: 3546
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Thu, 6. Sep 18, 15:41

yes all NPC board stations (look into statistic - only condition is a XL carrier) and yes you can board also stations (or by support of your fleet with marines from your squad board other ships - or let MO board without your interaction),
anyway you can shoot all turrets/stationsparts down first, or hack station defence

if you came back one time, it seems some tutorials may usefull it seems like :D

bitvoid
Posts: 119
Joined: Wed, 6. Nov 02, 20:31
x4

Post by bitvoid » Fri, 7. Sep 18, 08:48

Greetings, I want to thank you for this great mod. I recently started a new game with it and it's proving to be really interesting.

I think I have a problem though. I was taking over Sable Vortex from the Xenon. After I boarded the Xenon Matrix in Schrödinger's Drift I noticed that the small ship production appears to be broken.

Whenever I try to expand the production modules of that station with the vanilla object details menu the UI will freeze. I'm normally using the "Improved Object Menu" and I managed to work around the issue in that one.

The cause seems to be that the lua function "GetProductionModuleData()" does return a list with nil entries. While I did not check the vanilla object menu code I imagine that it also does not expect a nil to be returned there.

With some additional nil checks added to the object menu I was then able to view the details of the Medium Shipyard production module and it appears that it's producing a whole lot of nothing. I can see the cycles complete and resources getting consumed but my small ship trader never gets any stock added.

Medium Shipyard

Small ship trader

I also uploaded the save that I took those screenshots from. You can download it here

Since my main game is on XRVR and using quite some mods I created a new game in XR for verifying this problem. This game only ever had the New Frontier and Simooms Lantern mods active. Simmoms Lantern was used to reveal the galaxy, equip the Skunk and spawn in a fleet allowing me clear the zone and board the station.
The problem should occur when you go to the details of the "Xenonknoten I" station in the properties menu and try to expand the production modules.

I hope you can find the cause of this. When I tried looking around in the mod and game files I quickly realized that I don't know nearly enough about the inner workings to make sense of it :)

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

Post by Marvin Martian » Fri, 7. Sep 18, 10:47

the problem seems to be the hull is too low
i still use a hack to rise hull over 35%, otherwise UI stop working

repair the station and the production may work again

bitvoid
Posts: 119
Joined: Wed, 6. Nov 02, 20:31
x4

Post by bitvoid » Fri, 7. Sep 18, 13:12

Hi Marvin, you were right. Once I repaired the Medium Shipyard to 100% it actually started producing ships :D

While I was watching it produce ships I noticed that two of them don't appear to be using ship parts yet. Is that intentional?

Production: S
Production: S (Gas)

Thank you for the help

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

Post by Marvin Martian » Fri, 7. Sep 18, 16:24

thanks for reporting, add them to uniparts warelist and make an update

bitvoid
Posts: 119
Joined: Wed, 6. Nov 02, 20:31
x4

Post by bitvoid » Fri, 7. Sep 18, 19:08

Thank you Marvin, with that last fix my Xenon shipyard is now fully functioning. I even got some NPC build orders already :)

bitvoid
Posts: 119
Joined: Wed, 6. Nov 02, 20:31
x4

Post by bitvoid » Sun, 9. Sep 18, 09:29

Greetings, I boarded a Arms Tech Fab station from PMC a while ago whose Turret Forge production seems to always be at full stock now. As I was looking around I saw that there are almost no consumers for turrets. Aside from the occasional CV I've not seen any buyers for them and then the CVs also only buy some of the turrets.

Previously the ship yards were buying the turrets for outfitting the build ships but since now the ship yards only use ship parts that sink is gone now and only the CVs are left.

I looked around in the mod files a bit and saw that there is already a "universalparts2" production method for "shippartcomp" that uses turrets to produce weapon ship parts but it does not appear to be used anywhere yet.

IMO it would make total sense if the production of the weapon ship parts would actually consume weapons/turrets.

macewindu9
Posts: 1
Joined: Wed, 12. Sep 18, 13:03

Post by macewindu9 » Wed, 12. Sep 18, 13:06

Hey all,

is there anything besides the random information on github about the mechanics of this mod?

In particular, how is it possible to board a station? I noticed that I gain random control of a station if I destroy a whole sector but is there any possibility to board stations explicitly?

Thanks in advance!

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

Post by Marvin Martian » Wed, 12. Sep 18, 13:39

with your MarineOfficer you can transfer Marines from Skunk to an Follower, this allow to use more then the regular count of Skunkmarines at boardingactions
with such an Follower you may find under attach of this ship an boarding command, here you can select your target (stations are possible in that case)

if you transfer the MO to a ship with marines in dronebay, or who has follower himself with marines (for example carrier with M-class boardingships*), the ship may possible to board objects alone (but you should out of zone in that case)

*) they are actualy only to convert, with Hymir ships by use of special workshop at shipyards

or you may board any one of the cruise ships from HoL, they have heavy shields and dronebays

Gibbynator
Posts: 15
Joined: Sat, 28. Feb 15, 21:44
x4

Post by Gibbynator » Fri, 14. Sep 18, 00:45

Since this mod has easily added over 100 hours of life to X Rebirth for me, I'd like to show my appreciation by attempting to document everything I've discovered playing through it on the wiki. I'm thinking of putting some pages under the X Rebirth/Mods/Extensions section of the wiki, like CWIR has.

Would this be something you'd like to see? And Marvin Martin, would this be something you would be ok with?

My tentative list of things to document (open to more ideas if I missed something):
  • General mechanics (zone taxes/ship salaries, economy changes, station deconstruction, etc.)
    New Ships
    New Stations
    New CV mechanics (unique stations, contractors, remote build in zone)
    Shipyard mechanics
    Diplomacy
    How to convince someone you want their ship/station more than they do (a.k.a. the new boarding mechanics with the MO)
    Ayosana/Remakron mechanics (repair, salvage, recycle)
    Warp drives
There are a couple of things I'm unsure of that I'd like to clarify though:
  • 1. The Plutarch (AL Mk II) CV doesn't seem to have any different stations than the normal AL one. Is it supposed to?
    2. Removing stations to free up a build slot. I had a Cell Recharge station that I removed the manager from, and had one of my engineers board it to destroy the whole thing. However, she destroyed the dock while deconstructing the last stage, and evicted herself (I'm assuming into space, hopefully she brought a space suit from the X3 universe). I could not get a new engineer on it without having a CV come over and reconstruct the first stage again. I eventually deleted the station from my save file manually so I could build another station in that location, but is there a way I could have done that without modifying my save (like selling the station to the Xenon, blowing up every module, then leaving until the garbage collector removes it)?
Thanks!

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

Post by Marvin Martian » Fri, 14. Sep 18, 09:33

The Mk II / II numbers at CV is regarding CWIR base (they only not called different), here a couple of SYs have 3 Stages, IMO to get different Ships, or simply owing the fact that a CV you can buy at a SY never can build that Station by default macrolist or XR-Engine have a CTD
the mechanic at NF with blueprints doesn't trigger this problem

The engineer should destruct station piece by piece and at last the whole stage (actually as suicide mission, i think here need to be added any mission type / evac step to complete the work)

Gibbynator
Posts: 15
Joined: Sat, 28. Feb 15, 21:44
x4

Post by Gibbynator » Fri, 14. Sep 18, 15:43

Thanks. I thought something was up with the engineer deconstructing. I'll try getting some documentation up on the wiki later today/tomorrow on what I've discovered, and I'll put up the links when I'm done.

Post Reply

Return to “X Rebirth - Scripts and Modding”