Post here for help and support regarding LunaLua and SMBX2's libraries and features.
Moderator: Userbase Moderators
|
|
|
|
-
DrMekar
- Eerie

- Posts: 787
- Joined: Sat Apr 08, 2017 7:16 am
- Flair: CUSTOM CHARACTER CREATOR
-
Contact:
Postby DrMekar » Tue May 12, 2020 10:20 am
Enjl wrote: ↑Tue May 12, 2020 10:09 am
That is a possibility. Permanent speedY of 0 has fairly obvious side-effects, but it's a possibility.
It would help you insofar that if you put your head to understanding mouser ai you would be able to catch the point in the AI loop where a jump occurs and prevent the ai values from ever reaching that point.
Very obvious side effects you meant xD
It isen't very an Option for that Boss, so it's an intresting concept.
I also understand the idea behind the printing thing now. I'm gonna look into it, Thanks 
|
|
|
|
|
|
|
|
|
-
FanofSMBX
- Ludwig von Koopa

- Posts: 3878
- Joined: Sun Dec 22, 2013 12:01 pm
Postby FanofSMBX » Tue May 12, 2020 6:45 pm
Would giving him super-gravity also work?
|
|
|
|
|
|
|
|
|
-
DrMekar
- Eerie

- Posts: 787
- Joined: Sat Apr 08, 2017 7:16 am
- Flair: CUSTOM CHARACTER CREATOR
-
Contact:
Postby DrMekar » Wed May 13, 2020 12:49 am
FanofSMBX wrote: ↑Tue May 12, 2020 6:45 pm
Would giving him super-gravity also work?
What is Super-Gravity?
|
|
|
|
|
|
|
|
|
-
FanofSMBX
- Ludwig von Koopa

- Posts: 3878
- Joined: Sun Dec 22, 2013 12:01 pm
Postby FanofSMBX » Thu May 14, 2020 2:15 am
DrMekar wrote: ↑Wed May 13, 2020 12:49 am
FanofSMBX wrote: ↑Tue May 12, 2020 6:45 pm
Would giving him super-gravity also work?
What is Super-Gravity?
Just normal gravity, but more. I recall in my graphics pack I made a crude parachute goomba by giving the spiny egg low gravity. So you may be able to make Mouser not jump by making his gravity so high that his jump is over in an instant.
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9891
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Thu May 14, 2020 2:34 am
FanofSMBX wrote: ↑Thu May 14, 2020 2:15 am
DrMekar wrote: ↑Wed May 13, 2020 12:49 am
FanofSMBX wrote: ↑Tue May 12, 2020 6:45 pm
Would giving him super-gravity also work?
What is Super-Gravity?
Just normal gravity, but more. I recall in my graphics pack I made a crude parachute goomba by giving the spiny egg low gravity. So you may be able to make Mouser not jump by making his gravity so high that his jump is over in an instant.
I'm pretty sure due to the order in which the code is executed, there will always be at least 1 frame of bouncing. This is a much jankier and unreliable solution than just manipulating the AI.
|
|
|
|
|
|
|
|
|
-
Murphmario
- 2025 Egg Hunter

- Posts: 2389
- Joined: Fri Dec 20, 2013 7:07 pm
- Pronouns: he/him
Postby Murphmario » Thu May 14, 2020 3:41 pm
Decided to do some digging on my own since the PGE Wiki doesn't have Mouser's AI variables for whatever reason, and apparently ai3 is the timer for Mouser jumping. Setting that to 0 might work.
|
|
|
|
|
|
|
|
|
-
DrMekar
- Eerie

- Posts: 787
- Joined: Sat Apr 08, 2017 7:16 am
- Flair: CUSTOM CHARACTER CREATOR
-
Contact:
Postby DrMekar » Thu May 14, 2020 5:07 pm
Murphmario wrote: ↑Thu May 14, 2020 3:41 pm
Decided to do some digging on my own since the PGE Wiki doesn't have Mouser's AI variables for whatever reason, and apparently ai3 is the timer for Mouser jumping. Setting that to 0 might work.
Good to hear. Would you know how I set the Timer to 0?
|
|
|
|
|
|
|
|
|
-
Murphmario
- 2025 Egg Hunter

- Posts: 2389
- Joined: Fri Dec 20, 2013 7:07 pm
- Pronouns: he/him
Postby Murphmario » Thu May 14, 2020 7:19 pm
DrMekar wrote: ↑Thu May 14, 2020 5:07 pm
Murphmario wrote: ↑Thu May 14, 2020 3:41 pm
Decided to do some digging on my own since the PGE Wiki doesn't have Mouser's AI variables for whatever reason, and apparently ai3 is the timer for Mouser jumping. Setting that to 0 might work.
Good to hear. Would you know how I set the Timer to 0?
Something like this?
Code: Select all function onTick()
for index,v in ipairs(NPC.get(262)) do
v.ai3 = 0
end
end
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9891
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Fri May 15, 2020 3:32 am
Murphmario wrote: ↑Thu May 14, 2020 3:41 pm
Decided to do some digging on my own since the PGE Wiki doesn't have Mouser's AI variables for whatever reason, and apparently ai3 is the timer for Mouser jumping. Setting that to 0 might work.
Someone must've forgotten to investigate Mouser. Feel free to add them to the wiki, for future reference.
|
|
|
|
|
|
|
|
|
-
DrMekar
- Eerie

