[Mod] Mining, Gas Collector and Raw Scrap Converter Stations

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

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

sprIder
Posts: 92
Joined: Sat, 3. Jul 10, 23:23
x4

[Mod] Mining, Gas Collector and Raw Scrap Converter Stations

Post by sprIder » Sun, 10. Oct 21, 13:10

German/Deutsch

Hi all,

due to the changes of Egosoft regarding mining and to revive some X3 feelings, I created this mod.
This mod adds mining stations for ore, silicon, ice and nividium, collector stations for methane, helium and hydrogen as well as converter stations for raw scrap.
Energy cells are needed to mine the minerals, gases and raw scrap, with one energy cell producing one mineral, gas or scrap.
To meet the high demand for energy cells, two new modules for energy cell production are also offered.

The AI does not build these stations.
They are available as blueprints from the factions and can be built anywhere like normal stations / station modules. Therefore, they do not need resource deposits, asteroid fields, gas clouds or similar.

Mining Stations

There are large mining stations, which use a minimalised model of the headquarters with three different asteroids. They can be bought as blueprints from all races.
Currently the production cycle is 12 minutes, with up to 120k nividium, 600k ice and 2 mio ore or silicon produced per hour.
In addition, small mining stations are offered by the community of planets and by the Terrans. These stations are cheaper, require a fortieth of the energy for production, but also produce only a fortieth: 3k nividium, 15k ice and 50k ore or silicon per hour

Gas Collector Stations

The Gas Collector Stations are available in normal and small versions from the Terrans and from the other races.
They produce up to 125k helium, 200k methane and 75k hydrogen per hour, the small stations also a tenth each.

Raw Scrap Converter Stations.

These stations exploit old shipwrecks and convert the raw scrap into general purpose scrap. They produce up to 22500 scrap per hour. They are also available from almost all races.

Energy Cell Productions

Similar to the mining stations, the output of these stations has also increased with update 1.7. The large station produces 6 million energy cells per hour, the small one 600k.

Research and Cheat Options

Since update 1.7, it is possible not only to buy station blueprints, but also to research them. This works just like the rest of the game's research. A lot of resources and a little bit of time are needed.
By default, the research of blueprints of the player race are available. So that the research menu does not overflow. This can be changed via the mod options in the extension options. This requires the SirNukes mod support API mod:
Steam or Nexusmods

Also, there is now the option to get station blueprints for free via the same menu.


If you want to add changes to the mod in general, you should use the Dropbox download, because all data is already unpacked here.
How and where to make changes for other production rates or the influence of the labor force are described in the readme and in the wares.xml.

Links to the mod:
For those who own at least Cradle of Humanity:
- Dropbox
- Steam

For those who do NOT own Cradle of Humanity:
- Dropbox
- Steam

For those who play with the Star Wars Interworlds mod:
SWI, v0.66 and earlier:
- Dropbox
SWI, v0.7 and later:
- Dropbox

Image ImageImage Image ImageImage

Since this is my first station mod and I'm not really good at balancing, I'd appreciate some feedback.

Credits and special thanks to:

- iforgotmysocks, Egosoft-forum and Nexusmods: Update and notification routine. Thank you for letting me crip and adapt your code!
- kuertee, Egosoft-forum and Nexusmods: Options for mods within the game (extension options). Same reason. Thank you very much!
- aladinaleks, Steam: Russian translation and general support
- cyno op, Steam: Chinese translation

