Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: [1] 2 3 4

Author Topic: [0.95a] Transfer All Items v1.2 (2021/03/27)  (Read 114310 times)

Nociam

  • Ensign
  • *
  • Posts: 11
    • View Profile
[0.95a] Transfer All Items v1.2 (2021/03/27)
« on: November 11, 2019, 03:02:21 AM »

Transfer All Items

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

Demonstration:
Spoiler
[close]

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
Quote
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
[close]

Credits:
For the developers of the game Starsector
LazyWizard
Unofficial Starsector Discord
« Last Edit: March 27, 2021, 03:19:46 PM by Nociam »
Logged

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
Re: [0.9.1a] Transfer All Items v1.0 (2019/11/11)
« Reply #1 on: November 11, 2019, 04:01:26 AM »

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  :)
Logged

tantananan

  • Ensign
  • *
  • Posts: 48
    • View Profile
Re: [0.9.1a] Transfer All Items v1.0 (2019/11/11)
« Reply #2 on: November 11, 2019, 06:58:40 AM »

Yow! This is super convenient! Thank you!
Logged

Cyan Leader

  • Admiral
  • *****
  • Posts: 718
    • View Profile
Re: [0.9.1a] Transfer All Items v1.0 (2019/11/11)
« Reply #3 on: November 13, 2019, 06:00:06 PM »

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

Kulverstukass

  • Lieutenant
  • **
  • Posts: 54
    • View Profile
Re: [0.9.1a] Transfer All Items v1.0 (2019/11/11)
« Reply #4 on: December 22, 2019, 12:03:33 PM »

Quote
...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
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)
[close]
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
Logged
Buckle up for broken english vocabulary, comrade!

OldManHenderson

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: [0.9.1a] Transfer All Items v1.0 (2019/11/11)
« Reply #5 on: December 23, 2019, 01:30:55 AM »

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
Logged

Fantastic Chimni

  • Commander
  • ***
  • Posts: 104
  • Chimni
    • View Profile
Re: [0.9.1a] Transfer All Items v1.0 (2019/11/11)
« Reply #6 on: December 23, 2019, 01:50:59 AM »

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
Logged

pozix

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: [0.9.1a] Transfer All Items v1.0 (2019/11/11)
« Reply #7 on: January 09, 2020, 07:42:21 AM »

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]
« Last Edit: January 09, 2020, 07:46:16 AM by pozix »
Logged

Nociam

  • Ensign
  • *
  • Posts: 11
    • View Profile
Re: [0.9.1a] Transfer All Items v1.0 (2019/11/11)
« Reply #8 on: January 10, 2020, 04:47:01 AM »

Quote
...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
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)
[close]
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.
Logged

Nociam

  • Ensign
  • *
  • Posts: 11
    • View Profile
Re: [0.9.1a] Transfer All Items v1.0 (2019/11/11)
« Reply #9 on: January 10, 2020, 04:49:06 AM »

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.
Logged

pozix

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: [0.9.1a] Transfer All Items v1.0 (2019/11/11)
« Reply #10 on: January 10, 2020, 07:51:28 AM »

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.
Logged

Kulverstukass

  • Lieutenant
  • **
  • Posts: 54
    • View Profile
Re: [0.9.1a] Transfer All Items v1.0 (2019/11/11)
« Reply #11 on: January 11, 2020, 01:47:29 PM »

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
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)
[close]

***
This one with 1.1
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)
[close]

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.
Logged
Buckle up for broken english vocabulary, comrade!

Nociam

  • Ensign
  • *
  • Posts: 11
    • View Profile
Re: [0.9.1a] Transfer All Items v1.0 (2019/11/11)
« Reply #12 on: January 11, 2020, 10:52:55 PM »

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
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)
[close]

***
This one with 1.1
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)
[close]

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.
Logged

BoraYeou

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.9.1a] Transfer All Items v1.1 (2020/01/10)
« Reply #13 on: January 25, 2020, 05:29:42 AM »

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!
Logged

Soñjer

  • Ensign
  • *
  • Posts: 15
    • View Profile
Re: [0.9.1a] Transfer All Items v1.1 (2020/01/10)
« Reply #14 on: March 07, 2020, 12:27:29 PM »

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.
« Last Edit: March 07, 2020, 12:50:12 PM by Soñjer »
Logged
Pages: [1] 2 3 4