PDA

View Full Version : Extra blank spaces in Story entries names are removed after save/load of campaign



Valyar
March 2nd, 2019, 18:44
After the new indentation was introduced for the reference manual and Author extension was updated, I started using the feature but notices very annoying bug, that wastes a lot of time when using the GUI to add content:


If there are blank spaces in the title of a Story entry (such as 0.0 Intro, 0.1 One Space, 0.2 Three space, etc.), after the game is loaded, those are gone and it resets to the standard 1 space between characters.


This affects my current projects using CoreRPG as base set. Is this bug or feature? If feature it is severely impacting at least what I do and the way I use blank spaces - to organize visually the content of Story Entries (not just numbers).

Mister Smith
March 3rd, 2019, 11:44
I have had the same issue

Moon Wizard
March 3rd, 2019, 23:22
Some questions:

* When does this happen? Does it happen between campaign sessions on stories, or only when exporting with the Author extension, or something else?
* Does it happen with the author extension disabled?

Regards,
JPG

Valyar
March 4th, 2019, 05:40
Yes, this happens without any extension. I tested on empty campaign with CoreRPG loaded only. I have 100% success in reproducing this every ti

1. I do data entry in Story tab. Everything is OK until I exit the campaign/program.
2. After I load the campaign, the story entries are "normalized", without extra spaces between the leading numbers and the rest of the text.

I did further troubleshooting on this issue, and opened the .xml file with baretail to monitor what is going on. This is the initial code and the content of the XML database after I saved the campaign and exited the game/program.


<encounter>
<id-00001>
<name type="string">0.0 Chapter</name>
<text type="formattedtext">
<p>Chapter</p>
</text>
</id-00001>
<id-00002>
<name type="string">0.1 Sub Chapter</name>
<text type="formattedtext">
<p></p>
</text>
</id-00002>
<id-00003>
<name type="string">0.2 Sub Chapter</name>
<text type="formattedtext">
<p></p>
</text>
</id-00003>
<id-00004>
<name type="string">0.2.1 Sub Chapter</name>
<text type="formattedtext">
<p></p>
</text>
</id-00004>
<id-00005>
<name type="string">0.2.2 Sub Chapter</name>
<text type="formattedtext">
<p></p>
</text>
</id-00005>

When I open the campaign/program again... the GUI does not display those extra spaces at all even though the code still has them in the XML db! The XML database is not modified until I save the campaign again, when it is normalizes the content to the code below, no extra spaces. So it seems that there is something in the rendering engine that is cleaning up those extra spaces, similar to the trim lead/trailing space line operations in Notepad++ for example... to make things pretty maybe. After the campaign is saved either manually/on exit/on the timer the changes are committed to the db:


<id-00001>
<name type="string">0.0 Chapter</name>
<text type="formattedtext">
<p>Chapter</p>
</text>
</id-00001>
<id-00002>
<name type="string">0.1 Sub Chapter</name>
<text type="formattedtext">
<p></p>
</text>
</id-00002>
<id-00003>
<name type="string">0.2 Sub Chapter</name>
<text type="formattedtext">
<p></p>
</text>
</id-00003>
<id-00004>
<name type="string">0.2.1 Sub Chapter</name>
<text type="formattedtext">
<p></p>
</text>
</id-00004>
<id-00005>
<name type="string">0.2.2 Sub Chapter</name>
<text type="formattedtext">
<p></p>
</text>
</id-00005>