ThyNexus

Villager
Member
Joined
Sep 16, 2014
Messages
22
Reaction score
4
First Language
English
Primarily Uses
I've searched all over the internet and can't seem to find an answer to a couple of quick questions.


First: When players open the menu, I want the character boxes on the right to contain a small 1-2 sentence blurb of their character for reference. There's no battling system in my game and thus I do not require HP/MP/TP or anything else of that sort. The menu looks like this currently:

ask1.png

Is there a way to include a short bio in the box where the blank space is so that one does not have to click on the status button to read it?


Second: I want to have specially designed status menus for my characters which would contain a picture, their name, and a paragraph biography. I also plan to include their sprite in the bottom right corner. It would look something like this:

allan.png

However I want this picture to be accessed when a player clicks on the character in the normal status menu. So it would work like Open Menu > Click Status > Click on Character > Picture Appears. I'm not sure how to make this happen, however, because it's not a normal event that I can create on the map. It's something that can be accessed through the menu at any time. Is there a way to set a picture as the status rather than the normal status menu?


Thanks for any help!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,828
Reaction score
14,497
First Language
English
Primarily Uses
RMMV
You need someone to write a script for you to do this.


Where is the bio information going to come from?  That's more than the 2 lines that are allowed in the description.
 

ThyNexus

Villager
Member
Joined
Sep 16, 2014
Messages
22
Reaction score
4
First Language
English
Primarily Uses
The bio information would be a condensed form of what is shown in the second picture. I would want it to end up looking something like this:

ask2.png

But of course that's just a quick photoshop and not something used through scripts or the like. Do you know of any kinds of scripts that could achieve something like this? Or something I (or someone else who's more well-versed with scripts) could do to achieve this? The same goes for my other question regarding the picture in place of a status screen.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,828
Reaction score
14,497
First Language
English
Primarily Uses
RMMV
Second: I want to have specially designed status menus for my characters which would contain a picture, their name, and a paragraph biography.



This is what I'm asking about.  Where do you plan to store this paragraph biography?
 

ThyNexus

Villager
Member
Joined
Sep 16, 2014
Messages
22
Reaction score
4
First Language
English
Primarily Uses
I'm sorry, I'm not sure I follow. The paragraph biography is included within the picture that I showed in my original post (the second picture). The paragraph in that picture would be on the picture itself, not as a separate piece of text. If you're asking where I would store the picture, I was looking for guidance regarding that.
 

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,916
Reaction score
3,403
First Language
English
Primarily Uses
RMVXA
I think what Shaz is asking is where you are storing this information on the characters. Assuming you're new to scripting, everything must be stored somewhere in order for Ruby to be able to find it, whether it be in the database or in a variable. What it seems like to me is that you are trying to get the character description stored in the Actors tab in the database to show on the menu.


Type the shortened version of the bio you provided in the actors tab in the database, then copy this script below materials and above main.


class Window_MenuStatus < Window_Selectable

def initialize(x, y)
super(x, y, window_width, window_height)
@pending_index = -1
refresh
end

def window_width
Graphics.width - 160
end

def window_height
Graphics.height
end

def item_max
$game_party.members.size
end

def item_height
(height - standard_padding * 2) / 4
end

def draw_item(index)
actor = $game_party.members[index]
@actor = actor
enabled = $game_party.battle_members.include?(actor)
rect = item_rect(index)
draw_item_background(index)
draw_actor_face(actor, rect.x + 1, rect.y + 1, enabled)
draw_description(rect.x + 108, rect.y + line_height / 2)
end

def draw_description(x, y)
Font.default_size = 12
draw_text_ex(x, y, @actor.description)
end

def draw_item_background(index)
if index == @pending_index
contents.fill_rect(item_rect(index), pending_color)
end
end

def process_ok
super
$game_party.menu_actor = $game_party.members[index]
end

def select_last
select($game_party.menu_actor.index || 0)
end

def pending_index=(index)
last_pending_index = @pending_index
@pending_index = index
redraw_item(@pending_index)
redraw_item(last_pending_index)
end
end


   The only downside is the line Font.default_size also changes the font size for the game end options. I really don't know how to fix that as of right now, as I'm quite new at scripting. *Sheepish face*
 

