Mar 19, 2012 at 1:50 AM
Absentee Modder
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Sep 7, 2010
Location: Outside your window. No no, don't check, it's okay
Posts: 272
Age: 29
Darn. That makes sense. Well, thanks.

EDIT: Unless...!
I remember seeing a separate npc that's a defeated Gaudi! Maybe I could just put the run script on death flag on that!

I'm not sure.

I'm using Cave Editor... Do the flag checkboxes in the npc editor correspond to the ones in the map editor? 'Cause some of them have different names. Is there a run script on death button in that menu?

I'm quite all right with having every gaudi death run the script.
 
Mar 19, 2012 at 1:52 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
What Serkol said.
Gaudis, butts, and other enemies have extremely large health values and magically transform into other npcs once their health drops below a certain threshold.
That's why changing their health with npc.tbl doesn't do anything, and also why runondeath won't work.
 
Mar 19, 2012 at 2:02 AM
Absentee Modder
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Sep 7, 2010
Location: Outside your window. No no, don't check, it's okay
Posts: 272
Age: 29
Edited my post. Anyone know if that might work?
 
Mar 19, 2012 at 2:08 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
Welllllllll when npcs are created ingame they get a script number of 0000 automatically.
Even if you make those npcs always run an event on death, that event number will be #0000 (unless you hax), so you'd have to restructure the way your script works if you wanted that to wok.
 
Mar 19, 2012 at 2:10 AM
Absentee Modder
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Sep 7, 2010
Location: Outside your window. No no, don't check, it's okay
Posts: 272
Age: 29
Ohh, I see the issue there.
Wait, restructure the way the script works? How? Why? You mean like with ASM?

Couldn't I just make the script that I want to run at 0000? or does the game not allow a script number 0000...?
 
Mar 19, 2012 at 2:26 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
What I meant by the restructuring is that you'd have to change every YNJ and anything that goes to event 0000.
Which is quite a few things
 
Mar 19, 2012 at 2:42 AM
Absentee Modder
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Sep 7, 2010
Location: Outside your window. No no, don't check, it's okay
Posts: 272
Age: 29
Oh, that's not so bad. Besides, I'd only have to do it in the levels that have gaudis! Thanks!


EDIT: Hmm, the Defeated Gaudi entity does not seem to be the same as the defeated gaudi. Changing flags on it in the npc list doesn't seem to do anything. Can you point me in the right direction?
 
Mar 19, 2012 at 4:09 AM
Senior Member
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jan 21, 2011
Location:
Posts: 249
can anyone please explain the "run script on death" flag to me? I've flagged a gaudi with it, and put its event number in the script. For some reason when the gaudi gets killed, though, it doesn't run the event. And it still drops shinies when it dies, which I remember shouldn't be happening if it's got that flag on. Anybody know the problem?

Gaudi have very very high health values, and their AI (that is, ASM stuff) watches that health value. When it drops a certain amount, the AI changes the npcID to that of the defeated gaudi, which then kills itself and spawns loot. The reason run script on death will not work on gaudi is because that event is handled inside the bullet x npc collision function (00471D50), and it relies on the npc's health being below 1. In other words, what you want to do is not going to work unless you tweak the gaudi directly (that is, ASM.)

However, what you want could work if you added a clause in (00471B80) [enemy dies] to handle checking flag 200 and an eventnum. However, doing just that would end up having any npc with flag 200 running their script twice, since the latter would also get run from (00471D50). It's perfectly doable, sure. But it's not as simple as it looks.


Tiles 0x0-0x1F are behind the player
Tiles 0x20-0x3F are never drawn
Tiles 0x40-0xFF are in front of the player
I should point out that the game only knows how to handle tiles up to something like 0x70 or such. If you use higher values it starts to act weird. That is, if iirc. XD
 
Mar 19, 2012 at 4:26 AM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Well I think values that are higher than the max expected (that is, the max pixel programmed for that collision group) get caught by the default value of the SWITCH statement he uses, and nothing happens (effectively same as tile type 0)
I can't remember any issues with the rendering engine that would arise from high values either.
 
Mar 20, 2012 at 1:48 AM
Absentee Modder
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Sep 7, 2010
Location: Outside your window. No no, don't check, it's okay
Posts: 272
Age: 29
Hmm... Is there any list of bullet offsets anywhere? There isn't one in your amazing assembly compendium, Nox. :/
 
Mar 20, 2012 at 1:49 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
I had one. I dunno whether it got lost with my hard drive.
One sec.

Edit: Here's what I found.
Code:
00404160 - Bullet 01: Snake Level 1
004043F0 - Bullet 02 - 03: Snake
004047B0 - Bullet 04 - 06: Polar Star				    [08_WeaponObject | 0C_Level]
00404B30 - Bullet 07 - 09: Fireball					 [08_WeaponObject]
00405120 - Bullet 0A - 0C: Machine Gun
004055A0 - Bullet 0D - 0F: Missile Launcher
00405D80 - Explosion from missile <Bullet ID 10-12>
00405F30 - Bullet 13: Bubbler Level 1
00406190 - <Bullet 14?>
004064D0 - Bullet 15: Bubbler Level 3
004068B0 - Bullet 16: Bubble Spurs
00406BB0 - Bullet 19: Blade Level 1
00406E60 - Bullet 1A: Blade Level 2
00407110 - Bullet 1B: Blade Level 3
004075E0 - Bullet 17: Blade Slashes
004078A0 - Bullet 18
00407910 - Bullet 1C - 1E: Super Missile Launcher
00408080 - Bullet 1F - 21:
00408230 - Bullet 22 - 24, 2B: Nemesis
00408710 - Bullet 25 - 27
00408AE0 - Bullet 28 - 2A
00408F40 - Bullet 2C: Spur Level 2
00408F90 - Bullet 2D: Spur Level 3
00408FC0 - Runs Bullet AI
 
Mar 20, 2012 at 2:01 AM
Absentee Modder
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Sep 7, 2010
Location: Outside your window. No no, don't check, it's okay
Posts: 272
Age: 29
Awesome! Thanks, Lace!
 
Mar 20, 2012 at 3:01 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
Mar 23, 2012 at 3:22 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Mar 25, 2012 at 6:49 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
Requires some vicious assembly. You'd have to locate and rewrite the boss script I think.

Where are the fireball's/snake's framerects located in the .exe? I've found the bullet.pbm framerects since they're in the bullet code, but I can't find the framerects for caret.pbm.
 
Mar 25, 2012 at 7:13 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
I'm assuming you mean the trail. I'd guess that it's probably an entity, which one I havent' a clue.
 
Mar 25, 2012 at 7:20 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
So I should look through the npc scripts to find the framerects? I don't really understand.
 
Mar 25, 2012 at 7:57 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
You should look through the NPC list to find the one that's the trail for the snake/fireball
Failing that, it isn't listed, so you should look through the code of the fireball/snake to find out which entity it spawns and then tell me so I can add it to the list.
 
Top