The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.12 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Editor Map and all related files stored in 1 map folder (or file)
#1
I noticed that to show text I made for map and my game language is set to English I need to wrote all that text in Localizations/English/English.xml file. It means I need to place custom text for map along with all other texts made in English for all game elements. It may cause some troubles if I want to have many maps imported from other map authors that includes custom text messages for their map in scripts, especially if it comes to make text in specific language or more language than one - I couldn't just simply replace someone's English.xml to English.xml placed in game Localizations directory - I could lose text made for other maps this way - I would need to copy text from someone's English.xml to English.xml placed in Localizations directory.

To solve that problem what if if each map could have it's own folder in which all related to map files could be stored there and each localization could be stored in it's separate file?
So for my map named "asdf" (in which I made texts in English and Polish language) after saving the map game would generate folder named ../Media/Maps/asdf and it would contain files like:
  • ../Media/Maps/asdf/asdf.data;
  • ../Media/Maps/asdf/asdf.xml;
  • ../Media/Maps/asdf/asdf_localizations.xml (here is the list of languages for that map) - however maybe it could be included in asdf.xml instead?;
  • ../Media/Maps/asdf/English/asdf_EN_text.xml (stores texts wrote in English language, only players with English language chosen in launcher settings can see texts from there, however if someone plays Dwelvers in i.e. Chinese language than game should make English as default (because there's no .xml wrote in Chinese like asdf_CN_text.xml), so for map that haven't texts in Chinese localization will load texts from default English localization so in case of "asdf" map from asdf_EN_text.xml);
  • ../Media/Maps/asdf/Polish/asdf_PL_text.xml (stores texts wrote in Polish, which can be shown for this map in game only for those who have Polish language set in their game settings);
  • ../Media/Maps/asdf/Polish/asdf_scene1speech1_PL.ogg (custom sound/music), asdf_scene1speech2_PL.ogg, etc.

In the asdf.xml texts could be loaded for English language from asdf_EN_text.xml and for Polish language from asdf_PL_text.xml so in asdf.xml you would just need to write a text like:
Code:
<localization option="English" action type="subs_scene_1" message="map:asdf:subs_scene_1:something_1" duration="x.y"/>
<localization option="Polish" action type="subs_scene_1" message="map:asdf:subs_scene_1:something_1" duration="x.y"/>
That means that game will search for a file that have localization option="English" (so asdf_EN_text.xml file) and localization option="Polish" (asdf_PL_text.xml file), so map will only show text in English or Polish language for that particular scene, but only if files for both languages are stored in Media/Maps/asdf/English and Media/Maps/asdf/Polish consecutively. This way it would be far more easier to download and play maps uploaded in Steam Workshop - all files in one folder.
Spec: Win 10, ATI 7800 HD, res: 1280x1024x75. I support The Venus Project & Resource-Based Economy
Reply


Messages In This Thread
Map and all related files stored in 1 map folder (or file) - by Sebt - 11-02-2018, 03:44 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)