ThyNexus

Villager
Member
Joined
Sep 16, 2014
Messages
22
Reaction score
4
First Language
English
Primarily Uses
Ah, that works wonderfully, thank you! I knew that I was explaining things pretty strangely, so I'm sorry for the confusion. Would it be possible to also make it so that the character's name still shows up in the box? After I included the script, this is how it came up:

ask1.png

(I'll figure out how to fix the size of the font, so no worries about that!)
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,728
First Language
English
Primarily Uses
RMVXA
I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
 

Adventurer_inc.

Technically a Programmer
Veteran
Joined
Sep 12, 2015
Messages
99
Reaction score
42
First Language
English
Primarily Uses
RMMV
The fix is quite primal, actually. Something like this "should" do it. (Should as in I didn't test it and assumed based on method name doing what they say they do.)

Code:
  def draw_description(x, y)
    stuff = Font.default_size
    Font.default_size = 12
    draw_text_ex(x, y, @actor.description)
    Font.default_size = stuff
  end
 

ThyNexus

Villager
Member
Joined
Sep 16, 2014
Messages
22
Reaction score
4
First Language
English
Primarily Uses
The size of the font wasn't my problem, though. I'd already figured out a way to fix the font size (I simply had to change it to 18, as 12 was too small). My problem is that now the boxes don't state the characters' names like they did before.

It looked like this before


ask4.png


But now it looks like this


ask3.png

There's clearly space available to still have a name put in there. However no matter how much I attempt to edit the script (with the very, very limited scripting knowledge that I have) I cannot get the name to appear along with the two lines of description. Theoretically, if nothing is changed/added to the script, the only way to insert their names would be to get rid of one line of the description and replace it with a name. But I cannot spare another line, as these descriptions are short enough as is.
 

Adventurer_inc.

Technically a Programmer
Veteran
Joined
Sep 12, 2015
Messages
99
Reaction score
42
First Language
English
Primarily Uses
RMMV
Did you mean you want to push it down the description and add a name? That +24 is how far apart the name is from the description. I'm weak in GUI design (don't have distance memorized) so mess around with that 24 until you're satisfied. Everything after the # is excluded from the code, it's purely there for explanation.

Code:
  def draw_description(x, y)
    stuff = Font.default_size # This takes default size and saves it
    Font.default_size = 20 # This makes the name size 20
    draw_text_ex(x, y, @actor.name) # Print Name
    Font.default_size = 12 # This makes the description size 12
    draw_text_ex(x, y+24, @actor.description) # Print Description 24 pix away from the name
    Font.default_size = stuff # This returns the default size
  end
 
  • Like
Reactions: BCj

ThyNexus

Villager
Member
Joined
Sep 16, 2014
Messages
22
Reaction score
4
First Language
English
Primarily Uses
Ah this works perfectly, thank you! And thank you to everyone that helped me :)
 

Latest Threads

Latest Posts

Latest Profile Posts

Nearing completion of the first major city of Albert, a vacation getaway city built a long time ago by a king who really didn't want to be invaded.
It’s definitely a great day to fit in some time for me to play no mans sky on PS4
Julyon.png

First concept art of one of our main characters love interests who might turn evil depending on her decisions. Or become king of the world. Or marry her. Maybe even everything at once.
Me: *saved the game*
Also me: *exit the game afterward*
The game: "Any unsaved progress will be lost"
Me: "uh,.. alright?"
[I feel a bit sad I did this]
"WhY?...WhY dId YoU KiLl ThEm AlL?...yOu BlOoDy HeLl MoNsTeR...I'LL MAKE YOU PAY!!! FOR THE BLOOD OF THE LOST!!!" ~Scars final words before his final battle [not final boss]

Battle Theme: Blood of the Lost
Face Sprite
Forgotten Eclipse_Scar Dead+Final Battle with him.png

Forum statistics

Threads
110,269
Messages
1,051,826
Members
143,291
Latest member
FoGGick855
Top