[MOD]DeadAir Mods

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

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

boogieman335
Posts: 222
Joined: Tue, 4. Sep 07, 22:32
x4

Re: [MOD]DeadAir Mods

Post by boogieman335 » Mon, 8. Jun 20, 00:21

SirNukes wrote:
Sun, 7. Jun 20, 19:19
DeadAirRT wrote:
Sun, 7. Jun 20, 17:03
That error happens with every diff on an md. I'm pretty sure i renamed to lower-case long ago but I'll double check
It only happens with capitalized file names. I assume there's some spurious code that tries to load the patch as its own script (since the name casing is different), then later loads it again as a case-insensitive diff patch.
boogieman335 wrote:
Sun, 7. Jun 20, 18:04
Any body else having problems with Sir Nukes API breaking their map in version 3.2? I am asking here because the API is now a requirement for this mod to work and I first noticed it trying to do a new game start.
The api itself doesn't touch the map, though removing it may disable some other mod that uses the api to touch the map. If you are using Extra Game Options, make sure that's updated. One of the betas caused that extension to break the map, but I pushed out a same day fix.
Ok thank s I'll check the options file, though I thought it was the newest one. This happened once before when Ego updated something and I solved it by updating the API file so I assumed that it was because of the last EGo update to 3.2. I been keeping 2 copies of the game , one that requires Steam to run and one that launches using the no steam .exe file for modding and I stripped all the mods out of the extension folder except the options file and the API and the Split DLC and it still wouldn't load the map. I'll edit this after I get a chance to test it.
edit: Ok the options file was indeed the culprit. I got the the one from Github ver 1.9 and all is now good with the map thanks for the quick response.

boogieman335
Posts: 222
Joined: Tue, 4. Sep 07, 22:32
x4

Re: [MOD]DeadAir Mods

Post by boogieman335 » Mon, 8. Jun 20, 00:59

DeadAirRT wrote:
Sun, 7. Jun 20, 19:07
boogieman335 wrote:
Sun, 7. Jun 20, 18:04
Any body else having problems with Sir Nukes API breaking their map in version 3.2? I am asking here because the API is now a requirement for this mod to work and I first noticed it trying to do a new game start.
Define breaking the map?
What it did was it makes it so just the new little info box comes up instead of the map when you press "m". I was doing a new start with the dynamic war start after I updated my modded game to 3.20 and it started just fine except I couldn't board the ecplise it just froze at the ladder. I just fixed a modded ship that had this same problem, and I have seen it before in other ships the comorant comes to mind right after EGO does an update and they generaly put out a fix within a couple of days, so I wasn't worrried about that but then almost right away the station and the mammoth came under attack by a huge swarm of kahk and they blew through the 2 discover's like thy weren't even there and then I tried to access the map and couldn't so I knew something was screwy with the API cause like I said I had seen this before and solved it by updating the API , only this time I guess it was the options file that caused it. I was like this dynamic war thing is really kickin in this time, and here I am stuck on this station with no ship to fight em off and can't even see the damn map to see how many of em there are. LOL So big dummy that I am I tried starting it again and this time same thing happened only it was the Split invading at least according to the voices on the Radio. They took out the Discovers and the mammoth was screaming for back up when I decided I better go find help so I can at least get in the fight and that of course led me to post here LOL

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [MOD]DeadAir Mods

Post by DeadAirRT » Mon, 8. Jun 20, 02:08

