Page 1 of 1

Idea for adding custom race support

Posted: Mon Nov 16, 2020 7:56 pm
by XJDHDR
I've been thinking for a bit about better ways for modders to add custom races to the game. Currently, every custom race mod for DF has involved replacing the textures and text for one of the existing races.

The idea I currently have is a button on the race selection window that can be used to select any installed custom races. My idea has the modder create a JSON or similar file that is populated with all of the information required to integrate the new race into the game. The modder also needs to supply a texture file containing the new body and additional textures for each head. All of this is placed in a special folder in the StreamingAssets folder. On launch, the game looks through this folder and populates a list with all of the custom races it found. The button will then open this list and let the player pick one of them. The button could even be coded to only appear if at least one custom race is installed. I've also attached a rough mockup of how the button could be added.

What are your thoughts on this idea?

Re: Idea for adding custom race support

Posted: Mon Dec 14, 2020 2:58 pm
by joshcamas
This would definitely be awesome, although I'm not super sure how doable this is out of the box. I'd *hope* there is a way to have custom races, but it may all be hardcoded. Only way to find out is looking at the code :)

If it *is* hardcoded, it'd be good to transition DFU away from that. Would probably take a while though

Re: Idea for adding custom race support

Posted: Tue Dec 15, 2020 7:37 am
by Alth
Having a look at the engine and the races are held as enum values that map directly to native data. Just thinking that we could swap out enums for integers and just reserve the vanilla race integers. The hard part would be getting any custom races integrated into everything else.

Re: Idea for adding custom race support

Posted: Tue Dec 15, 2020 6:22 pm
by XJDHDR
joshcamas wrote: Mon Dec 14, 2020 2:58 pm , but it may all be hardcoded. Only way to find out is looking at the code :)
Yeah, someone else will have to do that. While I have some experience with programming, C# has a different syntax to anything else I've worked with so far. As a result, I get lost whenever I try to read DFU's code.
Edit: Didn't see Alth's post before writing this.

Re: Idea for adding custom race support

Posted: Tue Dec 15, 2020 11:03 pm
by joshcamas
Yep, enum was my fear. DFU was designed to... well, be Daggerfall, so many features are designed specifically to replicate what exists - OOP wasn't used nearly as much as it could have been, instead hardcoding most features.

Re: Idea for adding custom race support

Posted: Tue Dec 15, 2020 11:48 pm
by Interkarma
While maybe not exactly what you want, it's possible to deliver custom races via the effect system's racial override system. See vampirism and and lycanthropy for examples. It's possible to override or augment most aspects of the base race, including paper doll and many behaviours.

I understand that's not quite the same thing as adding a custom race right from character creation and fully integrated across every system - but there's still a lot you can do if you're willing to work within Daggerfall (and DFU's) limitations. If you have a great idea for a custom race and have a story to tell, it doesn't need to be perfect to be good.