ifritdiezel / is-seedfinder

finds shattered pd seeds based on set criteria. includes some extra features
GNU General Public License v3.0
5 stars 5 forks source link

How do I start shattered pixel dungeon on "first thread" on MacBook m1 pro (Sonoma)? #1

Closed Prakash4844 closed 2 months ago

Prakash4844 commented 2 months ago

I have tried the following commands:

$ open -n ./Shattered\ Pixel\ Dungeon.app -args XstartOnFirstThread
$ open -n ./Shattered\ Pixel\ Dungeon.app -args -XstartOnFirstThread
$ ./Shattered\ Pixel\ Dungeon.app/Contents/MacOS/Shattered\ Pixel\ Dungeon -XstartOnFirstThread
$  open -n ./Shattered\ Pixel\ Dungeon.app &
$ ./Shattered\ Pixel\ Dungeon.app -XstartOnFirstThread

None of them worked. i always get the following output:

❯ java -jar is-seedfinder-2.4.1v1.jar -mode find -floors 4 -items in.txt -output out.txt
Error: ShatteredPD must start on the first thread in order to work on macOS.
  To avoid this error, run the game with the "-XstartOnFirstThread" argument
  Now attempting to relaunch the game on the first thread automatically:

[Controllers] added manager for application, 1 managers active
[Controllers] removed manager for application, 0 managers active
(ignore the warnings above)
usage: is-seedfinder
 -b,--barren_land               enable Barren Land (generation-altering
                                challenge)
 -c,--compact                   remove most whitespace from the output to
                                make it compact
 -condition <arg>               ANY to find any listed items or ALL to
                                find all items
 -d,--into_darkness             enable Into Darkness (generation-altering
                                challenge)
 -e,--exact_upgrades            only detect items when they're exactly the
                                specified level
 -end,--ending_seed <arg>       seed to end with, default max seed
 -floors <arg>                  how deep to scan
 -items <arg>                   file containing items
 -mode <arg>                    scan/find/test
 -output <arg>                  file to write the results to
 -q,--quiet                     skip printing the intro message and only
                                output seeds in AAA-AAA-AAA format to
                                console
 -r,--runes                     enable Forbidden Runes
                                (generation-altering challenge)
 -s,--skip_consumables          don't print consumables in the report
 -seed <arg>                    seed to scan
 -seeds,--seeds_to_find <arg>   how many seeds to find before stopping
 -start,--starting_seed <arg>   seed to start with, default 0
 -u,--uncurse                   only finds seeds with enough scrolls of
                                remove curse to uncurse all requested
                                items
usage example: java -jar seedfinder.jar -mode find -items in.txt
ifritdiezel commented 2 months ago

sorry i have no idea as i have never owned a mac device. i'll keep the issue open and ask around to try and find a solution for the future if you have a discord i can send you an invite to a server where the seedfinder is hosted as a bot accessible through commands and hosted on my own PC

TextualMold9830 commented 2 months ago

@Prakash4844 Add -XstartOnFirstThread before -jar

ifritdiezel commented 2 months ago

it appears that the automatic restart wipes all the arguments. i'm not sure how to fix this and don't have a mac device to test on. if someone creates a pull request to fix this i'll merge it

Prakash4844 commented 2 months ago

Thanks! @TextualMold9830 @ifritdiezel

Add -XstartOnFirstThread before -jar

Solved the issue.

Now i am seeing

java -XstartOnFirstThread -jar is-seedfinder-2.4.1v1.jar -mode find -floors 4 -items in.txt -output out.txt
[Controllers] added manager for application, 1 managers active
[Controllers] removed manager for application, 0 managers active
Starting IS-Seedfinder, game version: 2.4.1

Not sure why it says game version as 2.4.1 when i have 2.4.2

Anyway, this can be closed.

Prakash4844 commented 2 months ago

@ifritdiezel is this not available for V2.4.2?

ifritdiezel commented 2 months ago

@ifritdiezel is this not available for V2.4.2?

dungeon generation is identical between minor versions so i didn't make a release for 2.4.2