So I brought my game to a few friends, and they asked about the gender of a few characters, so I was wondering, is it possible that when you go to a characters description through the pause screen that there's a symbol showing which gender they are? example below (edited with Paint.NET)
Not directly, you would need to use a script for it. I managed to set it to read in a notetag with the gender in my game, then I wrote the gender (M or F only) on the party menu with a script call. But, I use Yanfly's menu Engine so my exact script calls won't work for you.
Still, the easiest way:
1: Add a notetag to the actor for their gender.
2: Add a command to read in the gender when the actor is initialized. Make sure to put a default for missing notetags! (I used ?). The code to do 1 and 2 is here:
class Game_Actor < Game_Battler attr_accessor :gender attr_accessor :age alias bg_genderage_initialize initialize def initialize(actor_id) #Set the default age and gender @gender = "?" @age = "?" #Call the aliased function bg_genderage_initialize(actor_id) #Read the gender notetag for the current actor $data_actors[actor_id].note[/<Gender:\s*(\w+)>/im] if $1 and $1 != "" @gender = $1 end #Read the age notetag for the current actor $data_actors[actor_id].note[/<Age:\s*(\w+)>/im] if $1 and $1 != "" @age = $1 end endend
Put it in a new script in your materials section, if you wish to use it. Terms of use, do whatever you want with it, as I wrote it for notetag reading practice. You also gain the ability to read in the age if you wish to use that!
3: Add a command to draw the gender in the appropriate spot. I used Yanfly Menu engine so my code will not work for you I'm afraid, maybe someone else can help with that?
Edit: Here is part 2, which displays the gender on screen. Requires Yanfly's Menu engine, and probably Yanfly Core and Yanfly Status to work:
class Window_Base < Window @bg_display_string #-------------------------------------------------------------------------- # alias method: draw_actor_simple_status #-------------------------------------------------------------------------- alias bg_jpdisplay_draw_actor_simple_status draw_actor_simple_status def draw_actor_simple_status(actor, dx, dy) #Call Original Method bg_jpdisplay_draw_actor_simple_status(actor, dx, dy) #Set the dy value to be the same as in Ace Menu Engine #May need to comment this line out if not using Ace Menu Engine dy -= line_height / 2 #Add Gender/Age lines here. bg_display_string = actor.gender + "/" + actor.age draw_text(dx + 300, dy, 48, line_height, bg_display_string) end end # Window_Base
It's two scripts total, one to read in the values, one to display them on screen.
I think Mr bubbles might also have a script for this too though?
Not directly, you would need to use a script for it. I managed to set it to read in a notetag with the gender in my game, then I wrote the gender (M or F only) on the party menu with a script call. But, I use Yanfly's menu Engine so my exact script calls won't work for you.
Still, the easiest way:
1: Add a notetag to the actor for their gender.
2: Add a command to read in the gender when the actor is initialized. Make sure to put a default for missing notetags! (I used ?). The code to do 1 and 2 is here:
class Game_Actor < Game_Battler attr_accessor :gender attr_accessor :age alias bg_genderage_initialize initialize def initialize(actor_id) #Set the default age and gender @gender = "?" @age = "?" #Call the aliased function bg_genderage_initialize(actor_id) #Read the gender notetag for the current actor $data_actors[actor_id].note[/<Gender:\s*(\w+)>/im] if $1 and $1 != "" @gender = $1 end #Read the age notetag for the current actor $data_actors[actor_id].note[/<Age:\s*(\w+)>/im] if $1 and $1 != "" @age = $1 end endend
Put it in a new script in your materials section, if you wish to use it. Terms of use, do whatever you want with it, as I wrote it for notetag reading practice. You also gain the ability to read in the age if you wish to use that!
3: Add a command to draw the gender in the appropriate spot. I used Yanfly Menu engine so my code will not work for you I'm afraid, maybe someone else can help with that?
I think Mr bubbles might also have a script for this too though?
It's more than the core script, I added it onto the Menu engine completely. That's why I didn't post all of the code, just the part that will work for you. As it is what I did post will read in a gender value, but not display it on screen.
Unfortunately, I don't know how to display it on the status screen like you want (in my game I put it on the party screen). Maybe another scripter can pick it up from here and display the symbol or the letter for the gender?
Edit: Here is what it looks like in my game, if curious. It isn't quite what you asked for though.
It's more than the core script, I added it onto the Menu engine completely. That's why I didn't post all of the code, just the part that will work for you. As it is what I did post will read in a gender value, but not display it on screen.
Unfortunately, I don't know how to display it on the status screen like you want (in my game I put it on the party screen). Maybe another scripter can pick it up from here and display the symbol or the letter for the gender?
Do not consider using an entire engine just to get one symbol to display on your screen.
The snippet provided is simply to register an actor as being male or female. It has nothing to do with displaying anything on the screen. You could go ahead and add that to your game if you want, and set up the notes, but you will need another script in order to display it on the status screen.
Be patient and wait for someone to come by who can write the script that you need.
Do not consider using an entire engine just to get one symbol to display on your screen.Be patient and wait for someone to come by who can write the script that you need.
I planned on reading up on it first anyway, and judging by some responses, it messed up some areas, so I don't think I'd want that to happen, as I've been working on this since May 24th.
What Shaz said. I'm hoping what I posted here someone can edit to work on the default engine for you. All they should need to do is edit part two (I just posted part two in my first post so both parts are there) a little. Or, if you know scripting, feel free to use this as a base and edit to make it work for you.
What Shaz said. I'm hoping what I posted here someone can edit to work on the default engine for you. All they should need to do is edit part two (I just posted part two in my first post so both parts are there) a little. Or, if you know scripting, feel free to use this as a base and edit to make it work for you.
it's probably just a matter of modifying the appropriate window (I don't have it in front of me, so can't be sure, but it's probably something like Window_ActorStatus or Window_Status) and instead of drawing a letter, call the draw_icon method with the correct icon index based on whether you have a M or F in the actor's gender variable. And then you'd need to get the appropriate graphic for each gender and save that into your icon file.
Just wait. I'm sure someone will give you the right script within 24 hours. It'll only be a few lines.
To prepare, you could modify your iconset now and add the two icons, and provide the index for each one. Then whoever does the last of the script for you will be able to give you a complete script, and you won't even have to modify it to show the correct icons.
it's probably just a matter of modifying the appropriate window (I don't have it in front of me, so can't be sure, but it's probably something like Window_ActorStatus or Window_Status) and instead of drawing a letter, call the draw_icon method with the correct icon index based on whether you have a M or F in the actor's gender variable. And then you'd need to get the appropriate graphic for each gender and save that into your icon file.Just wait. I'm sure someone will give you the right script within 24 hours. It'll only be a few lines.To prepare, you could modify your iconset now and add the two icons, and provide the index for each one. Then whoever does the last of the script for you will be able to give you a complete script, and you won't even have to modify it to show the correct icons.
I have added the gender icons, I figured that it'd be necessary to add this feature since my friends were a bit confused about which characters were which gender.
There are people out here with amazing knowledge, far more able than I am. I could do this for you, but someone else will very likely not only finish before I do, but think of an easy way that makes my hilarious coding look hilarious.
There are people out here with amazing knowledge, far more able than I am. I could do this for you, but someone else will very likely not only finish before I do, but think of an easy way that makes my hilarious coding look hilarious.
What index do you have for the male and female icons? I kind of said you could use up the time adding them and stating their index/ids so whoever wrote the script could put that in and you wouldn't have to edit it.
Created it in a vanilla project, so it's fine with defaults but may have issues with custom scripts.
Anyway, you need to edit the index IDs (as Shaz said) to appropriate icons as I didn't see any in the default Icon list.
(The ones listed will only be good for a laugh if anything.)
Just go to the lines that denote the icons and make your changes.
After that, you need to tag male actor noteboxes with:
<gender:male>
and female actors with
<gender:female>
Let me know if I missed something and I'll try to explain it better.
module RPG
class Actor < BaseItem
def gender
@gender = nil
if self.note.include?("")
@gender = "Male"
elsif self.note.include?("")
@gender = "Female"
else
@gender = nil
end
return @gender
end
end
end
class Window_Base < Window
def draw_actor_nickname(actor, x, y, width = 180, g)
change_color(normal_color)
draw_text(x, y, width, line_height, actor.nickname)
draw_icon(g, x + width, y, true)
end
end
class Window_Status < Window_Selectable
def draw_block1(y)
if $data_actors[@actor.id].gender == "Male"gen_icon = 152 # Icon for Male Characters
elsif $data_actors[@actor.id].gender == "Female"
gen_icon = 52 # Icon for Female Characters
else
gen_icon = 0 #Icon for genderless / other characters
end
draw_actor_name(@actor, 4, y)
draw_actor_class(@actor, 128, y)
draw_actor_nickname(@actor, 288, y, gen_icon)
end
end
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.