[Solved]16x inventory grid
- delvisomanda
- Posts: 84
- Joined: Mon Jan 08, 2018 4:29 pm
- Location: Argentina
[Solved]16x inventory grid
Interkarma said I should put this problem here... so I'll paste the message.
I was translating the textures of the inventory, and I came to a problem.
If I modify the classic inventory, there's no problem, but when I try to modify the 16xgrid inventory, it doesn't display correctly.
Classic
texture
in-game
16x grid
texture
in-game
Of course, this is not a big problem, I can translate the classics, and that's it. But maybe there's something I didn't see.
pd: Is there a way to return to the start menu (DFU settings and mods) instead of leaving the game?
I was translating the textures of the inventory, and I came to a problem.
If I modify the classic inventory, there's no problem, but when I try to modify the 16xgrid inventory, it doesn't display correctly.
Classic
texture
in-game
16x grid
texture
in-game
Of course, this is not a big problem, I can translate the classics, and that's it. But maybe there's something I didn't see.
pd: Is there a way to return to the start menu (DFU settings and mods) instead of leaving the game?
Last edited by delvisomanda on Fri Mar 16, 2018 12:01 am, edited 1 time in total.
Currently translating Daggerfall into Spanish.
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: 16x inventory grid
Please post the minimal number of file(s) that cause this issue and I'll investigate.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: 16x inventory grid
Is texture compression enabled?
- delvisomanda
- Posts: 84
- Joined: Mon Jan 08, 2018 4:29 pm
- Location: Argentina
Re: 16x inventory grid
Here are the files
https://mega.nz/#!zA0lCLCR!Tos_MACd3gpo ... BxMS8Dw3e0
and no, texture compression is disable. That makes one of my textures, something strange, I'll upload it too, for opinions.
https://mega.nz/#!zA0lCLCR!Tos_MACd3gpo ... BxMS8Dw3e0
and no, texture compression is disable. That makes one of my textures, something strange, I'll upload it too, for opinions.
Currently translating Daggerfall into Spanish.
- delvisomanda
- Posts: 84
- Joined: Mon Jan 08, 2018 4:29 pm
- Location: Argentina
Re: 16x inventory grid
This is the texture mentioned.
Original (For some reason, this texture cannot be upscaled)
Compressed
Uncompressed
And here are the files
https://mega.nz/#!bdtWBSrB!2AEzlZ3WclyC ... OgSDQeX8IQ
Edit: For what I've tested, using compression, it looks like x16 grid inventory works.
Original (For some reason, this texture cannot be upscaled)
Compressed
Uncompressed
And here are the files
https://mega.nz/#!bdtWBSrB!2AEzlZ3WclyC ... OgSDQeX8IQ
Edit: For what I've tested, using compression, it looks like x16 grid inventory works.
Currently translating Daggerfall into Spanish.
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: 16x inventory grid
Please disable compression, open the inventory with x16 grid and close the game. The log created inside the game folder may provide useful informations
- delvisomanda
- Posts: 84
- Joined: Mon Jan 08, 2018 4:29 pm
- Location: Argentina
Re: 16x inventory grid
Currently translating Daggerfall into Spanish.
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: 16x inventory grid
Hmm, if it works with compression switched on I doubt it's anything to do with the item list component which renders the 4 or 16 items. To get the backgrounds for the 16x slots it simply copies other bits of the image (the amulet etc slots IIRC) as background textures for each slots' button component.
line 415 of ItemListScroller.cs:
line 415 of ItemListScroller.cs:
Code: Select all
itemListTextures = new Texture2D[listDisplayUnits];
Texture2D baseInvTexture = ImageReader.GetTexture(baseInvTextureName);
for (int i = 0; i < itemCutoutRects16.Length; i++)
itemListTextures[i] = ImageReader.GetSubTexture(baseInvTexture, itemCutoutRects16[i], new DFSize(320, 200));
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: 16x inventory grid
Wondering if problem caused by some recent changes to ImageReader.GetSubTexture(). It will now try to use Graphics.CopyTexture() where available, otherwise it falls back to the old pixel array method. Enabling compression will result in fallback as cannot use Graphics.CopyTexture() on compressed images without some caveats.
There's also some relative coordinate scaling changes to GetSubTexture(), but if enabling compression fixes this problem it seems more likely that CopyTexture() change is involved. I'll check this out tomorrow if nobody beats me to it overnight.
There's also some relative coordinate scaling changes to GetSubTexture(), but if enabling compression fixes this problem it seems more likely that CopyTexture() change is involved. I'll check this out tomorrow if nobody beats me to it overnight.
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: 16x inventory grid
This works fine for me with compressed textures enabled or disabled.
delvisomanda, I noticed your texture pack above has a lot of images in it, including coloured tile images and a set specifically for the 16x grid. The good news is you only need to replace a single image here: INVE00I0.IMG. The other variants with coloured tiles and the 16x grid layout don't need to be replaced (and are not used at all). This is all done using the more flexible UI in Daggerfall Unity which can slice out subrects and recolour as needed.
Let me know if you still have troubles here by just replacing normal INVE00I0.IMG. There could still be an issue with CopyTexture() on your system I need to diagnose.
delvisomanda, I noticed your texture pack above has a lot of images in it, including coloured tile images and a set specifically for the 16x grid. The good news is you only need to replace a single image here: INVE00I0.IMG. The other variants with coloured tiles and the 16x grid layout don't need to be replaced (and are not used at all). This is all done using the more flexible UI in Daggerfall Unity which can slice out subrects and recolour as needed.
Let me know if you still have troubles here by just replacing normal INVE00I0.IMG. There could still be an issue with CopyTexture() on your system I need to diagnose.