Tabbed Cargo Holds

A place to discuss mods in development and concepts for new mods.
Post Reply
relanat
Militia Commander
Militia Commander
Posts: 438
Joined: Tue Nov 05, 2013 9:56 am

Sun Oct 22, 2017 8:35 am

Attached is a Tabbed Cargo Hold mod which does as Latheos suggested in this topic https://forums.kronosaur.com/viewtopic.php?f=3&t=8102. It overwrites game dockscreen 'dsCargoHold'. Be advised there hasn't been much testing of the mod.

It gives a tabbed playership cargo hold with:
Usable,
Weapons,
Armor,
Devices (weapons excluded),
Ammo and
All tabs.
A "General" tab as well as those listed in the other topic has been added. "General" has everything except armor, devices and ammo and could probably exclude "Usable " as well.

"Damaged" is another option but is probably more applicable to looting (see below).



Also attached is some code that gives tabbed cargo holds to EI Freighter Autons (based on 1.8a2 code). NOTE THIS IS NOT A MOD, It's just the code directly related to the cargo hold. For the mod see this topic http://forums.kronosaur.com/viewtopic.php?f=24&t=8377 (the xelerus version is broken) or download from xelerus.

This code could be the basis of tabbed mules, crates and dead stations.

A quick summary (if I've got it right):
dsRPGLoot needs to be overwritten or replaced with a custom dockscreen.
ListOptions= criteria must be "*".
Then create a lambda like rpgD789FreighterCreateCargoHoldTabs (attached) and use whichever categories you like. See game lambda rpgCreateBuyItemTabs in Transcendence_Source as well as the lambda in the attached mod for more examples.
Run that lambda inside the ListOptions XML.

Put the lambda in a <Globals> block.

The function list shows item criteria which can be used in the lambda categories.


A modified copy of dsRPGJettison is also included which allows cargo space to be shown all the time. Standard game dsRPGJettison only shows cargo space in non-playership objects if there is less than 200 tons of space left. Only relevant to really large mules, drones or freighters/ships with holds larger than 200 tons.
Attachments
Tabbed Cargo Hold.xml
(5.81 KiB) Downloaded 9 times
example code for tabs NOT A MOD.xml
(8.22 KiB) Downloaded 7 times
Last edited by relanat on Sat Nov 04, 2017 12:12 am, edited 1 time in total.

relanat
Militia Commander
Militia Commander
Posts: 438
Joined: Tue Nov 05, 2013 9:56 am

Wed Oct 25, 2017 11:18 pm

Some more example code. This taken from an incomplete storage station mod which creates two categories of the station inventory using 'objSetItemData' (thanks to NMS for code help).

The player stores items in the station.
Items in the station inventory are, by default, held in the station but can be selected to be transfered to another system by a NPC freighter.
If the item is selected for transfer then it gets 'itemdata 'transfer' added to it and appears in the 'Transfer' tab, otherwise it stays in the 'Store' tab.
Attachments
more tab code examples NOT A MOD.xml
(1.71 KiB) Downloaded 3 times

Post Reply