ThiaudioTT / hoi4-presence

Hearts of Iron IV presence for Discord!
MIT License
13 stars 10 forks source link

Add more countries #4

Closed ThiaudioTT closed 1 year ago

ThiaudioTT commented 1 year ago

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.

Falcon2k1 commented 1 year ago

I could take a shot at this, although I don't actually play HOI4 :) Looking to get more experience contributing to OSS projects, though, and I do know python pretty well.

https://hoi4.paradoxwikis.com/Countries Is this list accurate or is there anything else I should know about? If so I can probably help out with this.

Edit: So I dug around a little bit, it looks like for adding more countries we will need to upload more images through the discord application portal, so I don't know if I understand what's required here. Do you have an application already setup with this, or are you somehow using the official Hearts of Iron one? How would you go about testing this yourself? If you can give me a bit more information I can do the code half of it pretty easily, just not sure how to figure out the flag names and validate them.

ThiaudioTT commented 1 year ago

@Falcon2k1

https://hoi4.paradoxwikis.com/Countries Is this list accurate or is there anything else I should know about?

Yes, the list is accurate, use this if you have trouble in the choosing the tags: https://forum.paradoxplaza.com/forum/threads/hoi4-resource-history-spreadsheet-updated-to-include-barbarossa-1-11-5.1509285/

The list of countries is larger, you can create another file with a function and import to main.py

So I dug around a little bit, it looks like for adding more countries we will need to upload more images through the discord application portal, so I don't know if I understand what's required here. Do you have an application already setup with this, or are you somehow using the official Hearts of Iron one? How would you go about testing this yourself? If you can give me a bit more information I can do the code half of it pretty easily, just not sure how to figure out the flag names and validate them.

It all depends on you, if you want to add the flags and the code...

You can do:

(if you will add the flags and the code)

Create a folder named /assets/ or /flags/ in the main Dir.

Create another application in https://discord.com/developers/applications and change main.pyclient_id = 'your app ID' and then start to developer.

The name of the flags, are exactly as in hoi4 wiki, but all in lowercase.

Example: I will add Costa Rica.

Go to https://hoi4.paradoxwikis.com/Costa_Rica and save the flag in /assets/, the name of the image is Costa_Rica.png, I will rename to costa_rica.png

In the code:

case "COS": # see the name of the TAG in hoi4wiki
    country = "Costa Rica"
    flag = "costa_rica" # without .png extension

In your application, you will add that image to art assets, and then test using the visualizer... Since you don't play hoi4, you don't need to test in the game, only knowing the country tag it should work.

Falcon2k1 commented 1 year ago

Thanks! I think I could help with that. I'll update if I can get a PR together for it.

Falcon2k1 commented 1 year ago

Got some basics setup; getting the flags is gonna take a couple days, but should have a PR sometime next week.

ThiaudioTT commented 1 year ago

Got some basics setup; getting the flags is gonna take a couple days, but should have a PR sometime next week.

Okay, thanks for all the work!

ThiaudioTT commented 1 year ago

Unassigned due to inactivity

ThiaudioTT commented 1 year ago

I added a module in the branch development that solve this issue partially.

This issue is generalized, creating an Issue like: add country X is more specific, and I think that is better.

With this module that I'm still implementing, it will be easier to add a country.

So, I will assign this issue to me and close it when it enters to the "production", that is, when I merge with the branch main.

ThiaudioTT commented 1 year ago

I will close this now and open later

ThiaudioTT commented 1 year ago

This: #27 solve this issue