boogieman335 wrote:
Mon, 8. Jun 20, 00:59
DeadAirRT wrote:
Sun, 7. Jun 20, 19:07
boogieman335 wrote:
Sun, 7. Jun 20, 18:04
Any body else having problems with Sir Nukes API breaking their map in version 3.2? I am asking here because the API is now a requirement for this mod to work and I first noticed it trying to do a new game start.
Define breaking the map?
What it did was it makes it so just the new little info box comes up instead of the map when you press "m". I was doing a new start with the dynamic war start after I updated my modded game to 3.20 and it started just fine except I couldn't board the ecplise it just froze at the ladder. I just fixed a modded ship that had this same problem, and I have seen it before in other ships the comorant comes to mind right after EGO does an update and they generaly put out a fix within a couple of days, so I wasn't worrried about that but then almost right away the station and the mammoth came under attack by a huge swarm of kahk and they blew through the 2 discover's like thy weren't even there and then I tried to access the map and couldn't so I knew something was screwy with the API cause like I said I had seen this before and solved it by updating the API , only this time I guess it was the options file that caused it. I was like this dynamic war thing is really kickin in this time, and here I am stuck on this station with no ship to fight em off and can't even see the damn map to see how many of em there are. LOL So big dummy that I am I tried starting it again and this time same thing happened only it was the Split invading at least according to the voices on the Radio. They took out the Discovers and the mammoth was screaming for back up when I decided I better go find help so I can at least get in the fight and that of course led me to post here LOL
Ah oh. And the Khaak are my doing. Enjoy the danger. :mrgreen:

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [MOD]DeadAir Mods

Post by DeadAirRT » Thu, 11. Jun 20, 04:34

Just figured I would do a quick write up to put some info out.

First, don't expect an update for a bit as I'm testing major changes (yet again, I know) to work on performance. Right now, I'm sure many have noticed that after a bit into the game, the FPS takes a huge hit. This was happening before but not nearly as bad in 3.1. As I work to track down what the cause of it is, I figured it would help to share at least a little of what I know. The game runs much better with a healthy economy and one of the most visible factors during the slowdown is a shortage of hull parts globally. Suddenly the logic for stations starts trying to grab traders to help them, the traders search for trades longer, and it recovers very slowly. Assisting with the hull parts shortage, using DeadAir Ware to inject wares to trade stations, or whatever solutions you can think of will help the slowdown get by sooner. You might wonder why I don't just add more stations and the answer is that the engine also struggles with a certain number of entities (stations + ships). The limit for my CPU seems to be around 12K ships and the amount of stations present after about 30 hours into a new save. Obviously everyone has different rigs, so I've been making many adjustments to help people enjoy the mod without playing a slide show. TLDR: supply hull parts ASAP and major update inc eta unknown

I've also managed to complete an optional highway system that is INTRA faction for the major factions. It was a huge pain, but I actually like how it turned out despite hating the vanilla one. The highway runs around the core grouping of sectors (the 6 sectors surrounding the shipyard sector). It doesn't connect to enemy space, and it's not quite as perfect as the vanilla one (since it was done by hand with math).

That's all I can think of for now, back to going over tens of thousands of lines of code.

shovelmonkey
Posts: 152
Joined: Wed, 29. Feb 12, 17:34
x4

Re: [MOD]DeadAir Mods

Post by shovelmonkey » Sat, 13. Jun 20, 15:08

DeadAirRT wrote:
Thu, 11. Jun 20, 04:34
Just figured I would do a quick write up to put some info out.

First, don't expect an update for a bit as I'm testing major changes (yet again, I know) to work on performance. Right now, I'm sure many have noticed that after a bit into the game, the FPS takes a huge hit. This was happening before but not nearly as bad in 3.1. As I work to track down what the cause of it is, I figured it would help to share at least a little of what I know. The game runs much better with a healthy economy and one of the most visible factors during the slowdown is a shortage of hull parts globally. Suddenly the logic for stations starts trying to grab traders to help them, the traders search for trades longer, and it recovers very slowly. Assisting with the hull parts shortage, using DeadAir Ware to inject wares to trade stations, or whatever solutions you can think of will help the slowdown get by sooner. You might wonder why I don't just add more stations and the answer is that the engine also struggles with a certain number of entities (stations + ships). The limit for my CPU seems to be around 12K ships and the amount of stations present after about 30 hours into a new save. Obviously everyone has different rigs, so I've been making many adjustments to help people enjoy the mod without playing a slide show. TLDR: supply hull parts ASAP and major update inc eta unknown

