aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/builds.yml18
-rw-r--r--docs/simulation/calculations.yaml45
-rw-r--r--game/assets/graphics/theme/main_menu.tres21
-rw-r--r--game/assets/localisation/locales/en_GB/menus.csv6
-rw-r--r--game/assets/localisation/locales/en_US/menus.csv6
-rw-r--r--game/src/Game/Menu/MainMenu/ReleaseInfoBox.gd23
-rw-r--r--game/src/Game/Menu/MainMenu/ReleaseInfoBox.tscn46
7 files changed, 133 insertions, 32 deletions
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml
index db71c8d..afc2d7e 100644
--- a/.github/workflows/builds.yml
+++ b/.github/workflows/builds.yml
@@ -1,6 +1,22 @@
name: Builds
-on: [push, pull_request]
+on:
+ push:
+ paths-ignore:
+ - '.github/**'
+ - '.vscode/**'
+ - 'docs/**'
+ - 'LICENSE-EXCEPTIONS.md'
+ - 'LICENSE.md'
+ - 'README.md'
+ pull_request:
+ paths-ignore:
+ - '.github/**'
+ - '.vscode/**'
+ - 'docs/**'
+ - 'LICENSE-EXCEPTIONS.md'
+ - 'LICENSE.md'
+ - 'README.md'
env:
GODOT_BASE_DOWNLOAD_URL: https://github.com/godotengine/godot
diff --git a/docs/simulation/calculations.yaml b/docs/simulation/calculations.yaml
index d0def97..9907991 100644
--- a/docs/simulation/calculations.yaml
+++ b/docs/simulation/calculations.yaml
@@ -1,17 +1,3 @@
-Budget:
- Loan interest per day:
- formula: (NBD + FBD * (1 + FIM)) * max(0.01, LBI+BIM)/30
- NBD: National bank debt = debt owed to your national bank.
- FBD: Foreign bank debt = debt owed to foreign national banks and private investors.
- 1+FIM: Foreign interest modifier = sum of loan_interest modifiers from non-tech
- max(0.01: Hardcoded value. Reasoning unknown.
- LBI: defines.economy.LOAN_BASE_INTEREST
- BIM: Base interest modifier = sum of loan_interest modifiers from technology.
- /30: Hardcoded value to represent days in a month.
- Gold income daily:
- formula: MGQ * GOLD_TO_CASH_RATE
- MGQ: Money good quanity = total production of goods with money = yes
- GOLD_TO_CASH_RATE: defines.country.GOLD_TO_CASH_RATE
Diplomacy:
Monthly diplomatic points gain: defines.country.BASE_MONTHLY_DIPLOPOINTS * (1 + sum of diplomatic_points + sum of diplomatic_points_modifier)
Influence:
@@ -50,6 +36,37 @@ Diplomacy:
else: 0
Daily influence gain per country: Base daily influence gain per country * Country influence gain modifier
Colonisable life rating: defines.country.COLONIAL_LIFERATING + sum of colonial_life_rating
+Economy:
+ Budget:
+ Loan interest per day:
+ formula: (NBD + FBD * (1 + FIM)) * max(0.01, LBI+BIM)/30
+ NBD: National bank debt = debt owed to your national bank.
+ FBD: Foreign bank debt = debt owed to foreign national banks and private investors.
+ 1+FIM: Foreign interest modifier = sum of loan_interest modifiers from non-tech
+ max(0.01: Hardcoded value. Reasoning unknown.
+ LBI: defines.economy.LOAN_BASE_INTEREST
+ BIM: Base interest modifier = sum of loan_interest modifiers from technology.
+ /30: Hardcoded value to represent days in a month.
+ Gold income daily:
+ formula: MGQ * GOLD_TO_CASH_RATE
+ MGQ: Money good quanity = total production of goods with money = yes
+ GOLD_TO_CASH_RATE: defines.country.GOLD_TO_CASH_RATE
+ Production:
+ Human resource management:
+ Vacancies: max employees - employees count
+ Maximum employees hired per day:
+ formula: max(employees available, relative maximum)
+ employees available: unemployed employee pops in state
+ relative maximum:
+ if employees count = 0 & max employees >= 6667: 0.2775 * Vacancies
+ else: ceil(0.15 * Vacancies) - 1
+ 0.15: Hardcoded value
+ 0.2775: 1 - (1 - 0.15)^2
+ note: Rounding is unknown for the 0.2775 case. See https://discord.com/channels/1063392556160909312/1063416834650554398/1204520366643347476
+ Minimum employees hired per day:
+ formula: max(absolute minimum, relative minimum)
+ absolute minimum: 50 (hardcoded value)
+ relative minimum: floor(defines.economy.EMPLOYMENT_HIRE_LOWEST * employees count)
Military:
Maximum units per soldier POP:
if POP size < defines.military.POP_MIN_SIZE_FOR_REGIMENT: 0
diff --git a/game/assets/graphics/theme/main_menu.tres b/game/assets/graphics/theme/main_menu.tres
index d79184c..c39d030 100644
--- a/game/assets/graphics/theme/main_menu.tres
+++ b/game/assets/graphics/theme/main_menu.tres
@@ -1,4 +1,4 @@
-[gd_resource type="Theme" load_steps=32 format=3 uid="uid://qoi3oec48jp0"]
+[gd_resource type="Theme" load_steps=37 format=3 uid="uid://qoi3oec48jp0"]
[ext_resource type="Script" path="res://src/Game/Theme/StyleBoxCombinedTexture.gd" id="1_axke7"]
[ext_resource type="Script" path="res://src/Game/Theme/TextureSetting.gd" id="2_7bwl2"]
@@ -81,6 +81,16 @@ texture_settings = Array[ExtResource("2_7bwl2")]([SubResource("Resource_hxpog"),
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1qcrh"]
+[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_yfar7"]
+
+[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_m16nl"]
+
+[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_exmmj"]
+
+[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_k4wq5"]
+
+[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_nm664"]
+
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_dd2b8"]
content_margin_left = 20.0
content_margin_top = 10.0
@@ -169,6 +179,15 @@ CommitLabel/styles/focus = SubResource("StyleBoxEmpty_1qwxu")
CommitLabel/styles/hover = SubResource("StyleBoxEmpty_myxhv")
CommitLabel/styles/normal = SubResource("StyleBoxEmpty_kmfi1")
CommitLabel/styles/pressed = SubResource("StyleBoxEmpty_1qcrh")
+GameInfoButton/base_type = &"Button"
+GameInfoButton/colors/font_hover_color = Color(0.360784, 0.360784, 0.360784, 1)
+GameInfoButton/colors/font_hover_pressed_color = Color(0.215686, 0.215686, 0.215686, 1)
+GameInfoButton/colors/font_pressed_color = Color(0.215686, 0.215686, 0.215686, 1)
+GameInfoButton/styles/disabled = SubResource("StyleBoxEmpty_yfar7")
+GameInfoButton/styles/focus = SubResource("StyleBoxEmpty_m16nl")
+GameInfoButton/styles/hover = SubResource("StyleBoxEmpty_exmmj")
+GameInfoButton/styles/normal = SubResource("StyleBoxEmpty_k4wq5")
+GameInfoButton/styles/pressed = SubResource("StyleBoxEmpty_nm664")
TitleButton/base_type = &"Button"
TitleButton/colors/font_color = Color(0.87451, 0.87451, 0.87451, 1)
TitleButton/colors/font_disabled_color = Color(0.87451, 0.87451, 0.87451, 0.501961)
diff --git a/game/assets/localisation/locales/en_GB/menus.csv b/game/assets/localisation/locales/en_GB/menus.csv
index f329342..67e3519 100644
--- a/game/assets/localisation/locales/en_GB/menus.csv
+++ b/game/assets/localisation/locales/en_GB/menus.csv
@@ -11,7 +11,11 @@ MAINMENU_MULTIPLAYER;Multiplayer
MAINMENU_OPTIONS;Options
MAINMENU_CREDITS;Credits
MAINMENU_EXIT;Exit
-MAINMENU_CHECKSUM;Checksum {checksum}
+MAIMENU_LATEST_RELEASE_NAME;Latest Release Name: {release_name}
+MAIMENU_COMMIT;Commit: {short_hash}
+MAINMENU_CHECKSUM;Checksum: {short_checksum}
+MAINMENU_CHECKSUM_TOOLTIP;Checksum {checksum}
+MAINMENU_GAME_INFO;Game Info
;; Options
OPTIONS_RESET;R
diff --git a/game/assets/localisation/locales/en_US/menus.csv b/game/assets/localisation/locales/en_US/menus.csv
index 1312f3b..3b4b9e8 100644
--- a/game/assets/localisation/locales/en_US/menus.csv
+++ b/game/assets/localisation/locales/en_US/menus.csv
@@ -7,7 +7,11 @@ MAINMENU_MULTIPLAYER;Multiplayer
MAINMENU_OPTIONS;Options
MAINMENU_CREDITS;Credits
MAINMENU_EXIT;Exit
-MAINMENU_CHECKSUM;Checksum {checksum}
+MAIMENU_LATEST_RELEASE_NAME;Latest Release Name: {release_name}
+MAIMENU_COMMIT;Commit: {short_hash}
+MAINMENU_CHECKSUM;Checksum: {short_checksum}
+MAINMENU_CHECKSUM_TOOLTIP;Checksum {checksum}
+MAINMENU_GAME_INFO;Game Info
;; Options
OPTIONS_RESET;R
diff --git a/game/src/Game/Menu/MainMenu/ReleaseInfoBox.gd b/game/src/Game/Menu/MainMenu/ReleaseInfoBox.gd
index c52503c..1529129 100644
--- a/game/src/Game/Menu/MainMenu/ReleaseInfoBox.gd
+++ b/game/src/Game/Menu/MainMenu/ReleaseInfoBox.gd
@@ -15,9 +15,9 @@ var _checksum : String = "????"
# * SS-104, SS-105, SS-106, SS-107
# * UIFUN-97, UIFUN-297, UIFUN-299
func _ready() -> void:
- _version_label.text = _GIT_INFO_.release_name
+ _version_label.text = tr("MAIMENU_LATEST_RELEASE_NAME").format({ "release_name": _GIT_INFO_.release_name })
_version_label.tooltip_text = _GIT_INFO_.tag
- _commit_label.text = _GIT_INFO_.short_hash
+ _commit_label.text = tr("MAIMENU_COMMIT").format({ "short_hash": _GIT_INFO_.short_hash })
_commit_label.tooltip_text = _GIT_INFO_.commit_hash
# UI-111
_checksum = Checksum.get_checksum_text()
@@ -29,8 +29,8 @@ func _notification(what : int) -> void:
_update_checksum_label_text()
func _update_checksum_label_text() -> void:
- _checksum_label.tooltip_text = tr("MAINMENU_CHECKSUM").format({ "checksum": _checksum })
- _checksum_label.text = "(%s)" % _checksum.substr(0, 4)
+ _checksum_label.tooltip_text = tr("MAINMENU_CHECKSUM_TOOLTIP").format({ "checksum": _checksum })
+ _checksum_label.text = tr("MAINMENU_CHECKSUM").format({ "short_checksum": _checksum.substr(0, 4) })
func _on_version_label_pressed() -> void:
DisplayServer.clipboard_set(_GIT_INFO_.tag)
@@ -40,3 +40,18 @@ func _on_commit_label_pressed() -> void:
func _on_checksum_label_pressed() -> void:
DisplayServer.clipboard_set(_checksum)
+
+func _on_game_info_button_pressed() -> void:
+ var project_name := ProjectSettings.get_setting("application/config/name") as String
+ var tag_name := _GIT_INFO_.tag
+ var commit_sha := _GIT_INFO_.short_hash
+ var godot_version := Engine.get_version_info().string as String
+ var os_name := OS.get_distribution_name()
+ var date_str := Time.get_datetime_string_from_system(true)
+ var display_server := DisplayServer.get_name()
+ var gpu_name := RenderingServer.get_video_adapter_name()
+ var gpu_api_version := RenderingServer.get_video_adapter_api_version()
+ var cpu_name := OS.get_processor_name()
+ var cpu_processor_count := OS.get_processor_count()
+ DisplayServer.clipboard_set("%s %s (%s) [Godot %s] - %s %s - %s - %s (API: %s) - %s (%s Threads)"
+ % [project_name, tag_name, commit_sha, godot_version, os_name, date_str, display_server, gpu_name, gpu_api_version, cpu_name, cpu_processor_count])
diff --git a/game/src/Game/Menu/MainMenu/ReleaseInfoBox.tscn b/game/src/Game/Menu/MainMenu/ReleaseInfoBox.tscn
index d9de5ea..55b2fdf 100644
--- a/game/src/Game/Menu/MainMenu/ReleaseInfoBox.tscn
+++ b/game/src/Game/Menu/MainMenu/ReleaseInfoBox.tscn
@@ -1,15 +1,34 @@
-[gd_scene load_steps=2 format=3 uid="uid://cen7wkmn6og66"]
+[gd_scene load_steps=4 format=3 uid="uid://cen7wkmn6og66"]
[ext_resource type="Script" path="res://src/Game/Menu/MainMenu/ReleaseInfoBox.gd" id="1_y2djw"]
+[sub_resource type="StyleBoxLine" id="StyleBoxLine_07plf"]
+content_margin_right = 2.0
+color = Color(1, 1, 1, 1)
+thickness = 2
+vertical = true
+
+[sub_resource type="Theme" id="Theme_une4m"]
+VSeparator/styles/separator = SubResource("StyleBoxLine_07plf")
+
[node name="ReleaseInfoBox" type="HBoxContainer" node_paths=PackedStringArray("_version_label", "_commit_label", "_checksum_label")]
editor_description = "UI-31"
+theme = SubResource("Theme_une4m")
script = ExtResource("1_y2djw")
-_version_label = NodePath("VersionLabel")
-_commit_label = NodePath("CommitLabel")
-_checksum_label = NodePath("ChecksumLabel")
+_version_label = NodePath("VersionButton")
+_commit_label = NodePath("CommitButton")
+_checksum_label = NodePath("ChecksumButton")
+
+[node name="GameInfoButton" type="Button" parent="."]
+layout_mode = 2
+theme_type_variation = &"GameInfoButton"
+text = "MAINMENU_GAME_INFO"
+flat = true
-[node name="VersionLabel" type="Button" parent="."]
+[node name="VSeparator" type="VSeparator" parent="."]
+layout_mode = 2
+
+[node name="VersionButton" type="Button" parent="."]
editor_description = "UI-869, UI-870"
layout_mode = 2
tooltip_text = "VERSION_MISSING"
@@ -19,7 +38,10 @@ text = "VERSION_MISSING"
flat = true
alignment = 0
-[node name="CommitLabel" type="Button" parent="."]
+[node name="VSeparator2" type="VSeparator" parent="."]
+layout_mode = 2
+
+[node name="CommitButton" type="Button" parent="."]
editor_description = "UI-871, UI-872"
layout_mode = 2
focus_mode = 0
@@ -28,7 +50,10 @@ text = "????????"
flat = true
alignment = 0
-[node name="ChecksumLabel" type="Button" parent="."]
+[node name="VSeparator3" type="VSeparator" parent="."]
+layout_mode = 2
+
+[node name="ChecksumButton" type="Button" parent="."]
editor_description = "UI-111"
layout_mode = 2
tooltip_text = "CHECKSUM_MISSING"
@@ -38,6 +63,7 @@ text = "(????)"
flat = true
alignment = 0
-[connection signal="pressed" from="VersionLabel" to="." method="_on_version_label_pressed"]
-[connection signal="pressed" from="CommitLabel" to="." method="_on_commit_label_pressed"]
-[connection signal="pressed" from="ChecksumLabel" to="." method="_on_checksum_label_pressed"]
+[connection signal="pressed" from="GameInfoButton" to="." method="_on_game_info_button_pressed"]
+[connection signal="pressed" from="VersionButton" to="." method="_on_version_label_pressed"]
+[connection signal="pressed" from="CommitButton" to="." method="_on_commit_label_pressed"]
+[connection signal="pressed" from="ChecksumButton" to="." method="_on_checksum_label_pressed"]