Reversed Text

Status
Not open for further replies.

Diretooth

Lv. 25 Werewolf
Veteran
Joined
Mar 10, 2013
Messages
1,231
Reaction score
444
First Language
English
Primarily Uses
RMMV
Okay, I'm looking for a way to make text in VX Ace reversed, as in the text itself is horizontally mirrored.

I want this done without a script preferably.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I want this done without a script preferably.
haha - that's funny :D


What "text"? Messages? Menus? A picture?


It's easy to reverse a picture. Anything else will require a script.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Reversed text is not built-in Ace functionality.
 

Diretooth

Lv. 25 Werewolf
Veteran
Joined
Mar 10, 2013
Messages
1,231
Reaction score
444
First Language
English
Primarily Uses
RMMV
Aww... I was hoping that I didn't have to rely on a script for what I need. They oftentimes don't work right until someone explains the moon logic behind them.

Anyway, what scripts are there that can achieve this? Which one is the simplest to use?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You answer my questions, and I'll answer yours.


AFAIK, there IS no script that can achieve it. You will have to get a custom one made. (which is why I asked you those questions).


Moving to RGSS3 Script Requests
 
Last edited by a moderator:

Diretooth

Lv. 25 Werewolf
Veteran
Joined
Mar 10, 2013
Messages
1,231
Reaction score
444
First Language
English
Primarily Uses
RMMV
Okay, I'll try to be as specific as possible for what I need. What I need is the ability to reverse the text in the text-box for dialogue. (The Show Text button.) Have it to where by typing \* in the text box, all text after reverses and by typing \- it stops the effect, making all text after it act normal. If one can script the text to reverse itself without need for anything else, then that would be perfect.

If anyone has any further questions, I will try to answer them to the best of my ability, and please remember, I need the script to be as easy to use as possible, idiot proof.

I thank any and all scriptwriters in advance.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Please choose which of these is required (list goes from easiest to most difficult):

- individual letters are reversed, but letters and words still appear in the correct order. So DOG would show as a reversed D, then a reversed O, then a reversed G.

- the whole word is spelled in reverse, and letters appear back to front, but the words are still in the same order. So MAD MAN would show as DAM NAM (but each letter is mirrored).

- all text between the start and end of the mirror is flipped around - words are shown in reverse order, spelled back to front, and individual letters flipped. So MAD MAN would show as NAM DAM. I don't even know if this is possible, because if your text goes over multiple lines, it could end up making the text exceed the message box.

Here is a start (it uses the first option - words and letters are in the correct order, but letters are reversed). I'm not sure why it makes it look slightly different.

class Window_Base < Window #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- alias shaz_reverse_text_initialize initialize def initialize(x, y, width, height) shaz_reverse_text_initialize(x, y, width, height) @mirror = false end #-------------------------------------------------------------------------- # * Normal Character Processing #-------------------------------------------------------------------------- def process_normal_character(c, pos) text_width = text_size(c).width if !@mirror draw_text(pos[:x], pos[:y], text_width * 2, pos[:height], c) else dummy = Bitmap.new(text_size(c).width, text_size(c).height) dummy.font = contents.font.clone dummy.draw_text(0, 0, dummy.width, dummy.height, c) contents.blt(pos[:x], pos[:y], dummy, Rect.new(dummy.width - 1, 0, -dummy.width, dummy.height)) dummy.dispose end pos[:x] += text_width end #-------------------------------------------------------------------------- # * Destructively Get Control Code #-------------------------------------------------------------------------- def obtain_escape_code(text) text.slice!(/^[\$\.\|\^!><\{\}\*\\]|^[A-Z]+/i) end #-------------------------------------------------------------------------- # * Control Character Processing # code : the core of the control character # e.g. "C" in the case of the control character \C[1]. #-------------------------------------------------------------------------- alias shaz_mirror_text_process_escape_character process_escape_character def process_escape_character(code, text, pos) shaz_mirror_text_process_escape_character(code, text, pos) case code.upcase when '*' mirror_text end end #-------------------------------------------------------------------------- # * Mirror Text #-------------------------------------------------------------------------- def mirror_text @mirror = !@mirror endend
This also works in the help window (so you can reverse text in descriptions), but not in lists (names of items, skills, etc).

Use \* to turn it on, and \* to turn it off again. Since it's just a toggle, you don't need two separate codes.
 
Last edited by a moderator:

Diretooth

Lv. 25 Werewolf
Veteran
Joined
Mar 10, 2013
Messages
1,231
Reaction score
444
First Language
English
Primarily Uses
RMMV
You've got the right idea. But I need it to look a bit like this: Example.png

I also love the toggle thing, makes everything so much easier!

EDIT: I can make it work by reversing the order of the text I need flipped. All I need to do, for example is use 'Dog' on one end and 'goD' on the other, and what I'm planning will work perfectly.

Thank you, Shaz. I appreciate the script.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Awesome! I COULD have done that for you, but it would been a bit more difficult and invasive.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
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.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top