I've also managed to complete an optional highway system that is INTRA faction for the major factions. It was a huge pain, but I actually like how it turned out despite hating the vanilla one. The highway runs around the core grouping of sectors (the 6 sectors surrounding the shipyard sector). It doesn't connect to enemy space, and it's not quite as perfect as the vanilla one (since it was done by hand with math).

That's all I can think of for now, back to going over tens of thousands of lines of code.
Sounds impressive! Can't wait to see it.
“Not even once has life or the weather complained about a human being.”
― Mokokoma Mokhonoana

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [MOD]DeadAir Mods

Post by DeadAirRT » Sun, 21. Jun 20, 02:11

New beta up for testing:
DeadAirGateOverhaul v3.3Beta
All miners will check for demand before mining, increased drone capacity of build modules, deactivated storylines until they can be properly implemented, fixed potential duplicate faction logics being run, disabled FFP colonial taxes, redesigned AI ware baskets, added second EQ dock to HOP/PAR/TEL, moved freeports/pirate bases, rebalanced starting stations, completely reworked jobs, rebalanced drone loadout rules for AI, lowered security/economy levels of xenon multi-sector clusters to prevent overwhelming number of I's, cleaned up module ownership definitions, lowered actor quota on stations, reworked shipgroups to reduce chance of faction requesting unavailable ship, reworked ships.xml to ensure factions can use their full doctrine of available ships, fixed some missing ware ownership for various factions, added additional safeguard for flagship fleet to use entire fleet against a station, disabled vanilla drain station script, increased range factions can grab ships for invasion and defense to 4, stopped court from using freesplit jobs (FFP), adjusted AI station plots to be larger, increased starting wares at wharf/shipyard, potentially fixed missing missions from split minor factions, prevented ships from using player/xenon/khaak faction as cover, deactived gates across the universe that will slowly be activated over time.

Yes, performance is better.
https://github.com/DeadAirRT/DeadAirGat ... /tree/beta - don't forget to rename folder

DeadAirWare v1.34
reset all wares back to double production/double consumption, increased price variation for all wares, increased chance of AI stations having multiple production modules of the same type per station.
https://github.com/DeadAirRT/DeadAirWare

DeadAirGateOverhaulPublicWorks v1.0
Added ring highway to major factions. Super descriptive.
https://github.com/DeadAirRT/DeadAirGat ... ublicWorks - don't forget to rename folder

DeadAirGateOverhaulVRO v1.0
Removed added jobs of VRO, added new ships into appropriate ship groups to be used by jobs, adjusted ware ownership to be consistent with gate. Required by DeadAirGateOverhaul v3.3+
https://github.com/DeadAirRT/DeadAirGateOverhaulVRO

Dinoff
Posts: 190
Joined: Thu, 21. May 09, 12:56
x4

Re: [MOD]DeadAir Mods

Post by Dinoff » Sun, 12. Jul 20, 02:26

Hey DeadAir,
Would it be possible to do a compatibility patch for the star wars mod? there are 3 sectors i think which overlap argon prime and its surrounding sectors.
https://www.moddb.com/mods/star-wars-mod-x4
If not, could you walk me through the short version of how to move a sector and its connected jobs?

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [MOD]DeadAir Mods

Post by DeadAirRT » Fri, 17. Jul 20, 09:31

Dinoff wrote:
Sun, 12. Jul 20, 02:26
Hey DeadAir,
Would it be possible to do a compatibility patch for the star wars mod? there are 3 sectors i think which overlap argon prime and its surrounding sectors.
https://www.moddb.com/mods/star-wars-mod-x4
If not, could you walk me through the short version of how to move a sector and its connected jobs?
Sadly I'm pretty much done with modding x4. Are you using loose files or cat/dat for star wars mod?

Versety
Posts: 4
Joined: Thu, 16. Jul 20, 22:39
x4

Re: [MOD]DeadAir Mods

Post by Versety » Sat, 18. Jul 20, 02:30

Hello, DeadAir! Writing to you about DeadAirFill.

First of all, thanks for a great mod. I cannot believe that cargo decay is almost nonexistant in base game, as the economy eventually stalls to the point of no return with maxed out cargo at stations after long periods of peace in the universe.