Changelog:
31.10.2021, v1.1:
- fixed wrong production method of gen_mining_station_ice
03.11.2021, v1.2:
- added smaller terran mining stations. Half the production rate with half the demand.
13.11.2021, v1.3:
- added gas collector stations from the Terrans and the other races
- added small gas collector stations from the Terrans and the other races
- clean up of mining station models
- fixed wrong station (blue print) prices
27.11.2021, v1.4:
- added Russian language, big thanks to aladinaleks!
- changed production of all station, small stations produce 1/10 of large stations
- changed ratio of energy cells to minerals/gases from 2:1 to 1:1
- added readme and more comments to the code so you can change it easier
- changed prices for station building
- fixed wrong building material of some Terran stations
- mod should now work properly on Linux
02.12.2021, v1.5:
- added S Mining Stations for the other races.
03.12.2021, v1.51:
- added split dependency
03.12.2021, v1.52:
- updated Russian language, thanks to aladinaleks!
26.02.2022, v1.53:
- added Chinese language, big thanks to cyno up!
06.05.2022, v1.6:
- added two new energy cell production modules
- removed old wares.xml
- changed some production times of the modules
- corrected mistakes in the description of the wares.xml
27.06.2022, v1.61:
- updated Russian language, thanks to aladinaleks!
- Unknown Energy Cell production no longer depends on sunlight
17.07.2022. v1.62:
- added missing factions for the Unknown Energy Cell productions
- New version for Star Wars Interworlds
04.04.2023. v1.7:
- added S Rawscrap Converter Stations for the Terrans and the other races which produce scrap
- changed needed wares for nearly all modules. Inflation simply hits everything.
- The big Mining Stations produce now 40 times that of the small stations. And of course cost more.
- There is now a 40% production increase, when big Mining Stations have workers.
- The Energy Cell production modules produce more now.
- changed some descriptions
- added research! You can now research all blueprints of this mod which needs some resources and, of course, time.
- By default you can research blueprints of your playerrace. This can be changed via the mod options in the extension options.
- To change settings you need SirNukes Mod Support API Mod. You can get it on Steam or nexusmods.
- via the same mod menu, you can now cheat and get the blueprints for free.
- Big thanks to kuertee from Egosoft-forum and Nexusmod for making the last two points possible. He gave me the permission to crip and adapt certain parts of his code and mods to use Sir Nukes Mod Support API for extension options.
- Big thanks to iforgotmysocks from Egosoft-forum and Nexusmod for giving me the permission to crip his update routine and adapt it.
- Hopefully, some fps improvements for all Gas Collector Stations.
12.04.2023, v1.71:
- updated to X4: Foundations v6.0.
14.04.2023, v1.72:
- updated Russian language, thanks to aladinaleks!
- set split, pirate and boron dlc dependency to optional.
24.06.2023, v1.74:
- some small code optimizations.
- fixed turrets of the large Unknown Energy Cell Production. Added them for the S Unknown Energy Cell Production.

sprIder
Last edited by sprIder on Sat, 21. Oct 23, 18:12, edited 20 times in total.

Halpog
Posts: 424
Joined: Sat, 13. Feb 21, 14:09
x4

Re: [Mod] Mining Station

Post by Halpog » Mon, 11. Oct 21, 08:13

mein feedback :

punkt 1 : ich liebe dich :)
punkt 2 : ich liebe dich :)
punkt 3 : ich liebe dich :)

ok spaß bei seite, der mod ist mega geil :) endlich sind sie wieder da . diese stationen sparen soooviele FPS and script gerechne und erspart uns sooo viele laggs .....endlich brauchen wir keine 50 miner mehr die herumschwirren....endlich bleiben uns 30 oder mehr stationen erspart wo wir erz abbauen und sammeln nur um es dann zu verteilen.

was jetzt noch fehlt ist der alte sprung mod damit schiffe , besonders miner udn händler wieder von sektor zu sektor springen können
denn diese begrenzung was miner angeht auf 5 sektoren, ist das grauen ....

was jetzt noch fehlt ist ein mod, mit ner all in one station, um einfach diesem megakomplex mist vorzubeugen . ich krieg den mod nciht hin mit der all in on station, wäre also echt mega hammer wenn du da was machen könntest.
es wäre so geil eine station zu haben an der alles produziert wird was man für eine schiffsweft braucht ( halt wie ein komplex ) nur in einem modul .. um dem gelagge in nem sektor vorzubeugen, nur weil man dort 500 produktionsmodule hat und und 500 schiffe hin und her fliegen ....
als beispiel : erz mehtan helium, also die ganzen mineralien als ressource und als produkt halt all die produkte die man für ne schiffswerft bracuht. ( also geschützturm komponenten,schilde, waffen, usw usw )
ich habs mit handels stationen versucht, oder damit versucht alles anzukaufen, das ist horror.
aber der mod hier von dir jetzt, der erspart uns sehr sehr viel kopfschmerzen

