Jump to content

[Mod] Cargo UI


infal

Recommended Posts

I decided to make a small mod that would let you see the full list of items in your ship's cargo hold.

 

It highlights any irregular items with coloured text so they stand out in the list.

 

Screenshots:

 

p2wd66B.jpg

Stolen and illegal items are red, suspicious is dark yellow, dangerous is yellow. Also, this screen shows the list partly scrolled.

 

(Suspicious sheep... when are sheep not suspicious though...?)

 

i8Tyg7A.jpg

The mod adds an icon to the top right screen

 

AurK80x.jpg

My actual game, not cheating items in. Mostly the items are white with the irregular items being a different colour to stand out.

 

Z1mt0T5.jpg

Here I've abandoned the mission from the player menu and then dumped the cargo with the cargo ui.

 

 

 

Downloads:

 

 

You need to have Mod Loader v1.2.0+

Mod Loader Forum Topic

 

Then you need Cargo UI:

Cargo UI v1.3.2

 

Instructions for installing each, should be in the zip files.

 

 

 

Updates

 

 

v1.3.2 25mar2017

- Mostly just updated to make it work with Mod Loader 1.2.0+ but the way it works is a little more efficient now.

v1.3.1 15Mar2017

- Made this mod work with mod loader to resolve issues where players on servers couldn't use the script because they couldn't access the /run command

v1.01 03Mar2017

- Laserzwei provided feedback and suggestion on a crash that occurred when the empty space in the listbox was clicked. Rookie error, fixed with generous help. Thanks Laserzwei!

 

 

Link to comment
Share on other sites

Looks very good :D

Definitly using this

Thanks!

 

I just added some info about uninstalling to the first post. It seems like the game will delete your ship if it can't find a script so you have to removeScript before deleting the actual file.

Link to comment
Share on other sites

Hey, this is a great mod, I wondered tho, where would I have to change base files so it runs the script on every ship i enter?

 

It's possible, but not as easy as just adding a line in a file somewhere. You'd probably go to server.lua and register a player onShipChanged handler and then in the handler you'd add or remove the script to the ship.

 

 

I don't have any problems with my Listbox:

 

Interesting. Do you use the beta branch?

I'll look back through the code to see if I'm doing anything wrong. I've only been scripting with lua for 2 or 3 days  ;D

 

 

thank you for making this!

 

No probs! I hope you like it!

Link to comment
Share on other sites

I'm using the beta branch .7633

 

You probably get a crash like this:

Fri Mar 03 09:25:49 2017| Error: EXCEPTION_ACCESS_VIOLATION
Fri Mar 03 09:25:49 2017| addr2line -i -e "E:\Program Files (x86)\Steam\steamapps\common\Avorion\bin\Avorion.exe" 000000000066cb93 2>&1
Fri Mar 03 09:25:49 2017| ScriptLine.cpp:?
Fri Mar 03 09:25:49 2017| addr2line -i -e "E:\Program Files (x86)\Steam\steamapps\common\Avorion\bin\Avorion.exe" 000000000066eccb 2>&1
Fri Mar 03 09:25:49 2017| ScriptLine.cpp:?
Fri Mar 03 09:25:49 2017| addr2line -i -e "E:\Program Files (x86)\Steam\steamapps\common\Avorion\bin\Avorion.exe" 0000000000afe54d 2>&1
Fri Mar 03 09:25:49 2017| ldo.c:?

right?

This happens when you call an invalid Entry count:

invalidEntrycount = -1
myListBox:getEntry(invalidEntrycount)

 

If you click in the Empty space below your List,  myListBox.selected will return -1 and trigger the crash.

I'm doing a wild guess and say you didn't sanitize such an input?

Link to comment
Share on other sites

If you click in the Empty space below your List,  myListBox.selected will return -1 and trigger the crash.

I'm doing a wild guess and say you didn't sanitize such an input?

 

Perfect! That was exactly the problem. Thank you! I've updated the first post with a new download and removed the pic with the crash warning.

Link to comment
Share on other sites

Great mod, I love it for my single player game. The only issue I have is that I can't rightly roll this out on my dedicated server because a good number of the players aren't that tech literate and I'd rather avoid needed to tell everyone that they need to do an immersion-killing run command for each ship to get it working. Is there a way that I can modify the base files so that individuals can avoid using the run command? Thanks!

Link to comment
Share on other sites

Great mod, I love it for my single player game. The only issue I have is that I can't rightly roll this out on my dedicated server because a good number of the players aren't that tech literate and I'd rather avoid needed to tell everyone that they need to do an immersion-killing run command for each ship to get it working. Is there a way that I can modify the base files so that individuals can avoid using the run command? Thanks!

ok habs geschaft clientseitiger Mod. Problem müßte ich "/run) für alle freigeben und das kann gefährlich sein

 

gibt das auch serverseitig?

Thanks for the feedback guys. I only speak English but what I'm gathering from Andy's post is that the /run command doesn't work client side on a dedicated server. I only play (and test) in a single player world.

 

I'm working on some code that will allow it to run by adding a line or two to server.lua, and will have an update soontm

Link to comment
Share on other sites

Great mod, I love it for my single player game. The only issue I have is that I can't rightly roll this out on my dedicated server because a good number of the players aren't that tech literate and I'd rather avoid needed to tell everyone that they need to do an immersion-killing run command for each ship to get it working. Is there a way that I can modify the base files so that individuals can avoid using the run command? Thanks!

ok habs geschaft clientseitiger Mod. Problem müßte ich "/run) für alle freigeben und das kann gefährlich sein

 

gibt das auch serverseitig?

Thanks for the feedback guys. I only speak English but what I'm gathering from Andy's post is that the /run command doesn't work client side on a dedicated server. I only play (and test) in a single player world.

 

I'm working on some code that will allow it to run by adding a line or two to server.lua, and will have an update soontm

 

Awesome! I look forward to the update! Thanks again!

Link to comment
Share on other sites

  • 2 weeks later...

would it be possible to modify a bar in for just a visual on cargo volume to how much volume you have?  something similar to the way the game has the cargo show already, but with all this useful information.  but perhaps, vertical next to the list for easier viewing for a graphical presentation of your cargo space and x item taking up that cargo space.

 

besides that it gives a ton of info the other did not yet.

Link to comment
Share on other sites

Yeah it's definitely possible to add more features. The only reason I haven't is because I expected the mod to have a very short lifespan. Koonschi has said somewhere that he's aware of the cargo window problem and will fix it so, when he does, this mod will be redundant.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...