[Starsector Mods][0.95a] Transfer All Items v1.2 (2021/03/27)

  • Post category:Mods
  • Post comments:0 Comments

Transfer All Items

Supports

What is this?
Transfer All Items is a mod for quickly transfer multiple items between your fleet and the market or storage.

Demonstration:

Spoiler: click to expand
Spoiler

Compatibility:
It should work with any other mod and does not require a new game. It only transfers items between the fleet and the market or storage.

How to use:
1. Download and install this mod
2. Make sure this mod is enabled
3. On the market or storage screen:
    – Push the button (Upwards Arrow): Transfers all items from the selected Fleet tab to the market or storage.
    – Push the button (Downwards Arrow): Transfers all items from the selected market or storage tab to the fleet.

Changelog:

Spoiler: click to expand
Spoiler

Version 1.2 (March 27, 2021)
===============================
Bug fix that happens when the speed up option is active.
===============================
 Version 1.1 (January 10, 2020)
===============================
Bug fix that does not work correctly on some non fullscreen resolutions.
After you transfer the last item, you force the rating to leave the screen organized.
===============================
 Version 1.0 (November 11, 2019)
===============================
Initial release

Credits:
For the developers of the game Starsector
LazyWizard
Unofficial Starsector Discord

This is a pretty sweet utility mod! I’ll definitely use this in my own playthroughs, I’ve long wanted to skip dumping weapons into storage individually. Thanks for posting! I’ll let you know if I have any issues  :)

Yow! This is super convenient! Thank you!

Thanks a lot, this should really be an official feature.

…between your fleet and the market or storage

Yep, can’t transfer into throwaway hatch aka “the f**k outta here”, would like to be able to.
Crashed a game with blind attempt to get rid of “allweapons & allwings” results –

Spoiler: click to expand
Spoiler
3804747 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  – java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.MarketMouseClick.getMarket(MarketMouseClick.java:130)
   at data.scripts.MarketMouseClick.clickAllMarket(MarketMouseClick.java:54)
   at data.scripts.TransferAllItems.transferCargoMarketToFleet(TransferAllItems.java:62)
   at data.scripts.TransferAllItems.checkInput(TransferAllItems.java:49)
   at data.scripts.TransferAllItems.advance(TransferAllItems.java:26)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Had to sell for 150mil and throw away usb-wallet into airlock instead. ;D

PS – thanks for the mod, it’s invaluable at exploration & stockpiling stage


Unknown if its a bug but it moves two items then leaves one selected and refuses to move the rest, is this a bug? i hit the up arrow on my keyboard

Unknown if its a bug but it moves two items then leaves one selected and refuses to move the rest, is this a bug? i hit the up arrow on my keyboard

I’m getting the exact same issue on this one


Thanks for the mod!

Unknown if its a bug but it moves two items then leaves one selected and refuses to move the rest, is this a bug? i hit the up arrow on my keyboard

I’m getting the exact same issue on this one

I was getting the same error too.
There are 2 issues in MarketSizeInfo.java

1. The first is the HEIGHT_MIN_BORDER = 20 (MarketSizeInfo.java – l.18) which is affecting this function: (MarketSizeInfo.java – l.127)

Code
private static float calcRowsVisible() {
        float rowsVisible = (float)Math.floor((getScreenHeight() - HEIGHT_MIN_BORDER * 2 - HEIGHT_TAB * 2 -
                              HEIGHT_INFO_TOP - HEIGHT_BUTTONS_MID - HEIGHT_BAR_BOTTOM) / 2F) / 100;
        return Math.min(rowsVisible, MAX_VISIBLE_ROWS);
    }

For 1080p the total height border is 101 and for 960p is 41. I hard-coded the HEIGHT_MIN_BORDER to 101 for me.

2. The second issue is: (MarketSizeInfo.java – l.91)

Code
private static int getWindowsPosY() {
        if (!Display.isFullscreen()) {
            return Display.getY() + getWinTitleBarHeight();
        }

        return 0;
    }

It doesn’t take into account borderless fullscreen, so it still adds getWinTitleBarHeight().

I don’t work with Java or these APIs usually so I hard-coded my fixes for 1080p borderless.
If you want the same fix replace TransferAllItems.jar in /jars with the attached file while we get an update.

[attachment deleted by admin]

…between your fleet and the market or storage

Yep, can’t transfer into throwaway hatch aka “the f**k outta here”, would like to be able to.
Crashed a game with blind attempt to get rid of “allweapons & allwings” results –

Spoiler: click to expand
Spoiler
3804747 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  – java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.MarketMouseClick.getMarket(MarketMouseClick.java:130)
   at data.scripts.MarketMouseClick.clickAllMarket(MarketMouseClick.java:54)
   at data.scripts.TransferAllItems.transferCargoMarketToFleet(TransferAllItems.java:62)
   at data.scripts.TransferAllItems.checkInput(TransferAllItems.java:49)
   at data.scripts.TransferAllItems.advance(TransferAllItems.java:26)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Had to sell for 150mil and throw away usb-wallet into airlock instead. ;D

PS – thanks for the mod, it’s invaluable at exploration & stockpiling stage

Is this error constantly happening? Maybe it’s incompatible with some other mod.


Thank you for the informations. They were helpful in solving the problem. But my solution is totally different from yours. Anyway when you can test my new version and see if it is working correctly at its resolution. I await a return. Thanks.

Thanks for the mod!

