#Using helpers.fake_tiles in a Loenn entity file

22 messages · Page 1 of 1 (latest)

violet stream
#

I'm trying to create a new FallingBlock version for Bounce Helper, and so far I've just copied the Loenn version of the entity plugin from here (https://github.com/CelestialCartographers/Loenn/blob/master/src/entities/falling_block.lua) and changed the names appropriately:

local fakeTilesHelper = require("helpers.fake_tiles")

local BounceHelperBounceFallingBlock = {}

BounceHelperBounceFallingBlock.name = "BounceHelper/BounceFallingBlock"

function BounceHelperBounceFallingBlock.placements()
    return {
        name = "normal",
        data = {
            tiletype = fakeTilesHelper.getPlacementMaterial(),
            climbFall = true,
            behind = false,
            width = 8,
            height = 8
        }
    }
end

BounceHelperBounceFallingBlock.sprite = fakeTilesHelper.getEntitySpriteFunction("tiletype", false)
BounceHelperBounceFallingBlock.fieldInformation = fakeTilesHelper.getFieldInformation("tiletype")

function BounceHelperBounceFallingBlock.depth(room, entity)
    return entity.behind and 5000 or 0
end

return BounceHelperBounceFallingBlock

but when trying to open Loenn it crashes with the attached message. Any ideas why this is happening/how to fix it?

GitHub

A Visual Map Maker and Level Editor for the game Celeste but better than the other one - CelestialCartographers/Loenn

old hearth
#

it'll in next loenn update

#

this is dev loenn

#

current stable doesn't have it yet

violet stream
#

oh ok fair, is there any intermediate fix I can use? Also do you know the ETA on the next loenn update?

old hearth
#

you can probably look at current plugins from other mods

#

idk when will be next loenn update, but i guess not soon

#

at least month i think

#

but idk

violet stream
#

Alright I've updated the code to this:

local fakeTilesHelper = require("helpers.fake_tiles")

local BounceHelperBounceFallingBlock = {}

BounceHelperBounceFallingBlock.name = "BounceHelper/BounceFallingBlock"

function BounceHelperBounceFallingBlock.placements()
    return {
        name = "normal",
        data = {
            tiletype = "3",
            climbFall = true,
            behind = false,
            width = 8,
            height = 8
        }
    }
end

BounceHelperBounceFallingBlock.sprite = fakeTilesHelper.getEntitySpriteFunction("tiletype", false)
BounceHelperBounceFallingBlock.fieldInformation = fakeTilesHelper.getFieldInformation("tiletype")

function BounceHelperBounceFallingBlock.depth(room, entity)
    return entity.behind and 5000 or 0
end

return BounceHelperBounceFallingBlock

and Loenn no longer crashes, but the new entity just doesn't appear in the placement menu. Any idea why, or how I can figure out why?

old hearth
#

did i literally just say you that fakeTilesHelper doesn't exist

#

or it does thinkeline

#

wait uhh

#

i'm not sure

#

but you can't have placements as function for now

violet stream
#

Yeah updated, but still doesn't appear in the placement menu

local fakeTilesHelper = require("helpers.fake_tiles")

local BounceHelperBounceFallingBlock = {}

BounceHelperBounceFallingBlock.name = "BounceHelper/BounceFallingBlock"

BounceHelperBounceFallingBlock.placements = {
    name = "normal",
    data = {
        tiletype = "3",
        climbFall = true,
        behind = false,
        width = 8,
        height = 8
    }
}

BounceHelperBounceFallingBlock.sprite = fakeTilesHelper.getEntitySpriteFunction("tiletype", false)
BounceHelperBounceFallingBlock.fieldInformation = fakeTilesHelper.getFieldInformation("tiletype")

function BounceHelperBounceFallingBlock.depth(room, entity)
    return entity.behind and 5000 or 0
end

return BounceHelperBounceFallingBlock
old hearth
old hearth
#

i guess you can use first code now

violet stream
#

haha fair, turns out the reason it wasn't appearing in loenn was that I just needed to add a new entry to the lang file. It's all working now, thanks for the help