[Research] Implementing a cargo bay for the Skunk

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

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

User avatar
Swallen
Posts: 280
Joined: Tue, 11. Oct 11, 19:13
x4

[Research] Implementing a cargo bay for the Skunk

Post by Swallen »

This thread is an attempt to design a mod that would allow for trading directly with the Skunk. For now it's just a place to throw ideas around and see where the limitations and possibilities are regarding to this.

1. Adding cargo pods to the Skunk ship and conducting trade through an in-station NPC.
2. Using a virtual freighter.

1. Proper cargo bay and in-station NPC - suggested by bbeach
Adding cargo capabilities to the Skunk
It is possible to add cargo pod containers to the skunk in the XML for the different types of wares. It's even possible to have those be upgrades to the skunk sold by the mechanic.

Trading
The player would dock and go talk to a Dock Master that would be present in all docking areas. Just as regular traders, this NPC would buy and sell proper wares, the same ones freighters deal with in space. They could charge you an extra for being the middleman and thus being an incentive to use freighter trade over "Skunk trading".

UI
As explained by bbeach on this thread:
bbeach wrote:The problem is the UI. Pretty much anything "new" that we have to implement can only use the radial menu as an interface.

[...]

I messed around all weekend with trying different [] parameters to various menus, but they're not documented at all. I couldn't get a generic selectable list to work that would return the selected element back to me.
2. Using a virtual freighter - this is my original post, a bit too verbose
I have not studied the game files far enough to know if this idea is feasible, and in any case with the bugs currently as they are, I have no way of conducting tests reliably, so I'd really appreciate the insight of those modders who understand the workings and extent of the scripting system better than me (most if not all of you).

Premise
Some have called the freighters "glorified backpacks", as they follow you around if you choose to, and essentially carry goods for you, sometimes in amounts that in other games you would carry yourself for trading with stations directly. Besides their physical presence and interaction with the universe, their implementation doesn't differ that much from a player inventory.

Concept
I wonder if it would be possible to create a virtual freighter, a ghost ship of sorts, that would follow you around and act just as this "glorified backpack". With some clever tweaks to the notification and orders systems it could be made to seem as if it was actually the cargo bay of the Skunk.

That is how inventories (players' and merchants') are implemented in some games, with the exception that I don't think we have a way to attaching a ship to the Skunk to act as a module, so we have to deal with the fact that this "ship" would be an independent entity in-game.

This is where I get into speculation, because my knowledge of the XML files is still very limited. I apologize for any nonsense I may spout, although I don't believe this is that far fetched from what I know so far.

Virtual freighter
A ship would have to be implemented with the following characteristics:
  • · Small
    · Very maneuverable and fast
    · Preferably able to clip through geometry
    · Invincible
    · Invisible (or perhaps drone-sized)
    · Not targetable by NPC ships (or the player for that matter)
Also capable of carrying bulk and perhaps container goods, with a limited cargo space. Its pilot would tantamount to the Skunk's quartermaster of sorts, and it would always follow the player.

This ship would be in possession of the player from the very start of the game.

For the purpose of upgrading cargo space, there could be several versions.

Trading
Once the player finds a trade order they like, they would order the "Albion Skunk" (as shown in the trade computer ship list), to handle the trade. The virtual freighter would proceed to trade just as any other trader. Given a free spot in the trading docks, the trade would happen much faster than if handled by a regular freighter, and the quartermaster would inform the player when the transfer was complete.

---

As I said, although educated, this is speculation at this point. Please feel free to suggest any pitfalls you see in this reasoning and let's see if there is a way to achieve something like this or similar.

Thank you
Last edited by Swallen on Mon, 25. Nov 13, 22:39, edited 1 time in total.
Privata
Posts: 719
Joined: Mon, 19. Dec 11, 22:59
x4

Post by Privata »

I have to say I like this idea , its worth looking in to.
I understand the skunk cant carry tones of E-cells , but why cant it carry say 50 of them? why? its silly , I understand that Item trading is there instade and indeed I love that idea but it would be realy nice if we could trade just a small amount of certain items.

know I have an idea , know I dont want to look like one of thos types that ask for things that cant be done
but what if we could merge drone and cargo trading together , so you buy a special drone that trades but , it cant carry much.

here the thing there many of these types of drones , one per container type.

so I guess its kind of the same idea as you. :)
bbeach
Posts: 100
Joined: Tue, 24. Feb 09, 03:47
x4

Post by bbeach »

I was toying around with it this weekend, but trading completely broke in 1.17 so it made it difficult to make any real progress.

Basically, what I wanted to do was have a "Dock Master" NPC that is in the dock room of every station. He will buy and sell all the wares that the station does for a 2% worse price (man in the middle markup).

