Home   Help Search Login Register  

Author Topic: Stringtable Text Color?  (Read 1394 times)

0 Members and 1 Guest are viewing this topic.

Offline mboshell

  • Members
  • *
Stringtable Text Color?
« on: 14 Apr 2010, 11:53:40 »
Hi, I would like to know if it's possible to change the color of certain words in the text of a stringtable.csv file.  What I want to do is display the name of the person talking in a different color than the text.  For example...

Anderson: We've got to flank that machine gun!

I guess the forum doesn't allow us to change colors, but what I'm looking for is "Anderson" to be colored so the player is able to easily distinguish that it is the name of the person speaking and not what is being said.

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Stringtable Text Color?
« Reply #1 on: 14 Apr 2010, 18:49:28 »
I don't think it's possible to define text color in the stringtable. As far as I know the stringtable is mostly for ease of translation into other languages. If you only intend your mission to be in English, I don't think you really need one.

Anyway, there is definitely a way to get colored text in your mission. I haven't done it, but I'm 99% certain that the way is to use custom resources, specifically custom titles. General Barron wrote a tutorial here.

Good luck. :good:

EDIT: I just realized that custom titles may only allow one color for a given set of titles. Experiment around a little to be sure, but if that's the case, suggestions:

(1) See if there's a way to "stack" the custom titles one on top of the other, so it looks like:

Anderson:
We've got to flank that machine gun

(2) Use a custom object instead of custom text. A custom object might take up more of the field of view, though.

(3) But frankly, if I were you I'd just put the persons name in all caps.

ANDERSON: We've got to flank that machine gun!

I don't think anyone would nitpick. :D
« Last Edit: 14 Apr 2010, 19:01:40 by RKurtzDmitriyev »
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline mboshell

  • Members
  • *
Re: Stringtable Text Color?
« Reply #2 on: 14 Apr 2010, 22:22:20 »
Thanks Rkurtz!  That will do the trick.  Not sure if I will just make the persons name in all caps, stack it on top, or both, but either way it should satisfy what I'm looking for. 

I do intend for my missions to be only english, but I expect Europeans to play who may not understand the voiceovers very well as they will be done with american english, where we say things lazily such as uh machine gun instead of a machine gun for example, so the text will be there so anyone who speaks any English should be able to understand what is being said.

Thanks again :)

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Stringtable Text Color?
« Reply #3 on: 14 Apr 2010, 23:53:09 »
Good thinking, but I doubt you still need a stringtable. Just type the text into the relevant commands. E.g.,

Code: [Select]
titleText ["ANDERSON: We've got the flank that machine gun","plain down"]

will give you titles on the bottom saying Anderson's line. It's exactly like trigger => effects => text. No need to prepare anything in the stringtable or description.ext .

EDIT: Or maybe you're preparing the description.ext for your custom voice files and you're wondering what to put in for "titles." You can still simply type the necessary text in there, though. (I believe it needs to be inside of quotation marks).
« Last Edit: 15 Apr 2010, 00:00:24 by RKurtzDmitriyev »
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Stringtable Text Color?
« Reply #4 on: 15 Apr 2010, 02:16:36 »
I would recommend using the stringtable for the simple purpose of easy future editing. Its simple to implement and saves loads of headache by eliminating the need to search for texts when something needs correcting. Aside from that, it makes it easy for others to add their language to it if they feel like it.

Offline mboshell

  • Members
  • *
Re: Stringtable Text Color?
« Reply #5 on: 15 Apr 2010, 02:29:21 »
Good point SavedbyGrace.  I notice that it's very helpful to put all of the dialogue in the stringtable first, then practice from that before recording the voiceovers.