[MOD] Space Station Recycling v0.01

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

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

User avatar
NZ-Wanderer
Posts: 1627
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer »

yup it was a shipyard :D
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

Well, two options spring to mind...


1. De-pressurisation.
2. I think swatti once mentioned a mod that increases the number of passengers.

:P
Zarjazz
Posts: 55
Joined: Tue, 5. Dec 06, 04:05
x4

Post by Zarjazz »

It would be a nice addition if you could also do this during the build period. I don't really want to have to finish building a particular station just to then blow it up :)
jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth »

NZ-Wanderer wrote:Great mod, thank you :)
Just one little query if I may, I recycled one of my stations, but now I have 3 ship dealers camped out in the back of my skunk with no way to get rid of them.. Any ideas??
Oops, sorry to hear that, but thanks for letting me know.

I guess that the shipyard creation script creates them but they won't have a fire capability as they cannot normally be hired at stations :(

I will add them to the todo list to be excluded from transfer to the skunk to close the stable door.

As for zapping the unwanted boarders I will give it some thought, if you don't want to edit the savegame then its going to be some code. The actual code isn't much of a problem but I need to think how best to present it to the general population. Maybe a utility sub menu or an auto cleanup of ship dealers when you go into the Station Destroy/Recycle menu.
swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti »

Am i mistaken or do have to "complete" the station before i can scrap it? May explain my issue before...
User avatar
NZ-Wanderer
Posts: 1627
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer »

jth wrote:As for zapping the unwanted boarders I will give it some thought, if you don't want to edit the savegame then its going to be some code.
I don't mind editing save files, as long as you can tell me what to edit out :)
(Keeping in mind that there will be other ship dealers in the save game cause of my other shipyards, so they would have to be skunk related in the save :)
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.
Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Post by Vim Razz »

NZ-Wanderer wrote:I don't mind editing save files, as long as you can tell me what to edit out :)
Nothing that drastic should be necessary.

I threw this little mod together kind of quickly (on break at work) and haven't had time to actually test it yet, but it should provide a "You're fired" convo option for ship traders or small ship traders (assuming blackrain hasn't used a custom actor type) who are onboard the skunk that will allow you to remove them cleanly:
https://www.dropbox.com/s/gwpkm3iscmaaf ... r.zip?dl=0

Edit: fixed DL link

If it doesn't work, let me know, though I wont have time to chase the problem down until tonight if there is one.
Last edited by Vim Razz on Wed, 5. Nov 14, 18:31, edited 1 time in total.
jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth »

swatti wrote:Am i mistaken or do have to "complete" the station before i can scrap it? May explain my issue before...
Just had a look at the code, you should have to complete whatever stage that you are building before it will recycle or destroy the station. You don't have to build every single module though.

With the v0.01 code if you select the menu options and go through with destruction or recycling then you are OK and can continue recycling. But if you ever chicken out part way then the menu option vanishes and never ever reappears. Re-installing the script will not help, its stored the running state of the top level cue in all subsequent save games.

Other people are also reporting vanishing menus. Its a bit complicated because I need to prevent you from recycling two stations at the same time but I also need you to be able to pop in and out of the menu options.

I have just written a a fix for the two issues that I have found with the triggering code that should stop the menu option from vanishing again. One of the fixes should also provide a work around for save games. Its taken me about 3 hours so far.

I need to test it a bit more and I would also like to fix the shipyard dealers before releasing v0.02

The ship dealers also require a fix and a mechanism to get them out of the Skunk without asking anyone to edit save games.
swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti »

I dont think many ppl "need" to have the ppl returned to you... considoring station price-range, the ppl are quite cheap to replace. Trust me, im an investor IRL ^^
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

How about Specialists?
User avatar
NZ-Wanderer
Posts: 1627
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer »

Vim Razz wrote:but it should provide a "You're fired" convo option for ship traders or small ship traders (assuming blackrain hasn't used a custom actor type) who are onboard the skunk that will allow you to remove them cleanly:
https://www.dropbox.com/s/gwpkm3iscmaaf ... r.zip?dl=0
If it doesn't work, let me know, though I wont have time to chase the problem down until tonight if there is one.
Yup, I now have the Your Fired option, however, clicking on that does nothing, I tried it in space, tried it docked to another ship, tried it landed on a station and I tried it face to face, none of them worked..
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.
Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Post by Vim Razz »

NZ-Wanderer wrote:Yup, I now have the Your Fired option, however, clicking on that does nothing, I tried it in space, tried it docked to another ship, tried it landed on a station and I tried it face to face, none of them worked..
Odd. I finally got a chance to try it in game and it worked fine. can you share a debug log by any chance? There should be a line like this in there:
*** Context:md.NPC_Shiptrader.SectionHandler<inst:824798>: <event_conversation_next_section> section: 'cArch_SpecialShiptraderRemovalTool'
User avatar
NZ-Wanderer
Posts: 1627
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer »

hmm, this what you want?

http://pastebin.com/awbTME6w
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.
jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth »

Sparky Sparkycorp wrote:How about Specialists?
That's primarily why I did it, there seems to be a very limited number of them and they weren't cheap. Also if you are rebuilding elsewhere then having the crew ready to go is useful. There aren't many managers left in DeVries after my building spree either :)

I have been thinking about writing a mod that moves fired crew into the station that you are on when you fire them rather than just destroy them. That way you could park them for later use and free up space in the skunk :)
swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti »

If im not mistaken you can call back specialists "manually"
Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Post by Vim Razz »

NZ-Wanderer wrote:hmm, this what you want?

http://pastebin.com/awbTME6w
Yes, thank you. It looks like it loaded properly (for a mod not packed in .cat/.dat files), but it will take longer to see in anything else you're running might be causing troubles.

for now, I replaced the DL file with a more abbreviated version that skips the NPC dialog and cutscene in case those elements were causing problems with the NPC macro for your shiptraders.


@ jth --

Good thinking, though it seems like an entitytype check before starting transport to the skunk should be sufficient to prevent the kind of problems here.

Regarding the CV crew, you might take a look at how marine officers are handled during boarding operations rather than cloning types. You can store them in the cue for a time until the new CV is ready to accept them.

Return to “X Rebirth - Scripts and Modding”