sprIder
Posts: 92
Joined: Sat, 3. Jul 10, 23:23
x4

Re: [Mod] Mining Station

Post by sprIder » Mon, 11. Oct 21, 19:26

Thanks for your feedback, Halpog!

There is also a topic in the German S&M forum. :)

Regading the "all in one" Station, i made some tests as you can see in your own topic. ;)

stb.rweckener
Posts: 889
Joined: Sun, 1. Apr 12, 09:20
x3ap

Re: [Mod] Mining Station

Post by stb.rweckener » Sun, 31. Oct 21, 10:54

In the German forum you can find some solutions on how to get the mod to work.

viewtopic.php?f=184&t=442526

Namyboy
Posts: 99
Joined: Sun, 4. Jan 09, 17:42
x4

Re: [Mod] Mining Station

Post by Namyboy » Mon, 1. Nov 21, 03:52

So got a weird bug. The Ice won´t be produced. Im getting a weird value of -999999 something as Produktion and it does not need wares to produce.

sprIder
Posts: 92
Joined: Sat, 3. Jul 10, 23:23
x4

Re: [Mod] Mining Station

Post by sprIder » Mon, 1. Nov 21, 09:49

I updated the mod yesterday evening. There was a mistake in the non-terran ice mining station. The bug should be fixed. Please download the new version and try it again.

If you used the terran ice mining station say something and i will have a look again.

Halpog
Posts: 424
Joined: Sat, 13. Feb 21, 14:09
x4

Re: [Mod] Mining Station

Post by Halpog » Mon, 1. Nov 21, 12:54

is there any chance to get a version with a lot smaller modell ?

sprIder
Posts: 92
Joined: Sat, 3. Jul 10, 23:23
x4

Re: [Mod] Mining Station

Post by sprIder » Mon, 1. Nov 21, 13:48

An easy way? Nope.

I would need another model since i never found a proper way to scale down an existing one. And the models of the snappoints on the HQ/Mining station would be to small to fit to other moduls. The function "snap with other moduls" would work, but it would look ugly.
And i think there would be some ?game crashing/breaking? bugs, if i change the models and there are already existing Mining Stations in the savegame.

But if you have any good idea of a smaller and existing models i can have a look. The steam version of this mod isn't rolled out yet. And of course it could work if the player destroys all existing ones and updates the mod afterwards.
There is also the idea of additional gas collector stations. It would be suitable to use other stations here.

Halpog
Posts: 424
Joined: Sat, 13. Feb 21, 14:09
x4

Re: [Mod] Mining Station

Post by Halpog » Mon, 1. Nov 21, 21:46

sprIder wrote:
Mon, 1. Nov 21, 13:48
An easy way? Nope.

I would need another model since i never found a proper way to scale down an existing one. And the models of the snappoints on the HQ/Mining station would be to small to fit to other moduls. The function "snap with other moduls" would work, but it would look ugly.
And i think there would be some ?game crashing/breaking? bugs, if i change the models and there are already existing Mining Stations in the savegame.

But if you have any good idea of a smaller and existing models i can have a look. The steam version of this mod isn't rolled out yet. And of course it could work if the player destroys all existing ones and updates the mod afterwards.
There is also the idea of additional gas collector stations. It would be suitable to use other stations here.
no no not like scaling down or something^^ i mean for example the terran l living quarters as model or something like that .

sprIder
Posts: 92
Joined: Sat, 3. Jul 10, 23:23
x4

Re: [Mod] Mining Station

Post by sprIder » Tue, 2. Nov 21, 20:47

It would work. But it will look kinda boring because of no effects. And there would be "only terran" station for obvious reasons. And i don't know how to brush the station more argonish or teladish...

I will look into it the next days. But i can't promise anything.

Halpog
Posts: 424
Joined: Sat, 13. Feb 21, 14:09
x4

Re: [Mod] Mining Station

Post by Halpog » Tue, 2. Nov 21, 22:36

sprIder wrote:
Tue, 2. Nov 21, 20:47
It would work. But it will look kinda boring because of no effects. And there would be "only terran" station for obvious reasons. And i don't know how to brush the station more argonish or teladish...

