Changing Magikoopa Spawns

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

ANueUtsuho
Bot
Bot
Posts: 51
Joined: Sun May 04, 2014 1:13 am

Changing Magikoopa Spawns

Postby ANueUtsuho » Tue May 26, 2020 6:46 pm

Is there any way I could alter what Magikoopas turn Flip Blocks into? I'd like to get rid of the Fighter Flies, or just make them spawn less often.

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9891
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: Changing Magikoopa Spawns

Postby Emral » Wed May 27, 2020 1:03 am

Load npc-300.lua in your lua file, and change the contents of the "transformations" variable (they're NPC IDs). Here's the loading code with the list set to what it currently is. Every entry is equally likely to appear.
local magic = require("npcs/npc-300")
magic.transformations = {54, 112, 33, 185, 301, 165}

Hoeloe
Phanto
Phanto
Posts: 1465
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Pronouns: she/her

Re: Changing Magikoopa Spawns

Postby Hoeloe » Wed May 27, 2020 7:24 am

Enjl wrote:
Wed May 27, 2020 1:03 am
Load npc-300.lua in your lua file
This isn't possible to do. Attempting it load npc-n.lua files produces an error.

This particular NPC had an oversight when converting it to npc-n.lua, and this should have been moved into their NPC config. This will be fixed in the next patch.

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9891
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: Changing Magikoopa Spawns

Postby Emral » Wed May 27, 2020 7:28 am

Ah, darn bugs.

Until then you can get the same effect by copying npc-300.lua to your level folder and renaming it to npc-751.lua, and copy the magikoopa magic image sprite to the same filename too. You can then use npc-299.txt for the magikoopa to set "magic=751", to make the magikoopa shoot the new custom magic NPC.


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 4 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari