Anti-Jump Code for Mouser?

Post here for help and support regarding LunaLua and SMBX2's libraries and features.
User avatar
DrMekar
Koopa Shell
Koopa Shell
Posts: 674
Joined: Sat Apr 08, 2017 7:16 am
Flair: CUSTOM CHARACTER CREATOR
Contact:

Re: Anti-Jump Code for Mouser?

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

Image

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 :)
My Youtube Channel: https://www.youtube.com/channel/UC-8fzX ... subscriber

My Episodes & Projects:
ImageImage


If you want to support my Projects, put this in your signature. Thanks :)
Spoiler: show

Code: Select all

[url=https://www.supermariobrosx.org/forums/viewtopic.php?f=36&t=25110[/url]
Great Folks who support/ed my projects/in the past:

Suecra
jaf
Suckerman7 GM

Image

User avatar
FanofSMBX
Bowser
Bowser
Posts: 3874
Joined: Sun Dec 22, 2013 12:01 pm

Re: Anti-Jump Code for Mouser?

Postby FanofSMBX » Tue May 12, 2020 6:45 pm

Would giving him super-gravity also work?

I believe in Jesus Christ as my Lord and Savior. If you do, put this in your signature.
My graphics pack!
Supporting forums:

Spoiler: show
SMBX Galaxy forum by Pivot40Channel
http://smbxgalaxy.prophpbb.com/
Come to the SMBX+ forums by illias3000. There is a whole forum category dedicated to the boss rush series with official rushes, submit bosses, and fan boss rushes! It is still open but AirSeus Forums is now open:
http://nsmbx.prophpbb.com/
AirSeus Forums the new home of the Boss Rush series:
http://smbxairseusforums.prophpbb.com/
Spoiler: show
First to discover:
Spark
Eerie
Grinder
Rainbow Shell
Birdo
Boom Boom
Image
Image
Image
Image
Image
KINGBOWSER112 RULES!


User avatar
DrMekar
Koopa Shell
Koopa Shell
Posts: 674
Joined: Sat Apr 08, 2017 7:16 am
Flair: CUSTOM CHARACTER CREATOR
Contact:

Re: Anti-Jump Code for Mouser?

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?
My Youtube Channel: https://www.youtube.com/channel/UC-8fzX ... subscriber

My Episodes & Projects:
ImageImage


If you want to support my Projects, put this in your signature. Thanks :)
Spoiler: show

Code: Select all

[url=https://www.supermariobrosx.org/forums/viewtopic.php?f=36&t=25110[/url]
Great Folks who support/ed my projects/in the past:

Suecra
jaf
Suckerman7 GM

Image

User avatar
FanofSMBX
Bowser
Bowser
Posts: 3874
Joined: Sun Dec 22, 2013 12:01 pm

Re: Anti-Jump Code for Mouser?

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.

I believe in Jesus Christ as my Lord and Savior. If you do, put this in your signature.
My graphics pack!
Supporting forums:

Spoiler: show
SMBX Galaxy forum by Pivot40Channel
http://smbxgalaxy.prophpbb.com/
Come to the SMBX+ forums by illias3000. There is a whole forum category dedicated to the boss rush series with official rushes, submit bosses, and fan boss rushes! It is still open but AirSeus Forums is now open:
http://nsmbx.prophpbb.com/
AirSeus Forums the new home of the Boss Rush series:
http://smbxairseusforums.prophpbb.com/
Spoiler: show
First to discover:
Spark
Eerie
Grinder
Rainbow Shell
Birdo
Boom Boom
Image
Image
Image
Image
Image
KINGBOWSER112 RULES!


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

Re: Anti-Jump Code for Mouser?

Postby Enjl » 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.
Ideas are useless if you can't make them real.
Image

All my assets from packs and episodes are free to use for non-Novaverse levels and projects, as long as proper credit is given.

User avatar
Murphmario
Larry Koopa
Larry Koopa
Posts: 2202
Joined: Fri Dec 20, 2013 7:07 pm

Re: Anti-Jump Code for Mouser?

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.
Now taking graphics requests:
https://docs.google.com/forms/d/1urWpFq ... #responses

My graphics pack:
http://www.supermariobrosx.org/forums/v ... t=1960/url

Really tempted to just make a general graphics thread for all of my graphics instead of just making individual threads for each of them.

User avatar
DrMekar
Koopa Shell
Koopa Shell
Posts: 674
Joined: Sat Apr 08, 2017 7:16 am
Flair: CUSTOM CHARACTER CREATOR
Contact:

Re: Anti-Jump Code for Mouser?

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?
My Youtube Channel: https://www.youtube.com/channel/UC-8fzX ... subscriber

My Episodes & Projects:
ImageImage


If you want to support my Projects, put this in your signature. Thanks :)
Spoiler: show

