Setup woes: CLobby.HostGame(self) expected 1 args, but got 2

Everything about mods can be found here.

Moderator: Morax

Setup woes: CLobby.HostGame(self) expected 1 args, but got 2

Postby ketura » 24 May 2017, 08:50

So I'm trying to dip my feet into tinkering with modding, but I can't seem to get a barebones mod to work at all.

Initially, I followed the instructions on the wiki to create an init_dev.lua file, made a shortcut to ForgedAlliance within the FAF folder using the /init flag, and then pointed the dev_path variable to where I cloned the fa repo. So far so good, everything loaded fine and I could start a game.

However, if I ever try to change dev_path to point to anything except the fa repo, I can't get a skirmish match to run. It hangs on connecting and in the log I get this output:

Code: Select all
info: LOBBY: Game port 0[None] opened.
warning: Error running OnFrame script in CScriptObject at 101a1300: void CLobby.HostGame(self)
           expected 1 args, but got 2
         stack traceback:
            [C]: in function `HostGame'
            ...ged alliance\gamedata\lua.scd\lua\ui\lobby\lobby.lua(341): in function `HostGame'
            ...rged alliance\gamedata\lua.scd\lua\ui\menus\main.lua(916): in function `StartLobby'
            ...rged alliance\gamedata\lua.scd\lua\ui\menus\main.lua(919): in function <...rged alliance\gamedata\lua.scd\lua\ui\menus\main.lua:911>
            ...rged alliance\gamedata\lua.scd\lua\ui\menus\main.lua(818): in function <...rged alliance\gamedata\lua.scd\lua\ui\menus\main.lua:810>
            ...rged alliance\gamedata\lua.scd\lua\ui\menus\main.lua(320): in function <...rged alliance\gamedata\lua.scd\lua\ui\menus\main.lua:305>


It seems to me that I'm missing some file or something somewhere in my mod, except I can't get it to work with any other mods, either. I've tried downloading the ModBootstrap mod and a couple of other small Hello World-esque mods, but I cannot get them to successfully load either.

Am I missing something in how I'm supposed to set this up? The wiki seemed to suggest that I point the init file to the individual mod, but now I'm wondering if it's supposed to be developed as a subfolder within the fa file structure or something.

Any help on how I'm supposed to organize my folders/init files would be greatly appreciated.
ketura
 
Posts: 2
Joined: 24 May 2017, 08:37
Has liked: 0 time
Been liked: 0 time
FAF User Name: ketura

Re: Setup woes: CLobby.HostGame(self) expected 1 args, but g

Postby CookieNoob » 24 May 2017, 12:17

well. if you want to try modding, you dont need a custom init file at all (except you want to create a featured mod that makes changes to the lobby). A custom init file is needed for nomads for example (they add an additional faction to the game lobby), a normal mod that only loads at the game start doesnt need this.

So you should make the init file load the FAF repository and then load the mod you are developing with the lobby-mod manger. If you have more questions feel free to pm me in the client.

OR: you can just start the game with the FAF changes by launching the ForgedAlliance.exe in the bin folder of the FAF directory and then use the in-lobby-mod manager. (This is sufficient when you dont want to make changes to the FAF code, i.e. create a mod and not a game patch)
Check out the next level of maps: viewtopic.php?f=53&t=13014
For adaptivity, customizability and less clutter in the vault.
User avatar
CookieNoob
Priest
 
Posts: 477
Joined: 02 Aug 2014, 17:07
Has liked: 65 times
Been liked: 249 times
FAF User Name: CookieNoob

Re: Setup woes: CLobby.HostGame(self) expected 1 args, but g

Postby ketura » 24 May 2017, 18:22

Aha. So I just need to put the actual mod in the My Games subdirectory and develop from there, I presume? Thanks so much! I knew I was going about this wrong.
ketura
 
Posts: 2
Joined: 24 May 2017, 08:37
Has liked: 0 time
Been liked: 0 time
FAF User Name: ketura


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest