Alive Weapons v2. Unearth new allies! Customizable shooting NPCs.

Share and discuss custom LunaLua code and content packs for SMBX2.
User avatar
hacheipe399
Fighter Fly
Fighter Fly
Posts: 62
Joined: Mon Feb 10, 2014 12:29 pm
Current Project: Be an engineer in 5 years.

Alive Weapons v2. Unearth new allies! Customizable shooting NPCs.

Postby hacheipe399 » Tue Aug 14, 2018 11:03 pm

Hi Everyone! This is my API and I want to share it with you, guys!

First of all a little story: Do you remember your first time playing "The Suck" in The Invasion 2? Did you get amazed by the fact that you can use Hammer Bros as weapons? "Why aren't other enemies usable?" you asked to yourself. Well, I came here to solve that matter.

The API aliveweapons.lua aims to make most projectile-thrower NPCs into real guns for fighting into levels! They do in the same way as hammer bros do! Just bury an enemy, unearth it and voila! The version 2 of the API is released with these improvements:

New! You can customize the shooting behavior of the NPCs covered by this API! with the brand new function overhaulWeapon(). With this you can change projectile, firing rate and bullet speed! Look at the documentarion for a detailed explanation.
New! You can make your own weapon! That's right! makeCustomWeapon() lets you make any NPC throw any object, at the frequency, speed and position you want! If you get tired of it, then use resetCustomWeapon() to revert changes. With this tool you can make something like a SMB2-styled Veggie thrower!
New! 2-player mode support! Now you can be a menace 2 society with your friend! Be careful, don't kill your partner!
New! Complete overwrite of the API from scratch. Now it's more optimized and less glitchy.

Here is a video!


This time I did a complete rewrite of the API. The video uses the version 2! Now NPCs have animations when throw projectiles! In the video isn't shown, but the biggest enemies as Wart, SMB1 and SMB3 Bowser make the player do a heavy stomp in the ground when the player carries them. Be careful when jumping! If you don't like it, you can turn it off in your code.
GIF Demos: show
Image
Image
Image
Image
Image
Image
Even statues can be used as guns!
Image
SMB1 Bowser is OP as f$kk
Image
Ludwig von Koopa does a funny jumping animation when player jumps.

To make this API usable, paste my two files into your level's folder, make a lunadll.lua and write this line:

Code: Select all

local aliveweapons = API.load("aliveweapons")
Also I included functions to activate/deactivate certain/all NPCs shooting behavior. These are:

Code: Select all

aliveweapons.disableWeapon("npcname")
aliveweapons.enableWeapon("npcname") --DON'T FORGET THE QUOTATION MARKS
Just copy these functions into your onStart() event and write the name of the NPC into the brackets. Simple as that. They can be used within onLoadSection#() event too, so you can activate/deactivate behaviors as your player progresses in the level.
Important: enableWeapon() isn't needed if you didn't use any disableWeapon() before. Every NPC behavior is enabled by default. You can see the legal strings and the brand new customizing functions such as overhaulWeapon(), stompEffectActivated() and makeCustomWeapon() in the Documentation text included in the compressed file.

CHANGELOG V2:
  • Mouser added! Be careful as the bombs don't explode instantly!
  • Weapon customization added!
  • Custom weapon creation!
  • 2 player support!
  • Player stomp effect when carrying big NPCs like Wart!
  • Fixed player hurting with its own weapon.
  • Fixed projectiles killing coins and powerups.
If you have any suggestion or issue to report, tell me in this thread.

-Requires pnpc, colliders and expandedDefines.

DOWLOAD IT NOW!


Initial release (outdated - kept just to compare)

Last edited by hacheipe399 on Wed Aug 22, 2018 11:22 pm, edited 1 time in total.
I'm the spanish translator of the PGE Project. Please use it and give feedback to improve the software!
My LunaLua API:
Image

My currently released GFX work:
Image
Image
Image

I'm Hardcore 2 da bone.
1. for the treble.
2. for the bass

User avatar
HenryRichard
Ludwig von Koopa
Ludwig von Koopa
Posts: 2844
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: Alive Weapons. Unearth new allies![LunaLua API]

Postby HenryRichard » Wed Aug 15, 2018 12:49 am

I like it! I always thought more enemies should have this behavior, and it's neat to see it all implemented.

Side note: SMBX2 will eventually have snifits that behave like this.
Image

