[SOLVED] Language Files in Dev Mode - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: SOMA (https://www.frictionalgames.com/forum/forum-55.html) +--- Forum: User created content (https://www.frictionalgames.com/forum/forum-79.html) +---- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-80.html) +---- Thread: [SOLVED] Language Files in Dev Mode (/thread-31008.html) |
[SOLVED] Language Files in Dev Mode - triadtimes - 09-28-2015 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!
The bit of code for the terminal in my map looks like this: Spoiler below!
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? RE: Language Files in Dev Mode - Romulator - 09-28-2015 Have you got a resources.cfg file pulling information from SOMA's config/lang? RE: Language Files in Dev Mode - triadtimes - 09-28-2015 My resources.cfg file currently looks like: Spoiler below!
I guess I'm having trouble understanding directory paths. In the above, is it based off of the redist folder or the folder my resources.cfg is in? If it's the later, how would I tell it to go back to redist? That aside, my problem might be that my dev environment isn't set up properly. Loading up SomaDev.bat actually doesn't load my map, it loads a blank and from there I load map1.map. Would that make a difference? Relevant part of Dev_user_setting.cfg looks like: Spoiler below!
RE: Language Files in Dev Mode - triadtimes - 09-29-2015 Something that I have also found is that when I reload the game using F5/the debug console terminals act differently. If I reload the game while using SomaDev.bat to test adding or removing emails then the changes will go through, however, if I reload the game using the mod launcher version my changes will not go through until I fully restart the mod. I guess this (and my original issue) is because SomaDev.bat uses the an edited version of the original Soma main_int.cfg and my mod would use it's own main_int.cfg. Maybe the convention for naming files or folders is location specific? e.g. when the original main_int.cfg says BaseLanguageFolder = "config/" it means redist/config/, whereas when my mod's main_int.cfg says BaseLanguageFolder = "config/" it means mymod/config/. Thoughts? EDIT: Just tried changing the settings for SomaDev.bat to point to my mod's main_int.cfg using Code: Soma.exe -user Dev -cfg mods/triad_test/config/main_init.cfg It loaded up a new instance of the game (i.e. put me back to fullscreen, had me pick gamma settings). After hitting New Game and after the loading brain icon disappeared I was stuck on a black screen with the loading ambient noises. I couldn't move, turn on flashlight, open up the escape menu. After about a minute I shut it down using the task manager. RE: Language Files in Dev Mode - triadtimes - 09-30-2015 Alright, I got it. My original issue was that in SomaDev.bat mode it wouldn't load my english.lang file, but in ModLauncher mode it wouldn't load the original english.lang file. As I found out, the parts of the terminal for FROM, DATE, SUBJECT, SENT, etc. are held in the game's original english.lang, meaning if you want to use them in a mod you have to find them and transfer them over into your mod's english.lang. This, however, only solved the problem of having the ModLauncher version having missing text, my SomaDev.bat version still wouldn't load my mod's english.lang. After fiddling around in .cfgs, .bats, and a bunch of other files I found out how to make it all work, how to make your mod's english.lang show up in SomaDev.bat (also, how to make SomaDev.bat actually load the level you want and not pitch black). So here it is: triadtimes' how to set up a dev environment 101. (This is assuming you are creating a mod in a folder along the lines of redist/mods/mymod/) After running SomaDev.bat the first time please sit still. DO NOT (as the wiki suggests) CHANGE YOUR dev_user_settings.cfg. Well, you can, just not the change start map part. Now that SomaDev.bat has run once, check redist/config/ for a file called main_int_dev.cfg. This is the file that will help you out, this is where you should change the map start location (very bottom), an example will look like: Spoiler below!
Now, to make your .lang file actually useful! At this point it looks like you can do one of two things 1) find resources.cfg in the redist/ folder and add the line Code: <Directory Path="/mods" AddSubDirs="true" /> and then save. Or, 2) you can change the line in main_int_dev.cfg that points to a resource file to point to your resource file in your mod, just make sure the one in your mod also has the directory path "/mods" in it. That's pretty much it! The issue was that resources.cfg did not have a directory for the "mods" folder. Of course this is only the dev environment, when it comes time to test/ship your mod make sure your mod's own main_int.cfg and resources.cfg are set up correctly. |