SithDuke

Regular
Regular
Joined
Jan 18, 2014
Messages
38
Reaction score
0
First Language
English
Primarily Uses
I'm after displaying variables, switches and various game stats(saves, various actors stats/ etc) upon game completion. This would ideally also include ranks based on switches and variables. This is akin to the Metal Gear Solid games.

2489668-metal+gear+solid+3+-+final+ranking.jpg

I realise I can do this just by writing variables into a text box but it looks horrible in eventing. Is it possible there's a script to do this and make it more concise?
 
Last edited by a moderator:

ShinGamix

DS Style 4Ever!
Regular
Joined
Mar 18, 2012
Messages
3,968
Reaction score
530
First Language
April Fools
Primarily Uses
RMVXA
Couldn't it be done eventing instead??
 

Kes

Regular
Regular
Joined
Aug 3, 2012
Messages
23,808
Reaction score
13,728
First Language
English
Primarily Uses
RMMZ
If it looks horrible that is not the fault of the variables, but how you have chosen to present your information.  And that is a graphics issue.

You could do it by having the info displayed over images brought up by the Show Picture command, for example.
 

SithDuke

Regular
Regular
Joined
Jan 18, 2014
Messages
38
Reaction score
0
First Language
English
Primarily Uses
It's not how I've chosen to present my information, it's the lack of options over the display of message boxes I have. Firstly there's no apparent way to show an image inside of a message box like the example I gave in my first post.

Even if there is, I'd need to copy and paste the entire message box event for each different Grade/Title: possibility, which needs to check for things like "Playtime < X", "Saves < X", "Boss Souls >= 3". As each of these variables/switches will possibly carry point values which is used to give the player their grade/title. I imagine this to be an extremely lengthy event.

Problems.png

Using the default message box system looks like this. Firstly the window isn't centre aligned and looks horrible stretched across the screen.

2cd9ad1cdc650d6a087490a9e41efcbe.png

Using show picture with a transparent text box on top could work but there's no way add a small menu to this screen. If I were to "Show Choice"  it would still use the standard message box boarder.

Problems.png

Ideally I'd like to have a small menu to allow the player to save and continue into New Game+ or return to the game.

This is why I asked for a basic endgame scene as doing this via the RPG Maker interface compared to scripting a scene and just letting me use a script-call to call the scene would be a lot better.

MGS Score Breakdown.jpg
 
Last edited by a moderator:

Kes

Regular
Regular
Joined
Aug 3, 2012
Messages
23,808
Reaction score
13,728
First Language
English
Primarily Uses
RMMZ
Hmm, would something like this do?  It's got a lot of customization options, including the display window.
 
Last edited by a moderator:

SithDuke

Regular
Regular
Joined
Jan 18, 2014
Messages
38
Reaction score
0
First Language
English
Primarily Uses
Hmm I put it into my project and I got a strange error.

b58ac93e4fdc029f94f76c1faa0c3453.png

.empty? is a standard Ruby method isn't it? Not sure why it's throwing me an error. But from the screenshots I can see. It looks like it's setup to display images nicely however I'm not sure how I'd go about displaying variables, text and other game data. 

Achievements.png
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,958
First Language
English
Primarily Uses
RMMV
Yes. .empty? is a Ruby method that applies to an array. What it's saying is that the thing that comes before .empty? is not an array. It has not been defined.


I bet you added the script then loaded a saved game that was saved prior to you adding the script.


What is line 88 in Cache?
 

SithDuke

Regular
Regular
Joined
Jan 18, 2014
Messages
38
Reaction score
0
First Language
English
Primarily Uses
Yes. .empty? is a Ruby method that applies to an array. What it's saying is that the thing that comes before .empty? is not an array. It has not been defined.

I bet you added the script then loaded a saved game that was saved prior to you adding the script.

What is line 88 in Cache?
No I didn't load a saved game and line 88 is if filename.empty?

#--------------------------------------------------------------------------  # * Load Bitmap  #--------------------------------------------------------------------------  def self.load_bitmap(folder_name, filename, hue = 0)    @cache ||= {}    if filename.empty? #<----------------------- Line 88      empty_bitmap    elsif hue == 0      normal_bitmap(folder_name + filename)    else      hue_changed_bitmap(folder_name + filename, hue)    end  endOkay so I'm guessing it's because it's looking for a picture that doesn't exist, so that's fixable. However my earlier concern was there's no apparent way to display text for game information/variables and such. Also one of my earlier requests were for there to be a small menu allowing access to the save Scene and return to game option.
 
Last edited by a moderator:

SithDuke

Regular
Regular
Joined
Jan 18, 2014
Messages
38
Reaction score
0
First Language
English
Primarily Uses
This is quite good, the only issue is it seems to only support icons so I can't use any grading images. Since variables can't be a string I can't see any way to go about making just a grade/rank either.
 

Sato1999

Yangfly Master(Previously)
Regular
Joined
Sep 9, 2014
Messages
351
Reaction score
86
First Language
Portuguese
Primarily Uses
RMVXA
Yes variables can be strings.

Just do this in a Script call:

Code:
$game_variables[ID] = "Stuff Stuff Stuff"
 

KockaAdmiralac

Cube-shaped garbage can
Regular
Joined
Jun 15, 2015
Messages
569
Reaction score
156
First Language
Serbian
Primarily Uses
N/A
Yes variables can be strings.

