Best Way to Make a Dynamic List?

jjraymonds

Villager
Member
Joined
Feb 1, 2020
Messages
17
Reaction score
1
First Language
English
Primarily Uses
RMMV
Hello everyone,

I have been working on a mystery/detective game and have been using Yanfly's Common Event Menu Plug-In to create a menu that players can use to review the evidence that they have collected so far... now I have been creating a custom pause menu system with pictures, and it would be nice to keep the evidence review menu in the same style and feel than the "default RM list".

Is it possible to create a dynamic list that you could scroll through like what Yanfly's common event menu has, but with switches/variables and pictures with eventing? I would basically only be adding things to the list... but the order of which they could be added would depend on how the player finds them... I feel like it could be done... I'm just trying to wrap my head around how the events should be laid out.

Thanks in advance!
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,204
Reaction score
428
First Language
indonesian
I think it's possible... but it will be quite complicated without any plugins...
1. create all the event with the correct 'evidence' graphics.
2. have switches for every evidence found. ex: evidence 1 found, evidence 2 found, evidence 3 found, etc... then have variables for every evidence found. ex: evidence 1 id, evidence 2 id, and so on...
3. then every time you found evidence create some conditional branch check... it's best you do it in reverse (check the last evidence first)... then combine it to jump to label to the end of event. every condition if true will set the variable of the position to the 'evidence id' you set (ex: 2 is pistol, 1 is body, 3 is plastic bag, etc). then flip the switch ON. you might also need one extra switch to know that all evidence found and go to end...
ex:
Code:
found evidence !
cond: switch final evidence found ON
   >> jump to Label END
cond: switch evidence 3 found ON
   >> variable evidence 4 id = 2(gun)
   >> switch final evidence found ON
   >> jump to Label END
cond: switch evidence 2 found ON
   >> variable evidence 3 id = 2(gun)
   >> switch evidence 3 found ON
   >> jump to Label END
cond: switch evidence 1 found ON
   >> variable evidence 2 id = 2(gun)
   >> switch evidence 2 found ON
   >> jump to Label END

then add one when no evidence found yet... (no condition)
  >> variable evidence 1 id  = 2(gun)
  >> switch evidence 1 found ON

LABEL END
do something here if you want...
that is in 'when finding the gun' event page... you will need to recreate each event like that for each evidence...

3. in the 'evidence view' map... create the autorun event that do some conditional branch [script] that check the position with the evidence 'id'... if it's in first position move the event in first position... if second position move the event in second position... etc. then flip a switch to activate actual page (not self switch!!!) that will execute when we talk to it...
something like this :
Code:
cond: variable evidence id 1 = 2(gun)
move to pos 1
cond: variable evidence id 2 = 2(gun)
move to pos 2
and so on until last position...
this if for the GUN evidence event... you need to recreate each event like that for each evidence.

i try using self switch but it will messed up when you're exiting the evidence viewing map and reenter... it will reset the position of the event... the auto run event also will not execute again.. so use switch instead... and don't forget to RESET the switch when exiting the 'view evidence' map.

the good of this setup is that you can REUSE the switch and variables after finishing the 'case'. just make sure to reset it in the begining of new 'case'.

this process could be simplified with multiple script call and script condition but might not be easy for non coder.

hope this help.
 
Last edited:

jjraymonds

Villager
Member
Joined
Feb 1, 2020
Messages
17
Reaction score
1
First Language
English
Primarily Uses
RMMV
I think it's possible... but it will be quite complicated without any plugins...
1. create all the event with the correct 'evidence' graphics.
2. have switches for every evidence found. ex: evidence 1 found, evidence 2 found, evidence 3 found, etc... then have variables for every evidence found. ex: evidence 1 id, evidence 2 id, and so on...
3. then every time you found evidence create some conditional branch check... it's best you do it in reverse (check the last evidence first)... then combine it to jump to label to the end of event. every condition if true will set the variable of the position to the 'evidence id' you set (ex: 2 is pistol, 1 is body, 3 is plastic bag, etc). then flip the switch ON. you might also need one extra switch to know that all evidence found and go to end...
ex:
Code:
found evidence !
cond: switch final evidence found ON
   >> jump to Label END
cond: switch evidence 3 found ON
   >> variable evidence 4 id = 2(gun)
   >> switch final evidence found ON
   >> jump to Label END
cond: switch evidence 2 found ON
   >> variable evidence 3 id = 2(gun)
   >> switch evidence 3 found ON
   >> jump to Label END
