PDA

View Full Version : Damage Messages - One of the GM and a cut down version for the Player



MadBeardMan
August 8th, 2019, 15:11
Afternoon Folks,

One thing I've noticed in my Traveller ruleset is that when damage is applied to an NPC, both the players and GM get the same message. This message it something like DAMAGE[5] -> [to TEST_NPC][ARMOUR 3][ENDURANCE reduced to 3]

Now that's ace for the GM, but the players should see DAMAGE [5] -> [to TEST_NPC][Armour reduced damage]

It sends the message to the Chat Window via:


local msgShort = {font = "msgfont"};
local msgLong = {font = "msgfont"};

if sDamageType == "Recovery" then
msgShort.icon = "roll_heal";
msgLong.icon = "roll_heal";
elseif sDamageType == "Heal" then
msgShort.icon = "roll_heal";
msgLong.icon = "roll_heal";
else
msgShort.icon = "roll_damage";
msgLong.icon = "roll_damage";
end

msgShort.text = sDamageType .. " ->";
msgLong.text = sDamageType .. " [" .. sTotal .. "] ->";
if rTarget then
msgShort.text = msgShort.text .. " [to " .. rTarget.sName .. "]";
msgLong.text = msgLong.text .. " [to " .. rTarget.sName .. "]";
end
if nArmourProtection > 0 then
msgShort.text = msgShort.text .. " [ARMOUR " .. nArmourProtection .. "]";
msgLong.text = msgLong.text .. " [ARMOUR " .. nArmourProtection .. "]";
end

if sExtraResult and sExtraResult ~= "" then
msgLong.text = msgLong.text .. " " .. sExtraResult;
end

ActionsManager.messageResult(bSecret, rSource, rTarget, msgLong, msgShort);


I'm going to dig later, but this is bugging me whilst I focus on Animal hits.

Cheers,
MBM

Trenloe
August 8th, 2019, 16:01
msgLong is for the GM, msgShort is by default for the players.

Look at messageResult in the CoreRPG ActionsManager package (scripts\manager_actions.lua) which looks at various campaign display options to decide which message to show to the players.

You're storing the [ARMOUR...] data to both msgShort and msgLong.

MadBeardMan
August 8th, 2019, 16:04
msgLong is for the GM, msgShort is by default for the players.

Look at messageResult in the CoreRPG ActionsManager package (scripts\manager_actions.lua) which looks at various campaign display options to decide which message to show to the players.

You're storing the [ARMOUR...] data to both msgShort and msgLong.

This is why I asked here, cos I'll soon be able to loog into this.

Phew, almost got the ruleset completed.

Cheers fella!

MadBeardMan
August 8th, 2019, 21:47
Ok chap, sorted, but discovered some of the message is created outside of the Actions Manager messageDamage, so it's in the aNotifications table which gets appended.

So I tidied up the messages. The GM after all can see the exact HP from looking at their CT.

Cheers,
Col
P.S. Enjoy the beer :)