Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload my section in MVP demo to make load system
Made a default load system button and stuff by our game style. and next week, I'll try to connect the directory system and load character files by CSV files.
- Loading branch information
1 parent
d1cbb70
commit 988382d
Showing
126 changed files
with
4,279 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
Phase2/Godot_GameCode/_MVP_Game_Demo/Suhwan/bcirpg_game_mvp_2024_0204A/.import/.gdignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
3 changes: 3 additions & 0 deletions
3
...rpg_game_mvp_2024_0204A/.import/Background_black.png-56039c85507f66e5b636dc3622fcd7f0.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source_md5="79d2b9a5284e50d91a97c2dd565f2fa4" | ||
dest_md5="ab01d4eeab6e15a95fc10ee1b4e02967" | ||
|
Binary file added
BIN
+2.24 KB
...pg_game_mvp_2024_0204A/.import/Background_black.png-56039c85507f66e5b636dc3622fcd7f0.stex
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
...rpg_game_mvp_2024_0204A/.import/Background_black.png-5f076dc51f49c2d5a7007d49260388b4.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source_md5="79d2b9a5284e50d91a97c2dd565f2fa4" | ||
dest_md5="ab01d4eeab6e15a95fc10ee1b4e02967" | ||
|
Binary file added
BIN
+2.24 KB
...pg_game_mvp_2024_0204A/.import/Background_black.png-5f076dc51f49c2d5a7007d49260388b4.stex
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
...rpg_game_mvp_2024_0204A/.import/Background_white.png-092c9ce605239bda8605597c05979c3a.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source_md5="13a1e728def8fb06bd8e797fcc392604" | ||
dest_md5="b396169339b2e8d769e9830c387050ad" | ||
|
Binary file added
BIN
+3.61 KB
...pg_game_mvp_2024_0204A/.import/Background_white.png-092c9ce605239bda8605597c05979c3a.stex
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
...rpg_game_mvp_2024_0204A/.import/Background_white.png-90278c2837a8c1d366dff638eb6d5498.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source_md5="13a1e728def8fb06bd8e797fcc392604" | ||
dest_md5="b396169339b2e8d769e9830c387050ad" | ||
|
Binary file added
BIN
+3.61 KB
...pg_game_mvp_2024_0204A/.import/Background_white.png-90278c2837a8c1d366dff638eb6d5498.stex
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
...irpg_game_mvp_2024_0204A/.import/background_demo.png-bf78baa5e40d24f1836aa08964398dec.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source_md5="266f789a4e895911161321092c2c2429" | ||
dest_md5="a08a6dcf169f683724bfd5cd82e23fe6" | ||
|
Binary file added
BIN
+36 KB
...rpg_game_mvp_2024_0204A/.import/background_demo.png-bf78baa5e40d24f1836aa08964398dec.stex
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
...irpg_game_mvp_2024_0204A/.import/background_demo.png-e30ac367b3596013bad15f6d4bbea075.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source_md5="266f789a4e895911161321092c2c2429" | ||
dest_md5="a08a6dcf169f683724bfd5cd82e23fe6" | ||
|
Binary file added
BIN
+36 KB
...rpg_game_mvp_2024_0204A/.import/background_demo.png-e30ac367b3596013bad15f6d4bbea075.stex
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
...o/Suhwan/bcirpg_game_mvp_2024_0204A/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source_md5="47313fa4c47a9963fddd764e1ec6e4a8" | ||
dest_md5="2ded9e7f9060e2b530aab678b135fc5b" | ||
|
Binary file added
BIN
+3.33 KB
.../Suhwan/bcirpg_game_mvp_2024_0204A/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex
Binary file not shown.
1 change: 1 addition & 0 deletions
1
...o/Suhwan/bcirpg_game_mvp_2024_0204A/.import/test.csv-75a2900a9caab1d59b154f8c32b55ac9.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
source_md5="cfb2a27b25dace2544a35a8ec7d50081" |
3 changes: 3 additions & 0 deletions
3
...g_game_mvp_2024_0204A/.import/testingCSVCharFile.csv-3b5525eef03e325be0c14b7381c8663a.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source_md5="6c1f8727c8d1f2bf769473ce1e014294" | ||
dest_md5="93baaa829d8920726f5c904e487be855" | ||
|
1 change: 1 addition & 0 deletions
1
...g_game_mvp_2024_0204A/.import/testingCSVCharFile.csv-f593f5b4d0df687ec2043eb45dbff294.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
source_md5="fe8dea03f3f241ec8c3f199dcd974cbe" |
8 changes: 8 additions & 0 deletions
8
Phase2/Godot_GameCode/_MVP_Game_Demo/Suhwan/bcirpg_game_mvp_2024_0204A/Control.tscn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[gd_scene format=2] | ||
|
||
[node name="Control" type="Control"] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} |
43 changes: 43 additions & 0 deletions
43
Phase2/Godot_GameCode/_MVP_Game_Demo/Suhwan/bcirpg_game_mvp_2024_0204A/README.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
**************************** | ||
README.TXT: | ||
**************************** | ||
Author: Doug McCord | ||
Date: 4-Feb-2024 | ||
|
||
**************************** | ||
Intro notes: | ||
This project updates the RPGR BCI merged demo game from August 6, 2023 for | ||
the Modgodtoolset and associated updates. Draws game from XML, and adds | ||
numerous missing features. | ||
|
||
The roadmap for this file can be found in the project Github: | ||
Phase2/Documentation | ||
|
||
|
||
|
||
**************************** | ||
Project file structure: | ||
Surface Layer: | ||
Default Godot files remain at this level | ||
|
||
_toArchive: | ||
Directory to serve as reference-only; precursor to trash | ||
|
||
assets: | ||
Images, fonts, themes and styles (TRES text resource data files). Note that all fonts and styles are defined in | ||
the following themes: ui_controlNode_light_theme.tres and ui_controlNode_dark_theme.tres. Any style changes | ||
should be made in those theme files to assure propagation throughout. | ||
|
||
gamePlay: | ||
Scenes and scripts specific to the gameplay section | ||
|
||
globalScripts: | ||
For project-wide use, or scripts that are not either: | ||
A. attached to a template scene, intended to go with all instances of that, or | ||
B. unique, scene-specific scripts. | ||
|
||
screens: | ||
Planned to include both .tscn scene files and their associated scripts. | ||
|
||
userInterface: (note misnomer for text-based game) | ||
Re-useable UI elements and their scripts, such as change-scene, input-response |
13 changes: 13 additions & 0 deletions
13
...dot_GameCode/_MVP_Game_Demo/Suhwan/bcirpg_game_mvp_2024_0204A/Screens/But_HistoryPager.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#BUT_HISTORYPAGER: | ||
# Iterates the page number and calls HistoryViewer script to display | ||
# stored page and response fro the history array | ||
# | ||
|
||
extends Button | ||
|
||
onready var historyViewerScript = get_node("/root/HistoryViewer") | ||
|
||
#DKM TEMP: this needs refactoring -- too much being calculated as needed/repeated | ||
func _on_But_HistoryPager_button_up() -> void: | ||
historyViewerScript.update_pager() | ||
|
28 changes: 28 additions & 0 deletions
28
...dot_GameCode/_MVP_Game_Demo/Suhwan/bcirpg_game_mvp_2024_0204A/Screens/But_StartNewGame.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#BUT_CHANGESCENE: | ||
# Generic template script allowing GUI linking of scenes by button press. | ||
|
||
tool | ||
extends Button | ||
|
||
#Creates param usable in the UI; and the params next to export make it string and file browser | ||
export(String, FILE) var next_scene_path: = "" | ||
|
||
onready var pSingleton = get_node("/root/PlayerCharacter").pc | ||
|
||
var tempToggle = 0 | ||
|
||
func _on_But_NewGame_button_up(): | ||
if(pSingleton.pcText.length() < 1): | ||
#print("GOT IT! Popup msg: " + $PopupDialog/WarnText.text) | ||
var alertPopup = get_node("../../PopupDialog") | ||
var alertPopupText = get_node("../../PopupDialog/WarnText") | ||
alertPopupText.text = "No player was loaded! Please load a character to begin game." | ||
alertPopup.popup_centered() | ||
return | ||
else: | ||
var _changeResponse = get_tree().change_scene(next_scene_path) | ||
|
||
|
||
func _get_configuration_warning() -> String: | ||
return "next_scene_path must be set for this button to work" if next_scene_path == "" else "" | ||
|
88 changes: 88 additions & 0 deletions
88
.../Godot_GameCode/_MVP_Game_Demo/Suhwan/bcirpg_game_mvp_2024_0204A/Screens/Character_Add.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#CHARACTER_ADD: | ||
# Script for adding a new character and both saving it to file and loading | ||
# it into the character object | ||
|
||
extends Control | ||
|
||
onready var settings = get_node("/root/GlobalSaveInstance").settingsInstance | ||
onready var pSingleton = get_node("/root/PlayerCharacter").pc | ||
|
||
onready var Name = get_node("Title/VBoxContainer/LabelName/LE_Name") | ||
|
||
onready var Profession = get_node("Title/VBoxContainer/LabelProfession/LE_Pro") | ||
|
||
onready var Strength = get_node("Title/VBoxContainer/LabelStrength/LE_Str") | ||
|
||
onready var Intellect = get_node("Title/VBoxContainer/LabelIntellect/LE_Intl") | ||
|
||
onready var Willpower = get_node("Title/VBoxContainer/LabelWillpower/LE_Will") | ||
|
||
onready var Charm = get_node("Title/VBoxContainer/LabelCharm/LE_Charm") | ||
|
||
onready var Weapon = get_node("Title/VBoxContainer/LabelWeapon/LE_Weapon") | ||
|
||
onready var Armor = get_node("Title/VBoxContainer/LabelArmor/LE_Armor") | ||
|
||
onready var Quote = get_node("Title/VBoxContainer/LabelQuote/LE_Quote") | ||
|
||
func _ready() -> void: | ||
theme=load(settings.themeFile) | ||
$Title/But_SaveChar.grab_focus() | ||
|
||
|
||
func save_data_to_csv(data: Array, file_path : String) ->void: | ||
var file = File.new() | ||
|
||
if file.open(file_path, File.WRITE) == OK: | ||
for row in data: | ||
file.store_string(format_row(row)) | ||
file.close() | ||
print("Data saved to ", file_path) | ||
else: | ||
print("Failed to open ", file_path, " for writing.") | ||
|
||
|
||
func format_row(row_data: Array) -> String: | ||
# Convert the array of data to a comma-separated string | ||
var formatted_row = "" | ||
for i in range(row_data.size()): | ||
formatted_row += str(row_data[i]) | ||
if i < row_data.size() - 1: | ||
formatted_row += "," | ||
|
||
formatted_row += "\n" | ||
|
||
return formatted_row | ||
|
||
|
||
|
||
func _prep_PlayerCharacter_Template(): | ||
# This function prepares the data for the player character in two ways. | ||
# Way 1: By loading all of this data into the singleton for easy reads during gameplay | ||
# Way 2: To prepare the data to be pulled from the singleton, when writing a file. | ||
pSingleton.name = Name.text | ||
pSingleton.profession = Profession.text | ||
pSingleton.strength = Strength.text | ||
pSingleton.intellect = Intellect.text | ||
pSingleton.willpower = Willpower.text | ||
pSingleton.charm = Charm.text | ||
pSingleton.armor = Armor.text | ||
pSingleton.quote = Quote.text | ||
|
||
func _on_But_SaveChar_pressed() -> void: | ||
_prep_PlayerCharacter_Template() | ||
var file_path = "" | ||
|
||
if pSingleton.name != "": | ||
file_path = "user://" + pSingleton.name + "_data.csv" | ||
else: | ||
file_path = "user//character_data.csv" | ||
|
||
var input_data = [ | ||
["Name", "Profession", "Strength", "Intellect", "Willpower", "Charm", "Weapon", "Armor", "Quote"], | ||
[pSingleton.name, pSingleton.profession, pSingleton.strength, pSingleton.intellect, pSingleton.willpower, pSingleton.charm, pSingleton.weapon, pSingleton.armor, pSingleton.quote], | ||
] | ||
|
||
save_data_to_csv(input_data, file_path) | ||
|
||
|
Oops, something went wrong.