Page 1 of 1

Integrating planning tool for Terra Mystica

Posted: 29 October 2020, 10:50
by Rincevent123
Hi,
I have created a small online planning tool for Terra Mystica to plan player next round in advance (you can find it here: https://rincevent.github.io/TerraMysticaTurnCalculator/).
Currently it is pretty simple but I would like to enhance it for instance to compute expected scoring and expected resource income for the next round. However to do that I would need to have access to the game data for a given player(e.g; how many structure are already built, what favor and scoring tile are in play, etc.).

My question is two fold:
- Is there a way to access such information about a given game from the outside of Board Game Arena maybe through public API (with the player having to be logged in to BGA to access the info)?
- If not, would it be possible to integrate such tool directly inside BGA and then have a direct access to the data needed? The snellman platform already provides such planning tool for their TM game. I believe it could benefit the player to have access to such a tool in game on BGA as well.

Re: Integrating planning tool for Terra Mystica

Posted: 29 October 2020, 22:32
by PurplishCat
Short answer: It's software; anything is possible.

Longer answer: I don't think expecting an API to get Terra Mystica game state is realistic. But Terra Mystica is open information. You can write a screen scraper to read the data from a player's screen. You could also write a GreaseMonkey script or whatever to automate it.

Re: Integrating planning tool for Terra Mystica

Posted: 30 October 2020, 09:56
by Rincevent123
OK thanks, I hoped to avoid having to write a screen scraper but if there is no other ways that is what I will do then.

Re: Integrating planning tool for Terra Mystica

Posted: 30 October 2020, 11:48
by Tisaac
Rincevent123 wrote: 30 October 2020, 09:56 OK thanks, I hoped to avoid having to write a screen scraper but if there is no other ways that is what I will do then.
I would strongly advise to first read threads on the 7Wonders forum about Pythia :
https://boardgamearena.com/forum/viewto ... 92&t=16538

Re: Integrating planning tool for Terra Mystica

Posted: 30 October 2020, 12:21
by RicardoRix
Rincevent123 wrote: 29 October 2020, 10:50 - Is there a way to access such information about a given game from the outside of Board Game Arena maybe through public API (with the player having to be logged in to BGA to access the info)?
Yes there is, a much more direct and easy way, bring all the goodness that you have in mind to everyone in a fair way, Just add any additional functionality to the game code itself. Best would be to add a game option to turn this stuff on or off as the table creator prefers.
https://en.studio.boardgamearena.com/

Do not go down the Pythia route.

Re: Integrating planning tool for Terra Mystica

Posted: 31 October 2020, 08:51
by Rincevent123
Thanks for the info.
I will integrate it in the game if is possible.

Somebody called aIex in BGA Studio and TheRedMachine in BGA is the admin for the game. Do you know how I could contact him to talk about this?

Re: Integrating planning tool for Terra Mystica

Posted: 31 October 2020, 21:55
by Victoria_La
Terra Mystica is done by Een - bga admin, you would have to ask him directly