#Graphical glitch on 50.01
1 messages · Page 1 of 1 (latest)
!visual-artifacts
BattleTech Visual Distortion Field Calibration
Experiencing graphical glitches or distortions in the heat of your Mech battles? Your MechTech team has some tweaks to realign your HUD:
:hammer_and_wrench: Adjust Your System's Visual Settings:
First Step: Ensure you're using a quality text editor like Notepad++ to make these adjustments. This will help avoid formatting issues that can occur with more basic editors.
Edit the Megamek.l4j.ini and Mekhq.l4j.ini files in your game directory with the following flags, tailored to your system's memory:
For Standard Systems (8-16 Gig):
-Xmx2048m -Dsun.java2d.d3d=false- Or, use
-Xmx2048m -Dsun.java2d.opengl=truefor OpenGL support.
For Advanced Systems (16 Gig):
-Xmx4096m -Dsun.java2d.d3d=false- Or,
-Xmx4096m -Dsun.java2d.opengl=true
For High-End Systems (32 Gig):
-Xmx8192m -Dsun.java2d.d3d=false- Or,
-Xmx8192m -Dsun.java2d.opengl=true
UI Scaling Issues?
Some MechWarriors have achieved clarity with -Dsun.java2d.uiScale=1.
:notebook_with_decorative_cover: Instructions:
- Locate the
.l4j.inifile for MegaMek or MekHQ in your installation folder. - Open it with Notepad++ or another quality text editor.
- Add the appropriate flag(s) based on your system's memory.
- Save the changes and restart the game.
If distortions persist in your Mech's cockpit, report to your nearest MechTech for further diagnostics. Your contributions help keep the Inner Sphere's technology at the cutting edge!
Is Notepad ok or do i need notepad++ or a code editor like VS code ?
notepad is fine
are you starting megamek from mekhq? if so need to update the mekhq ini also
Mekhq has stricly the same parameters
also need to restart completely
i usually put this on a new line -Dsun.java2d.d3d=false instead of after the other part
Ok I will try
By the way 8192 is only tied to RAM or do I need to also take into account CPU and GPU power ?
Im also launching with jar on windows but that should not be an issue
that is probably the issue think you would need to pass in these as parameters
the ones in the ini file
So what should I do, run with exe instead ?
Ok, and keeping updated ini files you gave me
the exe file uses the ini file adjust the java parameters
what is the name of java's "ini files" ?
MegaMek.l4j.ini and MekHQ.l4j.ini
I am confused I already edited those ones, and you said they only affected the exe version. So how can I fix the jar version ?
not sure how to fix running for the jar. I was just explain how the exe works
Ok I will stick to exe version
The EXE versio is the JAR version but the stuff in the INI file gets appended into a single line and passed to the JAR version.
The EXE is just to make it easier for Windows users. Same with the shell scripts for Linux users.
basically the equivalent of a batch script
So basically the jar is the vanilla version and the EXE is the jar version plus instructions coming from ini ?
The EXE is in essence a shell script with some fancy additions such as JRE checking, copyrights, app icons, support URLs, etc for WIndows. it does nothing but load the JAR using the command line args within the INI.
It's all the same version, just a different way to load it
Oh ok, so launching via jar is the more direct way to do it
But since I need ini files to fix artifacts, I will not be able to fix the jar version or is there a way ?
You can do the Jar version if you pass the same arguments to the java run time before the -jar command.
That's all the EXE is doing.
I am still new to JRE, where do I add those arguments ?
java <arguments> -jar MegaMek.jar
Ok so in my case I need to go to the shell and run the following command :
java -Xmx8192m -Dsun.java2d.d3d=false -jar MegaMek.jar
If you want to run from the shell, yes.
Managed to make both java2d commands work
These are the error messages responsible for the weird duplicates, does someone have a fix ?
I am using a .bat file of this content :
cd "C:\Users\myself\Documents\myGames\MekHQ-0.50.01"
java -Xmx8192m -Dsun.java2d.d3d=false -Dsun.java2d.noddraw=true -jar MegaMek.jar