[RMMZ] CANNOT FIND PROPERTY "ID" OF "NULL?"

Posts

Pages: 1
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
So I'm trying to playtest my game but this annoying game-breaking bug keeps getting in the way. Every time I try to load my game not even the title screen can load before the game crashes. Instead it gives me a vague error message that says "Cannot read property ID of null" which I have no idea what that means. So I go into devtools and I think it's due to an issue with Visustella Extra Enemy Drops. For each of my enemies they have 10+ drops each so I really need that plugin greatly, but I keeps crashing my game! (I think) I enter in all the names of the items manually into the notetags so maybe a few spelling errors here or there could be causing it? As in the game tries to read an entry in the database that doesn't exist? Like writing "S Dark Shard" instead of "Dark Shard S" or something. Anyways I really need some help here because otherwise I'll have to delay the game even further...


Edit: Okay, here is my plugin list. By the way I'm using some MV plugins which can be used in MZ due to fossil. Maybe that's the issue?

pianotm
The TM is for Totally Magical.
32347
Oh, look, it's everyone's favorite glitch.

Okay, first things first. Update your original post with a picture of all the plugins in your list.

Meanwhile, you don't have to wait for an answer for the first step of your bug hunt. Go into your plugins and turn them all off. Then turn them on one by one, testing the game each time, until you trigger that glitch again. Don't just test the Visustella plugins. Test them all. That will help you narrow it down.
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
I updated the original post to add the plugins I'm using. See any issues?

Edit: So I removed the visustella extra drops plugin to see what would happen and now I get a completely new glitch:


Any idea what this is all about?
Marrend
Guardian of the Description Thread
21781
You should be able to click on those error lines as links, and maybe get more info. Perhaps I'm thinking of my own debugging process, where I make breakpoints at certain points in the code, and can look to see the value of objects as I hover my mouse over them.

*Edit: My initial response to that "unexpected token ')'" error was that there might be a missing semicolon. Except that just doesn't seem right at all. Though, with how many plug-ins you're using, it would not surprise me in the slightest if, in the process of disabling them all, and re-enabling them one-by-one, something you were trying to do might not be read correctly, and is throwing that exception.

*Edit2: I would also double-check your item database against whatever you inputted as possible drops. Like, it kinda sounds to me that you should be using an item's ID from the database, and if you're using the item's name instead, weeeeellllp.
pianotm
The TM is for Totally Magical.
32347
You've got so many plugins in there, nobody's going to figure that out just by looking. Sounds like you've probably got a plugin conflict. Visustella is having the problem, but it seems like it's probably not the cause. This is also why I told you to turn all of them off and then turn them back on one by one. Obviously, with that many sets, the order you turn them on is going to be important. I have no idea which order you should turn them on in. It's your project. You know how you're using these plugins. I'd offer to check for you, but I don't have MZ.
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
Okay so upon removing both Visustella Extra Enemy Drops, Visustella Skills States, and all plugins that require those, my game works like a charm! No crashes at all. Opening FMVs loads perfectly, title screen loads perfectly, even the intro text runs perfectly. (though there was a glitch there since I forgot to add in a transfer event and pasted one of the images twice. But that can be easily fixed)

Also, I didn't disable them one-by-one. I only disabled the ones I thought were causing the problem and sure enough they were. I know now for a fact that Skills States causes the "unexpected token )" glitch and that extra enemy drops cause the "cannot find property id of null" glitch. So that's cool.

I also think I may have a clue on what's causing the enexpected token glitch. I have a passive ability that causes AP costs to be switched out with AP costs and have a notetag in every skill switching around the costs using java. This is done via lunatic code using Skills States, so I think I entered something wrong there and that's what's causing the issue. Maybe? IDK. Might have to replace that passive skill with something else.

And for the other glitch, yeah, I'm positive it has to do with me entering an item to be dropped that isn't in the database. For that plugin I used item names rather than IDs because a lot of the time I switch up the IDs and that causes me to forget what enemies drop what. I have a couple of solutions for this. For one, I could just trash that plugin and use the default max 3 drops. That would suck, but at least it's better than having enemies drop nothing. Secondly, I could do event drops as a battle event at the end of every battle which would be very time consuming. Or thirdly, I could use an alternative plugin that performs the same purpose. Anyone know of any good extra enemy drop plugins for MV/MZ that ARENT Visustella/Yanfly? Something like that would really help especially if it's not buggy. I really wish the devs fixed the drop system in MZ to use a list and % because 3 drops per enemy is far too limiting, especially in games with crafting systems. Guess I just have to use default then...
Marrend
Guardian of the Description Thread
21781
And for the other glitch, yeah, I'm positive it has to do with me entering an item to be dropped that isn't in the database. For that plugin I used item names rather than IDs because a lot of the time I switch up the IDs and that causes me to forget what enemies drop what. I have a couple of solutions for this.


