Help us make VIO and DREAM actually compatible

Discuss modding questions and implementation details.
Post Reply
User avatar
King of Worms
Posts: 3708
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Help us make VIO and DREAM actually compatible

Post by King of Worms »

Ok, so...

Dream and VIO are not compatible. And both me and Kamer are bombarded with bug reports ever since...
It because VIO makes changes in the sprite atlas and swaps things around. And Dream uses modded high-res sprites, and they are - since modded - not in that atlas anymore, but somewhere else.

Thats what I understand is going on.
Is that even right? :lol:

Is there any chance some change either in DFU or VIO or DREAM can change this situation?

Thanks a lot :)

DREAM http://forums.dfworkshop.net/viewtopic. ... 7fd1187dcf
VIO http://forums.dfworkshop.net/viewtopic. ... 7fd1187dcf

l3lessed
Posts: 652
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: Help us make VIO and DREAM actually compatible

Post by l3lessed »

I would have to see the code, but he should be able to change out the code that swaps the atlas changes with code that grabs your hi-res sprites from whatever object/path they are held at/in. Null errors will continue to hit your mods until VIO loads your mod objects/hi-res sprites and updates the billboard swapping code to grab your sprite objects instead of the atlas objects.

Magicon had this issue in a different way with my mod. We had to load my mod raw scripts via namespace, so his mod had access to my objects for use in his CalculateAttackDamage formula code/object. Sounds like the same issue of not having access to your objects and not having a coded patch that pulls your sprite objects in place of the default atlas ones.
My Daggerfall Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

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

Re: Help us make VIO and DREAM actually compatible

Post by King of Worms »

Thanks a lot for reply and idea I3lessed :) I will redirect Kamer here, I hope he will drop by when he has some time.

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

Re: Help us make VIO and DREAM actually compatible

Post by TheLacus »

King of Worms wrote: Sun Dec 20, 2020 6:03 pm Is there any chance some change either in DFU or VIO or DREAM can change this situation?
Maybe Kamer can use a different approach when custom textures are available. For example mod authors can override and take control of NPCs look by extending MobilePersonAsset. I might be able to give a more on point answer with precise information on how VIO works. ;)
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
Kamer
Posts: 503
Joined: Mon Mar 05, 2018 9:26 pm

Re: Help us make VIO and DREAM actually compatible

Post by Kamer »

TheLacus wrote: Tue Dec 22, 2020 3:07 pm
King of Worms wrote: Sun Dec 20, 2020 6:03 pm Is there any chance some change either in DFU or VIO or DREAM can change this situation?
Maybe Kamer can use a different approach when custom textures are available. For example mod authors can override and take control of NPCs look by extending MobilePersonAsset. I might be able to give a more on point answer with precise information on how VIO works. ;)
Its just one line that changes the mseh of the Gameobject.

Code: Select all

gameObject.GetComponentInChildren<MeshRenderer>().material.mainTexture = guardTorchTexture;
Its simple, and straight to the point. It also lets me add in graphics without having to replace anything specifically.

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

Re: Help us make VIO and DREAM actually compatible

Post by TheLacus »

Kamer wrote: Tue Dec 22, 2020 7:26 pm
TheLacus wrote: Tue Dec 22, 2020 3:07 pm
King of Worms wrote: Sun Dec 20, 2020 6:03 pm Is there any chance some change either in DFU or VIO or DREAM can change this situation?
Maybe Kamer can use a different approach when custom textures are available. For example mod authors can override and take control of NPCs look by extending MobilePersonAsset. I might be able to give a more on point answer with precise information on how VIO works. ;)
Its just one line that changes the mseh of the Gameobject.

Code: Select all

gameObject.GetComponentInChildren<MeshRenderer>().material.mainTexture = guardTorchTexture;
Its simple, and straight to the point. It also lets me add in graphics without having to replace anything specifically.
You can use TextureReplacement.TryImportTexture(Int32, Int32, Int32, out Texture2D) to import a texture from mods. If you only want to know if a texture exists, you can combine TextureReplacement.TextureExistsAmongLooseFiles(Int32, Int32, Int32, TextureMap) (which doesn't import it) and ModManager.TryGetAsset<Texture2D>(String, false, out tex) (which relies on a cache).

If custom texture exists, material.mainTexture should be a single texture instead of an atlas, so you should be able to handle these two cases as needed.


I'd still suggest to look into extending MobilePersonBillboard and override SetPerson(Races race, Genders gender, int personVariant, bool isGuard) so you can alter this process directly.
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
King of Worms
Posts: 3708
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Help us make VIO and DREAM actually compatible

Post by King of Worms »

Have you tried the solutions mentioned here Kamer?

Post Reply