- Posts: 787
- Joined: Sat Apr 08, 2017 7:16 am
- Flair: CUSTOM CHARACTER CREATOR
-
Contact:
Postby DrMekar » Fri May 15, 2020 6:39 am
Murphmario wrote: ↑Thu May 14, 2020 7:19 pm
DrMekar wrote: ↑Thu May 14, 2020 5:07 pm
Murphmario wrote: ↑Thu May 14, 2020 3:41 pm
Decided to do some digging on my own since the PGE Wiki doesn't have Mouser's AI variables for whatever reason, and apparently ai3 is the timer for Mouser jumping. Setting that to 0 might work.
Good to hear. Would you know how I set the Timer to 0?
Something like this?
Code: Select all function onTick()
for index,v in ipairs(NPC.get(262)) do
v.ai3 = 0
end
end
That did it. Thanks alot 
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9891
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Fri May 15, 2020 6:51 am
DrMekar wrote: ↑Fri May 15, 2020 6:39 am
That did it. Thanks alot :)
Just checking in, for future reference. Do you understand the function of the code above? The purpose of the for loop, NPC.get, v and the ai value?
Just wanna make sure that you take more away from the topic than just a piece of code.
|
|
|
|
|
|
|
|
|
-
DrMekar
- Eerie

- Posts: 787
- Joined: Sat Apr 08, 2017 7:16 am
- Flair: CUSTOM CHARACTER CREATOR
-
Contact:
Postby DrMekar » Fri May 15, 2020 7:34 am
Enjl wrote: ↑Fri May 15, 2020 6:51 am
DrMekar wrote: ↑Fri May 15, 2020 6:39 am
That did it. Thanks alot
Just checking in, for future reference. Do you understand the function of the code above? The purpose of the for loop, NPC.get, v and the ai value?
Just wanna make sure that you take more away from the topic than just a piece of code.
I understand most of it, though I'm still a bit unsure with ai value.
It does diffrent things to diffrent NPCs that's clear, though what I'm
not sure about is if there is some kind of a pattern on what ai does
what to an NPC. ai3 doesn't stop a Red Paragoomba from jumping
for Example, most likely because it is, it's Main Attack like the Throwing
of Bombs (Or Bob-Ombs, Goombas, Lightings and Hammers) is Mousers
Main Attack.
Thanks for Asking.
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9891
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Fri May 15, 2020 7:57 am
DrMekar wrote: ↑Fri May 15, 2020 7:34 am
ai values were used by Redigit as 5 wildcard values for determining what an NPC should do. Their function depends on which NPC it is. Usually in programming there would be different classes of NPCs, like one for enemies that crawl on walls, or one for Yoshis, or one for Mouser. Redigit just crammed all 300 vastly different NPCs into a single class and sorted out the differences using these 5 ai values. Why 5? Seems to have come about due to necessity. Rednaxela and I recently discovered that some enemies that try to face the player at all times (like Larry or Mouser) actually use another field in the npc class as an ai6 value.
So, to make sense of ai values better, it's good to think of giving them legible names while investigating them. For example here ai3 for mouser is the jumpTimer, and ai1 for paratroopas is the paratroopaBehaviourStyle.
|
|
|
|
|
|
|
|
|
-
DrMekar
- Eerie

- Posts: 787
- Joined: Sat Apr 08, 2017 7:16 am
- Flair: CUSTOM CHARACTER CREATOR
-
Contact:
Postby DrMekar » Fri May 15, 2020 8:49 am
Enjl wrote: ↑Fri May 15, 2020 7:57 am
DrMekar wrote: ↑Fri May 15, 2020 7:34 am
ai values were used by Redigit as 5 wildcard values for determining what an NPC should do. Their function depends on which NPC it is. Usually in programming there would be different classes of NPCs, like one for enemies that crawl on walls, or one for Yoshis, or one for Mouser. Redigit just crammed all 300 vastly different NPCs into a single class and sorted out the differences using these 5 ai values. Why 5? Seems to have come about due to necessity. Rednaxela and I recently discovered that some enemies that try to face the player at all times (like Larry or Mouser) actually use another field in the npc class as an ai6 value.
So, to make sense of ai values better, it's good to think of giving them legible names while investigating them. For example here ai3 for mouser is the jumpTimer, and ai1 for paratroopas is the paratroopaBehaviourStyle.
Okay, that makes it more clear, Thanks  .
I think I'm gonna try around a bit more with
the Ai values.
I do wonder if it would be possible to force Wart to look at the Player if he's set other way around.
|
|
|
|
|
|
|
|
|
-
Ness-Wednesday
- Purple Yoshi Egg

- Posts: 1687
- Joined: Sun Jun 28, 2015 3:50 pm
- Flair: Diverse Scouts
- Pronouns: He/Him
Postby Ness-Wednesday » Fri May 15, 2020 9:40 am
Mouser doesn't have a list of AI behaviors in the Wholstand forums. Is there an actual list of his behaviors for ai1 to ai5?
|
|
|
|
|
|
|
|
|
-
Murphmario
- 2025 Egg Hunter

- Posts: 2389
- Joined: Fri Dec 20, 2013 7:07 pm
- Pronouns: he/him
Postby Murphmario » Fri May 15, 2020 10:43 am
Ness-Wednesday wrote: ↑Fri May 15, 2020 9:40 am
Mouser doesn't have a list of AI behaviors in the Wholstand forums. Is there an actual list of his behaviors for ai1 to ai5?
Maybe the source code, though I got the AI values myself through text.print.
|
|
|
|
|
Return to “LunaLua Help”
Users browsing this forum: No registered users and 8 guests
|