However, sometimes Shipyards or Wharfs also can get stuck with full container space, and as they are not creating sell offers for their surplus resources in that case, they have no way to make space for buying critical components required to produce ships, and cannot function. The only way to get the shipyard/wharf out of this state is to hack storage to release some surplus resources (and pray that a station would buy required critical components faster than max out other resources again)

I have added an option to implement cargo decay for shipyards and wharfs in your mod, including menu sliders, and created a pull request. Please, review it when you have time.
https://github.com/DeadAirRT/DeadAirFill/pull/1
Last edited by Versety on Sat, 18. Jul 20, 02:38, edited 1 time in total.

Versety
Posts: 4
Joined: Thu, 16. Jul 20, 22:39
x4

Re: [MOD]DeadAir Mods

Post by Versety » Sat, 18. Jul 20, 02:32

Also, I wanted to consult about problem in my game with you, as you are more knowledgeable at this topic.
Implementing cargo decay at shipyards and wharfs in my game seems to solve most of the problems with shipyards and wharfs, but one particular shipyard (Argon) does not place buy orders for shield components, even after free cargo space becomes available.

Argon shipyard used to have no free storage available, so I thought that this may be the reason for insufficient shield components. But even after decreasing values by using scripts, mods and save editing, no buy offers for shield components are created...
Things I have found out during my tests:

Reducing quantity of every item in storage for a bit allows the shipyard to create buy offers for other resources, but Shield components are still listed as "Low demand" at -41% price and no buy offers for them are created.

Reducing quantity of every item in storage to zero creates a lot of buy orders for all resources with "high demand" price, but shield components in particular stay the same as in previous case, no buy order created.

Interestingly, increasing available container cargo space creates buy orders for every item, including shield components.

There are no problems with building queue, as ordering ships without shields (no shield components are required for building) gets them built without problems and correctly uses respective resources.

I have had a thought, that maybe there is a ware reservation for shield components at the shipyard. I have waited for hours in SETA mode for a trader to come and fulfil it, but shield components never got supplied. Maybe trader got murdered or changed his mind along the way, but nevertheless the ware reservation was never updated. So it may be a bug related to ware reservation. I am not sure if there is a timeout for ware reservations in the game.

All the cases I checked for were tested without using minimum adjustment for wares in your mod, as there seems to be some big underlying issue for shipyards not placing buy orders for much needed resource.
I hoped that changing the current stock might get it unstuck, but even after using minimum adjustment for wares in your mod, no additional buy offers for shield components are placed. If adjustment script bumped available shield components stock to required values, ships are finally getting built, but still no new buy offers for shield components required in build process of next ships in queue are being created.

I am using several QoL mods, but main ones that may have an effect on this are VRO with XR ship pack for it, and faction fixes by Mysterial

I have checked several relevant threads, and it seems that there were problems like this before. I wonder if I should fill a bug report for this or is this a problem at my end?
Relevant threads examples:
viewtopic.php?t=404367
viewtopic.php?t=408512
https://www.reddit.com/r/X4Foundations/ ... omponents/
https://www.reddit.com/r/X4Foundations/ ... pply_good/ (Reddit post with exactly the same problem - shield components)

After staying in SETA for a very long time, it seems that one ship finally got built somehow, and "low demand" price for shield components changed from -41% to -30%.Still no buy offers active for it, while shipyard is sitting at 22 shield components out of 1773 max. All other resources are slowly getting filled to 100% and have buy offers set for them. I have since left game for an hour to run by itself in SETA and set up a recording to check it afterwards. Shield components increased without any new buy offers created two times: the first time it was a magical bump from 22 to 190 with no apparent reason for it, and the second time it increased from 190 to 358 right when some ship has undocked (docked ships count has changed from 1 to 0)
Screenshots:
https://imgur.com/a/M0Fwwro

Sorry for a long post, I bought X4 at steam sale this summer without expecting much but got really interested. Such a great game, looking forward to next expansion.

