Giter VIP home page Giter VIP logo

hoi4-presence's Introduction

Hoi4 Rich Presence

Download - Latest Release

demonstration

WindowsOnly GithubStars GithubIssues GitHub last commit

pypresence Pyinstaller

BuiltWithSwag MadeWithPython

About

This is a presence for discord that shows what you are doing in Hearts of Iron 4.

How to download and install

Struggling in installing? See the Wiki.

Known issues

HOI4 is frequently updating, see known issues in Issues.

Submiting an issue

Found a bug? Submit it.

Contributing

Feel free to contribute! I will be happy to see your pull request.

First, read the CONTRIBUTING.md file.

how the presence works?

It uses the saves to get data. So, spend one month in the game or save the game to update the presence.

See: How it Works

Image sources

Hoi4 Wiki

Logo

hoi4-presence's People

Contributors

imgbotapp avatar thiaudiott avatar wolfmyths avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hoi4-presence's Issues

Rename documents path

image

This text doesn't provide which documents path. The objective of this issue is to provide a way to better show what the documents path is.

It is something like:

C:\Users\$USER\OneDrive\Documentos\Paradox Interactive\Hearts of Iron IV

Issue on launch

Game launches fine, however error messages appear and appears to be accessing wrong file-path, user profile is not called User? (e.g. "Users/User/etc." should be "Users/actualusername/etc."
Capture
Capture2

[BUG] - Can't change launcher-settings.json | 'charmap' codec can't decode byte 0x90 in position 792: character maps to <undefined>

We are having trouble when installing the presence with the new update 1.14.4.3.

We can't change the launcher-settings.json, this causes the presence to not update.
Error:

'charmap' codec can't decode byte 0x90 in position 792: character maps to <undefined>

Possibly related: #36

Line in code:

print("Changing launcher-settings.json...")

Temporary solution

Change exePath in launcher-settings.json to:

"exePath": "./runRPC.bat",

[BUG] Hoi4 Logo not appearing in large-image

I don't know if it's because of this mod called "The Road to 56" but is there any way to fix this to show the country your playing as?
I tried many ways to solve it maybe I am dumb lol I can't seem to find a solution. Cheers!
Screenshot 2024-06-27 230410

Change file location in batchFile if setup.py installs in another folder

start "hoi4RPC.exe" "C:\Users\%USERNAME%\Documents\Paradox Interactive\Hearts of Iron IV\hoi4Presence\checkupdate.exe"

This drive name is fixed and needs to change like setup.py changes the installation.

We fix this issue making setup.py rewrite this line and making it point to the exact location.

Both for presence path and checkupdate path

Create an installer

Create an setup.py that install all the files (batch and .exe and all with the dependencies) and configure the initialization automatically.

Adjust auto-release when making a new tag

Basically, create a new workflow for when a release tag is created.

Like in:
https://github.com/marketplace/actions/automatic-releases#create-a-new-github-release-when-tags-are-pushed-to-the-repository

This will define a new tag "release" to be the most stable version.

Then checkupdate.py must be updated to reflect the new changes, it should check the version.json in the latest tag.

URL = urllib.request.urlopen("https://raw.githubusercontent.com/ThiaudioTT/hoi4-presence/main/version.json")

This workflow also needs to validate version.json, see #45 is also related.

summary

  • Create the new workflow to trigger when a new version tag is created and auto set as the latest release
  • Update checkupdate.py to see the latest tag
  • Auto bump and validate version.json, related: #45

CI/CD for the repo

We can create, somehow, a github workflow to build the exe files and release the packages. This would create a CI/CD and make the release more easier.

Solving this issue first would be better-> #9

Uninstaller

Create an uninstaller to bring back the vanilla game.

See #2

Improve documentation

Create an /docs folder and add documentations there OR

Elaborate repository Wiki.

Auto bump in CI/CD

Before merge a PR.

it should:

verify branch main for version.json.

See if it is bumped, if yes -> ok to merge

Utils module and debug mode

For things like debug print and sys.exit.

Example of a code:

debug("Oopsie, I am silly, I made a bug")

This will print in console. (if debug mode) and pause for 1 second.

A debug mode

We need to have a debug mode to make it easier to develop and test it.
Like: auto save always new.

Random large images

We could have different large_images showing when we don't have a country for it.

Images like:

  • Some random printscreen of the gameplay
  • Different icons

etc.

Create an "all in one" file

This will help with the release packages. Make a CMAKE/Makefile using batch, or something, to compile all the files in one folder.

Adds more time when getting errors

When I get some error, the program exit it without any warning in some cases.

We need to find when and where this occurs and adds a time.sleep(10) (or other thing) to let the user know that we get an error.

Check if the paths in installer are all valid

Add checking if paths in installer are all valids.

If it isn't valid, ask the user to enter the path again.

image

Obs:
Checking if the path is valid isn't enough, we already do it. Check if the path contains the game and the others resources that the presence uses (if any) and asks the user until we find a real valid path.

Add more countries

Currently, the presence works perfectly only with the "main" countries.

Add all the others countries, as well their flags, use discord developer portal to see if the images are good.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.