Script Request: Replace template face/sprite sheet with another depending on gender/class (include e

Discussion in 'RGSS3 Script Requests' started by Indrah, Oct 25, 2014.

  1. Indrah

    Indrah Megane Berserker Veteran

    Messages:
    2,073
    Likes Received:
    2,032
    Location:
    Spain
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Premise: I’m working in a game where you can choose your gender and class, and I’d like to use a single face (emotions included) and spirte (if possible supporting poses) per character to automate the replacement of the template graphics with others without constant conditional branches using gender/class (switches and variables are fine).

    I’m already using Fomar’s Face Macro script (so that use of Face=text format (in this case it displays their namebox and colours their text).

    What I want is to use a template graphic sheet (faces or sprites) and for the game to automatically replace those graphics with others depending on switches/variables/classes (whichever works best).

    That would meant that if I made a textbox with the Emotion “smile”, it would display two different faces depending on gender, and further on (not as vital, but it would be ideal) class. The idea is that during editor work and eventing I would use the template rather than a million conditional branches.

    I am ok with layered pictures or similar being used (adding a face or sprite sheet to the template) if that would be easier to implement (as long as it looks fine).

    It cannot depend on Equipment tho, which is the closest thing I’ve been able to find; and in any case it does not support gender variants portraying faceset emotions.

    So in summary: there would be Template sheets: TemplateFaceA and B (2) ideally to support a wide away of emotions and TemplateSprite with poses if possible; and then Variant sheets using all the same positions but with different graphics that replace the templates.

    The changes would be determined by switches or variables (in effect graphics change by chosen gender and (ideally, if it can be done) class, as each character can advance through different class paths and I’d like to reflect that.

    If I’m making no sense please ask further, I’m not sure if I’m explaining myself well enough. My games are dialog-y and I definitely do not want to plaster conditional branches for every time the main character opens their mouth. And that doesn’t even include class changes >A<

    Example:

    Use “FaceTemplate.png” emotion 2 in a textbox:

      ->If Character is Male (switch Male:on) and Class Pikeman, substitute graphic for “FaceMalePike.png” emotion 2

    ->If Character is Female (switch Female:on)  and Class Swordsman, substitute graphic for “FaceFemaleSword.png” emotion 2

    *Ideally needs to support replacement templates for multiple characters with various classes each (only the main character changes by gender).

    *Must support faces, emotions included (entire faceset) and sprite. Poses in the same spritesheet too, if possible.
     
    Last edited by a moderator: Oct 25, 2014
    #1
  2. nio kasgami

    nio kasgami VampCat Veteran

    Messages:
    8,600
    Likes Received:
    2,358
    Location:
    Canada / Quebec
    First Language:
    French
    Hum... they exist a way for make automatic change like that this will require to modify a little the rtp script but I think this possible 

    for futur people who read this because I can't work on this for the moment I am already press by time 

    Naturally for make such automatic message system script it will require a modifcation in the actor and message part

     so in simple 

    module Indrah_gender_auto_messages¸Face_Name = "Sexy_hero"Path_Index = [ "A", "B"]endclass Game_Messagealias Nio_message_initialize initializedef initializecheck_sexy_hero_face_presentNio_message_initializeendthis what I imagine for the moment
     
    #2
  3. Indrah

    Indrah Megane Berserker Veteran

    Messages:
    2,073
    Likes Received:
    2,032
    Location:
    Spain
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    bump~
     
    #3
  4. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,069
    Location:
    Toronto
    First Language:
    English
    How does the face macro work?

    Does it change the face that is displayed dynamically?

    For example if I wrote

    [FACE=happy]Hey there![FACE=Neutral]How can I help you?Would it change automatically?What is the input for the macros? Is it the name of the file?

    How are genders implemented? Are there multiple actors?
     
    Last edited by a moderator: Oct 29, 2014
    #4
  5. Indrah

    Indrah Megane Berserker Veteran

    Messages:
    2,073
    Likes Received:
    2,032
    Location:
    Spain
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    The face macro fomar made that I'm using: (for now I'm using Yanfly's text system with it, but I don't think that influences things much, as it only adds some simple format options and name boxes)

    =beginFace Macros (compatibility)by Fomar0153Version 1.0----------------------Notes----------------------Allows you to add text to the beginning of a message basedon the face being used.----------------------Instructions----------------------This script should go below any custom message systems.To add a macro do:FACE_MACROS['Face_name'] = []The 0th index is the default for that whole sheetand then the 1st to 8th indexes are specifically forcertain faces on the sheet.So:FACE_MACROS['Face_name'][0] = 'some text'Please use single quotes (')----------------------Known bugs----------------------None=endclass Window_Message < Window_Base  #--------------------------------------------------------------------------  # * Face Macros  #--------------------------------------------------------------------------  FACE_MACROS = {}#example   0= all 1-8 signle face id#  FACE_MACROS['Actor1'] = []#  FACE_MACROS['Actor1'][1] = '\c[2]Ralph:\c '  FACE_MACROS['0-MainA'] = []  FACE_MACROS['0-MainA'][0] = '\\n<\n[1]> '   #--------------------------------------------------------------------------  # * Add the macro text  #--------------------------------------------------------------------------  alias compat_convert_escape_characters convert_escape_characters  def convert_escape_characters(text)    if FACE_MACROS[$game_message.face_name] != nil      if FACE_MACROS[$game_message.face_name][$game_message.face_index + 1] != nil        text = FACE_MACROS[$game_message.face_name][$game_message.face_index + 1] + text      else        text = FACE_MACROS[$game_message.face_name][0] + text      end    end    return compat_convert_escape_characters(text)  endend
    I program a code line for a faceset in the script and it automaticlly comes in use when I use the face. So for example I set up a <facebox>+<text color> display, and when using the faces it displays the box and colors their text. (it can be configured to entire face sheets or single frames).

    The codes work from the editor and are not touched by the textbox input at all as far as I know. I just make a dialog box with the correct face and it does it (I'm not sure if that's what you were asking, sorry).

    Genders would be implemented by a switch/variable changed (only for the main character) at the start of the game. Besides the main character, the other allies would change only depending on their class, which is changed (class advancement) at certain points at the game. [if that proves too fiddly I'm ready to drop class variations as long as I can have gender].
     
    Last edited by a moderator: Oct 29, 2014
    #5
  6. Indrah

    Indrah Megane Berserker Veteran

    Messages:
    2,073
    Likes Received:
    2,032
    Location:
    Spain
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    *bump*
     
    #6
  7. Shaz

    Shaz Veteran Veteran

    Messages:
    37,817
    Likes Received:
    11,523
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    If nobody else does this, I can take a shot at it.


    Can you set up a demo with a single map with EVERYTHING on it that you want the script to cater for, along with the other scripts you're using that will affect this? Then give instructions about who to talk to, and what should be seen during/afterwards.


    I've already got something like this working in my game, but not with as many variations as you have.
     
    #7
  8. Indrah

    Indrah Megane Berserker Veteran

    Messages:
    2,073
    Likes Received:
    2,032
    Location:
    Spain
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    On it. will PM you in a bit when I set it up, thanks \(*3*)/
     
    #8
  9. Evan Finkel

    Evan Finkel Modeling Beholder Veteran

    Messages:
    1,076
    Likes Received:
    320
    @Indrah Where did you find Fomar's Face Macro?
     
    #9

Share This Page