{"id":20858543,"url":"https://github.com/yard1/hoi4-scripted-gui-pie-chart","last_synced_at":"2026-03-13T08:31:17.278Z","repository":{"id":101531693,"uuid":"195421690","full_name":"Yard1/HoI4-Scripted-GUI-Pie-Chart","owner":"Yard1","description":"An example way of how to implement a Scripted GUI pie chart in Hearts of Iron IV.","archived":false,"fork":false,"pushed_at":"2020-05-07T23:15:18.000Z","size":19,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T07:23:55.531Z","etag":null,"topics":["hearts-of-iron-4","hearts-of-iron-iv","heartsofiron4","modding","modding-resources","paradox-interactive","paradoxgame","pie-chart"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yard1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-05T14:20:14.000Z","updated_at":"2024-11-11T08:36:55.000Z","dependencies_parsed_at":"2023-06-28T17:31:18.052Z","dependency_job_id":null,"html_url":"https://github.com/Yard1/HoI4-Scripted-GUI-Pie-Chart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yard1%2FHoI4-Scripted-GUI-Pie-Chart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yard1%2FHoI4-Scripted-GUI-Pie-Chart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yard1%2FHoI4-Scripted-GUI-Pie-Chart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yard1%2FHoI4-Scripted-GUI-Pie-Chart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yard1","download_url":"https://codeload.github.com/Yard1/HoI4-Scripted-GUI-Pie-Chart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243230101,"owners_count":20257644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hearts-of-iron-4","hearts-of-iron-iv","heartsofiron4","modding","modding-resources","paradox-interactive","paradoxgame","pie-chart"],"created_at":"2024-11-18T04:46:28.168Z","updated_at":"2025-12-24T08:47:18.644Z","avatar_url":"https://github.com/Yard1.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# HoI4-Scripted-GUI-Pie-Chart\nAn example way of how to implement a Scripted GUI pie chart in Hearts of Iron 4.\n\n![Showcase GIF](https://thumbs.gfycat.com/UnnaturalInconsequentialEsok-size_restricted.gif)\n\nA pie segment iconType equivalent to a 1/100 of the entire pie is created 100 times, each time with a 3.6 degree rotation, creating a full pie in the end. The texture contains frames - and which frame is shown is controlled by a 100 element `pie_chart` array, with each element corresponding to an iconType. The `create_pie_chart` scripted effect is used to create the `pie_chart` array, updating the pie chart. In this example, it is called daily.\n\nThe pie chart can be easily resized with `scale` argument in the .gui file. Changing the number of possible colors is also easy - one just needs to add/remove frames from the `gfx/interface/pie_chart_segment.dds` texture, and update the .gfx entry and the `create_pie_chart` scripted effect. This pie chart can be used to represent any values adding up to 100% - in this example, vanilla party popularities are used.\n\nYou may overlay a pie chart overlay onto this pie chart, to make it look nicer.\n\nFeel free to use in your mods, but give credits to Yard1 (both in code, with comments; and on your download page).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyard1%2Fhoi4-scripted-gui-pie-chart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyard1%2Fhoi4-scripted-gui-pie-chart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyard1%2Fhoi4-scripted-gui-pie-chart/lists"}