I will look into it the next days. But i can't promise anything.
it can look kinda boring for me, since i try to "shrink" all and get a compact version of all i build... because i end up in massive frame dropps and laggs in a alater gameplay ...there is such a station with such hugh mining stuff not helpfull, espacaly not when i try to create a shipyard that can run by itself .. it needs 2 of those hugh mining stations, every factory at least 1x, than habbitats, containers, xl,l,s+m productions and so on ^^
and when there are comming tons of ships out , than i cant even move the cam anymore without having any kind of hugh loading laggs, or frame dropps.
that why i was asking :P
ofc i can build a station anywhere else and transport the stuff to the factory, but that wont help too^^
i already edited the x10 factorys to ax 20 factory, so i can just use 1 each of them^^

i have no clue what this script laggs is about but i have 32gb ram, and a 2060 super, and still got trouble, when there are more than just some ships in a sector.


basicaly i need smaller models of the mining station to be able to keep my complex smaller :P

sprIder
Posts: 92
Joined: Sat, 3. Jul 10, 23:23
x4

Re: [Mod] Mining Station

Post by sprIder » Wed, 3. Nov 21, 22:21

It's done. There are now 4 additional small terran mining station based on the Terran L living quarters. Compared to the HQ stations, they produce and require half the amount of material.

I hope everythink works. Feedback is welcome.

Halpog
Posts: 424
Joined: Sat, 13. Feb 21, 14:09
x4

Re: [Mod] Mining Station

Post by Halpog » Thu, 4. Nov 21, 10:21

sprIder wrote:
Wed, 3. Nov 21, 22:21
It's done. There are now 4 additional small terran mining station based on the Terran L living quarters. Compared to the HQ stations, they produce and require half the amount of material.

I hope everythink works. Feedback is welcome.
wow, it works verry well :)))) cant say thnx often enough :)))

heifi
Posts: 81
Joined: Fri, 10. Feb 06, 12:45
x3ap

Re: [Mod] Mining Station

Post by heifi » Sun, 7. Nov 21, 11:38

I really like that mod. It does help reducing the mining ship spam in my games. Thanks for that!

sprIder
Posts: 92
Joined: Sat, 3. Jul 10, 23:23
x4

Re: [Mod] Mining Station

Post by sprIder » Sat, 13. Nov 21, 18:30

Since minerals are not everythink we need, there are now normal and small gas collector stations from the Terrans and the other races.

Halpog
Posts: 424
Joined: Sat, 13. Feb 21, 14:09
x4

Re: [Mod] Mining Station

Post by Halpog » Sat, 13. Nov 21, 21:57

sprIder wrote:
Sat, 13. Nov 21, 18:30
Since minerals are not everythink we need, there are now normal and small gas collector stations from the Terrans and the other races.
einfach nur mega geil, danke :) kann man nicht mehr zu sagen, einfach nur geil

sprIder
Posts: 92
Joined: Sat, 3. Jul 10, 23:23
x4

Re: [Mod] Mining and Gas Collector Stations

Post by sprIder » Fri, 3. Dec 21, 17:14

There are now new S Mining Stations to the other races. And i made a non DlC-Version for those who do not own one or both current DlCs. And overall the production ratios were changed.

Tassekaffe
Posts: 50
Joined: Thu, 10. Feb 22, 19:33
x4

Re: [Mod] Mining and Gas Collector Stations

Post by Tassekaffe » Sun, 6. Mar 22, 21:16

Thank you,all these miners are performance killers on my old system.
Great job and the models look really good !

rgiles18
Posts: 22
Joined: Sat, 19. Mar 22, 04:14
x4

Re: [Mod] Mining and Gas Collector Stations

Post by rgiles18 » Sat, 19. Mar 22, 20:10

I get a message that the Mining Station is installed, now how do I set or build the or these stations? Thank You

sprIder
Posts: 92
Joined: Sat, 3. Jul 10, 23:23
x4

Re: [Mod] Mining and Gas Collector Stations

Post by sprIder » Sun, 20. Mar 22, 12:15

You buy the blueprints from a faction representative you like. Currently not possible at the ones of the Pirate DlC factions. But at all the others. And then you can just build the stations via the normal station build menu.

Post Reply

Return to “X4: Foundations - Scripts and Modding”