Jump to content
Demonius

Game loads 2x mod textures instead of 1x

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.

Share this post


Link to post
Share on other sites

Iirc, you need to also define the tilesets in either map.info or mod.info text files.

 

 I’m not sure on the details, however. Hopefully someone else knows?

 

 You could well be right, ofc. We’ll check that as well.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...