Page 1 of 1
How do I setup customization of NPCs, Blocks & BGOs?
Posted: Sun Aug 18, 2019 9:56 pm
by Animebryan
I trying to create some custom blocks & I'm not sure what the options refer to. Here's the dummy.ini template:
[block]
image = "Dummy.png"
name = "Dummy Block"
group = "Dummy blocks"
category = "Dummy block"
sizable = 0
danger = 0
collision = 1
slope-slide = 0
shape-type = 0
lava = 0
destroyable = 0
destroyable-by-bomb = 0
destroyable-by-fireball = 0
spawn-on-destroy = 0
destroy-effect = 1
bounce = 0
hitable = 0
transform-onhit-into = 0
algorithm = 0
animated = 0
frames = 1
frame-delay = 125
While some are obvious, there's a few that I'm not so sure of. Can I get a list of what each of these options mean, including ones for NPCs & BGOs?
Re: How do I setup customization of NPCs, Blocks & BGOs?
Posted: Sun Aug 18, 2019 10:02 pm
by Enjl
Most of these options are exclusive to the PGE engine.
For SMBX2's purposes, INI files only affect the editor and only the visual/display fields are interesting.
Documentation is here:
https://wohlsoft.ru/pgewiki/Category:Config_pack
For actual in-game customization, you need to use NPC config. There's a template in the npc-n.lua in the _templates folder, and a list of NPC codes here
https://docs.google.com/spreadsheets/d/ ... 1557876631
Re: How do I setup customization of NPCs, Blocks & BGOs?
Posted: Thu Aug 22, 2019 11:25 pm
by Animebryan
It won't stop giving me the finger! I set up 4 custom blocks to act as layer switches when hit, set the Hitable setting to 1, but when I try to hit it, it acts like a used solid block. It doesn't bump up like a hitable block should. How do I fix this?
One of the ini files:
[block]
image = "block-757.png"
name = "Right Arrow Block"
group = "Custom blocks"
category = "Switch block"
sizable = 0
danger = 0
collision = 1
slope-slide = 0
shape-type = 0
lava = 0
destroyable = 0
destroyable-by-bomb = 0
destroyable-by-fireball = 0
spawn-on-destroy = 0
destroy-effect = 0
bounce = 0
hitable = 1
transform-onhit-into = 0
algorithm = 0
animated = 0
frames = 1
frame-delay = 0
Re: How do I setup customization of NPCs, Blocks & BGOs?
Posted: Fri Aug 23, 2019 3:49 am
by ElectriKong
Animebryan wrote: ↑Thu Aug 22, 2019 11:25 pm
It won't stop giving me the finger! I set up 4 custom blocks to act as layer switches when hit, set the Hitable setting to 1, but when I try to hit it, it acts like a used solid block. It doesn't bump up like a hitable block should. How do I fix this?
One of the ini files:
[block]
image = "block-757.png"
name = "Right Arrow Block"
group = "Custom blocks"
category = "Switch block"
sizable = 0
danger = 0
collision = 1
slope-slide = 0
shape-type = 0
lava = 0
destroyable = 0
destroyable-by-bomb = 0
destroyable-by-fireball = 0
spawn-on-destroy = 0
destroy-effect = 0
bounce = 0
hitable = 1
transform-onhit-into = 0
algorithm = 0
animated = 0
frames = 1
frame-delay = 0
.ini files only affect the PGE editor, so don't expect it to work in game.
If you want to make a block hitable, then try adding 'Block.config[n].hitable = true' to your level's/episode's luna.lua file, replacing the n with the block ID.
Re: How do I setup customization of NPCs, Blocks & BGOs?
Posted: Fri Aug 23, 2019 6:19 am
by Enjl
Electriking wrote: ↑Fri Aug 23, 2019 3:49 am
If you want to make a block hitable, then try adding 'Block.config[n].hitable = true' to your level's/episode's luna.lua file, replacing the n with the block ID.
bumpable, not hitable
Re: How do I setup customization of NPCs, Blocks & BGOs?
Posted: Fri Aug 23, 2019 8:21 am
by Animebryan
What?
Re: How do I setup customization of NPCs, Blocks & BGOs?
Posted: Fri Aug 23, 2019 9:45 am
by Hoeloe
As has been said, .ini files only affect how the block appears in the editor. In order to change its in-game behaviour, you need to add:
Code: Select all
Block.config[BLOCKID].bumpable = true
to your levels luna.lua file.
Re: How do I setup customization of NPCs, Blocks & BGOs?
Posted: Fri Aug 23, 2019 10:08 am
by Animebryan
So do I add that as well or just change hitable to bumpable?
Re: How do I setup customization of NPCs, Blocks & BGOs?
Posted: Fri Aug 23, 2019 10:13 am
by Enjl
Animebryan wrote: ↑Fri Aug 23, 2019 10:08 am
So do I add that as well or just change hitable to bumpable?
The ini is completely irrelevant for this. The ini's config flag is called "hitable" but only affects the PGE engine, which we don't use in SMBX2. All you need is the line hoeloe provided.
Re: How do I setup customization of NPCs, Blocks & BGOs?
Posted: Fri Aug 23, 2019 10:32 am
by Animebryan
Enjl wrote: ↑Fri Aug 23, 2019 10:13 am
Animebryan wrote: ↑Fri Aug 23, 2019 10:08 am
So do I add that as well or just change hitable to bumpable?
The ini is completely irrelevant for this. The ini's config flag is called "hitable" but only affects the PGE engine, which we don't use in SMBX2. All you need is the line hoeloe provided.
Bringing up the ini file is irrelevant. We're talking about the luna.lua file & whether to replace hitable with bumpable or to keep hitable & have both.
Re: How do I setup customization of NPCs, Blocks & BGOs?
Posted: Fri Aug 23, 2019 10:40 am
by Enjl
Ah, I didn't know you skipped over the part where I corrected Electriking by saying that the field is called "bumpable" instead of "hitable". Hitable doesn't exist in block config.