How do I get bosses to work.

Need help with any SMBX game-related issues? Ask your questions here.
User avatar
AMinorFlood
Koopa Troopa
Koopa Troopa
Posts: 29
Joined: Sun Mar 24, 2019 8:25 pm
Flair: HI IM A MUFFIN!!

How do I get bosses to work.

Postby AMinorFlood » Thu Jun 13, 2019 2:56 pm

I need to know how bosses work in the editor, I was thinking of a boss that runs and jumps around and then shoots 3 arcing projs. and takes about 8 hits to defeat.

User avatar
ThePieSkyHigh
Nipper Plant
Nipper Plant
Posts: 741
Joined: Fri Jun 15, 2018 3:03 pm
Flair: "Nothing is impossible!" But I do nothing all day.
Current Project: ☆ Jump up super star! ☆
Chat Username: ThePieSkyHigh
Contact:

Re: How do I get bosses to work.

Postby ThePieSkyHigh » Sat Jun 15, 2019 5:15 pm

All I know (for 1.3) is that each vanilla boss does it's own thing with different health. Replacing these with custom graphics only changes it's appearance, not what it does. You can change some settings with an "???-npc" text file (Notepad). Find these settings in the manual of 1.3.

If this is 2.0 I think you can make a whole new NPC, but that's a different topic for me.
Image
Go check out my levels
Go check out my short stories
You may call me "Pie" if you'd like.

If you want a logo for your episode, go PM AndrewPixel!
I support: show
Image

Image

Image

Image

User avatar
AMinorFlood
Koopa Troopa
Koopa Troopa
Posts: 29
Joined: Sun Mar 24, 2019 8:25 pm
Flair: HI IM A MUFFIN!!

Re: How do I get bosses to work.

Postby AMinorFlood » Sat Jun 15, 2019 7:01 pm

ThePieSkyHigh wrote:
Sat Jun 15, 2019 5:15 pm
All I know (for 1.3) is that each vanilla boss does it's own thing with different health. Replacing these with custom graphics only changes it's appearance, not what it does. You can change some settings with an "???-npc" text file (Notepad). Find these settings in the manual of 1.3.

If this is 2.0 I think you can make a whole new NPC, but that's a different topic for me.
Yeah, i'm using 2.

User avatar
ThePieSkyHigh
Nipper Plant
Nipper Plant
Posts: 741
Joined: Fri Jun 15, 2018 3:03 pm
Flair: "Nothing is impossible!" But I do nothing all day.
Current Project: ☆ Jump up super star! ☆
Chat Username: ThePieSkyHigh
Contact:

Re: How do I get bosses to work.

Postby ThePieSkyHigh » Sun Jun 16, 2019 12:31 pm

AMinorFlood wrote:
Sat Jun 15, 2019 7:01 pm
ThePieSkyHigh wrote:
Sat Jun 15, 2019 5:15 pm
All I know (for 1.3) is that each vanilla boss does it's own thing with different health. Replacing these with custom graphics only changes it's appearance, not what it does. You can change some settings with an "???-npc" text file (Notepad). Find these settings in the manual of 1.3.

If this is 2.0 I think you can make a whole new NPC, but that's a different topic for me.
Yeah, i'm using 2.
Then it's the same, I just don't know what the new npc is
Image
Go check out my levels
Go check out my short stories
You may call me "Pie" if you'd like.

If you want a logo for your episode, go PM AndrewPixel!
I support: show
Image

Image

Image

Image

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8541
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: How do I get bosses to work.

Postby Enjl » Sun Jun 16, 2019 1:00 pm

ThePieSkyHigh wrote:
Sun Jun 16, 2019 12:31 pm
AMinorFlood wrote:
Sat Jun 15, 2019 7:01 pm
ThePieSkyHigh wrote:
Sat Jun 15, 2019 5:15 pm
All I know (for 1.3) is that each vanilla boss does it's own thing with different health. Replacing these with custom graphics only changes it's appearance, not what it does. You can change some settings with an "???-npc" text file (Notepad). Find these settings in the manual of 1.3.

