Error reading manifest - adding trappable critter

{
“type” : “entity”,
“mixins” : “stonehearth:mixins:critter”,
“components”: {

It needs to be mixed in to critters

Also, pretty sure:

“animation_table”: [
“file(/data/rigs/critters/rabbit)”

Should be

“animation_table”: [
“stonehearth/data/rigs/critters/rabbit” as the animation does not reside within your mod folder.

But Miturion is right. We are currently the blind leading the blind without access to the files.

Edit: Oi! @SteveAdamo! Isn’t it about time we were able to upload zip files less than 2 meg? One job Adamo! You had one job!!

1 Like

unfortunately the Discourse Deities deemed it a security risk to allow .zip attachments… le sigh

1 Like

le sigh indeed. I’ll let you off then, just this once :heart:

1 Like

@froggy in mixin folder its named critter not critters

I´m totally stuck everywhere, so i give up for today
This morning i got overriding the rabbit into a snowhare to work but now i even can`t redesign that
so i really need a rest and new ideas

But i learned a lot about { [ ] } , and files and uris and paths maybe i should select another first project now that im a bit deeper in the structure of stonehearth

but there`s a snowhare waiting to come to life by my hands…

1 Like

[quote=“Froggy, post:21, topic:13602, full:true”]
pretty sure:

“animation_table”: [
“file(/data/rigs/critters/rabbit)”

Should be

“animation_table”: [
“stonehearth/data/rigs/critters/rabbit” as the animation does not reside within your mod folder.[/quote]

I came up against a similar problem when I attempted to make a door mod (aside from the .less file) based on the information from this topic. I tried doing it the way you said. It did not work. Once I copied the appropriate folder into my mod it worked fine. After some testing, I’m pretty sure that specific code has no provision for pointing at files in other mods.

I think it is concatenating the base URI with the name of your mod (as per the manifest) and whatever string you pass it. Your “stonehearth/data/rigs/critters/rabbit” inside snowharemod would actually be pointing to “mods/snowharemodstonehearth/data/rigs/critters/rabbit”.

Unfortunately, they have no aliases in the stonehearth manifest.json for animation rigging (or effects), so you can’t use an alias for it either.

Edit: Just realised I was reading froggy wrong all along. He didn’t use the file() function, so what he said should work. Woops.

ok I´m still on the case…
did all over again to learn the file paths

this is working fine in my manifest
},
“overrides”: {
“stonehearth/entities/critters/rabbit/rabbit.qb”: “snowhare_over/entities/critters/rabbit/rabbit.qb”
}
and i got snowhares by renaming my snowhare.qb to rabbit.qb
next step
replacing the hole rabbit.json with my rabbit.json and enter the model_variants to “snowhare.qb” and placing the .qb in the same folder
effect:
invalid file path BUT it`s only the qb which is in the wrong place because i tested it and invisible rabbits spawn and get caught in traps and so on

So the question is
where is the reference to the qb to be in the original tree ?

testing goes on
i got some ideas to solve this or come close to it

@tuhalu the topic is for creating new “furniture” etc. which are static entries and there`s no problem with replacing, renaming, adding but unfortunately critters are not the same

another working mod is this:
adding these lines in rabbit.json works but the render_info shows some invalid file path errors
but snowhares spawn instead of rabbits
"render_info": {
“animation_table”: “stonehearth/data/rigs/critters/rabbit”
},
“overrides”: {
“stonehearth/entities/critters/rabbit/rabbit.qb”:“snowhare_over/entities/critters/rabbit/rabbit.qb”
},
“model_variants” : {
“default” : {
“models” : [
“file(rabbit.qb)”
]
}
}
it`s just a replacement of the overrides command from the manifest into the rabbit.json

But i want to ADD a critter
is there a command for placing my snowhare.qb into the original folder within my mod ?

Doors have animations too. They don’t run around, but they have a rig for their three animations: open, close and closed.

Having said that, I was misreading the code. He didn’t use file(), so his suggested change should work. My bad.

As it was mentioned earlier, would be much easier to find errors if you could post your files, not only snippets. E.g. to see how the file-structure looks like, to which you are referring.

I’ve just added a new creature by myself, to check if this is working at all. Did not transfer it yet into a mod, but works like a charm (ok, the rabbit-animations do not work very smooth with the mammoth-model, but that’s details :wink:). So overall there should be nothing hard coded here.

Again… I need to take a look into mixintos / overrides as I did not for a while… but in the manifest.json you are defining the source of your creature.json. From my understanding all other files related to the entity (also the .qb) have to be located in the same folder. So you do not need a “command” to introduce your snowhare.qb.

Update: Got it finally kind of working. So I can now add an animal and have it spawned (via a nest) in the wildlife. However, although I am adding the critter mixin…

“mixins” : “stonehearth:mixins:critter”,

it seems like my animal is not added to the list of trappable critters. I’ve removed the statement from the other critters and am receiving the ingame error message that a nil value is passed to the ai_component. Trying now to find out if this is due to an error in my files or not… @sdee?

Update: Tried for a while to exclude any possible mistake I could have done. Not able to fix it so far. Moved everything into the original .smod-file, to be sure that there is no issue with “importing” the mod. Also did not change anything. Either there is another file which I am missing so far to add the creature, or some hard coded “import”?

Update: Initially I have thought that the creature is “simply” not added to the critters-group (as I have received the following error message). However, not so sure anymore on the cause, as same error occurs if I keep one of the other animals “in the group”.

2 Likes