Code: Select all

[url=https://www.supermariobrosx.org/forums/viewtopic.php?f=36&t=25110[/url]
Great Folks who support/ed my projects/in the past:

Suecra
jaf
Suckerman7 GM

Image

User avatar
Murphmario
Larry Koopa
Larry Koopa
Posts: 2202
Joined: Fri Dec 20, 2013 7:07 pm

Re: Anti-Jump Code for Mouser?

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
Now taking graphics requests:
https://docs.google.com/forms/d/1urWpFq ... #responses

My graphics pack:
http://www.supermariobrosx.org/forums/v ... t=1960/url

Really tempted to just make a general graphics thread for all of my graphics instead of just making individual threads for each of them.

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

Re: Anti-Jump Code for Mouser?

Postby Enjl » 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.
Ideas are useless if you can't make them real.
Image

All my assets from packs and episodes are free to use for non-Novaverse levels and projects, as long as proper credit is given.

User avatar
DrMekar
Koopa Shell
Koopa Shell
Posts: 674
Joined: Sat Apr 08, 2017 7:16 am
Flair: CUSTOM CHARACTER CREATOR
Contact:

Re: Anti-Jump Code for Mouser?

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 :)
My Youtube Channel: https://www.youtube.com/channel/UC-8fzX ... subscriber

My Episodes & Projects:
ImageImage


If you want to support my Projects, put this in your signature. Thanks :)
Spoiler: show

Code: Select all

[url=https://www.supermariobrosx.org/forums/viewtopic.php?f=36&t=25110[/url]
Great Folks who support/ed my projects/in the past:

Suecra
jaf
Suckerman7 GM

Image

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

Re: Anti-Jump Code for Mouser?

Postby Enjl » 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.
Ideas are useless if you can't make them real.
Image

All my assets from packs and episodes are free to use for non-Novaverse levels and projects, as long as proper credit is given.

User avatar
DrMekar
Koopa Shell
Koopa Shell
Posts: 674
Joined: Sat Apr 08, 2017 7:16 am
Flair: CUSTOM CHARACTER CREATOR
Contact:

Re: Anti-Jump Code for Mouser?

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.
My Youtube Channel: https://www.youtube.com/channel/UC-8fzX ... subscriber

My Episodes & Projects:
ImageImage


If you want to support my Projects, put this in your signature. Thanks :)
Spoiler: show

Code: Select all

[url=https://www.supermariobrosx.org/forums/viewtopic.php?f=36&t=25110[/url]
Great Folks who support/ed my projects/in the past:

Suecra
jaf
Suckerman7 GM

Image

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

Re: Anti-Jump Code for Mouser?

Postby Enjl » 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.
Ideas are useless if you can't make them real.
Image

All my assets from packs and episodes are free to use for non-Novaverse levels and projects, as long as proper credit is given.

User avatar
DrMekar
Koopa Shell
Koopa Shell
Posts: 674
Joined: Sat Apr 08, 2017 7:16 am
Flair: CUSTOM CHARACTER CREATOR
Contact:

Re: Anti-Jump Code for Mouser?

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.
My Youtube Channel: https://www.youtube.com/channel/UC-8fzX ... subscriber

My Episodes & Projects:
ImageImage


If you want to support my Projects, put this in your signature. Thanks :)
Spoiler: show

Code: Select all

[url=https://www.supermariobrosx.org/forums/viewtopic.php?f=36&t=25110[/url]
Great Folks who support/ed my projects/in the past:

Suecra
jaf
Suckerman7 GM

Image

User avatar
Ness-Wednesday
Purple Yoshi Egg
Purple Yoshi Egg
Posts: 1450
Joined: Sun Jun 28, 2015 3:50 pm
Flair: Diverse Scouts

Re: Anti-Jump Code for Mouser?

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?
#Therealmofloveandhate

Join my Discord server!
Spoiler: show
Image
Do you love Villagers? I know I do!
(Image is not by me)
Will Toad truly get an actual project, will something happen who knows?
OR

User avatar
Murphmario
Larry Koopa
Larry Koopa
Posts: 2202
Joined: Fri Dec 20, 2013 7:07 pm

Re: Anti-Jump Code for Mouser?

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.
Now taking graphics requests:
https://docs.google.com/forms/d/1urWpFq ... #responses

My graphics pack:
http://www.supermariobrosx.org/forums/v ... t=1960/url

Really tempted to just make a general graphics thread for all of my graphics instead of just making individual threads for each of them.


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 1 guest