Xenphir

Nature's Friend
Veteran
Joined
Nov 20, 2017
Messages
198
Reaction score
133
First Language
English
Primarily Uses
RMMV
Hello I am currently trying scripting out and am curious on how to make self-variables, similar to self-switches where it only effects one event, and how to change the Event Image without having to switch event pages. Any help would be greatly appreciated. I have spent the past week or so watching youtube videos on java scripting and have been scanning RPGmaker's .js files to see if I can find the coding to change to do that. xD But I am confused.
 

Xenphir

Nature's Friend
Veteran
Joined
Nov 20, 2017
Messages
198
Reaction score
133
First Language
English
Primarily Uses
RMMV
You need a plugin to use self variables. This one will work:
http://yanfly.moe/2016/08/06/yep-113-self-switches-variables-rpg-maker-mv/

You can switch graphic on any event in the move route commands :)

Thanks for the link! The problem with the Move Route command though is that it doesn't remember the picture it changed to when you move off-screen. I am trying to make a farming system so it needs to remember which crop it is. I was hoping there was a simple line of script I can put into the event to change the Image but I'm not sure what exact commands it requires.
 

lordosthyvel

Veteran
Veteran
Joined
Jun 11, 2012
Messages
61
Reaction score
29
First Language
Swedish
Primarily Uses
RMMV
Thanks for the link! The problem with the Move Route command though is that it doesn't remember the picture it changed to when you move off-screen. I am trying to make a farming system so it needs to remember which crop it is. I was hoping there was a simple line of script I can put into the event to change the Image but I'm not sure what exact commands it requires.

Well yeah that is going to be harder. That is the exact thing that switches are for anyway so why not just use switches?
 

Xenphir

Nature's Friend
Veteran
Joined
Nov 20, 2017
Messages
198
Reaction score
133
First Language
English
Primarily Uses
RMMV
Well yeah that is going to be harder. That is the exact thing that switches are for anyway so why not just use switches?
I'm not quite sure what you mean. What I am trying to do is have the page read conditional branch for the new self-variables you linked me. Basically I want it to read If self var "Turnip" is 1, show image "Turnip.Seed" and then when self var "Turnip" is 2, show image Turnip.Leaf. Or something like that. But for every event to be able to change no matter what crop the player wants to plant there.
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,834
Reaction score
2,346
First Language
English
Primarily Uses
RMMZ
You'll probably want to get a plugin that's designed to do this kind of thing. I believe that Galv has one called Simple Crops. There are likely others out there too.
 

Xenphir

Nature's Friend
Veteran
Joined
Nov 20, 2017
Messages
198
Reaction score
133
First Language
English
Primarily Uses
RMMV
You'll probably want to get a plugin that's designed to do this kind of thing. I believe that Galv has one called Simple Crops. There are likely others out there too.
I checked that out already and unfortunately it doesn't do what I need it to, but I'll see if I can change it somehow to work with what I need now that I know a little about javascript
 

lordosthyvel

Veteran
Veteran
Joined
Jun 11, 2012
Messages
61
Reaction score
29
First Language
Swedish
Primarily Uses
RMMV
I'm not quite sure what you mean. What I am trying to do is have the page read conditional branch for the new self-variables you linked me. Basically I want it to read If self var "Turnip" is 1, show image "Turnip.Seed" and then when self var "Turnip" is 2, show image Turnip.Leaf. Or something like that. But for every event to be able to change no matter what crop the player wants to plant there.

If you do that every time the player enters the map, everything should work the way you want
 

Xenphir

Nature's Friend
Veteran
Joined
Nov 20, 2017
Messages
198
Reaction score
133
First Language
English
Primarily Uses
RMMV
If you do that every time the player enters the map, everything should work the way you want
Yeah but there wasn't a code for it but I think after messing around with the code a bit from RPG Maker's original Js files and putting into a script I've gotten it to work kind of, but now its a little buggy xD But I'm working on that. Thanks for the help though as Yanfly's plugin has made this much easier!
 

Latest Threads

Latest Posts

Latest Profile Posts

Hi everyone! Enjoying this nice long weekend. How are you all doing? :)
I just successfully tested having events check if specific actors are in a particular party slot and then changing image to match. This will let me make scenes take into account who is in the party at the time and arrange them accordingly - this is important since I'll have extra actors beyond current party. The script used is the same from MV and is compatible with my current core plugin setup in MZ. Thank goodness.
That awkward moment when you're talking about thinking about writing a limited shop stock plugin for MZ and then find out you already wrote one...last May. My memory is so bad.
When I open my project and I'm like, hell yeah.
Some drawings I made in Lapis, one day I intend to involve them in some RPG Maker project.
* maybe two wall frames
*or some sprite flower tiara, or maybe it inspires someone to do something.
bdd19b62e539d17b3b00cc3d63034f7d.jpg

fcca5c8471b34483da8e032cfe579275.jpg

Forum statistics

Threads
118,426
Messages
1,115,862
Members
155,378
Latest member
TrashWizard
Top