[MOD] Station Build Service

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

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

Phipsz
Posts: 334
Joined: Mon, 23. Apr 12, 23:56
x4

Post by Phipsz » Mon, 11. Apr 16, 18:23

@alexalsp: it depends on the possibility of building stations disconnected from defined build locations. I will have a look at some point to maybe spawn base parts of a station and connect a buildership to it, but <construct_station /> needs a buildlocation as parameter...

@HunEndorfin: I was at first wondering what charge I should take (20% was with Hephaistos Corp, for those that had the Bonus Package of X3AP). I chose 50% charge, because all station parts are constructed without further interaction and, when using the "cheaty" version, all wares neede will be supplied as well. I'll see if I lower it for the next update (I think 25-30% are indeed reasonable as well), but I have some things to fix before I do that (I found that a station may not be constructed properly as of now, when I connected a cv to a built station, the station was partly rebuilt...). for now, if you want stuff cheaper, there are two positions that need modifying:
  • ui/p_order_station_overview.lua: line ~47, totalcost = totalcost * 1.5 <- change 1.5 to 1.3 for 30% charge or 1.25 for 25% charge
  • md/pstationbuildservice.xml: line ~76, <set_value name="$stationcost" exact="($stations.{$i}.$resourceneed.$totalcost)Cr * 1.5" /> <- again change 1.5 to whatever wanted

HunEndorfin
Posts: 7
Joined: Sun, 13. Mar 16, 14:53

Post by HunEndorfin » Tue, 12. Apr 16, 18:54

it worked, now one more question, after the service transferred the station to me, the constructor ship disappeared.
W/o constructor, i cant repair the station (i play on hard so its matter of time, until reivers demage it.)

Phipsz
Posts: 334
Joined: Mon, 23. Apr 12, 23:56
x4

Post by Phipsz » Wed, 13. Apr 16, 00:40

Well, they need the CV for building the next stations, don't they? ;) I personally play with a mod allowing to place engineers on your stations, but you could always assign a new cv yourself. you can actually then assign any cv to any station, so an albion-cv can indeed repair ol stations when connected to one

HunEndorfin
Posts: 7
Joined: Sun, 13. Mar 16, 14:53

Post by HunEndorfin » Wed, 13. Apr 16, 21:31

*sigh* building an empire is a hard thing..
Now i've encountered an another problem, stations wont finish cause only a few fusion reactors present on the whole map.
I bought some, but cant manually trade with the cv, cause some error "8".
...And despite i have the res. spawn version of this mod, no resources spawning, all buildings(6) stucked at somewhere around the last stages, and leptons sitting around them with no command msg.

Phipsz
Posts: 334
Joined: Mon, 23. Apr 12, 23:56
x4

Post by Phipsz » Thu, 14. Apr 16, 12:38

I have set the cvs to restricted trading, so only their own ships may support them. the leptons have a "None"-command? or the "searching for trades" one? if the first, you have encountered a bug I thought I already pushed a bugfix for. I will see if I can push the next update until tomorrow. I need to test a few other changes I made though, which may take a few hours to test, even with sinza...

HunEndorfin
Posts: 7
Joined: Sun, 13. Mar 16, 14:53

Post by HunEndorfin » Thu, 14. Apr 16, 19:00

Yeah it was none command, so looking forward to that fix. :)

Phipsz
Posts: 334
Joined: Mon, 23. Apr 12, 23:56
x4

Post by Phipsz » Thu, 14. Apr 16, 20:05

pushed an update. all supply ships should be killed and new ones spawned, just in case. this I could not test sadly, as I cannot reproduce the bug anymore.

HunEndorfin
Posts: 7
Joined: Sun, 13. Mar 16, 14:53

Post by HunEndorfin » Thu, 14. Apr 16, 21:49

Since i have to restart due to the old file, i'l see that in sometimes.
Btw, this mod is compatible with the campaign?

Phipsz
Posts: 334
Joined: Mon, 23. Apr 12, 23:56
x4

Post by Phipsz » Thu, 14. Apr 16, 22:19

