-
May 21st, 2015, 12:01 #1
Help With Effects and Damage Types
I am trying to incorporate effects and damage types for my DCC RPG ruleset. I have honed in on damage types in the code.
I am using 3.5E as a model. Does anyone know which files/scripts contain the effects code? I know about the following:
actions_manager_attack
actions_manager_damage
manager_actor2
manager_combat2
manager_effect
data_common
Is there anything I am missing? I am referring specifically to effects like "ATK:2" and "SAVE:1" etc., not so much to conditions like "Prone" and "Sickened"...DCC Ruleset Wiki: https://github.com/bwgibs/dcc-ruleset/wiki
-
May 21st, 2015, 18:43 #2
I'm not at a computer now so can't check. There will be a different actions_manager_xxxx script for saves.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
May 21st, 2015, 20:30 #3
Saves are in manager_action_spell.lua - starting with performSaveRoll.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
May 21st, 2015, 21:42 #4
Oh yeah, saves. Thanks, Trenloe. I removed some of the effects/damage types from the data_common file and got an error about the function 'contains' getting a nil value. So I am just trying to get a better feel for how it's set up.
DCC Ruleset Wiki: https://github.com/bwgibs/dcc-ruleset/wiki
-
May 22nd, 2015, 04:48 #5
Does the Castles & Crusades ruleset parse range and damage type info from the CT attack line? It doesn't seem like it, but maybe I am using the wrong string format.
DCC Ruleset Wiki: https://github.com/bwgibs/dcc-ruleset/wiki
-
May 22nd, 2015, 05:31 #6
I figured out another solution. I was using the C&C format for PC weapons and 3.5E format for NPC attacks. I figured out how to structure the data so the damage functions work properly. It looks like dragging attacks/damage onto tokens is working, and token effect/health icons seem to be working as well. I am using the client CT wound categories from 3.5E, so the whole disabled/dying/dead thing isn't quite DCC RPG, although I did get rid of stabilization rolls.
I just need to run through the effects that auto-apply roll modifiers to make sure they match up with DCC RPG, which really only has a few. Also, cover is just one category, but I will continue to work on the effects after the ruleset is posted...DCC Ruleset Wiki: https://github.com/bwgibs/dcc-ruleset/wiki
-
May 23rd, 2015, 16:46 #7
I have modeled my ParseAttackLine function after 3.5E, but I want to eliminate the critical hit multiplier, since DCC RPG uses a crit table instead. I want my attack line to read:
Sword +1 melee (1d8+1/19-20)
where the label+bonus = Sword +1, range = melee, damage die+mod = 1d8+1, and crit range (if specified) = /19-20. If specified, damage type would follow the damage dice+mod (1d8+1 fire/19-20). So, in scripts/manager_combat2, I have the following:
Code:nPhraseStart, nPhraseEnd, sAll, sAttackCount, sAttackLabel, sAttackModifier, sAttackType, nDamageStart, sDamage, nDamageEnd = string.find(sPhrase, '((%+?%d*) ?([%w%s,%[%]%(%)%+%-]*) ([%+%-%d][%+%-%d/]+)([^%(]*)%(()([^%)]*)()%))');
Code:local aWordDice, nWordMod = StringManager.convertStringToDice(sDamageRoll); if #aWordDice > 0 or nWordMod ~= 0 then local rDamageClause = { dice = {} }; for kDie, vDie in ipairs(aWordDice) do table.insert(rDamageClause.dice, vDie); end rDamageClause.modifier = nWordMod; if kClause == 1 then rDamageClause.mult = 2; else rDamageClause.mult = 1; end rDamageClause.mult = tonumber(sCrit) or rDamageClause.mult; if not bRanged then rDamageClause.stat = "strength"; end local aDamageType = ActionDamage.getDamageTypesFromString(table.concat(aWordType, ",")); rDamageClause.dmgtype = table.concat(aDamageType, ","); table.insert(rDamage.clauses, rDamageClause); end
Code:if #(rDamage.clauses) > 0 then if bRanged then local nDmgBonus = rDamage.clauses[1].modifier; if nDmgBonus > 0 then local nStatBonus = ActorManager2.getAbilityBonus(rActor, "strength"); if (nDmgBonus >= nStatBonus) then rDamage.statmult = 1; end end else local nDmgBonus = rDamage.clauses[1].modifier; local nStatBonus = ActorManager2.getAbilityBonus(rActor, "strength"); if (nStatBonus > 0) and (nDmgBonus > 0) then if nDmgBonus >= math.floor(nStatBonus * 1.5) then rDamage.statmult = 1.5; elseif nDmgBonus >= nStatBonus then rDamage.statmult = 1; else rDamage.statmult = 0.5; end elseif (nStatBonus == 1) and (nDmgBonus == 0) then rDamage.statmult = 0.5; end end end
Currently, I have the following known issues with the ruleset, but I am working on it:
- Critical hit threshold not calculating properly for NPCs if not rolled with a d20. I have a couple target conditions that bump the attack die up from a d20 to a d24 (e.g. Entangled), but FG is counting rolls of 20-24 as critical hits instead of just 24.
- Two weapon fighting does not disable an expanded critical threat range. This only applies to warriors, so I will get to it eventually.
- Damage types for PCs always post as (TYPE: untyped XX+X=XX). I need to figure out how to remove the 'TYPE: untyped', which I will get to eventually.
I want to get the attack line parsing cleaned up first. I am going to post the ruleset before these issues are fixed though...DCC Ruleset Wiki: https://github.com/bwgibs/dcc-ruleset/wiki
-
May 23rd, 2015, 18:10 #8
Actually I am keeping rDamage.statmult. I don't fully understand it, but I know it matters for NPCs that have ability scores.
Does 3.5E allow the attack die to be specified? For example,
Sword d20+1 melee (1d8+1)
I would like to be able to do that if possible. Parsing is not my forte, I am finding.
I did remove rDamage.mult without any obvious bugs. My code is still really cluttered right now...DCC Ruleset Wiki: https://github.com/bwgibs/dcc-ruleset/wiki
-
May 26th, 2015, 18:37 #9
It's used for adding 1.5 x STR bonus for attacking with a two handed weapon and for adding 0.5 x STR bonus for attacking with a weapon off-hand when two weapon fighting.
Nope. As 3.5E always uses a d20 to attack. You'd have to customise this yourself.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks