RPG Maker MZ: Make a better mining system.

Поділитися
Вставка
  • Опубліковано 4 лис 2024

КОМЕНТАРІ • 82

  • @luminin3994
    @luminin3994 2 роки тому +3

    it keeps saying .remove() is not a function :(

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому

      Are you using MZ or MV? I haven't tried this with MV.

    • @luminin3994
      @luminin3994 2 роки тому

      @@LvLUpDesign mv, but I don’t see why it wouldn’t work. Isn’t remove() a built in js function?

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому +1

      I just made my self a coffee so I'll jump into MV and have a play around.

    • @luminin3994
      @luminin3994 2 роки тому

      @@LvLUpDesign thanks, let me know how it goes :)

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому +7

      @@luminin3994 So I have messed around with it for the better part of an hour and .remove should be a normal js function but for some reason it's not working so I asked the original tutorial creator if he has any idea why. forums.rpgmakerweb.com/index.php?threads/how-to-create-respawning-resource-nodes-using-a-single-variable-and-a-common-event.144193/

  • @kainestolkyn
    @kainestolkyn 2 роки тому +38

    One thing you might want to consider doing is future videos is doing a preview of the finished product, meaning that demonstrate what it will look like when finished, and then start explaining from the beginning. That way, viewers will know if this is something they're interested in learning about. Great vid. Great explanation.

  • @bannedaccount586
    @bannedaccount586 2 роки тому +10

    A video series teaching new people how to code would be awesome you really seem to know your stuff and can break it down in a way thats easy to digest (the added comedic value is a plus too)

  • @AutMouseLabs
    @AutMouseLabs 2 роки тому +7

    Excellent tutorial. I am using code more and more in MZ and the more examples I get to dissect the better. Thanks for taking us to that next level.

  • @rainer1531
    @rainer1531 Рік тому +2

    ok i did some research and found the following solution for MV users:
    create a document and add:
    Array.prototype.remove = function(element) {
    for (;;) {
    const index = this.indexOf(element);
    if (index >= 0) {
    this.splice(index, 1);
    } else {
    return this;
    }
    }
    };
    You save this as name.js in the plugin folder and activate it afterwards, the remove works perfectly

    • @cindybee1455
      @cindybee1455 Рік тому

      Not all heroes wear capes XD saw this mentioned in the comments on the original site but had no idea how it was supposed to be implemented haha. thanks for this clarification!

  • @DH-tt3jw
    @DH-tt3jw 2 роки тому +2

    Very cool, I've learned over time what different javascript snippets do but never really understood them in a way that I could explain it to others as I was just trying things till it all worked for me. But now it actually feels like I have a genuine understanding of it, your explanations were very clear and I feel even someone who hasn't experimented with snippets would still be able to pick up and understand what you're saying. I would love to see more re-created tutorials, especially ones that cover snippets as they always expand the engine's capabilities in meaningful ways, everyone should be taking advantage of them. Also, thanks for being one of the couple youtubers that have helped me greatly in my adventure as an indie dev. You're a big inspiration to me and others in this somewhat niche community of rpg maker.

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому +1

      Hey DH, Thanks for the comment. This is the reason I make videos like this because my overall goal with content creation on UA-cam is to build up the skillset and output of other Indie Devs. If my videos are a step in the direction to where people are releasing higher-quality games then I feel I've served my purpose.

  • @luciamitsu2248
    @luciamitsu2248 3 місяці тому

    It's a old video but as a french fan of RPG Maker it helps me alot to understand even in english what you are talking about for scripts thank you alot !

  • @dfa_evans
    @dfa_evans 10 місяців тому

    These tutorials are actually so valuable as a new user. Incredible at explaining stuff!

  • @jorgh.9889
    @jorgh.9889 2 роки тому

    First thing. Great tutorial!!! This can't described better than you have done.
    In my project I don't want to use frames for respawning. Because I have a day-change event when the player is resting at night. So I uses the oreData[2] item to count the day until it will respawn. But.... the loop for reset seems to skip array-items when another item was deleted from array. It's not a big deal, because it's a little more random which event respawns ;) ... but maybe some other watcher has this as a problem... and maybe another watcher has a solution :D
    But nevertheless, great video! great work! hope to see more stuff like that!

  • @owarida6241
    @owarida6241 2 роки тому +1

    Wow you explained those codes better than my programming professor.

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому

      I wanted to make sure each are of the code was well explained, even if it did push the video time up.

    • @owarida6241
      @owarida6241 2 роки тому

      @@LvLUpDesign your videos just got suddenly recommended to me yesterday and Its been my long lost dream of making an RPG game when I was just freshman college. Already bought the RPG maker MV+MZ bundles yesterday and been marathoning all of your videos, I'll be sure to buy your assets very very soon as a symbol of appreciation and good will once I'm in a good level of proficiency with the software, thank you for inspiring me.

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому

      @@owarida6241 Yeah, I hit 10k subs last month and my Analytics have been up 40% ever since, so I think YT is just showing my channel to more audiences now. Hope I have my assets finished soon. Have spent 3 months trying to make them :p

    • @owarida6241
      @owarida6241 2 роки тому

      @@LvLUpDesign keep up the good work 👍.

  • @jobe_gryant152
    @jobe_gryant152 2 роки тому

    Thanks for adding the codes and the explanation. This makes RPG Maker MZ way more functional. I feel limited using the original contents and this adds RNG to the content.

  • @heroslegendstudios1658
    @heroslegendstudios1658 2 роки тому

    Great video! Alot of great code here for improving RPG Maker Events! Although there could be a big performance issue if there was probably around 50+ ores maybe on weaker machines 20+ ores as the for loop is occurring every frame.

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому +2

      Good point! You could tie it to a time system that only runs a loop every second or every minute depending on what result you were after.

  • @mauigamestudio
    @mauigamestudio 2 роки тому +1

    Great video. You could almost have titled the video about arrays, objects and variables... but mining is a bit more sexy

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому +1

      Lets be real though, no one is clicking on a video about Arrays and Variables :P

    • @heroslegendstudios1658
      @heroslegendstudios1658 2 роки тому

      Look someone used a const! Lol

  • @nightcoreparadise7531
    @nightcoreparadise7531 2 роки тому +1

    Your video, they all very good and useful for me. 🤩 Could you do some RPG Maker MV tutorials video pls ? 🥺

  • @illyont
    @illyont 2 роки тому

    Thank you! I've been looking for days trying to find a decent way of doing this without using a bunch of not really useful plugins without documentation. MZ is probably too new still and because of that lacking a bit compared to some of the older versions.

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому

      The good thing is this isn't just with mining. Any time you want to store multiple bits of information somewhere, you could use this method to use an array to store it. There are loads of possibilities.

  • @mathiasbisaillon-leblanc2940
    @mathiasbisaillon-leblanc2940 2 роки тому

    Thank you it was really helpful!

  • @Anim3ddicted
    @Anim3ddicted 2 роки тому

    Iirc, you could make this with the commands.
    Just use conditional branch, then control variable > script > "[]" and it will make the selected variable into an array...
    I might be wrong because I haven't touched RPG Maker in a while.

  • @william.strebe
    @william.strebe 7 місяців тому

    mining with js looked like a blockchain tutorial hahaha until I saw the channel ofc

  • @chaseyou2573
    @chaseyou2573 2 роки тому

    Love your videos! Btw can you make a video about clothing and armor system? Like you'll be wearing nothing if you don't have any armor/clothes on and when u equip one, you can actually see your character wearing it. Just a tip would do too!

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому +1

      The only way to do that would be to have a different sprite for your character wearing the different armours, and change the sprite whenever a new armour is equiped.

    • @chaseyou2573
      @chaseyou2573 2 роки тому

      @@LvLUpDesign Yeah I figured it out, thanks tho!

  • @shiroisekai_20
    @shiroisekai_20 Рік тому

    sheeeeesshh

  • @steakdriven
    @steakdriven 8 місяців тому

    Wait. Doesn't pushing a value inside of brackets just create a nested array? [1.2,3].push([4]) becomes [1,2,3 [4]] does it not?

  • @renatofaria4167
    @renatofaria4167 2 роки тому

    Hello!!!! The system is amazing! Can you help with harvest herbs system? I tried to use the same system to do a herb collector, but did'nt work properly... Some of the events didn't appear in the map or didn't respawn.

  • @rayenrek2363
    @rayenrek2363 2 роки тому

    Dude... Can you make a tutorial on how we make a quest board system in RPG maker.

  • @RebellonRM
    @RebellonRM 2 роки тому

    Great script. It is also suitable for respawning monsters. Is it possible to somehow change it to add animation of plants growing in the garden?

    • @Zamoksva
      @Zamoksva Рік тому +1

      Yes add a B switch and write this > for (const harvesting of $gameVariables.value(1)) {
      harvesting[2]--;
      if (harvesting[2] === 0) {
      $gameSelfSwitches.setValue([harvesting[0], harvesting[1], 'B'], false);
      $gameVariables.value(1).remove(harvesting);
      }
      if (harvesting[2] === 500) {
      $gameSelfSwitches.setValue([harvesting[0], harvesting[1], 'A'], false);
      $gameSelfSwitches.setValue([harvesting[0], harvesting[1], 'B'], true);
      }
      }
      Note that your initial number in your main srpite should be higher than 500

  • @StarlightBettaGamer
    @StarlightBettaGamer 10 місяців тому

    what if you wanted them to respawn only when reentering the map rather than a frame rate? so if you're dungeon crawling, you can only clear one level once of its items and will have to come back later to get them again, that way its not just infinite items in one go :0

    • @LvLUpDesign
      @LvLUpDesign  10 місяців тому +1

      Then I would just have the events exit event processing then when the player returns to the map, it should start the event processing again. No code needed for that one I believe.

  • @Petq011
    @Petq011 Рік тому

    So, I suppose this doesn't work in MV sadly?
    As I tried it just now and it shows: "SyntaxError Unexpected token ==="
    When I change it down to only one = on every place it has 3, it then shows "ReferenceError Invalid left-hand side in assignment".
    Any help with that, or is MV simply not capable of that for whatever reason?
    I have no plugins. It's a base new project. so it can't be a problem caused by some plugin.

    • @LvLUpDesign
      @LvLUpDesign  Рік тому

      Yeah Mv has different case in its base engine which effects script calls. I think I got a response I posted in one of the comments here from Trihan but that was about the .remove function, not ===. Try two =

    • @Petq011
      @Petq011 Рік тому

      @@LvLUpDesign I also tried it in a demo version of MZ but it also gave an error there.
      Okay, I will redo the whole thing again on MV with two = just in case to see if that fixes it. Thanks for the response!

    • @Petq011
      @Petq011 Рік тому

      @@LvLUpDesign Okay, It was apparently some sort of a mistype on my part the first time.
      I copy-pasted everything, and now I can mine the event, and it starts processing the common event until the "time/500 frames" runs out.
      When the time runs out and it gets to the last line it gives an error:
      TypeError
      $gameVariables.value(...).remove is not a function
      But I know it's a function, I've used it before...
      And I copy/pasted it, can I really mess it up THAT badly? 😅🤣

    • @Petq011
      @Petq011 Рік тому

      @@LvLUpDesign, Oh, so it's probably the same?
      I guess I will look into the comments to see if there is and what is the fix to that, as my problem is the .remove function currently apparently.

  • @undyingunity6420
    @undyingunity6420 2 роки тому +3

    If you're using RPG Maker MV, and the array deletion part isn't working for you. I have found something that worked as a fix for me, however I'm not sure if there is anything wrong with it, so take it with a grain of salt. I ended up changing the line "$gameVariables.value(4).delete(oreData);" to "delete $gameVariables.value(4)[oreData];". Like I said this way worked for me, however I have no idea if it is the proper way.

    • @undyingunity6420
      @undyingunity6420 2 роки тому +1

      The reason why my game variable is set to the number 4 is because I am using a different variable slot from the tutorial, make sure to change yours back to 1 if you used the first variable!

    • @Petq011
      @Petq011 Рік тому

      @@undyingunity6420 WTF!? That actually fixed it!
      Though I also, have pretty much no idea if it ends up ruining something else in the future... I guess we'll see.
      Please let me know if you've found out if it breaks anything, and if there's a better fix. thank you!

  • @godsend1112
    @godsend1112 2 роки тому

    Will this work on events on maps that you are not currently visiting? Right now I have a mining system that uses way too many switches and variables, and a common event that counts time and after so many in game days respawns the events even when you aren't on the map, obviously a player isn't going to hang around the same map for very many in game days waiting on minable resources, especially as my in game time is every 120 frames equal 1 minute. So I would like to use this to respawn the mining spots without the player having to be on the same map as the events.

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому +1

      Yep. It's all controlled by the common event which will identify the exact map and event

    • @godsend1112
      @godsend1112 2 роки тому

      @@LvLUpDesign very cool. Thank you for the reply. love your videos, lots of helpful ones.

  • @REJEXCOLLECTS
    @REJEXCOLLECTS 2 роки тому

    Weird question. I'm wanting to make a game where it's 16 bit jrpg style but when you encounter an enemy, the combat system is like the game "worms" or "pocket tanks" style. Is that possible in this engine. I'm trying to think wich engine to design something like this.

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому +1

      You'd be better off using game maker or unity, something that can handle physics.

  • @DJVibeDubstep
    @DJVibeDubstep 2 роки тому

    Is MZ basically MV, but better? Like does MZ have everything MV has but more? MZ is basically an expanded MV? I have MV but if MZ is basically MV but better I’d consider upgrading to MZ.

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому +1

      Depends on where your project is upto. MZ is the next iteration in the maker engine from MV, so MZ does have more. But if you're half way through an MV project, you're better to finish that first and do your next project on MZ. Also, RPG Maker Unite is coming out soon which will be a toolkit built ontop of Unity, so really, it all depends on what you want for your game.

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому +1

      I've got this video on the topic. ua-cam.com/video/dNpdlcN2998/v-deo.html

    • @DJVibeDubstep
      @DJVibeDubstep 2 роки тому

      @@LvLUpDesign I haven't started my MV project yet. I've only started creating and gathering resources for it for awhile now. So I bet MZ would be the better option? Unless with unite I can sell my game on consoles too and not just Steam because it's built in Unity, right? If so I must just build it with Unite to save me the hassle of porting/publishing.. even though learning Unity engine and not the simple RPG Maker engine is a different beast.
      And just to be clear, I can sell my MV/MZ games on Steam? No need to worry about "porting" or whatever like you do with consoles?

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому +1

      @@DJVibeDubstep Yeah you can sell your MV/MZ games on steam. And console ports should be way easier with Unite, but we'll have to wait till it comes out to see the full potential.

    • @DJVibeDubstep
      @DJVibeDubstep 2 роки тому

      @@LvLUpDesign Alright great! Now I think I'll just make the game with MZ and sell it on Steam; and if it does well enough porting it won't be a problem anyway!
      2-3+ years of development expected for this project. I aim to make it unrecognizable that it's been made in an RPG Maker engine.
      I just love it's simplicity.
      Thanks!

  • @rainer1531
    @rainer1531 Рік тому

    hello my english is not good but this video is very good but i become a error message " Type Error "
    $game.Variables.value(...).remove is not a function
    Can any help me please (i am german) i have rebuilt this video 1:1 and after 500 frames i become this error i use RPG maker MV

    • @Zamoksva
      @Zamoksva Рік тому

      hey do yo u still have difficulty with your game, I can help

    • @Zamoksva
      @Zamoksva Рік тому

      If you are using MV and not MZ this is probably why

  • @steakdriven
    @steakdriven 8 місяців тому

    CONST in a for loop????

  • @dummythickcephalon2591
    @dummythickcephalon2591 2 роки тому

    i like you an all but the epic thing was a bit too much, love your content tho

  • @Idlemage
    @Idlemage 2 роки тому

    I followed all the code correct but my nodes dont respawn am I missing something?

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому

      Have you turned on the parallel common event buy making sure the switch is turned on?

    • @PenguinCinema
      @PenguinCinema 2 роки тому +1

      yes

    • @Idlemage
      @Idlemage 2 роки тому

      @@LvLUpDesign switch A is set to on

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому

      Self switch A should be switched off by the code when oreData[2] ===0

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому

      Try copying and pasting the code directly from the description.

  • @travisenglish8033
    @travisenglish8033 2 роки тому

    Will this work for MV?

    • @LvLUpDesign
      @LvLUpDesign  2 роки тому

      Not quite sure, maybe, but some of the code might be different.

  • @mollyoglesby5149
    @mollyoglesby5149 Рік тому

    I keep getting the error, "$gamevariables.value(...).remove is not a function" T__T Please help

    • @LvLUpDesign
      @LvLUpDesign  Рік тому

      I'm guessing you're using MV?
      I'm not sure how much about coding you know but I did ask Trihan about this and he just responded to me the other day.
      forums.rpgmakerweb.com/index.php?threads/how-to-create-respawning-resource-nodes-using-a-single-variable-and-a-common-event.144193/page-2#post-1321935

    • @mollyoglesby5149
      @mollyoglesby5149 Рік тому

      @@LvLUpDesign I know absolutely nothing about coding :D Which is why I love and appreciate your videos so much! I will look into this link. Thank you very much for posting it. (and yes, I'm using MV)