Edit: I went ahead and opened a bug report on Technical Support forum, let's see what happens next
Last edited by Versety on Mon, 20. Jul 20, 02:57, edited 6 times in total.

Dinoff
Posts: 190
Joined: Thu, 21. May 09, 12:56
x4

Re: [MOD]DeadAir Mods

Post by Dinoff » Sat, 18. Jul 20, 11:52

DeadAirRT wrote:
Fri, 17. Jul 20, 09:31
Dinoff wrote:
Sun, 12. Jul 20, 02:26
Hey DeadAir,
Would it be possible to do a compatibility patch for the star wars mod? there are 3 sectors i think which overlap argon prime and its surrounding sectors.
https://www.moddb.com/mods/star-wars-mod-x4
If not, could you walk me through the short version of how to move a sector and its connected jobs?
Sadly I'm pretty much done with modding x4. Are you using loose files or cat/dat for star wars mod?
Loose files. Its been years since i last did text editing on an x game so all my knowledge is gone.

The6atekeeper
Posts: 27
Joined: Sat, 15. Dec 18, 12:54

Re: [MOD]DeadAir Mods

Post by The6atekeeper » Mon, 20. Jul 20, 01:00

Could you make us a version that starts in Freedom's Reach with the PHQ please. I Love playing like one of the other Super-Powers with a Central Sector for my HQ.

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [MOD]DeadAir Mods

Post by DeadAirRT » Wed, 29. Jul 20, 00:12

Versety wrote:
Sat, 18. Jul 20, 02:30
*snip*
If you'd like, you can take control of that mod and use the code as you please. I'm not really playing X4 anymore and annoyances with the engine have pretty much driven me away from modding it as well.

The script already removes wares from shipyards/wharfs if they go over 100% of their desired amount of the resource to prevent an old bug but I opted away from draining shipyard/wharfs because I actually wanted them to be able to stockpile near 100% if capable.

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [MOD]DeadAir Mods

Post by DeadAirRT » Wed, 29. Jul 20, 00:22

Versety wrote:
Sat, 18. Jul 20, 02:32
*snip*
So storage, buy offers, and station stuff in general is one of the main reasons I am not modding X4 anymore.

I can try and give some ideas as to why it's happening, but to be completely honest, it's all black box stuff.

First, it seems that shipyards/wharfs act very differently on resource allocation/pricing from other stations. Normally it goes that the less resouce on hand, the higher the price. The problem seems to be that either prices aren't being updated properly for their entire storage, or there is some prioritization feature that makes it so the station can only spend so much money (only updates some offers and not others). Either way, unless you manually add trade offers yourself, I'm not sure of any fix. I previously created code for this to solve the issue of energy cell prices when I made them also used for workforce.

The shield components could be getting ignored since they are also needed for station defenses. I've previously observed that workforce supplies are considered for pricing at a higher priority than ship building resources, so something similar may be occuring.

What I ran into with my energy cell required for workforce issue was the following:
The allocation amount was reasonable
The buy offer AMOUNT was reasonable
The buy offer PRICE was based on how many energy cells it wanted for workforce ONLY. It completely ignored that it didn't have enough for ship building.

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [MOD]DeadAir Mods

Post by DeadAirRT » Wed, 29. Jul 20, 00:25

The6atekeeper wrote:
Mon, 20. Jul 20, 01:00
Could you make us a version that starts in Freedom's Reach with the PHQ please. I Love playing like one of the other Super-Powers with a Central Sector for my HQ.
If you get dynamic war start, you can change a couple lines to start in freedom's reach instead.

essentially if you change Cluster_DA1_* to Cluster_DA2_*

in gamestart.xml and the md files, it will work. (of dynamic war start)

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [MOD]DeadAir Mods

Post by DeadAirRT » Wed, 29. Jul 20, 00:35

Dinoff wrote:
Sat, 18. Jul 20, 11:52
Loose files. Its been years since i last did text editing on an x game so all my knowledge is gone.
Luckily with loose files, all you have to do is replace some values.

