DICE PACKS BUNDLE
  1. #1

    Damage Messages - One of the GM and a cut down version for the Player

    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:

    Code:
    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
    Ruleset and much more content built for FGU.
    Come join me on Twitter at: https://twitter.com/MadBeardMan to see what I'm up to!

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,406
    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.
    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
    Quote Originally Posted by Trenloe View Post
    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!
    Ruleset and much more content built for FGU.
    Come join me on Twitter at: https://twitter.com/MadBeardMan to see what I'm up to!

  4. #4
    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
    Ruleset and much more content built for FGU.
    Come join me on Twitter at: https://twitter.com/MadBeardMan to see what I'm up to!

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
  •  
5E Character Create Playlist

Log in

Log in