cond: switch evidence 1 found ON
   >> variable evidence 2 id = 2(gun)
   >> switch evidence 2 found ON
   >> jump to Label END

then add one when no evidence found yet... (no condition)
  >> variable evidence 1 id  = 2(gun)
  >> switch evidence 1 found ON

LABEL END
do something here if you want...
that is in 'when finding the gun' event page... you will need to recreate each event like that for each evidence...

3. in the 'evidence view' map... create the autorun event that do some conditional branch [script] that check the position with the evidence 'id'... if it's in first position move the event in first position... if second position move the event in second position... etc. then flip a switch to activate actual page (not self switch!!!) that will execute when we talk to it...
something like this :
Code:
cond: variable evidence id 1 = 2(gun)
move to pos 1
cond: variable evidence id 2 = 2(gun)
move to pos 2
and so on until last position...
this if for the GUN evidence event... you need to recreate each event like that for each evidence.

i try using self switch but it will messed up when you're exiting the evidence viewing map and reenter... it will reset the position of the event... the auto run event also will not execute again.. so use switch instead... and don't forget to RESET the switch when exiting the 'view evidence' map.

the good of this setup is that you can REUSE the switch and variables after finishing the 'case'. just make sure to reset it in the begining of new 'case'.

this process could be simplified with multiple script call and script condition but might not be easy for non coder.

hope this help.
This seems like an awesome starting point, I see you mentioned going to a different map- I was hoping to keep all picture menu-ing on the same map that the player character was on (using a couple plug-ins to keep events from moving/being interactable)

Having a special map for reviewing evidence would making scrolling down the list a lot more straight forward... is there a way to ensure that events on the player's map don't get positions and such reset when transferring back and forth between the evidence list?

On a side note... I'm certainly not good at scripting... but even with me trying to avoid it the best I can I have started to get my feet wet. What kind of script calls/conditions would be used?
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,204
Reaction score
428
First Language
indonesian
This seems like an awesome starting point, I see you mentioned going to a different map- I was hoping to keep all picture menu-ing on the same map that the player character was on (using a couple plug-ins to keep events from moving/being interactable)

Having a special map for reviewing evidence would making scrolling down the list a lot more straight forward... is there a way to ensure that events on the player's map don't get positions and such reset when transferring back and forth between the evidence list?

On a side note... I'm certainly not good at scripting... but even with me trying to avoid it the best I can I have started to get my feet wet. What kind of script calls/conditions would be used?
ah i see... in my settings above... you go to special map 'evidence viewer' instead of the same map...
it's achieveable by creating common event... you can bind them to a button using plugins to call that common event or bind the common event to a menu or a picture on the screen when clicked call that common event(so many plugins that can execute common event)... in that common event... save the map id, player position, etc... then teleport the player to the evidence viewer map. after finish viewing evidences in that map... we can exit the map and teleport to the same position we left... this create illusion of 'opening menu' :D.

this could also combined using mouse plugins that can interact with event with mouse click... and make the actor transparent... so you can click each event to view the info instead of moving the actor and talk to the event (some people change the actor graphic to 'cursor' and move them with keyboard)...

then to make sure it positioned correctly each time enter and exit the map... at the autorun page that move evidences above... flip a switch which activate the real page... and when exiting the 'event viewer map' make sure to reset the switch so the autorun event will run again next time entering the map... if you did not want that way... you could also use plugins that save the map instead of reloading each times... there's also one that only save the event position from shaz (https://forums.rpgmakerweb.com/index.php?threads/save-event-position.50261/)

also the above setting did not require any script call. only regular conditional branch with switches and variables
for example:
Code:
cond: switch final evidence found ON
is a normal Conditional Branch event command that check a switch ON or OFF...

Code:
jump to Label END
Label END
also there in event command first page (at flow control section).

all that is pure eventing.

hope this help...
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Officially not a mod anymore. Thanks for the many years!
Thinking if i should post on the classifieds section...
Made another plugin showcase video! :kaojoy:
(Plugins and details inside the description of the YouTube video.) :LZScheeze:
Ami
Castle is my Biggest Fear :kaodes:. I just Managed make Part by Part (like the Entrance only),not the Entire Castle like in the RM Sample...
This video really speaks to me...

Forum statistics

Threads
104,373
Messages
1,005,908
Members
135,894
Latest member
EnriX
Top