Creating Mod with Google API for Translating ingame textchat

Everything about mods can be found here.

Moderator: Morax

Creating Mod with Google API for Translating ingame textchat

Postby NoUnits » 27 May 2018, 23:58

Hello Commanders, and Modders

I Stuck creating a mod, which translates Textchat from Any Language into users Languge and reverse.
Biggest Problem so far was to get the Luasocket libary working with my current lua installation. However i managed to overcome those difficulties and wantet to test my Code with the FA Supcom game.

But the game freezed when starting, and there was an erorr about an unrecognized Variable LUA_PATH
I thought this happens because luasocket is made for lua5.1 and the game uses 5.0...
does anyone know how to get luasocket or any other libary made for 5.1 running in fa ?

Thanks for your effort,
sincerly NoUnits

PS: i could share my mod via googledrive if you have an idea
NoUnits
 
Posts: 7
Joined: 08 Mar 2016, 22:06
Has liked: 0 time
Been liked: 0 time
FAF User Name: PHDMrSmith

Re: Creating Mod with Google API for Translating ingame text

Postby NoUnits » 29 May 2018, 17:05

UPDATE:

I think i have figured out what is the problem with the LUA_PATH Variable. Seems lua 5.0 doesnt use Package.path table. However if i set LUA_PATH still it cannot load the .dll from luasocket libary. I know there was a similiar problem when implementing the ICE Adapter.

I would just need to use sockets. ... any suggestions ?
thx for help
NoUnits
 
Posts: 7
Joined: 08 Mar 2016, 22:06
Has liked: 0 time
Been liked: 0 time
FAF User Name: PHDMrSmith

Re: Creating Mod with Google API for Translating ingame text

Postby CookieNoob » 29 May 2018, 17:47

From what I know about the game, I can tell you this:
  • FA uses its own implementation of LUA. Some functions are not available from the inbuild LUA, for example file access is completely restricted to the game.prefs file (probably to prevent mods from executing malicious code).
  • The ice adapter is not part of the game code, it is a separate executable which routes the network traffic. A mod would have to be run from within the game and thus works on a completely different basis.
  • Loading custom dlls is the purpose of this code https://github.com/FAForever/supcom-se however it never got implemented because of the possiblities to exploit it.
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


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest