mirror of
https://github.com/RPG-Research/bcirpg.git
synced 2024-04-16 14:23:01 +00:00
BCR-RPG SRIS stats added with percentage ability checks
This adds the ability to run percentage ability checks from the JSON module file working on the BCR-RPG SRIS ability scores taken off a new sample CSV char sheet in _userFiles. Needs heavy refactoring and cleanup still.
This commit is contained in:
parent
b15d2976e8
commit
d5a2e1fcf6
@ -0,0 +1,3 @@
|
||||
source_md5="b918ce36c79140123ba6299230647b74"
|
||||
dest_md5="4a3acb68f07fc2d17b50af0660f3c0ca"
|
||||
|
@ -0,0 +1,3 @@
|
||||
source_md5="dd2844f8b96c7a7f955098cd2ce51510"
|
||||
dest_md5="deb4ac7c88acaaec693aea232ca4b9e5"
|
||||
|
@ -0,0 +1,3 @@
|
||||
source_md5="766d733b8edaa28cdf98e68e20ceba59"
|
||||
dest_md5="e416e3ec46373a873cfc4afbf066c70f"
|
||||
|
@ -12,8 +12,8 @@
|
||||
"Action":"ShowText",
|
||||
"A_Params":"",
|
||||
"Text":"The boat rocks gently. You can leave the boat through a hatch. There is also now a test option.",
|
||||
"Option_Labels":["Examine Ship","Climb out through hatch","Play the fiddle!","Rest","Meditate", "Run die roll test"],
|
||||
"Option_GoTos":["Boat_002","Shore_001","Misc_001","Misc_002","Misc_003","Test_000"]
|
||||
"Option_Labels":["Examine Ship","Climb out through hatch","Play the fiddle!","Rest","Meditate", "Run generic die roll test", "Do strength check on percentile die"],
|
||||
"Option_GoTos":["Boat_002","Shore_001","Misc_001","Misc_002","Misc_003","Test_000","Test_002"]
|
||||
},
|
||||
"Node_Boat_002":{
|
||||
"Id":"Boat_002",
|
||||
@ -67,8 +67,24 @@
|
||||
"Id":"Test_001",
|
||||
"Action":"TestHandleNodeParams",
|
||||
"A_Params":"",
|
||||
"Text":"Die were rolled and passed to this node as: ",
|
||||
"Text":"Dice were rolled and passed to this node as: ",
|
||||
"Option_Labels":["Back to boat"],
|
||||
"Option_GoTos":["Boat_001"]
|
||||
}
|
||||
},
|
||||
"Node_Test002":{
|
||||
"Id":"Test_002",
|
||||
"Action":"RollDice",
|
||||
"A_Params":[10,10],
|
||||
"Text":"Dice were rolled and passed to this node as: ",
|
||||
"Option_Labels":["NA"],
|
||||
"Option_GoTos":["Test_003"]
|
||||
},
|
||||
"Node_Test003":{
|
||||
"Id":"Test_003",
|
||||
"Action":"TestAbstractAbilityCheck",
|
||||
"A_Params":["ST"],
|
||||
"Text":"Ability check run on strength resulted in: ",
|
||||
"Option_Labels":["Back to boat"],
|
||||
"Option_GoTos":["Boat_001"]
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
keys,en
|
||||
Name,Jon
|
||||
Race,Person
|
||||
Class,CSV
|
||||
AG,65
|
||||
APP,50
|
||||
CO,55
|
||||
QU,55
|
||||
MD,60
|
||||
ST,60
|
||||
CH,72
|
||||
EM,45
|
||||
IN,50
|
||||
ME,40
|
||||
MX,55
|
||||
PR,55
|
||||
RE,30
|
||||
SD,25
|
||||
Weapon,Mighty Pen
|
||||
Armor,Sweater vest +1
|
|
@ -0,0 +1,16 @@
|
||||
[remap]
|
||||
|
||||
importer="csv_translation"
|
||||
type="Translation"
|
||||
|
||||
[deps]
|
||||
|
||||
files=[ "res://_userFiles/characterFiles/testingCSVCharFile_bci-rpg_sris_test001.en.translation" ]
|
||||
|
||||
source_file="res://_userFiles/characterFiles/testingCSVCharFile_bci-rpg_sris_test001.csv"
|
||||
dest_files=[ "res://_userFiles/characterFiles/testingCSVCharFile_bci-rpg_sris_test001.en.translation" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress=true
|
||||
delimiter=0
|
Binary file not shown.
@ -0,0 +1,13 @@
|
||||
keys,en
|
||||
Name,The Epic Test
|
||||
Race,Robot
|
||||
Class,CSV
|
||||
Str,16
|
||||
Int,19
|
||||
Wis,3
|
||||
Dex,10
|
||||
Con,11
|
||||
Chr,8
|
||||
HP,72
|
||||
Weapon,Comma + 2
|
||||
Armor,Obfuscating shield
|
|
@ -0,0 +1,16 @@
|
||||
[remap]
|
||||
|
||||
importer="csv_translation"
|
||||
type="Translation"
|
||||
|
||||
[deps]
|
||||
|
||||
files=[ "res://_userFiles/characterFiles/testingCSVCharFile_libre.en.translation" ]
|
||||
|
||||
source_file="res://_userFiles/characterFiles/testingCSVCharFile_libre.csv"
|
||||
dest_files=[ "res://_userFiles/characterFiles/testingCSVCharFile_libre.en.translation" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress=true
|
||||
delimiter=0
|
Binary file not shown.
@ -0,0 +1,14 @@
|
||||
keys,en
|
||||
Name,Jon
|
||||
Race,Person
|
||||
Class,CSV
|
||||
ST,55
|
||||
QU,35
|
||||
PR,50
|
||||
IN,35
|
||||
EM,35
|
||||
CO,65
|
||||
AG,55
|
||||
SD,75
|
||||
ME,25
|
||||
RE,40
|
|
@ -0,0 +1,16 @@
|
||||
[remap]
|
||||
|
||||
importer="csv_translation"
|
||||
type="Translation"
|
||||
|
||||
[deps]
|
||||
|
||||
files=[ "res://_userFiles/characterFiles/testingCSVCharFile_rolemaster_test001.en.translation" ]
|
||||
|
||||
source_file="res://_userFiles/characterFiles/testingCSVCharFile_rolemaster_test001.csv"
|
||||
dest_files=[ "res://_userFiles/characterFiles/testingCSVCharFile_rolemaster_test001.en.translation" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress=true
|
||||
delimiter=0
|
Binary file not shown.
@ -157,6 +157,31 @@ func change_node(destinationNode: String, destinationParams: Array = []) -> void
|
||||
var destArr = target_Locale.destinations_array
|
||||
create_option(option, destArr[i])
|
||||
i = i+1
|
||||
#DKM TEMP: running an ability check test on passed node: -- this is only built out for agility and strength in this test
|
||||
# Def needs all kinds of refactor
|
||||
elif target_Locale.locale_action == "TestAbstractAbilityCheck":
|
||||
var check_result ="NA"
|
||||
print("DKM TEMP: passed stat is :" +target_Locale.locale_action_params[0])
|
||||
if(target_Locale.locale_action_params[0] in pSingleton.pc.viableCharStats):
|
||||
match target_Locale.locale_action_params[0]:
|
||||
"AG":
|
||||
if(int(destinationParams[0])<= pSingleton.pc.agility):
|
||||
check_result = "PASS"
|
||||
else:
|
||||
check_result = "FAIL"
|
||||
"ST":
|
||||
if(int(destinationParams[0])<= pSingleton.pc.strength):
|
||||
check_result = "PASS"
|
||||
else:
|
||||
check_result = "FAIL"
|
||||
|
||||
create_response(target_Locale.locale_description + check_result + " with roll of: " + str(destinationParams) + "; on ability of: " + str(pSingleton.pc.strength))
|
||||
clear_prior_options()
|
||||
var i = 0
|
||||
for option in target_Locale.options_array:
|
||||
var destArr = target_Locale.destinations_array
|
||||
create_option(option, destArr[i])
|
||||
i = i+1
|
||||
options_container.get_child(0).grab_focus()
|
||||
|
||||
func action_show_text(newLocale: Locale) -> void:
|
||||
@ -181,7 +206,14 @@ func action_roll_die(newLocale: Locale) -> void:
|
||||
DiceRoller.dieManager.setDieManager(dieParams, 0.5)
|
||||
var result = DiceRoller.dieManager.rollDice()
|
||||
print("Rolled values: " + str(result[0]))
|
||||
|
||||
if(DiceRoller.dieManager.isPercentageRoll):
|
||||
var percDie = int(result[1]*100)
|
||||
print("DKM TEMP: is percentage roll and perc res is: " + str(percDie))
|
||||
var perc_result = [percDie]
|
||||
change_node(newLocale.destinations_array[0], perc_result)
|
||||
else:
|
||||
change_node(newLocale.destinations_array[0], result[0])
|
||||
|
||||
#DKM TEMP: Andrew's code for ref:
|
||||
#assigning variable names to each of them for better clarity
|
||||
# var rolledValues = result[0]
|
||||
@ -190,7 +222,6 @@ func action_roll_die(newLocale: Locale) -> void:
|
||||
# var neededPercent = result[3]
|
||||
# var degreeOfSuccess = result[4]
|
||||
# var dice = result[5]
|
||||
change_node(newLocale.destinations_array[0], result[0])
|
||||
|
||||
#DKM TEMP: saves the entire scene in one packed scene file
|
||||
func save_module():
|
||||
|
@ -96,8 +96,6 @@ func rollDice():
|
||||
if isPercentageRoll:
|
||||
sumOfPercentages += (returnDiePercentage(diceUsed[0]) / 10.0) + (returnDiePercentage(diceUsed[1]) / 100.0)
|
||||
else:
|
||||
#DKM TEMP: not percentage roll:
|
||||
print("TEMP: not percentage roll")
|
||||
for die in diceUsed:
|
||||
sumOfPercentages += returnDiePercentage(die)
|
||||
denominator += 1
|
||||
|
@ -6,3 +6,52 @@ extends Resource
|
||||
class_name playerCharacterTemplate
|
||||
|
||||
var pcText = ""
|
||||
|
||||
#BCO-RPG SRIS system (percentile):
|
||||
var viableCharStats = ["AG",
|
||||
"APP",
|
||||
"CO",
|
||||
"QU",
|
||||
"MD",
|
||||
"ST",
|
||||
"CH",
|
||||
"EM",
|
||||
"IN",
|
||||
"ME",
|
||||
"MX",
|
||||
"PR",
|
||||
"RE",
|
||||
"SD"]
|
||||
|
||||
var agility = 0
|
||||
var appearance = 0
|
||||
var constitution = 0
|
||||
var quickness = 0
|
||||
var manual_dexterity = 0
|
||||
var strength = 0
|
||||
var chutzpah = 0
|
||||
var empathy = 0
|
||||
var intuition = 0
|
||||
var memory = 0
|
||||
var moxie = 0
|
||||
var presence = 0
|
||||
var reasoning = 0
|
||||
var self_discipline = 0
|
||||
|
||||
func toString() -> String:
|
||||
return("pcText: " + str(pcText) +
|
||||
"; Agility: " + str(agility) +
|
||||
"; Appearance: " + str(appearance) +
|
||||
"; Constitution: " + str(constitution) +
|
||||
"; Quickness: " + str(quickness) +
|
||||
"; Manual_dexterity: " + str(manual_dexterity) +
|
||||
"; Strength: " + str(strength) +
|
||||
"; Chutzpah: " + str(chutzpah) +
|
||||
"; Empathy: " + str(empathy) +
|
||||
"; Intuition: " + str(intuition) +
|
||||
"; Memory: " + str(memory) +
|
||||
"; Moxie: " + str(moxie) +
|
||||
"; Presence: " + str(presence) +
|
||||
"; Reasoning: " + str(reasoning) +
|
||||
"; Self_discipline: " + str(self_discipline)
|
||||
)
|
||||
|
@ -15,6 +15,41 @@ func _ready() -> void:
|
||||
|
||||
func _on_Button_pressed():
|
||||
$FileDialog.popup()
|
||||
|
||||
#Import character file
|
||||
func _charSetStat(statname: String, statvalue: int) -> void:
|
||||
if statname in pSingleton.viableCharStats:
|
||||
match statname:
|
||||
"AG":
|
||||
pSingleton.agility = statvalue
|
||||
"APP":
|
||||
pSingleton.appearance = statvalue
|
||||
"CO":
|
||||
pSingleton.constitution = statvalue
|
||||
"QU":
|
||||
pSingleton.quickness = statvalue
|
||||
"MD":
|
||||
pSingleton.manual_dexterity = statvalue
|
||||
"ST":
|
||||
pSingleton.strength = statvalue
|
||||
"CH":
|
||||
pSingleton.chutzpah = statvalue
|
||||
"EM":
|
||||
pSingleton.empathy = statvalue
|
||||
"IN":
|
||||
pSingleton.intuition = statvalue
|
||||
"ME":
|
||||
pSingleton.memory = statvalue
|
||||
"MX":
|
||||
pSingleton.moxie = statvalue
|
||||
"PR":
|
||||
pSingleton.presence = statvalue
|
||||
"RE":
|
||||
pSingleton.reasoning = statvalue
|
||||
"SD":
|
||||
pSingleton.self_discipline = statvalue
|
||||
else:
|
||||
return
|
||||
|
||||
#this is going to take information from the file the player chose and put the individul parts into textboxes so it can be edited and then saved
|
||||
func _on_FileDialog_file_selected(path):
|
||||
@ -27,6 +62,8 @@ func _on_FileDialog_file_selected(path):
|
||||
var csvStrArray = file.get_csv_line()
|
||||
var i = 0
|
||||
var isLabel = true
|
||||
var row_label = ""
|
||||
var row_value = ""
|
||||
while i < csvStrArray.size():
|
||||
var csvStr = csvStrArray[i]
|
||||
if(isLabel):
|
||||
@ -34,10 +71,14 @@ func _on_FileDialog_file_selected(path):
|
||||
var textLine = Label.new()
|
||||
$ScrollContainer/VBoxContainer.add_child(textLine)
|
||||
textLine.text = csvStr.to_upper()
|
||||
row_label = csvStr.to_upper()
|
||||
isLabel = false
|
||||
#DKM TEMP: save this unformatted to the singleton text string
|
||||
pSingleton.pcText += csvStr.to_upper() + ": "
|
||||
else:
|
||||
row_value = csvStr
|
||||
if(typeof(int(row_value)) == TYPE_INT):
|
||||
_charSetStat(row_label, int(row_value))
|
||||
isLabel = true
|
||||
var textBox = LineEdit.new()
|
||||
$ScrollContainer/VBoxContainer.add_child(textBox)
|
||||
@ -46,3 +87,6 @@ func _on_FileDialog_file_selected(path):
|
||||
pSingleton.pcText += csvStr + "\n"
|
||||
i += 1
|
||||
file.close()
|
||||
#DKM TEMP:
|
||||
print("PRINTING set char tostring: ")
|
||||
print(pSingleton.toString())
|
||||
|
@ -37,9 +37,8 @@ margin_bottom = 480.0
|
||||
window_title = "Open a File"
|
||||
mode = 0
|
||||
access = 2
|
||||
current_dir = "/ProgramData/CS_Working/RPGR/Godot_projects/bcirpg_mergedDemo_20220911A"
|
||||
current_file = "_userData/characterFiles"
|
||||
current_path = "/ProgramData/CS_Working/RPGR/Godot_projects/bcirpg_mergedDemo_20220911A/_userData/characterFiles"
|
||||
current_dir = "/ProgramData/CS_Working/RPGR/Godot_projects/bcirpg_mergedMaster_20220918A"
|
||||
current_path = "/ProgramData/CS_Working/RPGR/Godot_projects/bcirpg_mergedMaster_20220918A/"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user