Resizing existing sprites
- Ralzar
- Posts: 2211
- Joined: Mon Oct 07, 2019 4:11 pm
- Location: Norway
Resizing existing sprites
So I recently looked into modding sprites in Daggerfall and found that you could define the size of sprites by supplying XML files. This works, however, it is a bit awkward and the Unity developer keeps giving reference errors because the mod system expect me to supply the sprites.
https://github.com/Ralzar81/Meaner-Monsters
Is there an easier way to do this that does not use so many xml files and does not produce constant errors when running in debug mode?
https://github.com/Ralzar81/Meaner-Monsters
Is there an easier way to do this that does not use so many xml files and does not produce constant errors when running in debug mode?
- King of Worms
- Posts: 4753
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: Resizing existing sprites
Ive found just a workarounds and I dont really like those, so something more user friendly than current state and actually working would be more than welcomed (I dont think the XML files work for terrain sprites for example)
If you want to make something smaller, than resize the image withing the canvas, so it looks like this (notice the empty room above the plant)
To make it larger, only XML can help, if it works I mean...
If you want to make something smaller, than resize the image withing the canvas, so it looks like this (notice the empty room above the plant)
Spoiler!
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
- Ralzar
- Posts: 2211
- Joined: Mon Oct 07, 2019 4:11 pm
- Location: Norway
Re: Resizing existing sprites
I'm trying to avoid editing sprites, because then I'll have to do it for DREAM as well
- Baler
- Posts: 225
- Joined: Thu May 23, 2019 1:39 am
- Location: Earth
Re: Resizing existing sprites
Implement a scaler into DFU such as xBR scaling algorithm as an example.
edit: probably overkill and not really a direct solution
edit: probably overkill and not really a direct solution
Hidden Gem Mods - Enhanced Sky - Forgotten Quest Pack
- King of Worms
- Posts: 4753
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: Resizing existing sprites
I wanted that for the paperdoll project, would have saved me a major headache... but it was too problematic at the time, even tho I wanted to buy those damn algos and just make someone to implement it
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: Resizing existing sprites
The ability to resize sprites was introduced to allow replacement images to have significative scale or proportion differences with the original billboards; adding empty space to the texture itself is not an ideal solution for perfomance so support for xml files was added. Would you like the ability to provide xml files without textures? This is a feature that can be added if there is a request, but i'd like to understand what's the intended use case.
If you want something more open to customization you can rely on MobilePersonAsset component, at least for wandering npcs (enemies will also be supported in a similar way in the future).
If you want something more open to customization you can rely on MobilePersonAsset component, at least for wandering npcs (enemies will also be supported in a similar way in the future).
- Ralzar
- Posts: 2211
- Joined: Mon Oct 07, 2019 4:11 pm
- Location: Norway
Re: Resizing existing sprites
At the moment I’m working on the mod Meaner Monsters that changes the stats of enemies. Hopefully in the future (Hazelnut willing) I’ll be able to add new enemies.
Anyway, what I use this for at the moment is to resize enemies to visually match their stats. First of all werewolf/boars are rather small and now that I buff them, I also increase their size to 1.5.
I’ve also changed Dragonling_Alternate to be a “Large Dragonling” with boosted stats and an increased size.
Note that all XML files in my mod increase each sprite by the same amount, which seems like a really redundant way to do this compared to simply having a size value declared together with the sprite archive number in EnemyBasics.cs
Anyway, what I use this for at the moment is to resize enemies to visually match their stats. First of all werewolf/boars are rather small and now that I buff them, I also increase their size to 1.5.
I’ve also changed Dragonling_Alternate to be a “Large Dragonling” with boosted stats and an increased size.
Note that all XML files in my mod increase each sprite by the same amount, which seems like a really redundant way to do this compared to simply having a size value declared together with the sprite archive number in EnemyBasics.cs
- King of Worms
- Posts: 4753
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: Resizing existing sprites
Resizing enemies will be fantastic! And if we can add new mobs in a future, that will be a wet DREAM .)
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
- Baler
- Posts: 225
- Joined: Thu May 23, 2019 1:39 am
- Location: Earth
Re: Resizing existing sprites
Being able to add new custom monsters is one of my dream mod capability.
I really hope to add a huge varity of new monsters ripped from other games.
here is one example: https://i.imgur.com/kRcLSRZ.png
Also I hope if when this is possible that we can adjust individual custom monsters addition to the world based on character level.
I really hope to add a huge varity of new monsters ripped from other games.
here is one example: https://i.imgur.com/kRcLSRZ.png
Also I hope if when this is possible that we can adjust individual custom monsters addition to the world based on character level.
Hidden Gem Mods - Enhanced Sky - Forgotten Quest Pack
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: Resizing existing sprites
I confirm that a custom implementation of MobilePersonAsset is something you should consider. It would allow you to make all kinds of customizations and not only be limited to a fixed scale.
Xml files are retrieved with load order to serve a specific need; i would rather not break compatiblity by adding other ways to resize billboards. Maybe i can add a scale property to Archive.xml, which would serve as a base for additional scales defined in Archive_Record-0.xml. Would this work for you?
PS: I noticed that you have files for specific frames in your repository. This should't be needed, all frames have the same size so only Archive_Record-0.xml is actually read.
This is already possible with xml files. I remember doing it for a very early version of my mod that removes spiders.