Only Override/Mixinto When Playing as that Race Mod?


#1

I’m having the issue with my race of shorties that I have to change the armor and helmet models to fit the little guys, which works when I override the models. However, when I do this, it changes the models even when you’re playing as the ascendency or rayyas children, which makes sense.

How do I go about fixing this issue? Is there a way to selectively import overrides or am I going about the model variants wrong?


#2

The only way I can think of is doing something similar as the Rayya’s UI mod.

Do a deferred load of a mod with your overrides, that gets loaded only when you choose the bastioneers as race.
The script used for rayya should work for you without much change, since you’re listening to the population / player.

You’d have to have 2 mods in this case. But it’s the only way to not disturb the original ones.

I’m doing the same for the Candyland mod. The main mod has the basic things and an init script that loads the second mod (has deferred_load : true) , which has the overrides.


#3

I like this idea except I don’t want to have to have an additional mod for people to have to download. Is there a way to have the mod’s root be inside the default mod?

EDIT: Hold on, I’m going to try it through aliases


#4

So far I cannot find a way to have a mod inside a mod :frowning: I’ve even tried adding my ui mod folder into the official mods folder through the mixinto of my main mod lol.


#5

Is there some way to do this @yshan @sdee?


#6

Do you have a UI mod already? Could you not just use that to override recipes for the items to give your items, so that the recipes will only override if your race is chosen?..


#7

I’m also interested in this (using one only mod instead of 2), and saw somewhere that it was possible, but can’t remember how. @Drotten may help us here.


#8

Unfortunately, I know of no other way than what @Relyss already mentioned. I do agree that it’s better to keep it all in one mod, but at the moment I doubt there’s a way to do this, at least not easily.


#9

Can’t you just make a… Say… ‘Leather_padded_armor_Bastin’
'Leather_padded_armor_Bastin_F’
And make the game read the Bastinioneers as another version of the Hearthlings?

Like how she(the game) does it with the male and female versions of the Hearthlings

As you probably know, i’m not a Code guy, but there’s an idea


#10

@capotzalco The UI mod is optional so I don’t want to put element necessary to the core mod into it, sadly. :frowning:
@Hyrule_Symbol I could, and I did have it like that, but the iissue arises that mobs and raids still drop the normal ones. :frowning:


#11

How about (and I’ve not looked exactly into it) you make the bastioneer armour a model variant, like say ‘female’, then use the same code to force ‘bastioneer’ and ‘bastioneer_female’ as the default for your population.
The model variant: female is in the female_npc json under humans.


#12

So I figured it out and it’s actually really simple, I call _radiant.res.load_mod("bastioneers/bastioneers_ui") in my case in order to load bastion_ui mod from within bastioneers mod.


#13

Nice!! :smiley:


#14

Idk how it took so long to figure out :smiley:


#15

Just to be clear, you put one mod folder (with the ui) inside the other (with the race)?


#16

Yepp, so my directories to the manifests looks like this:
Bastioneers: /mods/bastioneers/manifest.json
Bastioneers UI: /mods/bastioneers/bastioneers_ui/manifest.json

and then in my client.lua file for Bastioneers I call: _radiant.res.load_mod("bastioneers/bastioneers_ui")


#17

Congratulations on figuring it out :tada: