Jump to content

Recommended Posts

Posted (edited)

Trying to make sticks usable in a charcoal pit. So far, none of my modified properties seem to be taking affect but the mod is loaded. Verified its being updated by changing version number. 
 

[
  {
    "op": "add",
    "path": "/class",
    "value": "ItemFirewood",
    "file": "game:itemtypes/resource/stick.json",
    "side": "Server"
  },
  {
    "op": "add",
    "path": "/attributes",
    "value": {
        firepitConstructable: true
    },
    "file": "game:itemtypes/resource/stick.json",
    "side": "Server"
  },
  {
    "op": "addmerge",
    "path": "/behaviors/properties",
    "value": {
        stackingCapacity: 32,
        bulkTransferQuantity: 8,
        burnHoursPerItem: 0.1
    },
    "file": "game:itemtypes/resource/stick.json",
    "side": "Server"
  },
]

 

Edited by aurora184
Posted
  1. The attribute patch should be "addmerge" to prevent deleting other attributes
  2. The behavior properties path is incorrect should have a number indicating which item in the behavior list to edit, so "/behaviors/0/properties" for the first behavior (the game is made in a 0 indexed language so we start at 0)
  3. The behavior properties should also change "upSolid" to true, because otherwise you cannot place a campfire on it (which is required for a charcoal pit)

 

All in all this would be the minimum changes you'd need for it to work:

[
  {
    "op": "add",
    "path": "/class",
    "value": "ItemFirewood", //Only firewood is valid for charcoal pit (hard coded requirement)
    "file": "game:itemtypes/resource/stick.json",
    "side": "Server"
  },
  {
    "op": "addmerge", //Has to be addmerge to prevent deleting other attributes
    "path": "/attributes",
    "value": {
      "firepitConstructable": true
    },
    "file": "game:itemtypes/resource/stick.json",
    "side": "Server"
  },
  {
    "op": "addmerge",
    "path": "/behaviors/0/properties", // need to select the first behavior through "/0"
    "value": {
      "stackingCapacity": 32,
      "bulkTransferQuantity": 8,
      "burnHoursPerItem": 0.1,
      "upSolid":  true // this is required to make it so you can put a firepit ontop of it and stack it more then 1 high
    },
    "file": "game:itemtypes/resource/stick.json",
    "side": "Server"
  }
]


Though you will likely also want to change the stacking model and it's ratio's (default one will look weird) and possibly also change the "efficiency" attribute (NatFloat) to change the conversion ratio to charcoal.

Posted (edited)

Does efficiency control item:charcoal conversion rate, such that a stack of 32 with an efficiency of 1.0 would create 32 charcoal? 

What datatype is NatFloat? Is that a VintageStory custom class? Can I assume all properties of floats apply to this datatype?

Edited by aurora184
Posted

upSolid doesn't seem to function for placing dry grass on it first to start building a campfire. I was hoping to not having to get a working IDE for VS. If you know of anything else required to get this to work, it'd be greatly appreciated.

Posted
3 hours ago, aurora184 said:

upSolid doesn't seem to function for placing dry grass on it first to start building a campfire. I was hoping to not having to get a working IDE for VS. If you know of anything else required to get this to work, it'd be greatly appreciated.

It actually does work (I tested it) but you can't place it by aiming at the stick pile because the hitbox is not a full block, you'd have to aim at a wall above it. Once you change the hitbox to end up as a full block you can place it just fine normally:

[
  {
    "op": "add",
    "path": "/class",
    "value": "ItemFirewood", //Only firewood is valid for charcoal pit (hard coded requirement)
    "file": "game:itemtypes/resource/stick.json",
    "side": "Server"
  },
  {
    "op": "addmerge", //Has to be addmerge to prevent deleting other attributes
    "path": "/attributes",
    "value": {
      "firepitConstructable": true
    },
    "file": "game:itemtypes/resource/stick.json",
    "side": "Server"
  },
  {
    "op": "addmerge",
    "path": "/behaviors/0/properties", // need to select the first behavior through "/0"
    "value": {
      "stackingCapacity": 32,
      "bulkTransferQuantity": 8,
      "burnHoursPerItem": 0.1,
      //Change hitbox and scale so it ends up as a full block allowing you to place stuff by aiming at it rather then a wall above / next to it.
      "collisionBox": { "x1": 0, "y1": 0, "z1": 0, "x2": 1, "y2": 0.25, "z2": 1 },
      "cbScaleYByLayer": 0.125,
      "upSolid": true // this is required to make it so you can put a firepit ontop of it and stack it more then 1 high
    },
    "file": "game:itemtypes/resource/stick.json",
    "side": "Server"
  }
]


image.thumb.png.e8a500c570f41d8659b1d9bd1d273cec.png
 

Posted (edited)

For whatever reason, I'm still having issues with this. The collision box does seem to work as intended. When I try placing grass on top, I get the error that the sticks are not a fireable block.

I used meld to essentially do a git diff on my version versus what you had provided as well as copy and pasted what you had exactly and without comments. 

Is how I'm packaging the mod.
https//spawningpool.net/CharcoalSticks.zip

Testing on the linux flatpack for 1.21.5 stable on Pop_OS!

Edited by aurora184
Posted

https://spawningpool.net/charcoal_sticks.png

[
  {
    "op": "add",
    "path": "/class",
    "value": "ItemFirewood",
    "file": "game:itemtypes/resource/stick.json",
    "side": "Server"
  },
  {
    "op": "addmerge",
    "path": "/attributes",
    "value": {
      "firepitConstructable": true
    },
    "file": "game:itemtypes/resource/stick.json",
    "side": "Server"
  },
  {
    "op": "addmerge",
    "path": "/behaviors/0/properties",
    "value": {
      "stackingCapacity": 32,
      "bulkTransferQuantity": 8,
      "burnHoursPerItem": 0.1,
      "collisionBox": { "x1": 0, "y1": 0, "z1": 0, "x2": 1, "y2": 0.25, "z2": 1 },
      "cbScaleYByLayer": 0.125,
      "upSolid": true
    },
    "file": "game:itemtypes/resource/stick.json",
    "side": "Server"
  }
]

 

Posted (edited)

Hmm your packaged zip works just fine for me, I tested on windows 10 with 1.21.6 and 1.21.5 (just to make sure) without any other mods. So unless you are running some other mod with a conflict while testing then I honestly don't know what's causing this.

This specific error message should only appear when it's trying to create a pit kiln 🤔

 

Edited by The Insanity God
Posted

Thanks for the confirmation. When I have time Ill try to load without any other mods. Thatll at least rule out custom modifications. Really hope its not an issue with the flatpack. Id feel really bad for the devs. 

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.