I'm on Soundcloud | My graphics pack!

Jesus is my savior.

User avatar
hacheipe399
Fighter Fly
Fighter Fly
Posts: 62
Joined: Mon Feb 10, 2014 12:29 pm
Current Project: Be an engineer in 5 years.

Re: Alive Weapons. Unearth new allies![LunaLua API]

Postby hacheipe399 » Wed Aug 15, 2018 10:51 am

HenryRichard wrote:
Wed Aug 15, 2018 12:49 am
I like it! I always thought more enemies should have this behavior, and it's neat to see it all implemented.

Side note: SMBX2 will eventually have snifits that behave like this.
Thanks!
I think I heard something of that somewhere. Btw I have this to fight with snifts. I'll do a video demo soon.
I'm the spanish translator of the PGE Project. Please use it and give feedback to improve the software!
My LunaLua API:
Image

My currently released GFX work:
Image
Image
Image

I'm Hardcore 2 da bone.
1. for the treble.
2. for the bass

User avatar
Mosaic
Ludwig von Koopa
Ludwig von Koopa
Posts: 2824
Joined: Fri Feb 27, 2015 8:07 pm
Current Project: The Mosaic Group's Journey, Toad's SMB Adventure, Mosaic Adventures and Other Secret Projects?
Chat Username: Mosaic
Contact:

Re: Alive Weapons. Unearth new allies![LunaLua API]

Postby Mosaic » Wed Aug 15, 2018 7:21 pm

Nice job on making these, going to download it later

I believe in Jesus Christ as my Lord and Savior. If you do, put this in your signature.
And Here's The Proof
My Rainbow Of Levels
Mosaic's Museum(My Discord)

Image

Image

Danny wrote:Here's some constructive criticism: What the hell.
Witchking wrote:Approved!

Discord Quotes: show
Image


User avatar
Mr Boboo
Mega Mole
Mega Mole
Posts: 264
Joined: Sat Jan 04, 2014 8:43 am
Flair: The Wicked Pissah
Current Project: Super Mario & the Journey to Everlast
Chat Username: Roberto

Re: Alive Weapons. Unearth new allies![LunaLua API]

Postby Mr Boboo » Sat Aug 18, 2018 10:46 am

Wow, this is awesome! I think this could have a lot of creative uses. I especially like the Snifit and Bowser statue. I'll most likely be using this!

If there's anything I'd recommend, it's to make it a little easier to customize the firing rate, so you can design a level around something that fires slowly or fires at lightspeed. That would make the API far more versatile imho.
I shall return with a new episode...... soon.

Check out my Mega Man Maker levels!
Breakneck Quarry: ID 189213
Flash Freeze: Coming soon

I support:

Image
Image
Image

User avatar
Radiance
Level Reviewer
Level Reviewer
Posts: 1264
Joined: Thu Dec 10, 2015 7:53 am
Current Project: viewtopic.php?t=16308

Re: Alive Weapons. Unearth new allies![LunaLua API]

Postby Radiance » Sun Aug 19, 2018 11:02 am

This API made me want to remake The Suck.

Added in 1 minute 10 seconds:
I also tried to customize the NPC spawned by the Hammer Bros and the player's bomb, fireball, and iceball work. The player's boomerang glitches tho

User avatar
hacheipe399
Fighter Fly
Fighter Fly
Posts: 62
Joined: Mon Feb 10, 2014 12:29 pm
Current Project: Be an engineer in 5 years.

Re: Alive Weapons. Unearth new allies![LunaLua API]

Postby hacheipe399 » Sun Aug 19, 2018 4:13 pm

Radiance wrote:
Sun Aug 19, 2018 11:03 am
This API made me want to remake The Suck.
My video demonstration will consist in a little twist to The Suck.
Radiance wrote: I also tried to customize the NPC spawned by the Hammer Bros and the player's bomb, fireball, and iceball work. The player's boomerang glitches tho
Most projs do glitches for the Hammer Bros. I think it's sort of low-level issue of the game.
I'm the spanish translator of the PGE Project. Please use it and give feedback to improve the software!
My LunaLua API:
Image

My currently released GFX work:
Image
Image
Image

I'm Hardcore 2 da bone.
1. for the treble.
2. for the bass

User avatar
hacheipe399
Fighter Fly
Fighter Fly
Posts: 62
Joined: Mon Feb 10, 2014 12:29 pm
Current Project: Be an engineer in 5 years.

Re: Alive Weapons v2. Unearth new allies! Customizable shooting NPCs.

Postby hacheipe399 » Wed Aug 22, 2018 11:23 pm

New version release! The API is completely redone and a video is posted!
I'm the spanish translator of the PGE Project. Please use it and give feedback to improve the software!
My LunaLua API:
Image

My currently released GFX work:
Image
Image
Image

I'm Hardcore 2 da bone.
1. for the treble.
2. for the bass

That Anarchy Dude
Goomba
Goomba
Posts: 3
Joined: Sun Feb 24, 2019 6:04 am

Re: Alive Weapons v2. Unearth new allies! Customizable shooting NPCs.

Postby That Anarchy Dude » Thu Mar 07, 2019 10:36 pm

Okay, I downloaded & unzipped your files into my worlds folder.
I loaded up the demo level, and none of the NPC's are doing anything when I hold them except the Hammer Bros.
What am I missing here?

User avatar
PixelPest
Link
Link
Posts: 7118
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: Alive Weapons v2. Unearth new allies! Customizable shooting NPCs.

Postby PixelPest » Fri Mar 08, 2019 1:08 pm

That Anarchy Dude wrote:
Thu Mar 07, 2019 10:36 pm
Okay, I downloaded & unzipped your files into my worlds folder.
I loaded up the demo level, and none of the NPC's are doing anything when I hold them except the Hammer Bros.
What am I missing here?
You you using 1.3?

User avatar
Eri7
Banned
Posts: 1653
Joined: Sat Jan 28, 2017 4:48 pm
Flair: Hard work pays off sooner or later
Current Project: SMNZ (38A) + SMNP1 (38A) + MKA(2.0) + TNV (2.0/38A) + TNVL (2.0/38A) + SMNP2 (2.0) + SMNR (2.0)
Chat Username: Eri7
Contact:

Re: Alive Weapons v2. Unearth new allies! Customizable shooting NPCs.

Postby Eri7 » Fri Mar 08, 2019 1:19 pm

Is this API or library as i had a conversation with a friend about it and he says that its library, is that true?
Image
Image
Image
Image

User avatar
PixelPest
Link
Link
Posts: 7118
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: Alive Weapons v2. Unearth new allies! Customizable shooting NPCs.

Postby PixelPest » Fri Mar 08, 2019 1:23 pm

Eri7 wrote:
Fri Mar 08, 2019 1:19 pm
Is this API or library as i had a conversation with a friend about it and he says that its library, is that true?
LunaLua is the API. LunaLua modules, such as this, are termed libraries

User avatar
hacheipe399
Fighter Fly
Fighter Fly
Posts: 62
Joined: Mon Feb 10, 2014 12:29 pm
Current Project: Be an engineer in 5 years.

Re: Alive Weapons v2. Unearth new allies! Customizable shooting NPCs.

Postby hacheipe399 » Sun Mar 10, 2019 2:57 pm

That Anarchy Dude wrote:
Thu Mar 07, 2019 10:36 pm
Okay, I downloaded & unzipped your files into my worlds folder.
I loaded up the demo level, and none of the NPC's are doing anything when I hold them except the Hammer Bros.
What am I missing here?
Did you load the API?

Code: Select all

local aliveweapons = API.load("aliveweapons")
That line alone should make your enemies throw their projs.
Also, I plan to do a bugfix release of this API, so stay tuned.
I'm the spanish translator of the PGE Project. Please use it and give feedback to improve the software!
My LunaLua API:
Image

My currently released GFX work:
Image
Image
Image

I'm Hardcore 2 da bone.
1. for the treble.
2. for the bass

User avatar
Eri7
Banned
Posts: 1653
Joined: Sat Jan 28, 2017 4:48 pm
Flair: Hard work pays off sooner or later
Current Project: SMNZ (38A) + SMNP1 (38A) + MKA(2.0) + TNV (2.0/38A) + TNVL (2.0/38A) + SMNP2 (2.0) + SMNR (2.0)
Chat Username: Eri7
Contact:

Re: Alive Weapons v2. Unearth new allies! Customizable shooting NPCs.

Postby Eri7 » Sun Mar 10, 2019 4:06 pm

Thanks Pixelpest for the answer, i am planning to use this for something to pay homage to the level "The Suck".
Image
Image
Image
Image


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 4 guests