09-28-2015, 04:26 AM
This issue has been solved, please look below if you are having trouble setting up a dev environment with .lang files.
--------------------------------------------------------------------------
I'm wondering if anyone knows how extra language files are used for custom maps in dev mode.
I created a map with a terminal in it, I made a file called english.lang and tried putting it in ...\SOMA\mods\my_mod\config\lang_main. The file looks like this:
The bit of code for the terminal in my map looks like this:
When I load the map from the mod launcher and use the terminal my text will show up but not the "default" text like From, Subject, Date, Inbox, Drafts, or Sent. Picture.
When I load from the SomaDev.bat and use the terminal I get the default text, but not my own. Picture.
I noticed in Dev mode it tells me it can't find the language file category "Emails". I also found the UrbanGUI category in the main english.lang, copying that over fixed the first issue. I guess what I need help with is getting dev mode to load up or recognize my own english.lang from the mods directory. Any ideas?
--------------------------------------------------------------------------
I'm wondering if anyone knows how extra language files are used for custom maps in dev mode.
I created a map with a terminal in it, I made a file called english.lang and tried putting it in ...\SOMA\mods\my_mod\config\lang_main. The file looks like this:
Spoiler below!
Code:
<LANGUAGE>
<CATEGORY Name="Emails">
<Entry Name="GUI_EMAIL_SEND">SEND EMAIL</Entry>
<Entry Name="GUI_MENU_INBOX">INBOX</Entry>
<Entry Name="GUI_MENU_DRAFTS">DRAFTS</Entry>
<Entry Name="GUI_MENU_SENT">SENT</Entry>
<Entry Name="GUIMailWindow">triadmail 2.0</Entry>
<Entry Name="GUIMailASimon">triadtimes@email.net</Entry>
<Entry Name="GUI_EMAIL_SUBJ1">Test Subject</Entry>
<Entry Name="EMAIL_1_FROM">Statyk</Entry>
<Entry Name="EMAIL_1_SUBJ">Test Subject</Entry>
<Entry Name="EMAIL_1_DATE">27 September 2015</Entry>
<Entry Name="EMAIL_1_BODY">Test</Entry>
</CATEGORY>
</LANGUAGE>
The bit of code for the terminal in my map looks like this:
Spoiler below!
Code:
#include "helper_imgui_urban.hps"
Code:
void Laptop_OnGui(const tString&in asEntityName, float afTimeStep)
{
UrbanGui_Unbranded_DrawBackdrop(1.0f);
UrbanGui_PACE_DrawDesktopIcons(2.0f);
ImGui_SetTransCategory("Emails");
Depth_ImGui_AddMail("GUI_EMAIL_SUBJ1", "EMAIL_1_BODY", "EMAIL_1_FROM", "EMAIL_1_DATE", eMailAppEntryType_Inbox);
UrbanGui_MailApp("GUIMailASimon", "MailSent_ApartmentEmail", "Mail_SelectionChanged");
}
When I load the map from the mod launcher and use the terminal my text will show up but not the "default" text like From, Subject, Date, Inbox, Drafts, or Sent. Picture.
When I load from the SomaDev.bat and use the terminal I get the default text, but not my own. Picture.
I noticed in Dev mode it tells me it can't find the language file category "Emails". I also found the UrbanGUI category in the main english.lang, copying that over fixed the first issue. I guess what I need help with is getting dev mode to load up or recognize my own english.lang from the mods directory. Any ideas?