[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: 3547
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Thu, 23. Aug 18, 13:49

the problem is Alpha Quadrant has Sky Meadows an "unique" station, so the station is now "Civilian" means neutral to other factions, because IMO plot/missionrelated - so the station need to survive in each scenario - a solution would be to simply not reactivate (for new owner) "useless" stations
end of story is the zone is in fact ownerless, Xenon expand and will take the zone very fast from Toride space - so this isn't a bug, simply an sideeffect of intendet behavior and actuall parameters

overall i would prefer to handle all situations similar based on actuall activity. i see it as high priority to have the code most neutral as possible, because it will used at multible positions and it is more effective you not add special stuff for a single faction/race

Anyway, reminds me to add an handler if a supporting/pirate faction change behavior to Mainfaction :roll:

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

Post by Vectorial1024 » Thu, 23. Aug 18, 15:03

Marvin Martian wrote:...
Anyway, reminds me to add an handler if a supporting/pirate faction change behavior to Mainfaction :roll:
:D And let's also standardize the terms for factions a bit

here's my idea and suggestion:

Main Faction/Major Faction
These factions are strong enough to reasonably own a fleet.
Factions are promoted to Main Faction at game start (to account for the lonely Khaak at the edge of Toride), or when they own a sector. (Or perhaps when they own a Capital Shipyard?)
Example is Plutarch Mining Corporation and Heart of Albion.

Minor Faction
Basically, any faction that is not a Main Faction is a Minor Faction.
Example is Ledda Industrial, Wholesome Foods, Albion Energy Sub., etc.

Industrial Faction (New)
Factions that has the potential to become a Main Faction because they have the industrial power to do so.
Example is Ledda Industrial and JSS.

Pirate Faction
Factions that are pirates. Duh.
Example is Reivers and Atlas.

Mercenary Faction
This one I am not so sure.
Example is ACME, DW, SS ...?
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 » Thu, 23. Aug 18, 16:41

there is no further use in code of much other lists, the "Mainfactions" is a relict of CWIR code and now used to select ambitious factions
the only thing i have add now is little code to add/remove factionId in case there is any change in behavior
this is a "be or not to be" situation with this list

in a full lack of any Stations or competitive ships Khaak is no candidate for Corps mechanic ATM, they will be simply exists as jobs

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

Post by Vectorial1024 » Fri, 24. Aug 18, 18:35

I made a pull request on GitHub. It would fix the station destruction/ownership change mix-up bug.

Perhaps some more work is required to make sure the script connects well with the existing scripts; i am not so familiar with existing scripts :(
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, 17:27

thanks, take short look
first you write a lot of nice code as far i read, but WTH should this fix? :?

very interessting you use signal_cue_instantly to get a $result in the calling cue, very new behavior for me (don't imagine this may work)
anyway, your result doesn't look very usefull to me

maybe i'm wrong, but you fire around with signals more then the ships that will fight against the stations - for what?
it is actually an decision (no further logic behind - simply less cpu-usage) that only capital ship attack will able to destroy a station

you register and check attacks like a Boss but what should this good for - actually without cheaty set_hull-sh*t an OOZ attack won't hurt a station (drones/fighters do not do that), drones anyway not fly around OOZ, without capital they even not exist, so it seems to be useless to register all that stuff you do (as far i understand that code i read)

the "problem" was and still is, is the station buildlocation, maplocation or "free" and THAT won't checked from you, so i think there is nothing fixed you make some good checks but i do not see the benefit of them or what is it worth

i will take next days a deeper look, but the inital problem was - map-locations need to seperated from "freelocations" (null) to solve something

and at the ownership stuff seems to be isn't changed anything, so what is different to the actual code (that seems not good enough yet)

----

please do not missunderstand my resistance, i'm happy if someone add code and improve, but i will not add stuff it make no sense, or fix something that isn't broken (yet, maybe later then we can use it) or in this case do work thats not required
because at the end i need to do lots of rewrite stuff that the non i9 >6GHz CPU users can use the mod also

may point of view was to send destruction request "right" the station is down, for this a global.$table is ready and should automaticly extended if station.macro is missing with min.hull value - so i think there is no need for register attacks and calls for destruction, anyway, at the end of a endless chain of calls my actual solution will be used with Check hull le global.$table on your destruction routine :roll:

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.

Post Reply

Return to “X Rebirth - Scripts and Modding”