#sim mode is starting the game instead of running simulation

50 messages · Page 1 of 1 (latest)

merry valley
#

So I just downloaded the stable version OTJ: Outlaws of Thunder Junction Release on Ubuntu and am trying to run a simulation. The decks I want to try are in the default location (/home/. forge/decks/constructed/) .

I have tried to following command:
/forge.sh sim -d "The rack.dck" "The rack.dck" -n 3
where "The rack.dck" is a name of a custom deck I have created which is indeed in the constructed folder.

Instead of the simulation being started, I get a normal startup of the game. Can anybody help me? Maybe I'm dense...

winged obsidian
#

I dont have the release here on my work computer, whats the contents of forge.sh

#

I'm guessing the sh file doesn't pass the command line args to the java call

merry valley
#

Yeah I am thinking the same. Though I know little to no java so I don't really know how to fix it myself

winged obsidian
#

Can you replace this line:

SHAREDPARAMS='-Xmx4096m -Dfile.encoding=UTF-8 -jar forge-gui-desktop-1.6.62-jar-with-dependencies.jar'

with

SHAREDPARAMS='-Xmx4096m -Dfile.encoding=UTF-8 -jar forge-gui-desktop-1.6.62-jar-with-dependencies.jar "$@"' 
merry valley
#

Thanks that got me a bit further. Though it tells me now that sim is not known:

Unknown mode.
Known mode is 'sim', 'parse'

winged obsidian
#

What version of java are you on?

merry valley
#

$ java -version
openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment (build 21.0.2+13-Ubuntu-122.04.1)
OpenJDK 64-Bit Server VM (build 21.0.2+13-Ubuntu-122.04.1, mixed mode, sharing)

winged obsidian
#

Ok, so i think generally you're gonna want a command like this:

java -jar forge-gui-desktop-1.6.62-jar-with-dependencies.jar "$@" -Xmx4096m -Dfile.encoding=UTF-8 --add-opens java.desktop/java.beans=ALL-UNNAMED --add-opens java.desktop/java.awt.color=ALL-UNNAMED --add-opens java.desktop/javax.swing.border=ALL-UNNAMED --add-opens java.desktop/javax.swing.event=ALL-UNNAMED --add-opens java.desktop/sun.awt.image=ALL-UNNAMED --add-opens java.desktop/sun.swing=ALL-UNNAMED --add-opens java.desktop/javax.swing=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED --add-opens java.desktop/java.awt.image=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true
#

I'm not 100%

#

The ordering matters but i forget which way linux wants

#

yknow.. the first answer i think is more right

#

Not sure why it wouldn't work

merry valley
#

Yeah it's weird that it says that the known mode is sim but doesnt recognise it anyways

#

Just to be clear the code you pasted above would be to plug into the "if then" statement?

winged obsidian
#

I think the best thing to do is probably figure it out what it needs to be and then work backwards to inject that into the forge.sh file

#
java --add-opens java.desktop/java.beans=ALL-UNNAMED --add-opens java.desktop/java.awt.color=ALL-UNNAMED --add-opens java.desktop/javax.swing.border=ALL-UNNAMED --add-opens java.desktop/javax.swing.event=ALL-UNNAMED --add-opens java.desktop/sun.awt.image=ALL-UNNAMED --add-opens java.desktop/sun.swing=ALL-UNNAMED --add-opens java.desktop/javax.swing=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED --add-opens java.desktop/java.awt.image=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true -Xmx4096m -Dfile.encoding=UTF-8 -jar forge-gui-desktop-1.6.62-jar-with-dependencies.jar sim -d "The rack.dck" "The rack.dck" -n 3```
#

So like.. from the command line of your forge folder, does this work?

merry valley
#

(just as a side note, I downloaded the previous stable version (PIP: Fallout Release, forge-1.6.61) and its .sh file is exactly the same as the original one from OTJ.
Maybe it's a problem on my side or nobody wanted to run simulation in the meantime

winged obsidian
#

Yea that file doesnt change, i'm guessing the wiki was written before we had to add all of these add-opens into the forge.sh file

winged obsidian
merry valley
#

You're a magician 🙂

#

-The rack has won! -> you don't say 🙂

#

Very nice. So I can just paste this codeblock into the if then statement? Or should I just run the sims using your codeblock in the console?

winged obsidian
#

Ok... soo maybe just

SHAREDPARAMS='-Xmx4096m -Dfile.encoding=UTF-8 -jar forge-gui-desktop-1.6.62-jar-with-dependencies.jar $@'

merry valley
#

No stil lthe same error:
Unknown mode.
Known mode is 'sim', 'parse'

winged obsidian
#

Weird

#

Maybe...
SHAREDPARAMS="-Xmx4096m -Dfile.encoding=UTF-8 -jar forge-gui-desktop-1.6.62-jar-with-dependencies.jar $@"

merry valley
#

SHAREDPARAMS='-Xmx4096m -Dfile.encoding=UTF-8 -jar forge-gui-desktop-1.6.62-jar-with-dependencies.jar '$@''

#

This worked! so '$@' instead of "$@"

#

I am getting new errors about it not finding the decks but maybe I can figure this out

winged obsidian
#

Ok wait, whats the command? I don't think it pasted properly

merry valley
#

How do you format it in a code block on discord?

#

SHAREDPARAMS='-Xmx4096m -Dfile.encoding=UTF-8 -jar forge-gui-desktop-1.6.62-jar-with-dependencies.jar '$@''

#

So all of the quotations must be of type ' x' and not "x". Both around the whole statement and around the $@

winged obsidian
#

Ah weird

#

Ok cooll thanks

merry valley
#

Thanks to you ! Great help

winged obsidian
merry valley
#

Nice!

winged obsidian
#

Can you try:

SHAREDPARAMS='-Xmx4096m -Dfile.encoding=UTF-8 -jar forge-gui-desktop-1.6.62-jar-with-dependencies.jar '"$@"
#

I think that might be "more" correct

merry valley
#

Also worked. At least it gets into simulation mode. I get the error:

Could not load deck - The, match cannot start

In both cases. I'm not sure if that is a path issue or if in the command:

$ ./forge.sh sim -d "The rack.dck" "The rack.dck" -n 3

somehow the string is split

winged obsidian
#

I thought the double quotes should fix that

#

Its because you have spaces in your file name

#

Linux doesnt like that

merry valley
#

Yeah that's an easy fix by renaming the file

#

./forge.sh sim -d "The_rack.dck" "The_rack.dck" -n 3
This now works. I'm sure there must be a way to escape also filenames with spaces. I'll try some things

winged obsidian
#

I wonder if they need to be on the line with java in them