If this is 2.0 I think you can make a whole new NPC, but that's a different topic for me.
Yeah, i'm using 2.
Then it's the same, I just don't know what the new npc is
The same? The new NPC?
The concept you provided wasn't even accurate to 1.3, so let's back up for a second.
The npc configuration files follow the pattern of "npc-###.txt" where ### is the ID of the NPC which the settings should apply to.
Now, before jumping ahead to the concept of "making a whole new NPC", since that does require knowledge of lua scripting and a couple of other systems (since in order to write a custom npc you have to write code that doesn't yet exist in the game), let's see how we could modify a vanilla boss.
As of the SMBX2 MAGLX3 Build, you can use the npc config variable "health" to customize a boss's health (e.g. this would be a line for NPC-###.txt). In order to get an boss to shoot an arching projectile, you need to tinker with the lua code a little.
Say, for example, your goal is to modify Larry Koopa. Larry usually shoots NPC 269, three in a row. What I'm about to do can be done for any projectile, so if Larry isn't to your liking, you can transfer the code to other bosses with little change.
After hitting the "local script" button in the "script" menu of the SMBX2 Editor, your preferred text editing program should come up. In there, you can use a code like this to instantly change all NPC-269s into any other ID. Say, 30. A hammer.

Code: Select all

function onTickEnd() --Every frame...
	for k,v in ipairs(NPC.get(269, player.section) do --Find all Larry Projectiles in the first player's section...
		v:transform(30) --Turn them into hammers...
		v.speedX = v.direction * 2
		v.speedY = -8 --Adjust speed to give them an arc
	end
end
The ABC of Creation
________________________________________________________
Image

User avatar
ThePieSkyHigh
Nipper Plant
Nipper Plant
Posts: 741
Joined: Fri Jun 15, 2018 3:03 pm
Flair: "Nothing is impossible!" But I do nothing all day.
Current Project: ☆ Jump up super star! ☆
Chat Username: ThePieSkyHigh
Contact:

Re: How do I get bosses to work.

Postby ThePieSkyHigh » Sun Jun 16, 2019 2:52 pm

Enjl wrote:
Sun Jun 16, 2019 1:00 pm
ThePieSkyHigh wrote:
Sun Jun 16, 2019 12:31 pm
AMinorFlood wrote:
Sat Jun 15, 2019 7:01 pm


Yeah, i'm using 2.
Then it's the same, I just don't know what the new npc is
The same? The new NPC?
The concept you provided wasn't even accurate to 1.3, so let's back up for a second.
The npc configuration files follow the pattern of "npc-###.txt" where ### is the ID of the NPC which the settings should apply to.
Now, before jumping ahead to the concept of "making a whole new NPC", since that does require knowledge of lua scripting and a couple of other systems (since in order to write a custom npc you have to write code that doesn't yet exist in the game), let's see how we could modify a vanilla boss.
As of the SMBX2 MAGLX3 Build, you can use the npc config variable "health" to customize a boss's health (e.g. this would be a line for NPC-###.txt). In order to get an boss to shoot an arching projectile, you need to tinker with the lua code a little.
Say, for example, your goal is to modify Larry Koopa. Larry usually shoots NPC 269, three in a row. What I'm about to do can be done for any projectile, so if Larry isn't to your liking, you can transfer the code to other bosses with little change.
After hitting the "local script" button in the "script" menu of the SMBX2 Editor, your preferred text editing program should come up. In there, you can use a code like this to instantly change all NPC-269s into any other ID. Say, 30. A hammer.

Code: Select all

function onTickEnd() --Every frame...
	for k,v in ipairs(NPC.get(269, player.section) do --Find all Larry Projectiles in the first player's section...
		v:transform(30) --Turn them into hammers...
		v.speedX = v.direction * 2
		v.speedY = -8 --Adjust speed to give them an arc
	end
end
Alright, I won't give an opinion for 2.0 anymore. You developed it, you know a lot more
Image
Go check out my levels
Go check out my short stories
You may call me "Pie" if you'd like.

If you want a logo for your episode, go PM AndrewPixel!
I support: show
Image

Image

Image

Image


Return to “Help and Support”

Who is online

Users browsing this forum: Google [Bot] and 13 guests