Campain Editor saves text in Escape coded format (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support



Message


Reg -> Campain Editor saves text in Escape coded format (3/30/2018 2:46:16 AM)

Hi,

I have noticed that text entered into the Campaign Editor (see Fig 1 below) is saved as escape coded format in the .campaign file.

This results in the descriptions being displayed with HTML tags as per Fig 2.

When the scenario is reloaded into the campaign editor, the text in the editor description box is same as fig 2 (with HTML tags) and the source code is escape coded format as per Fig 3. The saved code being escape coded format can be confirmed by examining the .campaign file with a text editor.

Not only is the text source converted to escape coded format on save, the editor also embeds illegal parameters that upset the game menu when converted to HTML tags.

The scenario descriptions when launched from the campaign menu display correctly.

The work around is to edit the .campaign file with a text editor to remove the illegal parameters and manually convert the escape coded format code to HTML (as per Fig 2) which then displays correctly.

Could the Campaign Editor be updated to fix this??

(Build 998.7)


[image]local://upfiles/446/056267EE70D2415680AF5581C6DEAEB1.gif[/image]




Eggstor -> RE: Campain Editor saves text in Escape coded format (3/30/2018 3:34:25 PM)

Another workaround is the way the devs have done the DLC campaigns:

- Save the intro as a HTML file (e.g. for the Chains of War DLC, ChainsofWarIntro.html)
- In the .campaign file, make a call to that HTML file (e.g., in Chains of War.campaign, "<Description>[LOADDOC]ChainsofWarIntro.html[/LOADDOC]</Description>"). I think, but am not positive, that, once you have the HTML file, you could type the the text between/including [LOADDOC] and [/LOADDOC] in the Title And Description window and save the .campaign file.

That also allows you to use CSS to style the description.

As an aside, the Strike Tutorial is the first time that I'm aware of someone other than the devs tried to make a campaign, and the process was a bit, shall we say, challenging.

Edit - If you don't have an HTML editor (or you don't want to deal with the bloat of saving a Word document as HTML), once you set up the text in the Title And Description window, open up the "Edit HTML Source" window, copy it into Notepad, and save as a HTML file (either .htm or .html should work - make sure the ending extension is not .txt).




Reg -> RE: Campain Editor saves text in Escape coded format (3/31/2018 3:26:25 AM)


Thanks for replying. [:)]

I had worked out about the use of external HTML files by examining the DLC as you said but I was hoping to keep things simple without additional files for trivial cases like tutorials. It's a bit of a trap having editing features that don't work as expected but now that we are aware of them we can work within those constraints.





michaelm75au -> RE: Campain Editor saves text in Escape coded format (3/31/2018 5:06:27 AM)

The campaign Description is being treated as XML rather than Text on loading from a save. I have changed it to be Text which is the same type as the campaign 'Ending Text' (which is showing correctly).




Reg -> RE: Campain Editor saves text in Escape coded format (3/31/2018 10:57:41 PM)


Excellent.

Thanks a million Michael. [&o] [&o]





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.671875