Jump to content

Recommended Posts

Posted (edited)

Just sharing something I learned about Subtitle Translator MCU's and want to share it if it helps anyone else avoid this mistake....

 

I've been making this "interactive playground" mission that spawns specific A/C types when triggered by small check zones placed around the map, marked on the GUI with icon translators.  So after takeoff you can go dogfight with specific aircraft types by going each specific area and crossing the little check zone to trigger some targets for that area.  The idea being that it would be a "playground" used for familiarization flights to learn new aircraft and practice against different targets and scenarios in one long flight (U/L ammo is on).   There's much more to it than that (ground and ship targets that can be spawned, etc) and it's actually turning out to be pretty cool (if I do say so myself). Learning A LOT!!!! 

 

Each check zone utilizes the 4-way random trigger switch provided in the tutorial and examples to spawn either one or multiple enemy A/C at different skill levels to go up against, to make the practice fights less predictable. And for each result a Subtitle Translator is used to let you know what aircraft have spawned.

 

So anyway...I've spent the last week and a half troubleshooting this weird problem wherein the subtitle translator messages would not show up for my 3rd and 4th random results that spawned a mix of planes, like "1 Spitfire Vb & 1 Spitfire IX Inbound!" or "2 I-16's & 1 Mig 3 Inbound!".   The subtitle translator MCU's for the first two results worked just fine, and were set up the same way!  So I've been trying all kinds of different approaches: target links from timer triggers, message links from the aircraft spawn events, delays, looking at resource or slowdown issues, etc.

 

So the problem is now so obvious and some of you may have already spotted it:  That damn "&" (ampersand) symbol was the culprit, and didn't break the first two subtitle translators since it wasn't in their messages.   It makes all kinds of sense now, since it's a reserved character used for encapsulation (at least, in XML it is).  But when used in the text for a subtitle translator, it will cause the message to not be displayed.  I don't consider it a bug, just something I should have thought through and figured out a week and a half ago!  Removed it, works like a charm!

 

Sometimes it's the little things!  ?

 

 

Edited by Stoopy
  • Like 1
  • Thanks 1
  • Upvote 2
Posted

Nice catch Stoopy. I'll add some character-related troubleshooting topics (or notes in existing topics) to the editor manual.

 

Another character problem I have seen is that you cannot open a mission in the editor if you include an apostrophe (and possibly other punctuation marks) in file names, MCU names, object names, etc.

  • Thanks 1
Posted (edited)

Thanks!  If you are going to do that (which would be great) here are two other things I noticed with aberrant behavior in text within translator subtitle MCU's:

  1. Using the "<" (left angle bracket) would cause truncated messages (anything after it would not show). Also applies to HTML formatting stuff like even <br>.
  2. Using extended character sets (for instance "" to replace the left angle bracket) works, but when you edit the mission again and look at the text in the subtitle translator MCU advanced properties, it will be replaced with a question mark (?).  Apparently the ME doesn't know how to display it in the dialogue box and replaces it with a question mark (as in "unknown character").  However, the original extended ASCII character will be preserved in the mission binary in subsequent re-saves, so it's no biggie.  Although I haven't tested to see what happens if you edit that translator subtitle and re-save... there's always the small possibility that the ME might then re-evaluate whats in the message string and overwrite the original extended character with a question mark.

This all came about because I set this playground up so that you could taxi straight ahead and trigger a takeoff/formation command for some AI fighters parked nearby to fly with you,  or you can turn left out of the parking area and it will then delete those planes so you can fly solo.  I got kinda anal retentive about how I wanted the in-cockpit helper message describing that at the start of the mission to look, and it just had to have directional arrows in the text. 

Edited by Stoopy
Leon_Portier
Posted (edited)

Thanks man! Avoiding symbols in the SubTrans seems like a good practice.

Edited by [N.O.G.F]Leon_Portier
Posted

Yup!  And that's a much better, succinct way to say it than I did!  

 

Posted
3 minutes ago, Stoopy said:

Thanks!  If you are going to do that (which would be great) here are two other things I noticed with aberrant behavior in text within translator subtitle MCU's:

  1. Using the "<" (left angle bracket) would cause truncated messages (anything after it would not show). Also applies to HTML formatting stuff like even <br>.
  2. Using extended character sets (for instance "←" to replace the left angle bracket) works, but when you edit the mission again and look at the text in the subtitle translator MCU advanced properties, it will be replaced with a question mark (?).  Apparently the ME doesn't know how to display it in the dialogue box and replaces it with a question mark (as in "unknown character").  However, the original extended ASCII character will be preserved in the mission binary in subsequent re-saves, so it's no biggie.  Although I haven't tested to see what happens if you edit that translator subtitle and re-save... there's always the small possibility that the ME might then re-evaluate whats in the message string and overwrite the original extended character with a question mark.

This all came about because I set this playground up so that you could taxi straight ahead and trigger a takeoff/formation command for some AI fighters parked nearby to fly with you,  or you can turn left out of the parking area and it will then delete those planes so you can fly solo.  I got kinda anal retentive about how I wanted the in-cockpit helper message at the start of the mission to look, and it just had to have directional arrows in the text. 

 

Thanks for the additional information.

 

I'm looking forward to seeing your "BoX Sandbox" when you are done. A multiplayer version would be great too.   :salute:

Posted
1 minute ago, JimTM said:

 

Thanks for the additional information.

 

I'm looking forward to seeing your "BoX Sandbox" when you are done. A multiplayer version would be great too.   :salute:

 

Sure thing!  I'll post it with a description and stuff.  There's just this one thing I gotta tweak a little (I suppose it's normal with the ME to keep telling yourself that for days on end?).   

  • Upvote 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...