Jump to content

Game loads 2x mod textures instead of 1x


Demonius

Recommended Posts

I created a mod with 2 texture packs:

 

my_awesome_tiles.pack
my_awesome_tiles2x.pack

 

But when I launch the game it always loads 2x textures, even if 2x option is disabled.

 

Here's what I found.

 

Which package shouls be loaded is controled by Core.TileScale variable.
Core.TileScale = 2 by default, and it sets as it should be in options in GameWindow.enter()

 

private static void enter() {
     Core.TileScale = Core.getInstance().GetOptionTexture2x() ? 2 : 1;

 

But the mod files are loaded before that - in GameWindow.init() when Core.TileScale has it default value.

 

private static void init() throws Exception {
    // ...
    ZomboidFileSystem.instance.loadModPackFiles();

 

Thus if the mod has a 2x texture pack it would be loaded regardless the options.

 

Solution: set Core.TileScale before loading mods.

 

Hope this helps.

Link to comment
Share on other sites

I have every file I need: info, tilesets, etc. It works fine with 2x textures enabled or if there is only one texture pack.

 

Game just picks wrong file when there is 2 packs with 1x and 2x textures and you want 1x.

If you activate mod when game already launched, it loads 1x textures as it should be. But on relaunch it always selects 2x.

Link to comment
Share on other sites

  • 8 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...