5E Character Create Playlist
  1. #1
    leozelig's Avatar
    Join Date
    Jun 2007
    Location
    Eastern USA
    Posts
    1,856
    Blog Entries
    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"...

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,409
    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!

  3. #3
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,409
    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!

  4. #4
    leozelig's Avatar
    Join Date
    Jun 2007
    Location
    Eastern USA
    Posts
    1,856
    Blog Entries
    1
    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.

  5. #5
    leozelig's Avatar
    Join Date
    Jun 2007
    Location
    Eastern USA
    Posts
    1,856
    Blog Entries
    1
    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.

  6. #6
    leozelig's Avatar
    Join Date
    Jun 2007
    Location
    Eastern USA
    Posts
    1,856
    Blog Entries
    1
    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...

  7. #7
    leozelig's Avatar
    Join Date
    Jun 2007
    Location
    Eastern USA
    Posts
    1,856
    Blog Entries
    1
    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/]+)([^%(]*)%(()([^%)]*)()%))');
    I think I can just leave that line alone. I was going to remove the following section in red because I do not need a crit multiplier:

    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
    Another segment I am not fully understanding, and I think it is because I don't know 3.5E rules that well, is this:

    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
    I do not know what rDamage.statmult is exactly, but I am pretty certain that I do not need it.

    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...

  8. #8
    leozelig's Avatar
    Join Date
    Jun 2007
    Location
    Eastern USA
    Posts
    1,856
    Blog Entries
    1
    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...

  9. #9
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,409
    Quote Originally Posted by leozelig View Post
    Actually I am keeping rDamage.statmult. I don't fully understand it, but I know it matters for NPCs that have ability scores.
    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.

    Quote Originally Posted by leozelig View Post
    Does 3.5E allow the attack die to be specified? For example,

    Sword d20+1 melee (1d8+1)
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in