Just do this in a Script call:

$game_variables[ID] = "Stuff Stuff Stuff"
That's true.

But it happened to me that, when I set the variable to a string and saved, the save engine crashed (while using YEA-Save Engine)

So, to prevent that possible issue, set the variable to a string, and then after showing the scene simply set that variable to some number.

Or maybe it was just YEA-Save Engine. I don't know, and I'm too lazy to test that again, but I think it would be a good idea
 
Last edited by a moderator:

SithDuke

Regular
Regular
Joined
Jan 18, 2014
Messages
38
Reaction score
0
First Language
English
Primarily Uses
So using XS Records the best I can seem to do looks like this:

abbf3f5533c5e4245bf67bef65d382fb.png

It doesn't support images and there's obviously no menu. Is there no way to get the Game Timer variable to display in the correct Hours:Minutes:Seconds format?
 
Last edited by a moderator:

KockaAdmiralac

Cube-shaped garbage can
Regular
Joined
Jun 15, 2015
Messages
569
Reaction score
156
First Language
Serbian
Primarily Uses
N/A
It DOES support icons.

# R_LIST[ID] = [RECORD_TEXT, VARIABLE_ID, ICON_INDEX(can be nil), ENABLED]In the part below set icon index to something that is not nil and set ICON_ENABLE to true.

The game time can be displayed with setting it to a variable and then displaying that variable.

Set the variable somewhat like this :

Code:
$game_variables[variable_id] = sprintf("%02d:%02d%02d", Graphics.frame_count / 12960000,Graphics.frame_count / 216000 , Graphics.frame_count / 3600)
 

Karanum

Villager
Member
Joined
Oct 15, 2012
Messages
5
Reaction score
1
First Language
English
Primarily Uses
There's also a way to get the playtime pre-formatted. Just use this:

Code:
$game_variables[variable_id] = $game_system.playtime_s
 

SithDuke

Regular
Regular
Joined
Jan 18, 2014
Messages
38
Reaction score
0
First Language
English
Primarily Uses
It DOES support icons.

# R_LIST[ID] = [RECORD_TEXT, VARIABLE_ID, ICON_INDEX(can be nil), ENABLED]In the part below set icon index to something that is not nil and set ICON_ENABLE to true.

The game time can be displayed with setting it to a variable and then displaying that variable.

Set the variable somewhat like this :

$game_variables[variable_id] = sprintf("%02d:%02d%02d", Graphics.frame_count / 12960000,Graphics.frame_count / 216000 , Graphics.frame_count / 3600)
Yes it supports Icon, but it was an actual image (not from the Icon Set) that I was intending to use. One image per each Grade.

I used

$game_variables[0026] = sprintf("%02d:%02d%02d", Graphics.frame_count / 12960000,Graphics.frame_count / 216000 , Graphics.frame_count / 3600) 

The value stays as "0" if I use the above. If I used $game_variables[26] I get the below error.

b55de1c356e20efff5729e403dfd4fcf.png
 

KockaAdmiralac

Cube-shaped garbage can
Regular
Joined
Jun 15, 2015
Messages
569
Reaction score
156
First Language
Serbian
Primarily Uses
N/A
For the image, I don't know.

Try this script call

$game_variables[26] = sprintf("%02d:%02d:%02d",Graphics.frame_count / 216000, Graphics.frame_count / 3600, Graphics.frame_count / 60)It worked for me
 
Last edited by a moderator:

Karanum

Villager
Member
Joined
Oct 15, 2012
Messages
5
Reaction score
1
First Language
English
Primarily Uses
You're using the Conditional Branch event command that assumes all variables are numbers. The sprintf command used to format the playtime turns the variable into a string, and that's why it throws that error.

If you want to use the playtime to determine the grade, the best way is to use another variable and get the flat playtime there, using $game_system.playtime, or Graphics.frame_count / 60, and then make the Conditional Branch use that variable.
 

SithDuke

Regular
Regular
Joined
Jan 18, 2014
Messages
38
Reaction score
0
First Language
English
Primarily Uses
 

You're using the Conditional Branch event command that assumes all variables are numbers. The sprintf command used to format the playtime turns the variable into a string, and that's why it throws that error.

If you want to use the playtime to determine the grade, the best way is to use another variable and get the flat playtime there, using $game_system.playtime, or Graphics.frame_count / 60, and then make the Conditional Branch use that variable.
You were absolutely right. I guess I'll have to check the grade based on seconds played. Thanks again!

For the image, I don't know.

Try this script call

$game_variables[26] = sprintf("%02d:%02d:%02d",Graphics.frame_count / 216000, Graphics.frame_count / 3600, Graphics.frame_count / 60)It worked for me
It's formatted correctly now and doesn't crash. I do appreciate your help and patience, thank you very much. I think it's is probably as good as it's going to get now.

9f67f8ec3ec6a4f838750f64a8315fde.png
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

The tutorial is live now.
Whew... I've been on a tear recently. Been working nonstop. Feels really good to be back in the groove! I think it's because I can finally see the end approaching. I only have 8 more side quests to develop (then NPCs, some art, then pretty much done).
how the hell do i change my username???
So imagine this but autotile. Stained glass ocean.
Photoshop_3xMc7HoPt8.png
Working on his first Game.

Forum statistics

Threads
134,744
Messages
1,250,221
Members
177,497
Latest member
uppo
Top