[MAPINFO] New format incapable of writing multi-line strings

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

[MAPINFO] New format incapable of writing multi-line strings

Post by Phobus »

Specifically I mean exittext and entertext. The old format allowed for this particularly easily. However, trying with the new format, I've been incapable of getting the desired result. In fact, here's a list of the results I got:

1) A MAPINFO error that only really told me where the problem was
2) All the text displaying on one line, running off the side of the screen
3) Only the first or last line being displayed (with errors being a high possiblity)

And I've tried the following layouts and styles:

1) Doing it the same way as the old format - both with and without the equals sign (I believe this results in an error due to an unended string)
2) Closing each line between speech marks, but otherwise the same as above (I think this one gives you the first line being displayed and/or errors)
3) Having "exittext =" on each line of the exittext, in the same style as above (This results in the last line being the only one written)
4) Having it all on one line, with each line being seperated with \n (This results in all the text, and the \ns, displaying on one line, off the side of the screen)
5) Doing the same as 2) and 1) but with \n at the end of each line - same results as before.
6) Checking the wiki and zdoom.pk3 for working examples. There are none. The closest you can get is using LANGUAGE to write your exit/enter text, and then referencing that with MAPINFO, but I was rather hoping for an in-lump solution
7) Giving up and reconverting back to the old format (this works, but is unsatisfactory as I don't know what is and isn't supported in the old format when compared to the new - nor do I know what I'll need in the future)

Likewise, the MAPINFO styles can't be mixed (no big surprises there), so this did mean converting everything back.

So what I want to know is, am I doing it wrong? Is there a right way to do this? If so, how? Or is it a bug or overlooked lack of feature that needs fixing? I've already seen possible evidence of this problem affecting another mod in this weeks /newstuff, so I am genuinely intruiged.
User avatar
Enjay
 
 
Posts: 27114
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [MAPINFO] New format incapable of writing multi-line strings

Post by Enjay »

This is an example output from Graf's MAPINFOCONV tool (sticky thread in the editing forum)

Code: Select all

cluster 38
{
	flat = FLAT14
	music = D_RUNNI2

	entertext = "There is a troublesome little area",
		"in the Red Giant Net we need you to",
		"deactivate.",
		"",
		"Find the main switch and shutdown ",
		"the sector."
	exittext = "You jump into the data port and ",
		"are immediately transported back ",
		"to your BGPA county house.",
		"",
		"The Red Giant Sector is deactivated.",
		"",
		"Well done."
}
In the thread for that tool I also posted a snippet of code from how I had worked out how to do it before the tool was available. It is slightly different but works. The above example is, presumably, the official way to do it though.
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

Re: [MAPINFO] New format incapable of writing multi-line strings

Post by Phobus »

Commas eh? Who'd have thought...

Thank you Enjay - guess I should search the forums a bit before asking for help.

Reconverting time!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [MAPINFO] New format incapable of writing multi-line strings

Post by Graf Zahl »

It was the only option considering that the parser does not like line feeds in string literals.
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

Re: [MAPINFO] New format incapable of writing multi-line strings

Post by Phobus »

That's fair enough. My main concern was that there was no obvious examples on how to do it properly, given that it wasn't an obvious guess.
Locked

Return to “Editing (Archive)”