Skip to main content

Truthsayer

This module allows to visualize the state of Dune the boardgame. The motivation for it is to build a bot allowing to play Dune online via Discord on the Truthsayer Discord channel.

Examples

You can generate a map of Arrakis as follows

from truthsayer.processor import Caretaker, OriginatorTruthsayer

meta = {
    'factions': {},
    'usernames': {},
    'user_ids': {},
    'texts': {
        'promo_top': 'Truthsayer Discord',
        'promo': 'Join us for more Dune games!',
        'game_id': '#21762',
        'game_turn': 6,
        'game_phase': 'Battle',
        'qr': 'https://discord.gg/VVYM22Hs2t',
        'commands': []
    }
}

originator = OriginatorTruthsayer(meta=meta)
caretaker = Caretaker(originator)

originator.render('images/originator/originator00.jpg')

originator.join(1, '@marek', '#467263')
caretaker.backup()

originator.join(5, '@renzokuken', '#387843')
caretaker.backup()

originator.join(3, '@zylwia', '#198264')
caretaker.backup()

originator.render('images/originator/originator01.jpg')

originator.join(2, '@andy', '#430293')
caretaker.backup()

originator.join(4, '@john', '#098532')
caretaker.backup()

originator.join(6, '@somedude', '#130539')
caretaker.backup()

originator.render('images/originator/originator02.jpg')

originator.randomize('factions')
caretaker.backup()

originator.render('images/originator/originator03.jpg')

originator.initgame()
caretaker.backup()

originator.render('images/originator/originator04.jpg')

originator.ship('emperor', 'plastic_basin', 'R13', 4)
caretaker.backup()

originator.render('images/originator/originator05.jpg')

originator.move('atreides', 'arrakeen', 'R10', 'hole_in_the_rock', 'R9', 3)
caretaker.backup()

originator.render('images/originator/originator06.jpg')

arrakis_cartography

We can move the storm, undo moves, cause Spiceblow and change sprite assets

originator.storm('R9')
caretaker.backup()

originator.render('images/originator/originator07.jpg')

originator.spiceblow('sihaya_ridge', 5)
caretaker.backup()

originator.render('images/originator/originator08.jpg')

# try to undo the move
caretaker.undo()

originator.render('images/originator/originator09.jpg')

originator.config('spice_token', 'spiceglow', 500)
caretaker.backup()

originator.render('images/originator/originator10.jpg')

arrakis_cartography

Now few examples how to draw cards and conduct the battle phase

# draw some cards
originator.draw('player_1', 'treachery')
caretaker.backup()

originator.draw('player_1', 'treachery')
caretaker.backup()

originator.draw('player_2', 'treachery')
caretaker.backup()

originator.draw('player_2', 'treachery')
caretaker.backup()

# initiate battle
hand_player_1 = originator.hand('player_1')
hand_player_2 = originator.hand('player_2')

print('player_1 hand')
print(hand_player_1)

print('player_2 hand')
print(hand_player_2)

originator.battle('player_1', 'player_2')
caretaker.backup()

originator.deployment('player_1', 3)
caretaker.backup()

originator.lead('player_1', 'thufir_hawat')
caretaker.backup()

originator.treachery('player_1', hand_player_1['cards'][0])
caretaker.backup()

originator.deployment('player_2', 4)
caretaker.backup()

originator.lead('player_2', 'alia')
caretaker.backup()

originator.treachery('player_2', hand_player_2['cards'][0])
caretaker.backup()

originator.render('images/originator/originator11.jpg', battle=True)

arrakis_cartography

Improve the Truthsayer experience

  1. To allow our bot to suggest territory names in commands try to convince Discord to increase the limits on number of choices from 25 to at least 42.

Credits

Game assets from Sorvan's website.

For vectorizing regions on the map we used the summerstyle editor.

For creating transparency on the battle wheels used online png tools.

Metadata

Release files for truthsayer 0.10.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for truthsayer 0.10.10
File Size Uploaded Provenance Actions
truthsayer-0.10.10.tar.gz 21.7 kB Without provenance Details for truthsayer-0.10.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for truthsayer 0.10.10
File Interpreter ABI Platform Actions
truthsayer-0.10.10-py3-none-any.whl Python 3 none any Details for truthsayer-0.10.10-py3-none-any.whl

Total release size: 43.5 kB

Release files / truthsayer-0.10.10.tar.gz

Download URL truthsayer-0.10.10.tar.gz
Size 21.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1b3edbc2fe73aa42d18cc870deb71853697f1460006b83cf7611ac58a4f64a76
BLAKE2b-256 checksum
How to use checksums
8f23c9bfd7bfa84f5b01a33d3f2529b01730f4235fc8da5644fa86bab1d5e363
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.4

Release files / truthsayer-0.10.10-py3-none-any.whl

Download URL truthsayer-0.10.10-py3-none-any.whl
Size 21.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d79a5d989d1e435e363516301e6719850255d3832b5d73d00c8eef6771863249
BLAKE2b-256 checksum
How to use checksums
459b27009024cb3557b191026c44ce7d8d521016ad538cd6703ad4b9de8374ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.4

Security for truthsayer 0.10.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page