Lua: Further centralize code, fix Bizhawk 2.9 (#1685)
* Fixes the socket library for bizhawk 2.9/lua 5.4 by including another one in parallel * Fixes lua 5.4 support by making socket.lua into a "modern" module (the `module` keyword is gone) * Adds the linux version and 32 bit windows socket dlls because why not * Merges common functions into `common.lua` - the only functional change of this should be that: * Some things that were locals are globals now - this can be changed, I just was lazy and it likely doesn't matter * `drawText` now uses middle/bottom for all prints - feel free to do what you like with that change
This commit is contained in:
@@ -27,10 +27,10 @@ Once Bizhawk has been installed, open Bizhawk and change the following settings:
|
||||
BizHawk is running in the background.
|
||||
|
||||
- It is recommended that you provide a path to BizHawk in your host.yaml for Adventure so the client can start it automatically
|
||||
- At the same time, you can set an option to automatically load the adventure_connector.lua script when launching BizHawk
|
||||
- At the same time, you can set an option to automatically load the connector_adventure.lua script when launching BizHawk
|
||||
from AdventureClient.
|
||||
Default Windows install example:
|
||||
```rom_args: "--lua=C:/ProgramData/Archipelago/data/lua/ADVENTURE/adventure_connector.lua"```
|
||||
```rom_args: "--lua=C:/ProgramData/Archipelago/data/lua/connector_adventure.lua"```
|
||||
|
||||
## Configuring your YAML file
|
||||
|
||||
@@ -66,7 +66,7 @@ path as recommended).
|
||||
Once both the client and the emulator are started, you must connect them. Within the emulator click on the "Tools"
|
||||
menu and select "Lua Console". Click the folder button or press Ctrl+O to open a Lua script.
|
||||
|
||||
Navigate to your Archipelago install folder and open `data/lua/ADVENTURE/adventure_connector.lua`, if it is not
|
||||
Navigate to your Archipelago install folder and open `data/lua/connector_adventure.lua`, if it is not
|
||||
configured to do this automatically.
|
||||
|
||||
To connect the client to the multiserver simply put `<address>:<port>` on the textfield on top and press enter (if the
|
||||
|
||||
@@ -58,7 +58,7 @@ Once the Archipelago server has been hosted:
|
||||
extension `*.nes`
|
||||
2. Click on the Tools menu and click on **Lua Console**
|
||||
3. Click the folder button to open a new Lua script. (CTL-O or **Script** -> **Open Script**)
|
||||
4. Navigate to the location you installed Archipelago to. Open data/lua/FF1/ff1_connector.lua
|
||||
4. Navigate to the location you installed Archipelago to. Open data/lua/connector_ff1.lua
|
||||
1. If it gives a `NLua.Exceptions.LuaScriptException: .\socket.lua:13: module 'socket.core' not found:` exception
|
||||
close your emulator entirely, restart it and re-run these steps
|
||||
2. If it says `Must use a version of bizhawk 2.3.1 or higher`, double-check your Bizhawk version by clicking **
|
||||
|
||||
@@ -414,7 +414,7 @@ to the emulator as recommended).
|
||||
Once both the client and the emulator are started, you must connect them. Within the emulator click on the "Tools"
|
||||
menu and select "Lua Console". Click the folder button or press Ctrl+O to open a Lua script.
|
||||
|
||||
Navigate to your Archipelago install folder and open `data/lua/OOT/oot_connector.lua`.
|
||||
Navigate to your Archipelago install folder and open `data/lua/connector_oot.lua`.
|
||||
|
||||
To connect the client to the multiserver simply put `<address>:<port>` on the textfield on top and press enter (if the
|
||||
server uses password, type in the bottom textfield `/connect <address>:<port> [password]`)
|
||||
|
||||
@@ -414,9 +414,9 @@ Double-cliquez sur votre fichier `.apz5` pour démarrer votre client et démarre
|
||||
Une fois le client et l'émulateur démarrés, vous devez les connecter. Dans l'émulateur, cliquez sur "Outils"
|
||||
menu et sélectionnez "Console Lua". Cliquez sur le bouton du dossier ou appuyez sur Ctrl+O pour ouvrir un script Lua.
|
||||
|
||||
Accédez à votre dossier d'installation Archipelago et ouvrez `data/lua/OOT/oot_connector.lua`.
|
||||
Accédez à votre dossier d'installation Archipelago et ouvrez `data/lua/connector_oot.lua`.
|
||||
|
||||
Pour connecter le client au multiserveur, mettez simplement `<adresse>:<port>` dans le champ de texte en haut et appuyez sur Entrée (si le
|
||||
le serveur utilise un mot de passe, saisissez dans le champ de texte inférieur `/connect <adresse>:<port> [mot de passe]`)
|
||||
|
||||
Vous êtes maintenant prêt à commencer votre aventure à Hyrule.
|
||||
Vous êtes maintenant prêt à commencer votre aventure à Hyrule.
|
||||
|
||||
@@ -86,7 +86,7 @@ to the emulator as recommended).
|
||||
Once both the client and the emulator are started, you must connect them. Within the emulator click on the "Tools"
|
||||
menu and select "Lua Console". Click the folder button or press Ctrl+O to open a Lua script.
|
||||
|
||||
Navigate to your Archipelago install folder and open `data/lua/PKMN_RB/pkmr_rb.lua`.
|
||||
Navigate to your Archipelago install folder and open `data/lua/connector_pkmn_rb.lua`.
|
||||
|
||||
To connect the client to the multiserver simply put `<address>:<port>` on the textfield on top and press enter (if the
|
||||
server uses password, type in the bottom textfield `/connect <address>:<port> [password]`)
|
||||
|
||||
@@ -80,7 +80,7 @@ Once the Archipelago server has been hosted:
|
||||
extension `*.nes`.
|
||||
2. Click on the Tools menu and click on **Lua Console**.
|
||||
3. Click the folder button to open a new Lua script. (CTL-O or **Script** -> **Open Script**)
|
||||
4. Navigate to the location you installed Archipelago to. Open `data/lua/TLOZ/tloz_connector.lua`.
|
||||
4. Navigate to the location you installed Archipelago to. Open `data/lua/connector_tloz.lua`.
|
||||
1. If it gives a `NLua.Exceptions.LuaScriptException: .\socket.lua:13: module 'socket.core' not found:` exception
|
||||
close your emulator entirely, restart it and re-run these steps.
|
||||
2. If it says `Must use a version of bizhawk 2.3.1 or higher`, double-check your Bizhawk version by clicking **
|
||||
|
||||
Reference in New Issue
Block a user