Page 1 of 1

MMX Chill Penguin (LunaLua API)

Posted: Fri Jul 27, 2018 9:17 am
by kking117

Chill Penguino

Ever wanted to fight Chill Penguin as Mario or Luigi?
No? Yeah me neither but you can now anyway.

By default it replaces the SMB3 Goomba and its projectiles replace SMB3 red Goomba and SMB blue Goomba. It also functions differently when set as boss in the editor.
With that out of the way here's some gifs to showcase what it can do:
Spoiler: show
Jump Attack:
Image
Ice Ball Attack:
Image
Slide Attack:
Image
Ice Breath and Blizzard Attacks:
Image
Health Bar Demonstration:
Image

How to use:

1. Put the chillpenguin.lua file and graphics in your level's folder.

2. Put this in your level's lunadll.lua file.

Code: Select all

local chillpenguinAPI = API.load("chillpenguin");

I want to make it jump higher/don't want it to replace Goombas:

Open up you level's lunadll.lua file in your preferred text editor.
Now at the start of the file add these to a new line:

Code: Select all

chillpenguin.PENGID = 1;
chillpenguin.ICEBALLID = 2;
chillpenguin.STATUEID = 27;
These are all parameters that you can change if you want to modify behaviour
or change which npc Chill Penguin replaces.
For a list of parameters see: https://github.com/kking117/SMBX2-NPC-M ... iki/PARAMS
Or view the chillpenguin.lua file.

APIs Needed to Run:
rng.lua
pnpc.lua
particles.lua

Download:
https://github.com/kking117/SMBX2-NPC-M ... enguin.git

Updates:
Spoiler: show
v1.0
  • Chill Penguin now stands still when set to don't move in the editor.
  • Fixed an issue where Chill Penguins set to don't move will start attacking after flinching.
  • Chill Penguin no longer gets set to its don't move AI when leaving the section and re-entering unless it was set to don't move in the editor.
v0.9
  • More parameters are included such as air and ground friction.
  • Code added to handle when Chill Penguin is being held.
  • Blizzard's push force code changed so that Link no longer moves faster while holding run.
  • All aspects of Chill Penguin now works correctly in 2 player even if both players are fighting separate Chill Penguins in different sections.
v0.8
  • First public release.

Issues/Bugs/Stuff to be Aware of:
Spoiler: show
  • Due to how much code the mod has to run through it's recommended to not dump a bunch in a section.
    (Though if you want to know I could have 10 around at once with no slowdown, and my laptop experiences high slowdown running Shovel Knight.)
  • Because of the way the particle.lua works, the blizzard particle effect will only play on the section player 1 is on.

Re: MMX Chill Penguin (LunaLua API)

Posted: Fri Jul 27, 2018 1:18 pm
by GDKeptr
Looks great, that would be a great boss for my upcoming sequel of my current project.

Re: MMX Chill Penguin (LunaLua API)

Posted: Tue Aug 28, 2018 7:48 am
by IAmPlayer
Looks cool. I might try it later to fiddle around.

Re: MMX Chill Penguin (LunaLua API)

Posted: Tue Aug 28, 2018 1:56 pm
by hacheipe399
You can solve the section issue by using the Memory offset 0x146 (FIELD_WORD) of the NPC instead of player.section. I did it for custom NPC behaviors and worked in all sections of levels.