Unknown if its a bug but it moves two items then leaves one selected and refuses to move the rest, is this a bug? i hit the up arrow on my keyboard

I’m getting the exact same issue on this one

I was getting the same error too.
There are 2 issues in MarketSizeInfo.java

1. The first is the HEIGHT_MIN_BORDER = 20 (MarketSizeInfo.java – l.18) which is affecting this function: (MarketSizeInfo.java – l.127)

Code
private static float calcRowsVisible() {
        float rowsVisible = (float)Math.floor((getScreenHeight() - HEIGHT_MIN_BORDER * 2 - HEIGHT_TAB * 2 -
                              HEIGHT_INFO_TOP - HEIGHT_BUTTONS_MID - HEIGHT_BAR_BOTTOM) / 2F) / 100;
        return Math.min(rowsVisible, MAX_VISIBLE_ROWS);
    }

For 1080p the total height border is 101 and for 960p is 41. I hard-coded the HEIGHT_MIN_BORDER to 101 for me.

2. The second issue is: (MarketSizeInfo.java – l.91)

Code
private static int getWindowsPosY() {
        if (!Display.isFullscreen()) {
            return Display.getY() + getWinTitleBarHeight();
        }

        return 0;
    }

It doesn’t take into account borderless fullscreen, so it still adds getWinTitleBarHeight().

I don’t work with Java or these APIs usually so I hard-coded my fixes for 1080p borderless.
If you want the same fix replace TransferAllItems.jar in /jars with the attached file while we get an update.


Thank you for the informations. They were helpful in solving the problem. But my solution is totally different from yours. Anyway when you can test my new version and see if it is working correctly at its resolution. I await a return. Thanks.

Thanks for the quick update! It seems to work perfectly now  ;D

There was another issue in the previous version where after some time, the game gets sluggish and starts dropping frames and the script used to do every command in less than 1 second.
I’m going to test the update more, later this evening.


Is this error constantly happening? Maybe it’s incompatible with some other mod.

This made with previous version, and I’ve manually ejected everything at once or separately to check if there is really could be an issue with anything specifically, there wasn’t.
I’ve made few tries with different tabs, but they all gave same error.

Spoiler: click to expand
Spoiler
Code
149025 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at data.scripts.MarketMouseClick.getMarket(MarketMouseClick.java:130)
at data.scripts.MarketMouseClick.clickAllMarket(MarketMouseClick.java:54)
at data.scripts.TransferAllItems.transferCargoMarketToFleet(TransferAllItems.java:62)
at data.scripts.TransferAllItems.checkInput(TransferAllItems.java:49)
at data.scripts.TransferAllItems.advance(TransferAllItems.java:26)
at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

***
This one with 1.1

Spoiler: click to expand
Spoiler
Code
112435 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at data.scripts.MarketMouseClick.getMarket(MarketMouseClick.java:127)
at data.scripts.MarketMouseClick.clickAllMarket(MarketMouseClick.java:55)
at data.scripts.TransferAllItems.transferCargoMarketToFleet(TransferAllItems.java:62)
at data.scripts.TransferAllItems.checkInput(TransferAllItems.java:49)
at data.scripts.TransferAllItems.advance(TransferAllItems.java:26)
at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

There isn’t much details – in an open space, open inventory and press Down on keyboard, inventory tabs doesn’t matter, amount of items in a tab doesn’t matter either.


You can save the store side game you use the mod and send the attachment of your save. It will be easier for me to test and find out what is going on.

Is this error constantly happening? Maybe it’s incompatible with some other mod.

This made with previous version, and I’ve manually ejected everything at once or separately to check if there is really could be an issue with anything specifically, there wasn’t.
I’ve made few tries with different tabs, but they all gave same error.

Spoiler: click to expand
Spoiler
Code
149025 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at data.scripts.MarketMouseClick.getMarket(MarketMouseClick.java:130)
at data.scripts.MarketMouseClick.clickAllMarket(MarketMouseClick.java:54)
at data.scripts.TransferAllItems.transferCargoMarketToFleet(TransferAllItems.java:62)
at data.scripts.TransferAllItems.checkInput(TransferAllItems.java:49)
at data.scripts.TransferAllItems.advance(TransferAllItems.java:26)
at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

***
This one with 1.1

Spoiler: click to expand
Spoiler
Code
112435 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at data.scripts.MarketMouseClick.getMarket(MarketMouseClick.java:127)
at data.scripts.MarketMouseClick.clickAllMarket(MarketMouseClick.java:55)
at data.scripts.TransferAllItems.transferCargoMarketToFleet(TransferAllItems.java:62)
at data.scripts.TransferAllItems.checkInput(TransferAllItems.java:49)
at data.scripts.TransferAllItems.advance(TransferAllItems.java:26)
at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

There isn’t much details – in an open space, open inventory and press Down on keyboard, inventory tabs doesn’t matter, amount of items in a tab doesn’t matter either.


I have error with this mod, but can’t received error massage. the error is, I can not transfer all stuff but only one stuff.
and more importantly, it’s working after start game. but over time, the mod no longer function, and transfer only one stuff.
I want to report every information. Just tell me what you need. Thank you!

Hi! Fantastic mod, however just a heads up for people also getting the same issue: if you have the “pan view up/down/right/left” option binded to up/down, items will only move one at a time instead of all at once. Can hardly be considered a bug tho, but still something to consider.

Edit: Nevermind, still have it. Worked for one test for some reason, but it’s now back to one at a time. Bug it probably is, then.

Leave a Reply