HunEndorfin wrote:Since i have to restart due to the old file, i'l see that in sometimes.
Btw, this mod is compatible with the campaign?
should be compatible, didn't test but it should be. the ships needed for building are always spawned in the same cluster the player is in (though not the same sector). Lazarus Corporation is neutral to everybody except the typical criminals, so nobody should be attacking the ships. they are indestructable as well for now, did not yet want to handle disruptions during build

User avatar
Ricemanu
Posts: 95
Joined: Sat, 7. Feb 04, 22:41
x4

Post by Ricemanu » Sat, 30. Apr 16, 02:52

Oh my God, yes.
I've spent the last sessions building new modules. Then going to the next station. I have enough money, but i have to click click click... this looks like absolute candy. Thank you so much for your great efforts. I'm already building 6 stations :)
:wink:

Is there any chance we'll see a similar tool from you, but for ships?
Because i buy ships and build stations all the time, not much else i'm doing really :P (being choked by not enough resources/too slow player shipyards/too much clicky click) like a ship mass order script for Billion-Credit Corporations like me :D

Keep up the good work, you rock.

User avatar
Ricemanu
Posts: 95
Joined: Sat, 7. Feb 04, 22:41
x4

Post by Ricemanu » Sat, 30. Apr 16, 15:08

Ricemanu wrote:Oh my God, yes.
I've spent the last sessions building new modules. Then going to the next station. I have enough money, but i have to click click click... this looks like absolute candy. Thank you so much for your great efforts. I'm already building 6 stations :)
:wink:

Is there any chance we'll see a similar tool from you, but for ships?
Because i buy ships and build stations all the time, not much else i'm doing really :P (being choked by not enough resources/too slow player shipyards/too much clicky click) like a ship mass order script for Billion-Credit Corporations like me :D

Keep up the good work, you rock.
I finished my first stations, nice! The specialist is a nice touch, but why not a manager and Def Officer as well? And for an additional fee, already set up with a Scaldis (one can dream! :P)

Phipsz
Posts: 334
Joined: Mon, 23. Apr 12, 23:56
x4

Post by Phipsz » Thu, 5. May 16, 12:32

Ricemanu wrote:Oh my God, yes.
I've spent the last sessions building new modules. Then going to the next station. I have enough money, but i have to click click click... this looks like absolute candy. Thank you so much for your great efforts. I'm already building 6 stations :)
:wink:
exactly the reason I wrote this mod :)
Ricemanu wrote:Is there any chance we'll see a similar tool from you, but for ships?
Because i buy ships and build stations all the time, not much else i'm doing really :P (being choked by not enough resources/too slow player shipyards/too much clicky click) like a ship mass order script for Billion-Credit Corporations like me :D

Keep up the good work, you rock.
Hm, maybe I'll make a "production queue" for capital shipyards. Just "spawning" the ships is, imho, unimmersive.I kind of want to keep my mods immersive, for this mod I originally planned to add a warehouse storing all wares needed for station building so that there is no need to spawn the wares for building. I'm still planning to, but I'm only really modding when I'm currently playing X, and atm I don't. mostly I play games for 1-3 month in a row and then switch to other games for similar amounts of time, so you'll have to wait for my X:R-slot ;)

oh, and concerning the manager/def-officer: I personally have preferences concerning the the voice types of these entity types, so I didn't add them, too. also, they are available in abundance, as opposed to specialists.

User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

Post by Simoom » Sat, 7. May 16, 05:16

Hey Phipsz!

Are stations built through the service always fully-extended? If so, how difficult would it be to write a custom UI menu where you can check/uncheck each build able station sequence/stage before you "order" the station?

I have been looking over the Architect's MD file and have some rough idea on how this might be done... the custom menu would first pull the construction plan from the selected station macro, then display each sequence/stage in the plan (the Architect's build menu already does this). There would be a checkbook next to each sequence/stage that could be built, and those checked would have their corresponding sequence/stage letter/number passed back via the returnsection...

The station building or spawning script can then use this returnsection to create only the desired sequences/stages.

But I have no idea how to even start creating a custom UI of this sort... LUA is so confusing! xD

Phipsz
Posts: 334
Joined: Mon, 23. Apr 12, 23:56
x4

Post by Phipsz » Sat, 7. May 16, 20:24

Simoom wrote:Hey Phipsz!

Are stations built through the service always fully-extended? If so, how difficult would it be to write a custom UI menu where you can check/uncheck each build able station sequence/stage before you "order" the station?

