PDA

View Full Version : Level Headed Edge



rundeks
January 14th, 2012, 04:09
Hi All,

I saw several posts that say the "Level Headed" Edge just works automatically if the player drags the edge to their character sheet. When this edge is used does the system display anything, like what happens when a Joker is dealt?

Thank You,
rundeks

phantomwhale
January 14th, 2012, 07:34
Yep, it's printed into the chat window (e.g. something like "Rundeks was dealt the eight of spades and the king of hearts. Rundeks uses the King of hearts"). It also works for NPCs too, by the way.

Quick and Improved level headed (and Fast as Lightning, if you own the Deadlands extension) all work in a similar fashion.

Doswelk
January 14th, 2012, 23:33
Just need to add some code to do the reverse i.e. the "Slow" hindrance which if you get dealt a card higher than <insert number here> redeal another card, I think it's already on the request list :p

phantomwhale
January 14th, 2012, 23:58
Is there a "Slow" hindrance ?

I mean, there is a hook in the ruleset code to easily add a "Slow" hindrance into the ruleset (or any edge / hindrance that affects combat card dealing) but you'd probably want to include this with the extension that provides this extra hindrance.

Doswelk
January 15th, 2012, 01:43
I have seen two different versions I think so far (add-ons and maybe not even pinnacle) but they are out there...

scionofnyarlathotep
January 15th, 2012, 17:57
I have seen two different versions I think so far (add-ons and maybe not even pinnacle) but they are out there...

Slow is a Hindrance in the Weird Wars setting:

"Not everyone was born with cat-like reflexes. This soldier is just a little slow on the uptake, or maybe freezes up when lead starts flying. He draws two cards and acts on the worst. If he draws a Joker, he uses it normally and ignores his Hindrance for the round.

Slow characters cannot take the Quick Edge, but they can actually improve their reaction time by taking the Level Headed Edge (but not during character creation). For this soldier, Level Headed allows them to draw one card and act normally. Improved Level Headed grants them two cards and they act on the best of the two."

Enjoy programming that one :)

rundeks
January 15th, 2012, 19:11
Thanks all for the quick reply and great responses!

Doswelk
December 30th, 2012, 10:40
So I have created an extension that takes the lower of two cards by using the following code:


function onInit()
InitiativeManager.registerAbilityHandler("slow", "SLOW", slowHandler)
end

function slowHandler(wActorGroup, tCard, fDraw)
local msg = {font = "systemfont"}
local sWording = " was dealt the "
local sText = wActorGroup.getName() .. sWording .. tCard.displayName()
local extracards = 1
if wActorGroup.hasAbility("SLOW") then
extracards = 2
end
for i = extracards,1,-1 do
tempcard = fDraw()
if i == 1 then
sText = sText .. " and the " .. tempcard.displayName() .. "."
else
sText = sText .. ", the " .. tempcard.displayName()
end
if tempcard.compareTo(tCard) < 0 then
tCard = tempcard
end
sWording = " uses the "
end
msg.text = sText
ChatManager.deliverMessage(msg)

return tCard, sWording
end

Only thing is this only works for Players if they have the Slow Hindrance in their list of edges, what else do I need to tweak to get it to check if it is in hindrances?

Thanks :o

phantomwhale
January 2nd, 2013, 21:46
This was discussed here --> https://www.fantasygrounds.com/forums/showpost.php?p=124898&postcount=20

In a nutshell, the combatant code (combatant.lua) either checks the NPC special ability list, or the PC edges list. Hence there is no simple way to hook in a Hindrance to affect dealing.

You can "hack" this by editing combatant.lua, and changing it around line 181 from:



elseif targetNode.getChild("edges") then
return CharacterSheetCommon.hasEdge(targetNode, sAbility)
end


to



elseif targetNode.getChild("edges") then
return CharacterSheetCommon.hasAbility(targetNode, sAbility)
end


This is something I should consider changing for v3.4 - unless anyone can think of any hindrances called "Quick", "Level Headed" or similar that might cause issues (!)

Regards,
-PW-

S Ferguson
January 9th, 2013, 17:21
In the Savage Worlds Deluxe rulebook there's Improved Level Headed in which you draw 3 cards;).

Doswelk
January 9th, 2013, 18:54
That's already in FGII :)

S Ferguson
January 9th, 2013, 19:14
I know. I was just trying to "make a funny." :) Sorry if it was inappropriate.:o

Doswelk
January 10th, 2013, 00:40
I did not think it was inappropriate, I was just trying to be helpful :)

S Ferguson
January 10th, 2013, 00:45
Phew. No I know the Savage Worlds game intuitively now. I'm now working on an FG II extension for it as we speak ;)

Doswelk
January 10th, 2013, 12:42
Ooh what extension?