Advertisement
Fomar0153

Fomar0153 - Face Macros (compatibility)

Jun 23rd, 2013
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. =begin
  2. Face Macros (compatibility)
  3. by Fomar0153
  4. Version 1.0
  5. ----------------------
  6. Notes
  7. ----------------------
  8. Allows you to add text to the beginning of a message based
  9. on the face being used.
  10. ----------------------
  11. Instructions
  12. ----------------------
  13. This script should go below any custom message systems.
  14.  
  15. To add a macro do:
  16. FACE_MACROS['Face_name'] = []
  17. The 0th index is the default for that whole sheet
  18. and then the 1st to 8th indexes are specifically for
  19. certain faces on the sheet.
  20. So:
  21. FACE_MACROS['Face_name'][0] = 'some text'
  22. Please use single quotes (')
  23. ----------------------
  24. Known bugs
  25. ----------------------
  26. None
  27. =end
  28.  
  29. class Window_Message < Window_Base
  30. #--------------------------------------------------------------------------
  31. # * Face Macros
  32. #--------------------------------------------------------------------------
  33. FACE_MACROS = {}
  34. FACE_MACROS['Actor4'] = []
  35. FACE_MACROS['Actor4'][1] = '\c[1]\n[1]: '
  36. FACE_MACROS['Actor1'] = []
  37. FACE_MACROS['Actor1'][1] = '\c[2]Ralph: '
  38. #--------------------------------------------------------------------------
  39. # * Add the macro text
  40. #--------------------------------------------------------------------------
  41. alias compat_convert_escape_characters convert_escape_characters
  42. def convert_escape_characters(text)
  43. if FACE_MACROS[$game_message.face_name] != nil
  44. if FACE_MACROS[$game_message.face_name][$game_message.face_index + 1] != nil
  45. text = FACE_MACROS[$game_message.face_name][$game_message.face_index + 1] + text
  46. else
  47. text = FACE_MACROS[$game_message.face_name][0] + text
  48. end
  49. end
  50. return compat_convert_escape_characters(text)
  51. end
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement