JeenLeen
2017-08-30, 12:31 PM
I'm getting interested in Riddle of Steel, but the combat mechanics seem complicated enough that I think my real-life group wouldn't consider it. So, I'm thinking of writing some functions in the programming language R (since it's free) that do combat for you.
My question is for those of you who know Riddle of Steel is: what functions sound useful?
Here's what I'm considering:
1) have each character (PC or NPC) defined as a data frame or list, containing elements like:
Name
Attributes
Armor value over each body part
Proficiency level for their default weapon type
TN for their default weapon type
TN default for defense
current highest wound at each body part
current highest pain at each body part
the exchange they are in
the round they are in
current Health
I envision these functions:
atk (attacker, defender, aCP, dCP, amod=0, dmod=0, aTN='NA', dTN='NA')
where
attacker = the name of the data frame for the attacker
defender = the name of the data frame for the defender
aCP = number of CP the attacker is using to attack this exchange
dCP = as dCP, but for defender
amod = any modifier to the attacker's number of die (for example, put a 1 here if you get +1 due to attacking an easy to attack place or using SA)
dmod = as amod, but for defender
aTN = TN of the attack, if not the default used in the array
dTN = as aTN, but for defender
The function would do the math, declare the result, and tell how many CP are available for the next exchange (after looking at things like shock and pain).
Since the data frame remembers what exchange it is and what round, it can handle stuff like rolling for blood lost at the appropriate time, and for fatigue decreasing CP over time.
Other similar functions could handle situations when both attack. Casting a spell or doing ranged weapons doesn't work as well since those take additional time.
I'd also make functions like:
printme <--prints a character sheet, displaying the array and any current wounds
clean <-- removes the temporary things, like current wounds/pain/health and what exchange/round they are in
and potentially some functions to handle 2-vs-1 and 3-vs-1 combat situations.
Anyway, any recommendations or thoughts?
My question is for those of you who know Riddle of Steel is: what functions sound useful?
Here's what I'm considering:
1) have each character (PC or NPC) defined as a data frame or list, containing elements like:
Name
Attributes
Armor value over each body part
Proficiency level for their default weapon type
TN for their default weapon type
TN default for defense
current highest wound at each body part
current highest pain at each body part
the exchange they are in
the round they are in
current Health
I envision these functions:
atk (attacker, defender, aCP, dCP, amod=0, dmod=0, aTN='NA', dTN='NA')
where
attacker = the name of the data frame for the attacker
defender = the name of the data frame for the defender
aCP = number of CP the attacker is using to attack this exchange
dCP = as dCP, but for defender
amod = any modifier to the attacker's number of die (for example, put a 1 here if you get +1 due to attacking an easy to attack place or using SA)
dmod = as amod, but for defender
aTN = TN of the attack, if not the default used in the array
dTN = as aTN, but for defender
The function would do the math, declare the result, and tell how many CP are available for the next exchange (after looking at things like shock and pain).
Since the data frame remembers what exchange it is and what round, it can handle stuff like rolling for blood lost at the appropriate time, and for fatigue decreasing CP over time.
Other similar functions could handle situations when both attack. Casting a spell or doing ranged weapons doesn't work as well since those take additional time.
I'd also make functions like:
printme <--prints a character sheet, displaying the array and any current wounds
clean <-- removes the temporary things, like current wounds/pain/health and what exchange/round they are in
and potentially some functions to handle 2-vs-1 and 3-vs-1 combat situations.
Anyway, any recommendations or thoughts?