It is possible to add cargo pod containers to the skunk in the xml for the different types of wares. It's even possible to have those be upgrades to the skunk sold by the mechanic. Would have been pretty cool and integrated in with the new feel of the game.

The problem is the UI. Pretty much anything "new" that we have to implement can only use the radial menu as an interface.

Meaning, if you wanted a ship to jump to a sector, you could do that using the map because it already has a UI for selecting a sector.

I messed around all weekend with trying different [] parameters to various menus, but they're not documented at all. I couldn't get a generic selectable list to work that would return the selected element back to me.

Then I gave up on the mod(and the companion one that would allow trade between two ships) because I refuse to make a scrollable list using the radial menu.
User avatar
Swallen
Posts: 280
Joined: Tue, 11. Oct 11, 19:13
x4

Post by Swallen »

I'm going to add your angle to the OP if you don't mind. For the sake of documenting options / design possibilities.

As far as I know, the proper UI (lists, menus, detail monitor...) is what's in the compiled Lua part of the game files, which we don't have any means to decompile and modify (nor to create anything new).

Should Egosoft release some sort of tool for this, or even just explain the file format, we would be able to create proper UI solutions.

EDIT: Your idea is much more sensible. I don't have the game in this computer, but I remember seeing in the aiscripts folder a script (with "trade" in its name, heh) that showed you the list of wares in a generic way, meaning every merchant had theirs defined somewhere else. I think the variable was called $WareList or something like that. I clearly remember seeing a for-loop that populated this list with the wares defined by the merchant in question.

I'm sure you've already seen it, but I mention it just in case. As I said, I don't have the files here, but I will look into it myself.
Rath
Posts: 55
Joined: Sat, 7. Feb 04, 13:57
x2

Post by Rath »

For trading in general i much prefer the self checkout at asda as opposed to the wait half an hour before the PC world staff realise someone wants to buy something method that Rebirth has adopted.
KRM398
Posts: 1556
Joined: Wed, 6. Nov 02, 20:31
xr

Post by KRM398 »

If this ever comes to pass remember that in all the X games before a heavy fighter often carried up to 300 cargo units then mostly for missiles and loot after fights so 50 is just a waste of work. If you do it check back and decide what size the Slunk really is..a fighter or corvette and then make cargo space accordingly. Of course its not a freighter so making a living hauling with it would not be possible anyways.

Theres something else to consider...it has a cargo bay. Its not mentioned or the size never is discussed but I gather after fights and sometimes have over 300 units of stuff, 45 units of scrap, or 120 units of something else. It takes it all and no matter how much I've gathered so far it never told me it was full. Its not for trading for sure, but it gathers loot, and that makes it a bulk carrier I guess, but it has to be like 500 units for now or I'd have filled it already. :wink:
Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Post by Vim Razz »

Since item loot is kept in the player inventory rather than assigned to the Skunk, I'm not sure you have a limit at all.

I spent a fair amount of time over the weekend playing around with small item trading to see if it was worth the time (answer: not really) -- buying wares off NPC traders when offered for less than average & selling them when I could find a buyer offering more than average -- and I often had 1000's of units of random junk in my inventory at any given time.


In terms of "what size the Skunk really is", it has exactly the same proportions as the Pride does in AP -- a bit less than half the length of a corvette and slightly longer & much fatter than most M3+ fighters.

In that game, it's cargo capacity is listed as ~1300 units. *shrug*
theqmann
Posts: 23
Joined: Fri, 21. Jan 11, 21:47
x4

Post by theqmann »

what about using the ingame menu to make the playership go trade with a station as if it were an npc freighter? So the top panel where it shows the selected ship could have an option for the Skunk.

It could even be a simple as requiring the player to be within 2km of the trade station and have cargo drones onboard. Then have the drones transfer the wares.
Staberind
Posts: 128
Joined: Wed, 5. May 10, 23:32
x4

Post by Staberind »

^^^^^^^^Same as this really^^^^^


Awesome idea, by the way, I think you can buy those cargo drones for the Pride,, and I would imagine they have an inventory, of sorts, let me check my savegame, if the whole trading drones thing gets unborked, that could be a workaround: you trade what's in the trading drones inventory, obviously, you cannot carry as many as a full sized freighter, say, 5 or 10, as opposed to 50?
Halconnen
Posts: 831
Joined: Sun, 22. Feb 04, 12:55
x3tc

Post by Halconnen »

Cargolifters have 4000 Cargo each and are kind of a good bit larger than the other drones. I don't think you could sensibly fit them into the Skunk.

Hmm.

1300 Cargo units seems like a decent amount, though. Much less than fits even a Gigurum, but enough to fetch small quantities of certain high-value goods yourself.

Return to “X Rebirth - Scripts and Modding”