Hello,
I’m a beginner trying to mod in an armor and I’m getting following error:
release-524 (x64)
std::exception: ''frostbyte' has no alias named 'armor:death_knight_armor' in the manifest.'
stack traceback:
radiant/modules/common.lua:214: in function 'report_traceback'
radiant/modules/common.lua:225: in function <radiant/modules/common.lua:219>
[C]: in function 'create_entity'
radiant/modules/entities.lua:24: in function 'create_entity'
...th/services/server/population/population_faction.lua:542: in function 'create_entity'
microworld/worlds/mini_game_world.lua:53: in function 'pickup'
microworld/worlds/mini_game_world.lua:56: in function 'start'
microworld/microworld.lua:221: in function 'instance'
radiant/modules/events.lua:209: in function <radiant/modules/events.lua:203>
[C]: in function 'xpcall'
radiant/modules/common.lua:234: in function 'xpcall'
radiant/modules/events.lua:203: in function <radiant/modules/events.lua:174>
The /death_knight_armor folder has the json and qb for the armor. I don’t understand why it says that there is no alias named armor:death_knight_armor in the manifest. What am I doing wrong?
Thanks a lot, after setting the version to 2 it seems to work now.
And I think the .json has to be omitted with armors. At least it’s like that with iron mail armors etc. in stonehearth, while weapons etc. seem to need the .json ending. I think that’s because the armors have two versions (male/female), so you just path to the folder? Well, that’s the explanation I just made up.
My mod also works with the full path (with .json ending). I looked into stonehearth once more and the pathing seems to be rather inconsistent:
While the bronze circlet and bronze shield have the full path, the basic shield and iron coif are only pathed to their respective folders. So it seems to not really matter which way you use.
well with my armor mod i just changed it to be without the .json ending and it threw a bunch of errors… so i’m gonna stick to using the .json ending just to be safe
@sdee explains how file() works when you leave out the .json file extension
So file("entities/armor/armorname")
= file("entities/armor/armorname/armorname.json")
= "yourmod/entities/armor/armorname/armorname.json"
and file("entities/armor/armorname/armorname")
= file("entities/armor/armorname/armorname/armorname.json")
="yourmod/entities/armor/armorname/armorname/armorname.json"
TBH, I’m not sure if I’m a fan of the shorthand form either because it invites confusion like this, but perhaps less clutter in the code is important too. Anyway I hope that clears up what’s going on.