I mean, doesn't it make more sense to use the item ID rather than the name? What does the plug-in instructions say to use? Like, Darigaaz, don't just input stuff, and assume it will work!
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
The plugins instructions say that you can use either. The reason that I use IDs and not names is because I change around the IDs a lot which forces me to redo everything and at that point I often forget all the enemy drops so that makes it even worse. Plus I don't remember the IDs of every item so then I have to constantly go back and forth through the items, weapons, armor, and enemy pages to get the right IDs to use and it's super tedious. Using the names is so much easier, but it becomes a problem when I misspell something or write the wrong thing and then it takes me forever to find the issue. The drop system in pretty much every RPG Maker sucks. It's been like this since at least VX. Why haven't the devs fixed it yet?
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
Okay I removed the lunatic code from every skill and disabled extra enemy drops. It's actually a plus that I disabled that plugin. Now I really have to think strategically on what enemies drop what and the fractions give a better picture in my head of how common the drop is compared to %. Like, an 12% drop or something doesn't really mean anything to me, but when you say 1/12 now I know that for approximately every 12 enemies you defeat you will obtain that item. Makes it a lot easier to gauge item rarity. Now, for the moment of truth, to see if my game finally works...
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
Yep, it still has the "unexpected token (" error even though I got rid of all the javascript. Must be another issue then. I can't even find what's wrong because the code is all encrypted. And if I go to Yanfly's discord to ask for help Yanfly will instaban me since he hates my guts and knows me personally. (he stalked me on discord for a bit) Even changing my screen name won't help since I'll need discord nitro to change my pfp for different servers and I don't have that. He'll definitely recognize my avatar. Speaking of which I should really commission someone to update my avatar for me because right now I'm using stolen Pokemon fanart on everything and that isn't good for my brand.
Marrend
Guardian of the Description Thread
21781
I don't pretend to know how, or if, all of those plug-ins interact with each other, but, given the sheer size, there is a non-zero possibility that there could be a conflict that's causing the unexpected token error. Since you're still getting the error, I'm going to take a page from pianotm, and suggest turning off plug-ins until the error doesn't come up, keeping the passive state plug-in for as long as possible, and seeing if the conflict lies elsewhere. If it does, great! Maybe it's something you can toss anyway! If it is, well, I dunno.
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
I already know what plugin is causing the issue. It's Yanfly Skills States, which is required for many other plugins to work. When skill states and the plugins surrounding are off, everything works perfectly, including all the other plugins. But as soon as I activate skills states everything breaks. I can't even find what's causing the error as the code is encrypted. I don't know what to do...
Marrend
Guardian of the Description Thread
21781
If you're certain the error is not from a mistake you made, that it's coming from the plug-in itself, and there is no good method for you to contact the plug-in developer (the reason(s) for this is beyond the scope of a thread like this), then, I think the options left to you are to either find a different plug-in that does the same thing, hire a person to write a similar plug-in, make it yourself, or do without it.

I highly suspect you already know these are your options, though. You're probably just hoping somebody will bail you out in some way, shape, or form. For my own part, I'm a mediocre-talent hack in regards to MZ, so, I dunno if I would have the wherewithal to attempt something like Skill States.
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
I could check if other plugins are causing the issue, but I doubt it is as the error message in devtools only mentioned visustella plugins. I could make a discord alt and contact them that way. If I use an alt and a VPN and don't reveal too many details they would never know it's me. There's basically no options plugin wise for MZ other than visustella and the only MV plugin dev still around is HimeWorks. The rest have all disappeared from the face of the earth.

My last three hopes are basiclly this:
1: It might be an error with another plugin, despite what the error message says
2: It could be an error with the passive states I have set up, a lot of them using complex JavaScript formulas meant to be used for MV. (Yanfly MV tips and tricks)
3: Finally, if all else fails, I can contact Visustella by using a discord alt and a VPN to get direct help.
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
Okay, just found out it's not a problem with the other plugins, even the MV ones. The error is solely on the visustella one. HOWEVER, I found a massive error within the scripting of some of my passive states. In short, Yanfly had this old series for MV in which he showed people how to do cool effects in MV using his provided coding. However, when it switched over the MZ, the terminology of all the apply effects changed, making all the previous tips and tricks unusable unless you updated the code with the new terminology. Previously it was something like <Custom React Effect: xyz> but now for MZ the terminology is <JS xyz Action> Figuring out this problem and fixing it might be the final thing I need to finally finish this mess. We can only wait and see...

Edit: Okay I have good news and I have bad news. The good news is that I finally solved that "unexpected token error" bug. Yay! The bad news is that I've run into another bug, this time with battle core. Don't exactly know what the issue is this time as battle core worked before when I turned off Skill States core and all the plugins that required it. Maybe it's some change I made to the passive states again when I fixed the other glitch? IDK. Here are some screenshots for reference.

