#Archipelago integration

55 messages · Page 1 of 1 (latest)

distant oak
#

https://archipelago.gg
It's an item randomizer framework. You can play solo, or with multiple games that aren't even necessarily Pokemon. So R207 Dawn could give my Fire Rod for A Link to the Past, for example, instead of Dowsing Machine, and instead of giving you an item it just sends that out to me. Someone may need to send me Parcel to give to Barry... etc etc.
AP has changed how I play my favorite games completely and I think it would be really sick to implement here.
Here's a playlist with a bunch of runs: https://www.youtube.com/playlist?list=PLFfCl8cCZEdDFlfsf2oIPOU8w1mzAJzXf

Something I want to say right away is that the main AP Discord server is very (imo overly) strict on copyright and not drawing Nintendo's ire, so they explicitly ban Switch games, as well as most fangames and mods since they use assets from other games. I don't think this should stop us since AP itself is MIT-licensed https://github.com/ArchipelagoMW/Archipelago and we can just not be in the Discord server, but it might be worth considering anyway so that's why I mention it.

I'm willing to write the AP client part, never done it before but willing to learn. The hurdles I know of:

  • Figuring out how to connect the AP client to the game, and detect when locations are checked (overworld/hidden items, badges obtained, etc). Randovania does the connection part already for Metroid Dread so I'll likely ask them for advice: https://github.com/randovania/randovania/blob/main/randovania/game_connection/executor/dread_executor.py#L111
  • Handling the game patches - the person generating the seed may not necessarily be the one playing, and I'd rather not require the host to have a BDSP dump to generate, just to play. The Pokemon games with pret usually have a basepatch in the AP repo that they modify. Randovania patches a RomFS dump when given a spoilerfile for Dread.
  • Decoupling badges from story flags and, if possible, making Sinnoh more "open" in general
  • Handling arbitrary items that the player picks up (PLAYER picked up SLOTNAME's ITEM!)
#

...also it goes without saying that if this isn't, like, an "official" thing for Lumi, I can always just learn the scripting and do it myself :p
somehow forgot that's why I made this thread to begin with

lilac vector
#

Yeah we're likely not going to make this ourselves, but I think it could be a cool project to get started with BDSP Modding. You can learn about scripting on the website here.

distant oak
#

yeye completely fair

hidden iron
#

You'll definitely need some exefs edits, at least to even connect externally

quick quest
#

The ExLaunch exefs framework has a logger server for getting information out of the game but I think you would want a more fleshed out API. I did see one of our old exefs devs manage something like that a long while back.

distant oak
#

i'll figure it out. it does seem a lot of the tools are windows-only though? ...i asked about that before here actually come to think of it

opaque eagle
#

I know Mart was interested in doing this

hidden iron
#

We do actually have a way to connect the game to an external python script, so there's that going for it at least

distant oak
opaque eagle
lilac vector
#

Is that only Exlaunch? Or does that include Starlight?

opaque eagle
#

Try getting in touch with Martmists here

distant oak
#

whoaaaa i didn't know that server existed

hidden iron
#

starlight did have something similar but i would absolutely recomend exlaunch

distant oak
#

ok will do

lilac vector
#

Oh right, isn't there a vanilla BDSP exlaunch?

hidden iron
#

i mean, that's just exlaunch

lilac vector
#

Right yyy

#

But we don't have a Lumi Exlaunch do we?

distant oak
#

gonna be real with yall i have no idea what an exlaunch is but i'm about to figure that out for myself 🫡

quick quest
#

It is the engine backend that we are moving to in ReLumi

lilac vector
distant oak
#

ohh ok

vocal lily
#

It's the framework for exefs stuff, Lumi used Starlight, but Exlaunch gives more options

distant oak
#

so i'm trying to set this up, but ms build tools is an exe and i have the teeny tiny problem of being on linux. do i have to build ev-as under wine or something?

#

or like. use a vm?
or could i just use lz4 from cli? i assume not since we have this dependency to begin with

lilac vector
#

Ev-as is a python script

#

I can't remember if you need the build tools for that or not, but as far as I can remember, you don't

distant oak
#

the text there seems to say you do:

and you would need this package anyway to build it.

vocal lily
#

Just try first, I dont think I ever installed it either

distant oak
#

is it that you specifically need that lz4 library, or would lz4 from arch repos be fine?

distant oak
#

the pillow version in requirements.txt for ev-as is failing to build. is there any reason i can't use a newer version?

vocal lily
#

I think you can use newer versions for everything except UnityPy
I have the 11.3.0 version of Pillow

distant oak
#

yeah for UnityPy i made sure to stick to 1.7.x

#

(the version in the requirements.txt must have been removed from pypi)

#

but yeah ill try it in a bit, my hands hurt so im taking a break

distant oak
#

muuuch better, ty blup

#

trying to parse ev_scripts and i get an immediate error about some kind of version check?

$ python src/ev_parse.py 
Traceback (most recent call last):
  File "/run/media/files/Projects/ap-pokemon_bdsp/ev-as/src/ev_parse.py", line 7, in <module>
    from evAssembler import EvCmdTypeWrapper
  File "/run/media/files/Projects/ap-pokemon_bdsp/ev-as/src/evAssembler.py", line 15, in <module>
    from evParser import evParser
  File "/run/media/files/Projects/ap-pokemon_bdsp/ev-as/src/evParser.py", line 53, in <module>
    class evParser ( Parser ):
  File "/run/media/files/Projects/ap-pokemon_bdsp/ev-as/src/evParser.py", line 57, in evParser
    atn = ATNDeserializer().deserialize(serializedATN())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/files/Projects/ap-pokemon_bdsp/ev-as/.venv/lib/python3.12/site-packages/antlr4/atn/ATNDeserializer.py", line 28, in deserialize
    self.checkVersion()
  File "/run/media/files/Projects/ap-pokemon_bdsp/ev-as/.venv/lib/python3.12/site-packages/antlr4/atn/ATNDeserializer.py", line 50, in checkVersion
    raise Exception("Could not deserialize ATN with version {} (expected {}).".format(ord(version), SERIALIZED_VERSION))
Exception: Could not deserialize ATN with version 3 (expected 4).
lilac vector
#

What version of antlr4 do you have?

distant oak
#

4.13.12

lilac vector
#

Try 4.9.3

distant oak
#

there we go ty

lilac vector
# vocal lily

If you run into any other version issues. Just refer to this.

distant oak
#

yeah idk how i missed that version number tbh

distant oak
#

idk if it's normal for the vscode evscript extension to just show todos for everything

lilac vector
#

Yeah very normal

quick quest
#

Yeah that's normal

distant oak
#

hmm ok

lilac vector
#

Refer to the website if you have any questions of what a command does.

#

We're still missing a bunch of commands, but we're slowly chipping away at them

quick quest
#

Yeah scripting is very much a vibes based thing right now. Lots of searching for examples of how ILCA or Lumi devs did stuff before and stealing that. ShinyMewGiggle

hidden iron
#

Yeah there are over a thousand commands in total, we just haven't had the time to sit down and document everything