Unable to find the bug

Hi modders,
i was working on a small feature for a mod that i’m working on but one of the entities causes a unpleasant bug. After placing the model in the world, the game crashes. I’m really not sure where it can be the problem. Tried few things but every time the same result.

For the first entity version i also used just the dinner table model with the json files.

This it the entity json-file
I will add also a link to the git, maybe the error is somewhere else (also tried to find but no result) —> Github Link

{
   "type": "entity",
   "mixins": "file(tavern_small_table_wood_ghost.json)",
   "components": {
  "stonehearth:entity_forms": {
     "iconic_form": "file(tavern_small_table_wood_iconic.json)",
     "ghost_form": "file(tavern_small_table_wood_ghost.json)",
     "placeable_on_ground": true
  },

  "destination": {
    "region": [
      {
        "min": { "x": -0.5, "y": 0, "z": -0.5 },
        "max": { "x": 1.5, "y": 1, "z": 1.5 }
      }
    ],
    "adjacency_flags": [
      "back",
      "front",
      "left",
      "right"
    ]
  },

  "region_collision_shape": {
     "region": [
        {
           "min": { "x": -0.5, "y": 0, "z": -0.5 },
           "max": { "x": 1.5, "y": 1, "z": 1.5 }
        }
     ]
  },

  "stonehearth:storage": {
    "type": "input_crate",
    "capacity": 3,
    "render_contents": true,
    "filter_list": "bazaar:ui:tavern_small_table_wood:filters",
    "is_single_filter": true
  },

  "effect_list": {
     "default": "file(/data/rigs/entities/furniture/tavern_small_table_wood/effects/idle.json)"
  }

   },
   "entity_data": {
  "stonehearth:net_worth": {
     "value_in_gold": 4,
     "rarity": "common",
     "shop_info": {
        "buyable": true,
        "sellable": true,
        "shopkeeper_level": 1,
        "shopkeeper_type": "caravan"
     }
  },
  "stonehearth:appeal": {
     "appeal": 12
  },
  "stonehearth:item_quality": {
     "variable_quality": true
  }
   }
}

Try without the effect. Usually a crash is related to error on animation files
Your stonehearth.log file should contain the error

1 Like

maybe you are right, have to check it out. it’s strange. i have also another model that works with an effect and these one is working fine without any problems.

will give it a try

i need the animation to sho the placed items. checked the code but there seems do be no differences between other animations (that already works) and this one.

i also not so sure what the ATTOVERCOG in the animation-json really means (maybe this one causes the error)

{
   "type" : "rig",
   "skeleton": {
      "ATTITEM00": [0.0,-0.0,0.0],
      "ATTITEM01": [10.0,-0.0,0.0],
      "ATTITEM02": [20.0,-0.0,0.0],
      "ATTOVERCOG": [15.0,7.0,44.25],
      "root": [15.0,5.0,0.0]
   },
   "animation_root" : "file(animations)",
   "effects_root": "file(effects)"
}

Unfortunately for now i’m just unable to check it by myself :confused:

Seconding Bruno’s opinion about it being caused by effect/animation (I blew up my mod a few times with that aswell)
On how to fix it though… I don’t know, sorry :confused:

It is more about being an incorrect file path than a problem in the animation. The game crashes when it can’t load the file, but has no complains if the animation is wrong or incomplete after that. The ATTOVERCOG is where icons are displayed.
Do you need a custom animation? Else you can just reuse some in the game already.

Maybe instead of the file() refference @pingu could try a complete path to the animation?

unfortunately i need a custom animation. is for a input-crate where the items are shown.

i was thinking also that maybe the path was wrong the bug is somewhere else. i have already created other models with personalized animation (all in this mod), but none of that has this issue. and all the input informations seem to be exactly how they have to be. :frowning: :confused:

i used the same code for the other models in this mod and for them everything worked fine

Doesn’t hurt to try at this point though. shrug

Maybe! Will give it a try

nope unfortunately this also didn’t worked :confused:

@pingu I think you’re missing the render info component for that item, so it doesn’t have any reference to the rig (animation table). That might be the problem. I see your other item (input pantry wood) does have the render info component in the ghost file.

1 Like

I’m sure this is the problem. Oh embarassing, just focused on the json of the model but not on the ghost-json :confused:

Will try it today! thx @Relyss !!

1 Like