Page 1 of 1

Three questions

Posted: Tue Feb 01, 2022 5:58 pm
by Twisted4932
1. Legacy SMBX episodes are compatible with SMBX2b4?
2. How add I light to certain NPCs with lua?
3. What should type I in the luna.lua file for use a new powerup? (I have downloaded anotherpowerup.lua and a custom powerup)

Re: Three questions

Posted: Wed Feb 02, 2022 8:00 am
by Marioman2007
Weirdgoomba4932 wrote:
Tue Feb 01, 2022 5:58 pm
1. Legacy SMBX episodes are compatible with SMBX2b4?
2. How add I light to certain NPCs with lua?
3. What should type I in the luna.lua file for use a new powerup? (I have downloaded anotherpowerup.lua and a custom powerup)
1. Yes, 1.3.0.1 or lower versions' episodes are compatible with Beta 4+

2. You could set their light related configs in npc-n.txt
https://docs.codehaus.moe/#/features/light-config

3. Sorry, I have no idea on that, but you should first try to experiment around with the example powerup

Re: Three questions

Posted: Wed Feb 02, 2022 2:37 pm
by Twisted4932
marioman2007 wrote:
Wed Feb 02, 2022 8:00 am
Weirdgoomba4932 wrote:
Tue Feb 01, 2022 5:58 pm
1. Legacy SMBX episodes are compatible with SMBX2b4?
2. How add I light to certain NPCs with lua?
3. What should type I in the luna.lua file for use a new powerup? (I have downloaded anotherpowerup.lua and a custom powerup)
1. Yes, 1.3.0.1 or lower versions' episodes are compatible with Beta 4+

2. You could set their light related configs in npc-n.txt
https://docs.codehaus.moe/#/features/light-config

3. Sorry, I have no idea on that, but you should first try to experiment around with the example powerup
Thanks for the help :)

Re: Three questions

Posted: Mon Feb 07, 2022 6:42 pm
by Twisted4932
marioman2007 wrote:3. Sorry, I have no idea on that, but you should first try to experiment around with the example powerup
I have played that demo level from anotherpowerup.lua and it works perfectly.
But when I play my custom level (Its folder have the "anotherpowerup" files and the "cape feather" files) always appears a message of "Item 851 could not be registered"

I wrote this in the luna.lua file

Code: Select all

local ap = require("anotherpowerup")

ap.registerItemTier(851, true)
ap.registerPowerup("ap_cape")

Re: Three questions

Posted: Mon Feb 07, 2022 10:02 pm
by Marioman2007
Weirdgoomba4932 wrote:
Mon Feb 07, 2022 6:42 pm
marioman2007 wrote:3. Sorry, I have no idea on that, but you should first try to experiment around with the example powerup
I have played that demo level from anotherpowerup.lua and it works perfectly.
But when I play my custom level (Its folder have the "anotherpowerup" files and the "cape feather" files) always appears a message of "Item 851 could not be registered"

I wrote this in the luna.lua file

Code: Select all

local ap = require("anotherpowerup")

ap.registerItemTier(851, true)
ap.registerPowerup("ap_cape")
you don't need to put anything in luna.lua file for the cape feather, just follow the instructions to use the cape feather and you are good to go

Re: Three questions

Posted: Tue Feb 08, 2022 3:27 pm
by Twisted4932
marioman2007 wrote:
Mon Feb 07, 2022 10:02 pm
Weirdgoomba4932 wrote:
Mon Feb 07, 2022 6:42 pm
marioman2007 wrote:3. Sorry, I have no idea on that, but you should first try to experiment around with the example powerup
I have played that demo level from anotherpowerup.lua and it works perfectly.
But when I play my custom level (Its folder have the "anotherpowerup" files and the "cape feather" files) always appears a message of "Item 851 could not be registered"

I wrote this in the luna.lua file

Code: Select all

local ap = require("anotherpowerup")

ap.registerItemTier(851, true)
ap.registerPowerup("ap_cape")
you don't need to put anything in luna.lua file for the cape feather, just follow the instructions to use the cape feather and you are good to go
I have erased that code and now the powerup works well. Thank you!