Currently Simply Portraits registers its preCreateChatMessage hook as soon as the module is loaded. This means that your hook gets in very early in the call chain of preCreateChatMessage functions.
CGMP's preCreateChatMessage does not get registered until the setup hook has fired. This means that my preCreateChatMessage function is always called after yours. This creates a problem, as CGMP may alter the speaker of a message. Therefore Simply Portraits calculates the speaker's portrait from the old speaker data, i.e. before CGMP has had a chance to alter it.
Therefore, can I request that Simply Portraits does not create its preCreateChatMessage hook until the ready hook has fired? This will move it down the call chain, and let other modules get in first, and allow them to make changes to the message before you calculate the token image?
You don't have to ask so politely, I'll set my jerk of a module straight presently. Clearly it needs to learn some manners about sharing hooks with others
Hi, I'm the author of the Cautious Gamemaster's Pack module.
Currently Simply Portraits registers its
preCreateChatMessage
hook as soon as the module is loaded. This means that your hook gets in very early in the call chain ofpreCreateChatMessage
functions.CGMP's
preCreateChatMessage
does not get registered until thesetup
hook has fired. This means that mypreCreateChatMessage
function is always called after yours. This creates a problem, as CGMP may alter the speaker of a message. Therefore Simply Portraits calculates the speaker's portrait from the old speaker data, i.e. before CGMP has had a chance to alter it.Therefore, can I request that Simply Portraits does not create its
preCreateChatMessage
hook until theready
hook has fired? This will move it down the call chain, and let other modules get in first, and allow them to make changes to the message before you calculate the token image?E.g...