You have to change the locations in galaxy.xml for the star wars clusters. The annoying part, is that in game coordinates do not directly translate. I taught shuulo pretty much everything I know about map modding so he would probably be able to help you with some coordinates.

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [MOD]DeadAir Mods

Post by DeadAirRT » Wed, 29. Jul 20, 00:39

I figured I should actually put something out about the current status of my mods and what to expect in the future:

I am done with X4 and have no plans to continue playing or modding this game. I do still occasionally check stuff to help people out (what's the point of all this self taught knowledge if I don't spread it).

People are more than welcome to use code from my mods, just give credit (even if it's just a comment in the code). If anyone wants to take over any of my mods, let me know and I'll send you whatever code I have lying around and misc resources.

Dinoff
Posts: 190
Joined: Thu, 21. May 09, 12:56
x4

Re: [MOD]DeadAir Mods

Post by Dinoff » Wed, 29. Jul 20, 02:53

DeadAirRT wrote:
Wed, 29. Jul 20, 00:35
Dinoff wrote:
Sat, 18. Jul 20, 11:52
Loose files. Its been years since i last did text editing on an x game so all my knowledge is gone.
Luckily with loose files, all you have to do is replace some values.

You have to change the locations in galaxy.xml for the star wars clusters. The annoying part, is that in game coordinates do not directly translate. I taught shuulo pretty much everything I know about map modding so he would probably be able to help you with some coordinates.
Thanks,
I will have to look a bit harder. would it be possible for you to highlight what section of the text i need to change in the map and other files to properly move the sector?

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [MOD]DeadAir Mods

Post by DeadAirRT » Fri, 31. Jul 20, 05:31

Dinoff wrote:
Wed, 29. Jul 20, 02:53
DeadAirRT wrote:
Wed, 29. Jul 20, 00:35
Dinoff wrote:
Sat, 18. Jul 20, 11:52
Loose files. Its been years since i last did text editing on an x game so all my knowledge is gone.
Luckily with loose files, all you have to do is replace some values.

You have to change the locations in galaxy.xml for the star wars clusters. The annoying part, is that in game coordinates do not directly translate. I taught shuulo pretty much everything I know about map modding so he would probably be able to help you with some coordinates.
Thanks,
I will have to look a bit harder. would it be possible for you to highlight what section of the text i need to change in the map and other files to properly move the sector?
You will have to change the position in maps/xu_ep2_universe/galaxy.xml

it should look something like this for the star wars clusters:

Code: Select all

	<connection name="Cluster_DA1_connection" ref="clusters">
		<offset>
			<position x="0" y="0" z="34640000" />
        </offset>
        <macro ref="Cluster_DA1_macro" connection="galaxy" />
	</connection>
x is left/right on map
z is up/down

y will cause you headaches

Dinoff
Posts: 190
Joined: Thu, 21. May 09, 12:56
x4

Re: [MOD]DeadAir Mods

Post by Dinoff » Fri, 31. Jul 20, 12:24

DeadAirRT wrote:
Fri, 31. Jul 20, 05:31
Dinoff wrote:
Wed, 29. Jul 20, 02:53
DeadAirRT wrote:
Wed, 29. Jul 20, 00:35


Luckily with loose files, all you have to do is replace some values.

You have to change the locations in galaxy.xml for the star wars clusters. The annoying part, is that in game coordinates do not directly translate. I taught shuulo pretty much everything I know about map modding so he would probably be able to help you with some coordinates.
Thanks,
I will have to look a bit harder. would it be possible for you to highlight what section of the text i need to change in the map and other files to properly move the sector?
You will have to change the position in maps/xu_ep2_universe/galaxy.xml

it should look something like this for the star wars clusters:

Code: Select all

	<connection name="Cluster_DA1_connection" ref="clusters">
		<offset>
			<position x="0" y="0" z="34640000" />
        </offset>
        <macro ref="Cluster_DA1_macro" connection="galaxy" />
	</connection>
x is left/right on map
z is up/down

y will cause you headaches
Got it. so basically i just need to fiddle with x and z until i find an open spot on the map.

Post Reply

Return to “X4: Foundations - Scripts and Modding”