PDA

View Full Version : NPC speech text colours



Callum
December 4th, 2012, 21:16
When typing directly into the chat window, NPC speech text appears blue in colour, but when dragging it from a pre-prepared chat frame, it is black. Is there an easy way to make both of these the same colour? I don't like the discontinuity, which my players have picked up on.

dr_venture
December 4th, 2012, 22:08
In my ruleset, there is additionally a GM's icon for NPC speech from the chat box, but not for NPC speechfrom ckickable speech text in modules.

My simplest workaround: I never use clickable text for NPCs - I always drag the text into the bottom of the chat box where you type messages, then hit 'Enter' to send the text with an ID I have defined with the "/ID" command.

Bit of a pain, but still way better than typing everything on the spot.

Ikael
December 4th, 2012, 22:17
If I recall right you can do required changes into chat_chat.lua file (ruleset specific thing, but usally its named like that) by editing onDrop event/handler function. Can you be more specific which ruleset you need to adjust?

Callum
December 4th, 2012, 22:36
Sorry, I was assuming that it was a generic thing. I'm using the base 3.5 ruleset.

Ikael
December 5th, 2012, 08:55
Programmatical workaround for this in 3.5E ruleset is to replace file's
3.5E/desktop/scripts/chat_window.lua onDrop function with following snippet:



function onDrop(x, y, draginfo)
local sDragType = draginfo.getType();
if StringManager.contains(DataCommon.actions, sDragType) then
ActionsManager.handleActionDrop(draginfo, nil);
else
local msg = {}
msg.text = draginfo.getStringData()
msg.mode = "story"

-- sender
local sender = draginfo.getDescription()
if sender and sender ~= "" then
msg.sender = sender
msg.font = "chatnpcfont"
msg.mode = "chat"
end

-- deliver chat message and stop further processing
Comm.deliverChatMessage(msg)
return true
end
end

I am sure that you can do it in more better way, but this is quickshot reponse to give guides what to do

Moon Wizard
December 21st, 2012, 01:07
Fixed this behavior in the v2.9.3 beta.

Basically, the onDeliverMessage script event was not being called on formatted text string drag and drop operations.

Regards,
JPG