forgottenarbiter / communicationmod Goto Github PK
View Code? Open in Web Editor NEWSlay the Spire mod that provides a protocol for allowing another process to control the game
License: MIT License
Slay the Spire mod that provides a protocol for allowing another process to control the game
License: MIT License
Hello, probably its me that is bad or your instructions need to be clearer.
When i start the mod i get the error messege that it has not recieved "the signal" from external process in is shutting down.
I took three pictures. Please explain to me what im doint wrong. One picture is of my config file, one is of ingame menu and one is the error messege from "ModTheSpire".
Thanks for the help beforehand, if i get this mod working it will be usefull!
The SpireConfig file that needs to be editted to point the mod at an external process doesn't seem to exist when ModTheSpire is installed from the steam workshop. At least, I can't seem to find it and the linked documentation does not seem to apply.
Hello,
I am planning to write an audio-only interface for STS with the help of Communication Mod, for blind and visually impaired gamers.
I understand that at the moment, only regular games are supported. Are there plans to add other modes, e.g. Daily Run?
The complete match state, as I understand, is not yet available. Could you please describe what is currently missing?
Are there other things in general that the Communication Mod could access? For example the settings menu, achievements, patch notes, Compendium and Potion Lab, etc. I am currently trying to gauge how much of the game could be potentially available.
Since you are more familiar with game internals, do you think it would be better to create this interface as a mod, i.e. am I limited if I create this in a non-JVM language?
Thank you very much in advance.
Blood for Blood is cheaper based on the # of times the player has taken damage. Unfortunately, the game state doesn't reveal this number (unlike game_state.cards_discarded_this_turn).
Can you expose this value?
CommunicationMod hangs if spirecomm selects choose 0
too quickly (i.e. with no-ux version of SuperFastMode). One card is chosen, and then communicationmod gets stuck while the game displays "Remaining Attempts: 4", never sending a new game state after the latest choose 0
command.
I can consistently reproduce this with
result = coordinator.play_one_game(PlayerClass.IRONCLAD, seed="2TQ7CH7RF8M2H")
when SuperFastMode 999.0.0 is set to make some actions instant + increase speed to 1000%.
It doesn't hang if I disable instant actions and play at 100% speed, and doesn't hang if I play with SuperFastMode but add a small delay to def handle_screen(self):
[...]
else:
time.sleep(0.07) # Add a small delay before sending the choice to communicationmod
return ChooseAction(0)
[...]
ModVersion Info:
Mod list:
The OverlayMenu isn't officially a screen within the game, but instead a container for various elements that are shown/hidden depending on the game state. Most of the time interacting with these elements will register to CommunicationMod as a state change by virtue of changing the current screen or flipping the isScreenUp
boolean in AbstractDungeon, but there are cases where this doesn't happen, particularly when having a GRID screen up. For example, when a user is selecting a card to purge in the shop, if they select a card and issue a cancel command this doesn't change the isScreenUp
or screen
fields in AbstractDungeon so hasDungeonStateChanged
in GameStateListener will not return true. And whenever we issue a command, we flip waitingForCommand
in GameStateListener to be false but it will never become true again until the user issues another command (since flipping that variable depends on the output of hasDungeonStateChanged
. This is problematic for some automated clients who wait for waitingForCommand
to become true again to issue another command.
Hi,
just in case you didn't know, it doesn't seem to be possible to access CommunicationMod via Steam Workshop anymore, since the new version was released. The previous version disappeared from my machine as well since it is no longer available, rendering mods which depend on CM useless. Any way you can fix this, or is this somehow steam related?
Hey, can you release a new version that includes 5c9bdc4?
The energy values currently reported in https://github.com/ForgottenArbiter/CommunicationMod/releases/tag/v0.7.0 were confusing me when trying to understand the output, and makes it more difficult to write an AI. Based on the commit description I assume the linked commit is a fix that reports the current energy instead of the "max". (Still having the max value available somewhere might also be nice, but of course much less important.)
Thanks!
This is the setup I start the mod with on Ubuntu 18.04:
I am not used to mods so I might have set up something wrong.
Other mods (for instance Fruity mod) work fine.
The setup leads me to this stack trace :
Initializing mods...
- Communication Mod
- communicationmod.CommunicationMod
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.evacipated.cardcrawl.modthespire.Patcher.initializeMods(Patcher.java:38)
at com.evacipated.cardcrawl.modthespire.Loader.runMods(Loader.java:390)
at com.evacipated.cardcrawl.modthespire.ui.ModSelectWindow.lambda$null$1(ModSelectWindow.java:265)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at basemod.BaseMod.subscribeIfInstance(BaseMod.java:2628)
at basemod.BaseMod.subscribe(BaseMod.java:2648)
at communicationmod.CommunicationMod.<init>(CommunicationMod.java:53)
at communicationmod.CommunicationMod.initialize(CommunicationMod.java:77)
... 8 more
In Setup 3. it says "Edit your newly-created SpireConfig file", took me some time to realize that the actual file is called "config.properties"
Hello, I am trying to sift through the documentation without an example program to guide me, and I am having issues that may just be my device. When I start the external process in-game, my computer lags for a moment. I believe that this is throwing off the timing for the communication mod as it is not getting a "Ready" signal in time. How would I get around this? Can I modify the default timeout period?
My code so far consists of:
import json import sys sys.stdout.write("Ready\n") #sys.stdout.flush() sys.stdout.write("START IRONCLAD 0 4LHFV1BZP8C8D\n") #sys.stdout.flush()
Is there any way for the external process to tell Communication Mod to just do nothing in the main menu until the player starts a run? It looks like the WAIT command only works during the run itself, and if the external process doesn't send any command then it will time out.
When I switch the game language to, for example, Chinese, the ModTheSpire output information shows some errors occur with sort of character problems in this mod. Some Chinese character became [???] which normally should be the card name/potion name in Chinese.
Are there any support for those none-English language?
I already tested in MacOS and Win10, only with English the mod will run all fine.
Looking forward to your reply, thx.
@ForgottenArbiter I have tried running spirecomm with the mod but I'm having an issue. The mod doesn't run the main.py file at all.
The main.py runs fine on its own so I'm guessing this is a mod problem.
Here is my config file:
#Sat Apr 22 11:12:53 AST 2023
command=python C\:\\spirecomm\\main.py
I have also made another script where I tried checking if the mod opens the external process where it creates a file after sending the ready signal, that way I can know if the mod has opened it but the file never gets created, unless I manually open the script of course.
Here is the list of mods I currently have:
I have disabled StSLib because in the Communication mod status it says that I might encounter problems running it because it has been specifically tested with a specific version, but enabling it and disabling it didn't make any difference.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.