[RGSS3] RETCON Library - Detecting current entry

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
Script is called RETCON LIBRARY: JOURNAL by McDohl.
Link: https://rpgmaker.net/scripts/272/

I'm trying to detect the current entry that the Journal window is showing, in order to adjust info shown in a custom window. I feel like it has to do with this line (approx. line 338):
Code:
entry = $game_party.journal[@page.currentpage][0].to_str
but I don't know what the first line should be in order to achieve something along the lines of:
Code:
case [code to figure out the entry array being used]
when 1 (AKA when the player is looking at the first entry in the module)
then [insert custom text + refresh window].
when 2
same process.
etc...
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
if you're doing this inside Scene_Journal itself

Code:
case @journalwindow.page.currentpage
if on other Class

Code:
case SceneManager.scene.journalwindow.page.currentpage
But for the 2nd code to work, you might need to add this first
Code:
class Scene_Journal
  def journalwindow
    return @journalwindow
  end
end
Also these would only work if you are inside the Journal scene as the "page" doesnt exist unless you're on that scene.
 
Last edited:

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
if you're doing this inside Scene_Journal itself

Code:
case @journalwindow.page.currentpage
if on other Class

Code:
case SceneManager.scene.journalwindow.page.currentpage
But for the 2nd code to work, you might need to add this first
Code:
class Scene_Journal
  def journalwindow
    return @journalwindow
  end
end
Also these would only work if you are inside the Journal scene as the "page" doesnt exist unless you're on that scene.
Doing it in Scene_Journal itself gives this error:
upload_2019-10-29_17-34-34.png

example of code in use, right now:
Code:
case @journalwindow.page.currentpage
when 1
msgbox("test 1")
when 2
msgbox("test 2")
else
end
 
Last edited:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Add this code then

Code:
class Window_Journal
  def page
    return @page
  end
end
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,845
Messages
1,016,961
Members
137,561
Latest member
JaCrispy85
Top