Plugin to run a common event on every player transfer -- does this exist?

Discussion in 'JS Plugin Requests' started by cuby, May 27, 2019.

  1. cuby

    cuby Veteran Veteran

    Messages:
    39
    Likes Received:
    9
    First Language:
    English
    Call me crazy but I was sure I saw this somewhere just a few months ago, but now no amount of searching is turning up anything. It's not on the master list either!

    I need a common event to run on each "transfer player" command. If anyone has any info please let me know, otherwise I'll have to go in and edit every single transfer event in my game -- yecch!

    Many many thanks! :LZYcool:
     
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,819
    Likes Received:
    11,523
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    #2
    cuby likes this.
  3. Ebanyle

    Ebanyle Veteran Veteran

    Messages:
    265
    Likes Received:
    150
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMVXA
    #3
    cuby and Eliaquim like this.
  4. cuby

    cuby Veteran Veteran

    Messages:
    39
    Likes Received:
    9
    First Language:
    English
    Thanks Shaz and Ebanyle.

    Shaz your VXAce script is almost certainly the one I saw in passing months ago, before I realized I needed it.

    Grateful that you located a MV version Ebanyle, I'll give it a shot. As often happens, I'm kind of astonished there isn't more call for something with this functionality! Also strange that no Google search of "map transfer common events" leads anywhere. Glad you both could help.
     
    #4
  5. cuby

    cuby Veteran Veteran

    Messages:
    39
    Likes Received:
    9
    First Language:
    English
    Bleh, looks like this plugin doesn't function, at least in the 1.4 version I'm committed to.

    Shaz if you ever get an itch to throw this one together please do let me know! Just seems a very useful thing.
     
    #5
  6. Shaz

    Shaz Veteran Veteran

    Messages:
    37,819
    Likes Received:
    11,523
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Why doesn't that one run for you? If you get an error message, tell us what it is, and we can help you figure it out.
     
    #6
  7. cuby

    cuby Veteran Veteran

    Messages:
    39
    Likes Received:
    9
    First Language:
    English
    Ahh, I got it working. Sorry about that -- simple user error, I just had a typo.

    Thanks again!
     
    #7
  8. cuby

    cuby Veteran Veteran

    Messages:
    39
    Likes Received:
    9
    First Language:
    English
    Well actually, if you don't mind me piggy-backing an issue with the plugin into this thread, I am having a problem with it after all.

    I've tested it with playing sound effects on map enters, and that works. However, it seems to be getting stuck on one element I have in the CE that I'm referencing: a conditional branch.

    Basically, I'm just running a conditional branch checking whether a switch is on. If the switch is on, play a sound. The error I'm getting is "Type error: Cannot read property '9' of null", (or '6', when I tried different switches or actions to do if the switch is on).

    Any thoughts?

    Edit: I'm trying all sorts of conditions in the conditional branch besides just a switch check, and this plugin isn't liking any of them.
     
    #8
  9. Andar

    Andar Veteran Veteran

    Messages:
    28,646
    Likes Received:
    6,584
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    as told several times before, we need to see a screenshot of your event to really help you.
     
    #9
  10. Shaz

    Shaz Veteran Veteran

    Messages:
    37,819
    Likes Received:
    11,523
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Are you sure it's that plugin, and not something else? When you get the error, hit F8 to open the developer tools, and go to the console and grab a screenshot to post here. And as Andar said, a screenshot of the event that has the command that you think is failing.

    Is your conditional branch actually using a Switch = command (as selected via the buttons in the conditional branch dialogue) or do you have a script check? If you're doing it via script, then you've probably spelled it wrong, or are using Ace syntax rather than MV.
     
    #10
  11. cuby

    cuby Veteran Veteran

    Messages:
    39
    Likes Received:
    9
    First Language:
    English
    I've enclosed screenshots of the common event, the error, and the console. I was testing the CE with just the sound effect, which worked with no issue. Once I add the conditional branch switch check, it borks. No scripting just a simple switch check.

    Thanks for your help!

    [​IMG]

    [​IMG]

    [​IMG]
     
    #11
  12. Shaz

    Shaz Veteran Veteran

    Messages:
    37,819
    Likes Received:
    11,523
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    I can't see that plugin, but I can pretty much guarantee it shouldn't be called [rpg maker mv] map transfer common event.js (with or without underscores).

    Change it to the correct name and see if that makes any difference
     
    #12
  13. Andar

    Andar Veteran Veteran

    Messages:
    28,646
    Likes Received:
    6,584
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @cuby
    your screenshot shows several problems that may have nothing to do with this problem, but also may completely destroy all your work.

    1) NEVER, and that really means NEVER, work on the project in a cloudsync'd folder.
    The RPG-Makers access their files like a databasing program does, not like regular files.
    And cloudsyncing has a problem with that - if you're lucky nothing will happen for several months, but sooner or later a cloudsync will happen at the same time as the editor is accessing the project files. and if that happens, the files will be destroyed due to two conflicting access methods.

    You can use googledocs to distribute and to backup only, but never for your working copy like you did a playtest in the folder screenshot above.

    2) make sure that all file and folder names follow networking rules
    Browsers have problems accessing files if the path does not follow the rules for networking folders.
    See that %20 in your error messages? That is exactly there because a browser CANNOT handle spaces in filenames, requiring to replace them even in error messages. Rename your project folder as soon as possible, you will get problems (and that includes plugins not working due to their inability to load files) with this, and it will prevent deployment to anything other than windows (where that stupid override for non-networking names doesn't exist at all)

    EDIT:
    And give a link to where you got the plugin from, there might be other problems with it than just the wrong name Shaz mentioned
     
    #13
  14. Shaz

    Shaz Veteran Veteran

    Messages:
    37,819
    Likes Received:
    11,523
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    @Andar the link to the plugin is in post #3. But when I followed it, I got an "account has been disabled" message. Not sure if that's MY account (I don't recall ever signing into RMRK on this computer), or the account of the person who wrote that plugin. I assumed because the OP got it, it was something happening at my end.
     
    #14
  15. Andar

    Andar Veteran Veteran

    Messages:
    28,646
    Likes Received:
    6,584
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @Shaz the entire website is down, you get the same message on going to www.rmrk.net
    has nothing to do with any visitor there
     
    #15
  16. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,626
    Likes Received:
    1,049
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Website works fine for me, so maybe you actually have a user that's logged in and disabled - try incognito mode. Or possible it's only open to IP addresses from the U.S.? That's strange but I've seen weird things before.

    If the error message is "Cannot read property '6' of null" occurring on this line, it means that the interpreter list of commands is somehow null.
    Code:
    Game_Interpreter.prototype.currentCommand = function() {
        return this._list[this._index];
    };
    Reading the plugin, it's executing the common event in a bit of a strange way, so it might not properly handle branches.
     
    #16
  17. Andar

    Andar Veteran Veteran

    Messages:
    28,646
    Likes Received:
    6,584
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @Aloe Guvner no, it must have been a temporary error - now the website works for me again as well (and I've been there several times before without problems)
     
    #17
  18. Shaz

    Shaz Veteran Veteran

    Messages:
    37,819
    Likes Received:
    11,523
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    That would indicate that this._list is not defined.

    @cuby could you please provide a screenshot of your map properties window, so we can see the notes you used to set the event ids? And a screenshot of the ENTER common event. That's the one it's crashing on, not the EXIT event.

    It is very odd ... I'm not sure why it doesn't just use the reserve common event function.
     
    #18
  19. cuby

    cuby Veteran Veteran

    Messages:
    39
    Likes Received:
    9
    First Language:
    English
    Thanks again to both for the advice. It's a funny thing, I started working from the Google Drive directory out of an abundance of caution after a catastrophic event a few years ago. Back when I was working in VX Ace within Steam, some godforsaken thing happened whose details I have blocked out of my memory seemingly, where some weird business with Steam's built-in backups wrote over my work causing me to lose endless progress. Ever since then I've been INSANE about backups, and will never use RPGM within Steam ever again.

    Right now I am working within the cloudsync folder, then after every session I save to local computer, then backup to a NAS. I will take your advice and reverse that, working on local computer and backing up to cloudsync drive, since that's just as easy.

    Does the no-spaces advice apply only to browsers? I have no plans to compile for browser, is it still worth it to go through and change all the files with spaces in them?

    Here's the link to the map properties. I am not using an exit note, just an enter note on the arrival map here. The CE just happens to be called "Room Exit".



    Danke!
     
    #19
  20. kako05

    kako05 Veteran Veteran

    Messages:
    93
    Likes Received:
    4
    First Language:
    Australian
    Primarily Uses:
    RMMV
    Using exit command it runs common event only after all initial transfered map auto events events are done. Too bad as I was hoping to apply the fadeout effect before the player enters the map.

    As for backups, I use easeus todo backup software. It's free and I set up it to backup my project folder 3 times a day to different disks.
     
    #20

Share This Page