Resizing existing sprites

Discuss modding questions and implementation details.
User avatar
Ralzar
Posts: 991
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Resizing existing sprites

Post by Ralzar » Sun Mar 01, 2020 5:11 pm

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?
My released mods

"I feel like Ralzar specifically wrote those mods for me and then said "Use them". Just so he could watch me die more."
-FuzzyBeanPlays

User avatar
King of Worms
Posts: 3055
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Resizing existing sprites

Post by King of Worms » Sun Mar 01, 2020 5:58 pm

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)
Spoiler!
503_25-0.png
503_25-0.png (521.04 KiB) Viewed 148 times
To make it larger, only XML can help, if it works I mean...

User avatar
Ralzar
Posts: 991
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Resizing existing sprites

Post by Ralzar » Sun Mar 01, 2020 6:03 pm

I'm trying to avoid editing sprites, because then I'll have to do it for DREAM as well ;)
My released mods

"I feel like Ralzar specifically wrote those mods for me and then said "Use them". Just so he could watch me die more."
-FuzzyBeanPlays

User avatar
Baler
Posts: 97
Joined: Thu May 23, 2019 1:39 am
Location: Earth

Re: Resizing existing sprites

Post by Baler » Sun Mar 01, 2020 6:07 pm

Implement a scaler into DFU such as xBR scaling algorithm as an example. :?:
edit: probably overkill and not really a direct solution :?

User avatar
King of Worms
Posts: 3055
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Resizing existing sprites

Post by King of Worms » Sun Mar 01, 2020 6:19 pm

Baler wrote:
Sun Mar 01, 2020 6:07 pm
Implement a scaler into DFU such as xBR scaling algorithm as an example. :?:
edit: probably overkill and not really a direct solution :?
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 :D

User avatar
TheLacus
Posts: 1104
Joined: Wed Sep 14, 2016 6:22 pm
Contact:

Re: Resizing existing sprites

Post by TheLacus » Sun Mar 01, 2020 6:33 pm

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).
Mod System documentation - Learn how to create mods for Daggerfall Unity.
Modder Discussion - General help and discussion for the mod system.
Github Issues - Submit a bug report for the game, including the mod system.

User avatar
Ralzar
Posts: 991
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Resizing existing sprites

Post by Ralzar » Sun Mar 01, 2020 7:12 pm

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
My released mods

"I feel like Ralzar specifically wrote those mods for me and then said "Use them". Just so he could watch me die more."
-FuzzyBeanPlays

User avatar
King of Worms
Posts: 3055
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Resizing existing sprites

Post by King of Worms » Sun Mar 01, 2020 7:42 pm

Resizing enemies will be fantastic! And if we can add new mobs in a future, that will be a wet DREAM .)

User avatar
Baler
Posts: 97
Joined: Thu May 23, 2019 1:39 am
Location: Earth

Re: Resizing existing sprites

Post by Baler » Sun Mar 01, 2020 7:55 pm

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.

User avatar
TheLacus
Posts: 1104
Joined: Wed Sep 14, 2016 6:22 pm
Contact:

Re: Resizing existing sprites

Post by TheLacus » Sun Mar 01, 2020 8:08 pm

Ralzar wrote:
Sun Mar 01, 2020 7:12 pm
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
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.
King of Worms wrote:
Sun Mar 01, 2020 7:42 pm
Resizing enemies will be fantastic!
This is already possible with xml files. I remember doing it for a very early version of my mod that removes spiders.
Mod System documentation - Learn how to create mods for Daggerfall Unity.
Modder Discussion - General help and discussion for the mod system.
Github Issues - Submit a bug report for the game, including the mod system.

Post Reply