This is getting exhausting. It's draining up all my motivation and it's only a matter of time until I get burnt out again like I did with the original release...
unity
You're magical to me.
12540
I can't help much here, but I can give a tip that can help in the future. If you back up your project daily or weekly, you can revert to an earlier build when the new one starts showing errors. I find it's especially useful to make backups before I do any messing with plugins.

You can use anything to back them up, even a simple USB stick works just fine if it has the room :DDD
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
Well, good news. I solved all my issues I've been having with my various passive states and such. The only problem? The glitch is still there! "Unexpected Token "("" keeps appearing every time I try to launch the game. I know 100% that it's an issue with Visustella Skill Core because if I remove that and all plugins that require it everything is fixed. Problem is is that that plugin makes many of my game's features actually work such as the battle system, so that's a major problem. Going back to an old version won't help anything as I know what the issue is. It's with skill core and even if I did have a backup I would lose an insane amount of progress for everything else. This problem has been there since I started this project most likely since I transferred over the files for Meteo Chronicles from MV over to MZ. I just don't know what to do at this point. I've tried everything...
unity
You're magical to me.
12540
Seeing as a lot of the plugins from MV don't work in MZ, perhaps you have tags or something else on some of your skills that reference a plugin that doesn't exist in MZ. I'd check all your skills for notetags that reference MV plugins instead of MZ plugins.
author=KrimsonKatt
This problem has been there since I started this project most likely since I transferred over the files for Meteo Chronicles from MV over to MZ.


Just taking a guess here but I think this is causing 90% of the problems across all seven or eight threads you posted. MV and MZ may both be Javascript and many things can be shared between them but the syntax is different enough that you shouldn't just transfer entire plugins from MV and hope that they'll work. Since they most likely won't.

In general though, what I think you need to do is step back for a moment and get your project management organized. And I'm talking about management beyond the project file itself: A good practice to get into, after you have your initial idea and a brief design overview document (you do have this, right?), is to make all of the big plugin decisions for your project as early as possible. Decide what plugins you need, get them implemented, tested, and make sure they're not conflicting in any way before you do literally anything else. Whether that be story, or eventing, or cutscenes.

This will save you a lot of trouble later on and greatly reduce the likelihood that you'll have to make a big change later and potentially break everything.

Especially considering that the plugin list you posted is... absolutely huge. More than almost any other game I've ever seen. Are you absolutely, 100% sure you need every feature you have listed here? A weapon swap system, crafting, enemy levels, and more? More plugins and features does not necessarily make a better game, and having more plugins than you need from multiple authors will greatly increase the risk of something conflicting.

And a game in general that does a few things really well will always be better than a game that does a lot of different things just "okay".

If you're not sure, try this: Write a pitch and a summary for your game. If it's more than two pages, scrap it and make it shorter.
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
I have some pretty good news. I removed every line of conflicting javascript in the notetags of the skills and states, not a single one left untouched. Suddenly, with all the javascipt removed, my game works like a charm. Anyways now to adress your concerns.

For the plugin amount, no, I don't think I have too many. Every single one is important in one way or another and as you can see a lot of them were turned off since I didn't need them at the moment. All of them enhance my game is one way or another. Even just with the ones you mentioned Weapon Swap is crucial to my battle system, crafting makes drops more varied and allows for a more unique way to obtain rare and powerful items then just having them bought or found in a chest, (and is super simple too) and enemy levels is crucial for my game's balancing system in which enemy stats are based off classes and given modifiers to make them weaker or stronger than the average. I need enemy levels for that system to work as intended, that system being incredibly useful as otherwise I have to balance all the stats myself and that's a huge pain and I'm remarkably bad at balancing. Ever since I'm implemented this system in Lost Chronicles my games balance has been improved tremendously, so removing those plugins would be a no-go.

And yes, I always have an idea of what my game is going to be beforehand. I usually have the plot and all mechanics written down in great length sometimes years before I even start making the game. However, this game, Meteo Chronicles R, is a remaster of an existing game, Meteo Chronicles, so I already have the base already made and now I'm just refining it. Added new mechanics and content cut from the original game along with refining what's already there such as the dialogue, graphics, music, and class system. Most of my projects, even the small ones, have like 50+ plugins involved at minimum, each one serving an important role. Removing any of them would make my games a lot less fun to play since base RM is lacking in so many vital features that only plugins can currently provide.

Finally, the problem didn't lie with the MV plugins in MZ. I'm using FOSSIL, which is a community plugin that allows a large library of MV plugins to become fully compatible with MZ. I've checked, all the MV plugins in my MZ project I'm using are on that list and all of them work perfectly fine and as intended in MZ. The real problem was with the javascript I used for some of the passive states which was faulty in some way, causing the entire game to crash upon startup. I still don't know which one specifically caused it, maybe all of them, but the problem certainly did not lie with the MV plugins since I'm using FOSSIL which makes all of them fully compatible with MZ.
Pages: 1