Cannot launch skirmish directly from command line [SOLVED]

This is for troubleshooting of problems with the FAF client and Forged Alliance game.

Moderator: PhilipJFry

Cannot launch skirmish directly from command line

Postby iliis » 25 Apr 2017, 00:48

Hi all,

I'm trying my hands at modding and I tought it would be convenient to launch FA directly into a sandbox game. But when I open the windows command prompt and enter according to http://wiki.faforever.com/index.php?title=Command_Line_Switches:

Code: Select all
"C:\ProgramData\FAForever\bin\ForgedAlliance.exe" /init init_faf.lua /windowed 1024 768 /showlog /map SCMP_015 /faction 1 /nofog /victory "sandbox"


I get the following error message:

Unable to launch /maps/SCMP_015/SCMP_015_scenario.lua: ...alliance\gamedata\mohodata.scd\lua\system\import.lua(37): Error importing '/lua/factions.lua'
state traceback: ...


excerpt from the log:
Code: Select all
DEBUG: Wavebank prepared: 2c45bd0
DEBUG: Wavebank prepared: 2c46440
DEBUG: Wavebank prepared: 2c45d38
DEBUG: Loading module '\000/lua/singleplayerlaunch.lua\000'
DEBUG: Loading module '\000/lua/ui/maputil.lua\000'
DEBUG: Loading module '\000/etc/faf/mapblacklist.lua\000'
INFO: /faction
DEBUG: Loading module '\000/lua/factions.lua\000'
WARNING: ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(79): access to nonexistent global variable "__active_mods"
WARNING: stack traceback:
WARNING:         [C]: in function `error'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\config.lua(53): in function <...alliance\gamedata\mohodata.scd\lua\system\config.lua:52>
WARNING:         ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(79): in function `GetSelectedMods'
WARNING:         ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(46): in function <...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua:41>
WARNING:         (tail call): ?
WARNING:         ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(322): in main chunk
WARNING:         [C]: in function `doscript'
WARNING:         [C]: in function `pcall'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\import.lua(48): in function `import'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\import.lua(37): in function `import'
WARNING:         ...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua(233): in function <...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua:228>
WARNING:         ...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua(321): in function <...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua:297>
DEBUG: Loading module '\000/lua/maui/frame.lua\000'
DEBUG: Loading module '\000/lua/ui/uimain.lua\000'
DEBUG: Loading module '\000/lua/multiplayer/onlineprovider.lua\000'
DEBUG: Loading module '\000/lua/ui/campaign/campaignmanager.lua\000'
DEBUG: Loading module '\000/lua/ui/splash/splash.lua\000'
DEBUG: Loading module '\000/lua/maui/movie.lua\000'
DEBUG: OpenMovie /movies/thqlogo.sfd: 1
...


This happens independently of the map (SCMP_015 is Fields of Isis). And after the error the game proceeds to the main menu and I can manually launch a single-player game without issues.

Also, just using
Code: Select all
"C:\ProgramData\FAForever\bin\ForgedAlliance.exe" /init init_faf.lua /map SCMP_015 /showlog


Fails with the same error message popup, but actually in a slightly different place in the code:

Code: Select all
DEBUG: Wavebank prepared: 2c16170
DEBUG: Wavebank prepared: 2c165a8
DEBUG: Wavebank prepared: 2c15d38
DEBUG: Wavebank prepared: 2c16710
DEBUG: Loading module '\000/lua/singleplayerlaunch.lua\000'
DEBUG: Loading module '\000/lua/ui/maputil.lua\000'
DEBUG: Loading module '\000/etc/faf/mapblacklist.lua\000'
DEBUG: Loading module '\000/lua/factions.lua\000'
WARNING: ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(79): access to nonexistent global variable "__active_mods"
WARNING: stack traceback:
WARNING:         [C]: in function `error'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\config.lua(53): in function <...alliance\gamedata\mohodata.scd\lua\system\config.lua:52>
WARNING:         ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(79): in function `GetSelectedMods'
WARNING:         ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(46): in function <...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua:41>
WARNING:         (tail call): ?
WARNING:         ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(322): in main chunk
WARNING:         [C]: in function `doscript'
WARNING:         [C]: in function `pcall'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\import.lua(48): in function `import'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\import.lua(37): in function `import'
WARNING:         ...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua(29): in function `GetRandomFaction'
WARNING:         ...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua(238): in function <...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua:228>
WARNING:         ...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua(321): in function <...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua:297>
DEBUG: Loading module '\000/lua/maui/frame.lua\000'
DEBUG: Loading module '\000/lua/ui/uimain.lua\000'
DEBUG: Loading module '\000/lua/multiplayer/onlineprovider.lua\000'
DEBUG: Loading module '\000/lua/ui/campaign/campaignmanager.lua\000'
DEBUG: Loading module '\000/lua/ui/splash/splash.lua\000'
DEBUG: Loading module '\000/lua/maui/movie.lua\000'
DEBUG: OpenMovie /movies/thqlogo.sfd: 1
DEBUG: Preparing movie /movies/thqlogo.sfd: 1


Adding a "/faction 1" parameter leads to the same "access to nonexistent global variable "__active_mods"" error tough.

I haven't looked into more deeply into this, as I can launch a game trough the menu just fine (altough less conveniently ;) ).
iliis
Crusader
 
Posts: 15
Joined: 18 Jan 2012, 12:44
Has liked: 0 time
Been liked: 0 time

Re: Cannot launch skirmish directly from command line  [SOLVED]

Postby iliis » 25 Apr 2017, 00:49

Actually, I just found out that it works fine when using the original ForgedAlliance.exe instead of the FAF one ;)
I leave this here in case somebody else has the same problem...
iliis
Crusader
 
Posts: 15
Joined: 18 Jan 2012, 12:44
Has liked: 0 time
Been liked: 0 time

Re: Cannot launch skirmish directly from command line

Postby iliis » 07 May 2017, 16:50

I've managed to launch the FAF version as well! Turns out, there is already a fix but it hasn't been merged into FAF yet:
https://github.com/FAForever/fa/commit/ ... bf7b107038

Just edit C:\ProgramData\FAForever\gamedata\lua.nx2\lua\factions.lua according to above commit and it launches correctly. (lua.nx2 is a zip)
iliis
Crusader
 
Posts: 15
Joined: 18 Jan 2012, 12:44
Has liked: 0 time
Been liked: 0 time


Return to Tech Support

Who is online

Users browsing this forum: No registered users and 1 guest