Custom NPCs won't stop jumping up & down

Need help with any SMBX game-related issues? Ask your questions here.
User avatar
Animebryan
Blooper
Blooper
Posts: 183
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Current Project: Star of Darkness
Contact:

Custom NPCs won't stop jumping up & down

Postby Animebryan » Sat Sep 14, 2019 11:53 pm

I created some Toad friendly NPCs through the custom range (npc-795, 797, 960, 961 & 962) and they keep jumping up & down. I've looked through their .ini & lua files but can't figure out how to get them to stop.
Need serious help with Lua based features :(

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

Re: Custom NPCs won't stop jumping up & down

Postby Enjl » Sun Sep 15, 2019 6:29 am

Read the comments in onTickNPC again.
The ABC of Creation
________________________________________________________
Image

User avatar
Animebryan
Blooper
Blooper
Posts: 183
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Current Project: Star of Darkness
Contact:

Re: Custom NPCs won't stop jumping up & down

Postby Animebryan » Sun Sep 15, 2019 6:56 am

Enjl wrote:
Sun Sep 15, 2019 6:29 am
Read the comments in onTickNPC again.
I've about had it with you & your vague as hell replies. If you're going to reply to help, TRY EXPLAINING IN DETAIL GODDAMN IT!!! :evil:
Need serious help with Lua based features :(

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

Re: Custom NPCs won't stop jumping up & down

Postby Enjl » Sun Sep 15, 2019 7:00 am

Animebryan wrote:
Sun Sep 15, 2019 6:56 am
Enjl wrote:
Sun Sep 15, 2019 6:29 am
Read the comments in onTickNPC again.
I've about had it with you & your vague as hell replies. If you're going to reply to help, TRY EXPLAINING IN DETAIL GODDAMN IT!!! :evil:
Image
I figured if you read the code you must've come across this section, sorry. The three lines below the comment make the NPC jump, so removing them is a pretty simple way to stop that from happening. The bouncing is included by default as a confirmation segment for the code running, to ensure people set up their copy of the template file correctly.
The comments in this code were specifically crafted to help newcomers understand which section of the code does what. This is so that they'd know what effect an alteration in a specific section would have. Considering this comment segment was insufficient for you, I would appreciate a short description of where you got hung up, as well as suggestions on how to improve it for future versions.
The ABC of Creation
________________________________________________________
Image

User avatar
Electriking
Posts: 4461
Joined: Mon Jun 06, 2016 4:32 pm
Flair: I have NO idea what to put here
Current Project: Something
Chat Username: ElectriKing
Contact:

Re: Custom NPCs won't stop jumping up & down

Postby Electriking » Sun Sep 15, 2019 3:34 pm

Animebryan wrote:
Sun Sep 15, 2019 6:56 am
Enjl wrote:
Sun Sep 15, 2019 6:29 am
Read the comments in onTickNPC again.
I've about had it with you & your vague as hell replies. If you're going to reply to help, TRY EXPLAINING IN DETAIL GODDAMN IT!!! :evil:
Please don't make disrespectful posts like this.
SMM2 ID: JJF-P7G-FSF

User avatar
Animebryan
Blooper
Blooper
Posts: 183
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Current Project: Star of Darkness
Contact:

Re: Custom NPCs won't stop jumping up & down

Postby Animebryan » Sun Sep 15, 2019 4:34 pm

Enjl wrote:
Animebryan wrote:
Sun Sep 15, 2019 6:56 am
Enjl wrote:
Sun Sep 15, 2019 6:29 am
Read the comments in onTickNPC again.
I've about had it with you & your vague as hell replies. If you're going to reply to help, TRY EXPLAINING IN DETAIL GODDAMN IT!!! :evil:
Image
I figured if you read the code you must've come across this section, sorry. The three lines below the comment make the NPC jump, so removing them is a pretty simple way to stop that from happening. The bouncing is included by default as a confirmation segment for the code running, to ensure people set up their copy of the template file correctly.
The comments in this code were specifically crafted to help newcomers understand which section of the code does what. This is so that they'd know what effect an alteration in a specific section would have. Considering this comment segment was insufficient for you, I would appreciate a short description of where you got hung up, as well as suggestions on how to improve it for future versions.
The problem here is that the comment line is still vague as hell in regards to making it stop. I overlooked it because I'm not a programmer & therefore didn't understand what I was looking at. I never would've thought to delete it because for all I know, that would've stopped it from working properly altogether. The real problem though is that because you're a programmer for the engine, you assume that everybody else who uses it has the same knowledge about it as you do & that's just so far from the truth. Its better to assume that someone asking for help doesn't know a thing about SMBX or Lua & give them a full explanation on how to fix their problem while educating them on how it works so that they can deal with it on their own in the future, than to assume that they know everything you do & then just drop vague hints as if they know what you're talking about when they don't. A suggestion would be to put comments for the coding in more layman's terms that even a non-programmer could understand.
Electriking wrote:
Animebryan wrote:
Sun Sep 15, 2019 6:56 am
Enjl wrote:
Sun Sep 15, 2019 6:29 am
Read the comments in onTickNPC again.
I've about had it with you & your vague as hell replies. If you're going to reply to help, TRY EXPLAINING IN DETAIL GODDAMN IT!!! :evil:
Please don't make disrespectful posts like this.

I wasn't being disrespectful, he was by dropping vague statements that make no sense. If you were struggling to deal with this engine without any knowledge of how it works & kept asking for help only to have the same developer constantly assume you know as much about the program as he does & kept getting vague answers that need further explanation like I've been dealing with, you'd lose your shit too! Hopefully my response will act as a wake up call to him so that he stops giving vague replies & actually starts going into full explanations on how to deal with future issues.

Added in 3 hours 3 minutes 59 seconds:
I've deleted the 3 lines to stop the jumping, but now they keep turning left & right repeatedly. It also gave me an error screen which I can't seem to screenshot now because that stupid SMBX2 loading screen did something to my clipboard so that I can't replace it with what's on the screen until I close it, so here it is typed out by hand:

==> ...s\SMBX\SMBX 2.0 PAL\data/scripts/base/engine/require.lua:150: Error:
...Legacy of the Stars (WIP)/The Mushroom Dome./npc-795.lua:144: '<eof>'
expected near 'end'
================
stack traceback:
...s\SMBX\SMBX 2.0 PAL\data/scripts/base/engine/require.lua:150: in function 'customNpcRequire'
scripts/base/npcManager.lua:181: in function 'loadNpcCode'
scripts/base/game/lunabase.lua:167: in function 'codeFile'
main.lua:469: in function 'loadCodeFile'
main.lua:593: in function <main.lua:519>
[C]: in function '__xpcall'
main.lua:519: in function <main.lua:518>
Need serious help with Lua based features :(

User avatar
Hoeloe
Kamikaze Koopa
Kamikaze Koopa
Posts: 1208
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Current Project: A2XT Episode 2

Re: Custom NPCs won't stop jumping up & down

Postby Hoeloe » Sun Sep 15, 2019 9:23 pm

Animebryan wrote:
Sun Sep 15, 2019 7:38 pm
A suggestion would be to put comments for the coding in more layman's terms that even a non-programmer could understand.
What part of "This makes the NPC jump when it touches the ground" do you think is not in layman's terms?

Honestly, I'm not surprised you struggle to get help. You're always aggressive when asking for it, and people are giving their time to try and help, while you just throw it back in their faces. You make people not want to help you.


In this particular case, you should delete the 3 lines of code immediately below the comment, since they make up a single block (a condition, a statement, and and end for that condition) - but you'd know this if you'd gone through the Lua tutorials properly. I suspect you get bored and skim these things, but in doing so you miss out the really important stuff, and then blame it on everyone else. Rather than just snapping at everyone all the time, try and consider putting the effort in yourself to actually learn, rather than expecting someone to hold your hand through it all.

User avatar
Animebryan
Blooper
Blooper
Posts: 183
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Current Project: Star of Darkness
Contact:

Re: Custom NPCs won't stop jumping up & down

Postby Animebryan » Sun Sep 15, 2019 9:59 pm

Hoeloe wrote:
Sun Sep 15, 2019 9:23 pm
Animebryan wrote:
Sun Sep 15, 2019 7:38 pm
A suggestion would be to put comments for the coding in more layman's terms that even a non-programmer could understand.
What part of "This makes the NPC jump when it touches the ground" do you think is not in layman's terms?

Honestly, I'm not surprised you struggle to get help. You're always aggressive when asking for it, and people are giving their time to try and help, while you just throw it back in their faces. You make people not want to help you.

In this particular case, you should delete the 3 lines of code immediately below the comment, since they make up a single block (a condition, a statement, and and end for that condition) - but you'd know this if you'd gone through the Lua tutorials properly. I suspect you get bored and skim these things, but in doing so you miss out the really important stuff, and then blame it on everyone else. Rather than just snapping at everyone all the time, try and consider putting the effort in yourself to actually learn, rather than expecting someone to hold your hand through it all.
I understood that it was causing the jumping, what's not easily understandable is how to get it to stop. As I mentioned earlier, you can't just delete lines of code without knowing what they do first, otherwise you could be deleting something vital & making the problem worse. As for the aggression when asking for help, it should be understandable considering how much of a pain in the ass SMBX2 & PGE is, it's just one problem after another every step of the way! I'm getting sick of it!

Another problem is the vague answers that don't make any sense or reaction posts like the one you're doing now instead of helping solve the problem. And what are you going on about Lua Tutorials? Where? Typical programmer telling someone who doesn't understand it to go learn it like its that easy. Just because a handful of you guys pick up on this so easily doesn't mean its easy for everyone else! Some people learn things at different paces & in different ways. Some of us may have bad short-term memory, some of us just don't have the patience we once had.

I'm sorry if I'm coming off as an asshole but each & every time I have to deal with some error or quirk with either SMBX2 or PGE & any responses that don't make any sense due to a lack of explanation or are just retaliating without helping just pisses me off more & more until I eventually ragequit SMBX2 for good. And complaining about someone needing their hand held is basically saying "If you want to use SMBX 2.0, learn Lua or GTFO!" Not exactly a proper way to treat people who want to use SMBX 2.0 but don't know how to program in lua. This engine & the community around it should be more user friendly.
Need serious help with Lua based features :(

User avatar
Hoeloe
Kamikaze Koopa
Kamikaze Koopa
Posts: 1208
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Current Project: A2XT Episode 2

Re: Custom NPCs won't stop jumping up & down

Postby Hoeloe » Sun Sep 15, 2019 10:18 pm

Animebryan wrote:
Sun Sep 15, 2019 9:59 pm
I understood that it was causing the jumping, what's not easily understandable is how to get it to stop. As I mentioned earlier, you can't just delete lines of code without knowing what they do first, otherwise you could be deleting something vital & making the problem worse. As for the aggression when asking for help, it should be understandable considering how much of a pain in the ass SMBX2 & PGE is, it's just one problem after another every step of the way! I'm getting sick of it!

Another problem is the vague answers that don't make any sense or reaction posts like the one you're doing now instead of helping solve the problem. And what are you going on about Lua Tutorials? Where? Typical programmer telling someone who doesn't understand it to go learn it like its that easy. Just because a handful of you guys pick up on this so easily doesn't mean its easy for everyone else! Some people learn things at different paces & in different ways. Some of us may have bad short-term memory, some of us just don't have the patience we once had.

I'm sorry if I'm coming off as an asshole but each & every time I have to deal with some error or quirk with either SMBX2 or PGE & any responses that don't make any sense due to a lack of explanation or are just retaliating without helping just pisses me off more & more until I eventually ragequit SMBX2 for good. And complaining about someone needing their hand held is basically saying "If you want to use SMBX 2.0, learn Lua or GTFO!" Not exactly a proper way to treat people who want to use SMBX 2.0 but don't know how to program in lua. This engine & the community around it should be more user friendly.

How about, I don't know, the handbook that comes with the download? Or the signposted Lua video tutorials linked to in most of the help threads? Or even any Lua tutorial at all? If you had even bothered to Google "Lua tutorial" or "LunaLua tutorial" you'd have got somewhere, but it seems like you're absolutely averse to putting any sort of effort in on your side. When I say about "not holding your hand", I mean not just writing the code for you, and instead encouraging you to try and think about what you're doing. At no point has anyone just said "go and learn Lua lol", what we have said is that it's helpful to have a basic understanding of the structure of the code, for which there are plenty of tutorials and people to help you learn, because you will be hopelessly lost without that.

Also, I literally told you exactly what to do to fix this issue, but as usual you didn't actually read my post fully did you? You just skimmed it.

Sorry, but you're the only person who has had this much of a problem with SMBX2. This isn't a problem with the program, it's a problem with you. You complain constantly, but I never see you actually making an effort to learn from the things people tell you. The engine and the community are perfectly friendly, you're just completely antagonistic towards both.

Also, no-one is saying you need to learn Lua to use SMBX2 - you need to learn Lua to... use Lua. There is a lot that can be done in SMBX2 without even touching Lua at all, but if you want to learn to, it's going to take some effort on your part.

User avatar
Animebryan
Blooper
Blooper
Posts: 183
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Current Project: Star of Darkness
Contact:

Re: Custom NPCs won't stop jumping up & down

Postby Animebryan » Mon Sep 16, 2019 12:54 am

Hoeloe wrote:
Sun Sep 15, 2019 10:18 pm
Also, I literally told you exactly what to do to fix this issue, but as usual you didn't actually read my post fully did you? You just skimmed it.
I've read through that handbook, not very helpful (confusing as hell). I've looked through those video tutorials, the ones made by Enjl right? I've watched his Darkness Effect video, confusing & vague to understand. (Even another viewer commented "Way to confusing"). I haven't looked for any tutorials outside of the SMBX forums so I'll give that a try.

I read your entire post, I don't skim through posts, and nowhere do you explain how to stop those custom NPCs from constantly turning left & right or explained that error that I had to retype by hand! Seems like you're the one skimming through posts! Talk about hypocrisy & projection! :evil:
Need serious help with Lua based features :(

User avatar
Cedur
Toad
Toad
Posts: 6208
Joined: Tue Jun 28, 2016 10:14 am

Re: Custom NPCs won't stop jumping up & down

Postby Cedur » Mon Sep 16, 2019 3:17 am

Animebryan wrote:I wasn't being disrespectful, he was by dropping vague statements that make no sense.
lol

don't even try to excuse your CAPS, THREE EXCLAMATION MARKS AND AN ANGRY EMOJI

seems like you're trying really hard to get banned

you wanna be more than 35 years old? you're rageing and retaliating like a damn 5-year-old
Image
More Supports: show

Image
Image

Still using the legacy editor? Get SMBX2 and PGE, it will improve your experience significantly. Here's why. And remember, Yoshis are tools to be used and discarded.

ShadowStarX (06/14/18) wrote: South Korea is easy deal

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

Re: Custom NPCs won't stop jumping up & down

Postby Enjl » Mon Sep 16, 2019 6:27 am

The darkness tutorial assumes knowledge about the basics of the language. That's why it's episode 7, not 1. Re-explaining the basics of the language every time is not a solution. Episodes 2 and 3, as well as resources like the official lua tutorial do that. If you're having trouble understanding particular aspects, it's advised you elaborate on what exactly you are struggling with (I asked this in my previous post but you didn't provide a good response) so that we can provide assistance regarding that particular detail. Situations like "I know what variables are, but I don't understand tables" are fairly common and sometimes need a personalized explanation. I suspect this case is one as well, but so far all I've heard is "Your tools are impossible for me to understand", which doesn't provide a starting point (considering other people starting without prior knowledge have gotten great mileage out of them). The #smbx2-script-help channel on codehaus is good for these situations, because there any dev can jump in to help and you can easily ask questions targeted at things you're struggling to understand.
The ABC of Creation
________________________________________________________
Image

User avatar
Animebryan
Blooper
Blooper
Posts: 183
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Current Project: Star of Darkness
Contact:

Re: Custom NPCs won't stop jumping up & down

Postby Animebryan » Mon Sep 16, 2019 6:52 am

Well, I haven't gotten around to studying it as I've just been dealing with it as I go along. I haven't been able to find a starting point of where to begin learning it. I have somewhat of a vague understanding having worked with both scripts & plugins from the RPG Maker programs, but only just enough to know what settings can be adjusted & what to look for. In reality though I'm at the noob level of understanding it. Most of my time is spent working on my levels for my SMBX episode or working on my RPG Maker Projects so I haven't gotten around to studying programming languages because I keep myself busy. I do want to learn how to use the darkness effect to add in some of my levels though.
Need serious help with Lua based features :(

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

Re: Custom NPCs won't stop jumping up & down

Postby Enjl » Mon Sep 16, 2019 7:34 am

Over time, more features like the darkness effect will be incorporated into the editor and no longer require lua scripting to use. But since we're still in beta and haven't overcome some necessary hurdles for that yet, a certain amount of scripting knowledge is necessary in order to use those features for the time being.
The ABC of Creation
________________________________________________________
Image

User avatar
Animebryan
Blooper
Blooper
Posts: 183
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Current Project: Star of Darkness
Contact:

Re: Custom NPCs won't stop jumping up & down

Postby Animebryan » Mon Sep 16, 2019 4:44 pm

What about my current problem?

I've deleted the 3 lines to stop the jumping, but now they keep turning left & right repeatedly. It also gave me an error screen which I can't seem to screenshot now because that stupid SMBX2 loading screen did something to my clipboard so that I can't replace it with what's on the screen until I close it, so here it is typed out by hand:

==> ...s\SMBX\SMBX 2.0 PAL\data/scripts/base/engine/require.lua:150: Error:
...Legacy of the Stars (WIP)/The Mushroom Dome./npc-795.lua:144: '<eof>'
expected near 'end'
================
stack traceback:
...s\SMBX\SMBX 2.0 PAL\data/scripts/base/engine/require.lua:150: in function 'customNpcRequire'
scripts/base/npcManager.lua:181: in function 'loadNpcCode'
scripts/base/game/lunabase.lua:167: in function 'codeFile'
main.lua:469: in function 'loadCodeFile'
main.lua:593: in function <main.lua:519>
[C]: in function '__xpcall'
main.lua:519: in function <main.lua:518>
Need serious help with Lua based features :(

MECHDRAGON777
Pink Yoshi Egg
Pink Yoshi Egg
Posts: 6234
Joined: Fri Dec 20, 2013 6:40 pm
Flair: Nuclear Queen of Reversion.
Current Project: http://www.supermariobrosx.org/forums/v ... 9&start=10
Chat Username: 鬼人 正邪
Contact:

Re: Custom NPCs won't stop jumping up & down

Postby MECHDRAGON777 » Mon Sep 16, 2019 4:55 pm

<eof> means "End of File", but can you show the lua code in question? On a side note, I also hate the screenshot issue you are having. A way around it is to have SMBX open, then the debug window, and then task manager as the active tab on tab of SMBX, but not covering the error. Hit "PrtSc" WITHOUT holding the Alt key. Open paint.net or your image editor of choice. You can then crop it to what you need to screenshot (The error message in this case.) I had to do this multiple times myself, but it does work. The lua code at line 144 and the surrounding lines may help though.

ImageImageImage

Image

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

Re: Custom NPCs won't stop jumping up & down

Postby Enjl » Mon Sep 16, 2019 5:03 pm

Curious. There's probably a lot of ways around the screenshotting issue. I always use Snipping Tool or WIN + SHIFT + S for my screenshots, and those work fine. They're probably easier to handle than opening an image editing software. I'm not sure what causes it, though. I'll try replicating it.

[[
Edit: While SMBX2 is running, printscr captures only the game window for easy screenshot taking. I suspect that's the issue in question? I wonder if it'd be good to limit that to when the window itself, not any dialogs spawned from it, is in focus. I'll bring it up in dev chat.
}}

As for the end of file error, the code would be a big help. Sounds like there's an end too much at the end of the file. Always make sure that the indenting lines up. There needs to be one end for any scope you open with a keyword like function, then or do.
The ABC of Creation
________________________________________________________
Image

User avatar
Animebryan
Blooper
Blooper
Posts: 183
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Current Project: Star of Darkness
Contact:

Re: Custom NPCs won't stop jumping up & down

Postby Animebryan » Mon Sep 16, 2019 9:19 pm

Image
Need serious help with Lua based features :(

User avatar
Hoeloe
Kamikaze Koopa
Kamikaze Koopa
Posts: 1208
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Current Project: A2XT Episode 2

Re: Custom NPCs won't stop jumping up & down

Postby Hoeloe » Mon Sep 16, 2019 9:27 pm

So what that code shows me is that you deleted two lines, not three. Please read what I said again:
you should delete the 3 lines of code immediately below the comment
I told you to delete the three lines below the comment - that doesn't include the comment itself. I even explained briefly what those lines were, just to be sure, yet you once again seem to have missed that.

MECHDRAGON777
Pink Yoshi Egg
Pink Yoshi Egg
Posts: 6234
Joined: Fri Dec 20, 2013 6:40 pm
Flair: Nuclear Queen of Reversion.
Current Project: http://www.supermariobrosx.org/forums/v ... 9&start=10
Chat Username: 鬼人 正邪
Contact:

Re: Custom NPCs won't stop jumping up & down

Postby MECHDRAGON777 » Mon Sep 16, 2019 9:30 pm

Image

ImageImageImage

Image


Return to “Help and Support”

Who is online

Users browsing this forum: justin_space and 5 guests