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



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Language Files in Dev Mode
triadtimes Offline
Senior Member

Posts: 508
Threads: 16
Joined: Jan 2011
Reputation: 21
#1
[SOLVED] Language Files in Dev Mode

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:

Spoiler below!

<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!

#include "helper_imgui_urban.hps"

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?

(This post was last modified: 09-30-2015, 12:18 AM by triadtimes.)
09-28-2015, 04:26 AM
Find


Messages In This Thread
[SOLVED] Language Files in Dev Mode - by triadtimes - 09-28-2015, 04:26 AM
RE: Language Files in Dev Mode - by Romulator - 09-28-2015, 06:33 AM
RE: Language Files in Dev Mode - by triadtimes - 09-28-2015, 06:38 PM
RE: Language Files in Dev Mode - by triadtimes - 09-29-2015, 06:10 PM
RE: Language Files in Dev Mode - by triadtimes - 09-30-2015, 12:16 AM



Users browsing this thread: 1 Guest(s)