I have been looking over the Architect's MD file and have some rough idea on how this might be done... the custom menu would first pull the construction plan from the selected station macro, then display each sequence/stage in the plan (the Architect's build menu already does this). There would be a checkbook next to each sequence/stage that could be built, and those checked would have their corresponding sequence/stage letter/number passed back via the returnsection...

The station building or spawning script can then use this returnsection to create only the desired sequences/stages.

But I have no idea how to even start creating a custom UI of this sort... LUA is so confusing! xD
hm, would be possible. actually pretty simple when the UI is done as I mostly use copies of or even the original scripts for building. I didn't check how checkboxes work exactly, but it should not be too difficult. But as with the feature-request concerning ship-building, I will consider this when next playing X:R myself. Currently I only do bugfixes.

oh, and lua actually is pretty simple, if you are used to scripting languages. once you get the hang of it, the only question most of the time is only which tools/methods you have available :)

User avatar
Ricemanu
Posts: 95
Joined: Sat, 7. Feb 04, 22:41
x4

Post by Ricemanu » Wed, 11. May 16, 22:26

Production Queue sounds good. I agree with you - the real production in X is actually one of the reasons the series shines so much compared to other games. I've been using the "Over 5 Million Autobuy" Feature implemented by CWIR tough, because everything takes so long already, it just wouldn't be fun anymore.

What do you mean by preference concerning the voices? Do you mean their voice actors? In any event, you need them to man stations properly, so... :D

User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

Post by Simoom » Thu, 12. May 16, 15:54

Phipsz wrote:hm, would be possible. actually pretty simple when the UI is done as I mostly use copies of or even the original scripts for building. I didn't check how checkboxes work exactly, but it should not be too difficult. But as with the feature-request concerning ship-building, I will consider this when next playing X:R myself. Currently I only do bugfixes.
Hahah, lemme know if you ever do... if I don't figure out LUA by then I may have to steal your codes... :D

spamjam
Posts: 37
Joined: Sat, 17. May 14, 21:16
x4

Post by spamjam » Thu, 12. May 16, 17:09

Hey Phipsz, would it be possible for you to provide your mod with a "keep the CV" version? I´d like to keep the CV after the station is finished.

Also, since I´m having trouble especially when building warehouses. Their weapon-outfit is only build with 50% availability. So I need to buy a new CV (additional 8 millions) and reconnect it to the station. Then the new CV has to build the first module anew (for a warehouse this means additional 20 million credits on top). After that, the missing weapons can be outfitted for another 14 millions.

I´d be more than happy to pay these expenses directly when buying the station. Just to safe the time for "nurturing" the build process :)

Thx for your work!! Really appreciated...

Cheers
Dad

Phipsz
Posts: 334
Joined: Mon, 23. Apr 12, 23:56
x4

Post by Phipsz » Thu, 12. May 16, 17:52

@Ricemanu: Yes, I personally don't quite like some of the VAs. anyway, since this change did not need thinking and only copy/pasting like ten lines of code, I will upload a version with added manager/DO sometime the next days.

@Simoom: oh, I will, it just may take some months :P

@spamjam: hm, with the warehouse sounds like a bug to me. I had changed some lines of code before and that at least fixed the very same problem with Cell Recharge Facs. Or maybe this is a problem that only sometimes occurs, I'll check it out the next days. I'll also upload a version to keep the CV, It's just commenting out some lines of code and adding some others (I hope ^^")

User avatar
Ricemanu
Posts: 95
Joined: Sat, 7. Feb 04, 22:41
x4

Post by Ricemanu » Thu, 12. May 16, 21:25

Phipsz wrote:@Ricemanu: Yes, I personally don't quite like some of the VAs. anyway, since this change did not need thinking and only copy/pasting like ten lines of code, I will upload a version with added manager/DO sometime the next days.
Wow. My hat off to you.
Thanks to guys like you i keep playing this game :)

spamjam
Posts: 37
Joined: Sat, 17. May 14, 21:16
x4

Post by spamjam » Wed, 18. May 16, 12:09

Great! Thanks a lot.
Will try the new version....

Cheers,
Dad

Post Reply

Return to “X Rebirth - Scripts and Modding”