PDA

View Full Version : SWADE is incompatible with AudioOverseer (or the contrary)



lozanoje
April 10th, 2020, 10:56
Does the SW ruleset make some manipulation with the chat of CoreRPG?

I've came to an error with AudioOverseer + SWADE here, where an effect of the kind Trait +1 does not work. In other rulesets based on CoreRPG as ad&d these kind of effect work.

https://www.fantasygrounds.com/forums/showthread.php?53583-AudioOverseer-(Audio-Management-Extension)&p=493119&viewfull=1#post493119

Edit: AudioOverseer breaks completely SWADE automations, it does not work drag&drop attacks on enemy, nor targeting
Edit 2: Seems that this issue has been solved thanks to celestian that fix some code in AO and ikael that modified SW ruleset in order to use the CoreRPG Dice Tower (SW 5.2.3 from Test channel). Thank you, guys. I will check more deeply in my next SW session.

lozanoje
April 11th, 2020, 18:18
Update: tested in SW Deluxe, same problem. And in Unity, SWADE/DLX both are incompatible with AudioOverseer.

celestian
April 11th, 2020, 19:08
Update: tested in SW Deluxe, same problem. And in Unity, SWADE/DLX both are incompatible with AudioOverseer.

Have you tried damned's extensions that also alter chat in SWADE? If it's what I think it is, any extension that alters chat will have the same problem in SWADE.

lozanoje
April 11th, 2020, 19:14
Have you tried damned's extensions that also alter chat in SWADE? If it's what I think it is, any extension that alters chat will have the same problem in SWADE.

Nope, which one should I test? Anyone at random?, do they all alter the chat?

celestian
April 11th, 2020, 19:17
Nope, which one should I test? Anyone at random?, do they all alter the chat?

I don't recall the names but they were his 2 recent ones. I think one was called "STOP" ? Sorry. Not at my desktop to search.

lozanoje
April 11th, 2020, 19:22
I don't recall the names but they were his 2 recent ones. I think one was called "STOP" ? Sorry. Not at my desktop to search.

I've tested Player Agency and it does work (the +1 to Spirit added as an effect). I will try the one you mention, it is called HALT, a security extension for people feeling wrong with the current scene.

https://i.ibb.co/LdbqCJH/screenshot-92.png (https://ibb.co/gZHXDPh)

lozanoje
April 11th, 2020, 19:27
Tested Halt extension, I am not sure if it captures the chat since it only shows icons in the chat, but It does work with SWADE:

https://i.ibb.co/88cXxtW/screenshot-93.png (https://ibb.co/rysvpNC)

lozanoje
April 11th, 2020, 19:30
But look, celestian, in another extension damned uses a *separate* extension for SavageWorlds, different from the generic CoreRPG one. Maybe is it related with the issue we are talking about? I will ask him.

lozanoje
April 11th, 2020, 19:53
What I see different from the CoreRPG and SW versions of "HeroPoints" extension is the way it deals with the console:

CoreRPG:

<script>
function onDoubleClick(x, y)
if getValue() > 0 then
local rActor = ActorManager.getActor("pc", window.getDatabaseNode());
Debug.console("rActor: ", rActor);

local nodeWin = window.getDatabaseNode();
Debug.console("nodeWin: ", nodeWin);

local sHeroType = nodeWin.getChild("pc_hero_points").getValue();
Debug.console("sHeroType: ");
Debug.console(sHeroType);
local msg = {font = "msgfont", icon = "heropoints"};
msg.text = rActor.sName .. " is using a " .. sHeroType;
Comm.deliverChatMessage(msg);
setValue(getValue()-1);
end
return true;
end
</script>
SavageWorlds:

<script>
function onDoubleClick(x, y)
if getValue() > 0 then
local rActor = ActorManager.getActor("pc", window.getDatabaseNode());
Debug.console("rActor: ");
Debug.console(rActor);
local nodeWin = window.getDatabaseNode();
Debug.console("nodeWin: ");
Debug.console(nodeWin);
local sHeroType = nodeWin.getChild("pc_hero_points").getValue();
Debug.console("sHeroType: ");
Debug.console(sHeroType);
local msg = {font = "msgfont", icon = "heropoints"};
msg.text = rActor.sName .. " is using a " .. sHeroType;
Comm.deliverChatMessage(msg);
setValue(getValue()-1);
end
return true;
end
</script>
I do not know lua, does it makes any sense for you?

celestian
April 11th, 2020, 20:37
Not sure that's related. I override the CoreRPG xml for the defaultchat window so I can capture the onReceivedMessages and check to see if sounds should be triggered. If SWADE does the same one of us will not work as far as I know you cannot have 2 overrides based on previous conversations I've had with JPG.

Ikael
April 12th, 2020, 07:27
With Doe:Sound extension the issue was it overwrite
onReceivedMessages function. If this extension uses the same approach then that's the problem. IMO extensions should not overwrite core functionality like that one.

celestian
April 12th, 2020, 08:21
With Doe:Sound extension the issue was it overwrite
onReceivedMessages function. If this extension uses the same approach then that's the problem. IMO extensions should not overwrite core functionality like that one.

If there is another way to read chat text for triggers I'll be happy to try it.

Ikael
April 13th, 2020, 22:08
If there is another way to read chat text for triggers I'll be happy to try it.

Can't you use slash commands?

celestian
April 13th, 2020, 22:22
Can't you use slash commands?

Slash commands isnt really the issue. I need to capture the text of ALL chat in the chat window and run it through a recognition function for sound triggers. So if "Godzilla" appears in the chat text then it triggers the sound associated with that.

Ikael
April 13th, 2020, 22:37
Slash commands isnt really the issue. I need to capture the text of ALL chat in the chat window and run it through a recognition function for sound triggers. So if "Godzilla" appears in the chat text then it triggers the sound associated with that.

Ok, then if you plan to support SavageWorlds, the only way would be to do conditional check if ruleset is SavageWorlds, then the overwritten function would contain features that SavageWorlds has. I checked the codebase and there are some, but honestly they look something that is deprecated and not the root cause of this issue. Next point would make sure that your overwrite it not hoggy, instead it would respect ruleset layering.

Ikael
April 13th, 2020, 22:54
I see the issue now, this one is the troublesome one:


<template name="basicchatwindow" merge="join">
<chatwindow_step name="chat">
<anchored position="insidetopleft" offset="20,25">
<right offset="-30" />
<bottom parent="entry" anchor="top" relation="relative" offset="-15" />
</anchored>
<script>
function onInit()
super.onInit();
onReceiveMessage = AudioOverseer.onReceiveMessageTrigger;
end
</script>
</chatwindow_step>
</template>


Templates does not support ruleset layering ie. merge="join" doesn't do anything here. The issue with SavageWorlds ruleset is that the ruleset itself overrides this template and there can be only one that does it.

Because of lack of layering support, overriding CoreRPG templates in extensions is bad idea IMO. The better solution would be to override the windowclass definition where the template is used. If the only thing you want to achieve is to do onReceiveMessage = AudioOverseer.onReceiveMessageTrigger; then better solution would be to do something like this instead:


<windowclass name="chat" merge="join">
<sheetdata>
<basicchatwindow name="chat">
<script>
function onInit()
super.onInit();
onReceiveMessage = AudioOverseer.onReceiveMessageTrigger;
end
</script>
</basicchatwindow>
</sheetdata>
</windowclass>


(ie. do not override template, override windowclass)

If you do that then different rulesets have much better chance not to conflict with the extension.

celestian
April 13th, 2020, 23:04
If you do that then different rulesets have much better chance not to conflict with the extension.


Thanks for the tip, I'll give this a go and see how it works ;)

lozanoje
April 13th, 2020, 23:56
Since I was the first one reporting this issue/incompatibily, I would like to thank Ikael and celestian for taking the time to dig into the code to see what's the problem with AudioOverseer running in SWADE.

Thank you both!!!

celestian
April 14th, 2020, 22:09
Here is the test version (1.22) based on Ikael's recommendations. Let me know how it works for ya.

lozanoje
April 15th, 2020, 08:58
Here is the test version (1.22) based on Ikael's recommendations. Let me know how it works for ya.

Sure!

Under FGC seems that now it does not interfere with Traits, now the Spirit +1 works, along with other effects I've set:

https://i.ibb.co/gPR6kJ5/screenshot-60.jpg (https://ibb.co/HxHX5qW)

Under FGU the same, it does work:

https://i.ibb.co/qst4FbF/screenshot-61.jpg (https://ibb.co/ts7NPyP)

But now triggers are broken, the links themselves work, it plays the sound when i hit the link (Syrinscape/VLC for local files), but triggers do not work, no sound with the attack command:

https://i.ibb.co/WKyjSn2/screenshot-62.jpg (https://ibb.co/QmNts9K)

celestian
April 15th, 2020, 15:32
Sure!

But now triggers are broken, the links themselves work, it plays the sound when i hit the link (Syrinscape/VLC for local files), but triggers do not work, no sound with the attack command:


That is odd. I tested triggers in CoreRPG, 2E and 5E and they worked after this change. I just assumed it would for SW. I'll test and see why.

lozanoje
April 15th, 2020, 17:09
That is odd. I tested triggers in CoreRPG, 2E and 5E and they worked after this change. I just assumed it would for SW. I'll test and see why.

I've double-checked, now with SW Deluxe and triggers do not work for me. No other extensions loaded, just AudioOverseer, new campaign, created a sound, created a trigger. All as clean as possible, and I failed.

celestian
April 15th, 2020, 17:46
I've double-checked, now with SW Deluxe and triggers do not work for me. No other extensions loaded, just AudioOverseer, new campaign, created a sound, created a trigger. All as clean as possible, and I failed.

Works for me.



/ao debug enable
/console
Generate text to trigger sound.
Review console output.


I just made a trigger looking for "test" then typed "test" and it worked.

lozanoje
April 15th, 2020, 17:57
Works for me.



/ao debug enable
/console
Generate text to trigger sound.
Review console output.


I just made a trigger looking for "test" then typed "test" and it worked.

Here I go:

https://i.ibb.co/4VKdymN/screenshot-63.jpg (https://ibb.co/gRmV1jg)

Note that the last test is dragging over the console the result of the attack above, to force show again the attack and result. Is it related with being hidden since it is the GM? I have to test on a client.

Console output:


Runtime Notice: Host session started
Ruleset Notice: Campaign database backup created.
Runtime Notice: s'[172.909]' | s'manager_audio' | s'onReceive' | s'Name of Trigger:' | s'Sword trigger'
Runtime Notice: s'[172.91]' | s'manager_audio' | s'playSoundRecord' | s'Sound Record Name' | s'Small Fireball-SoundBible.com-1381880822.mp3'
Runtime Notice: s'[172.911]' | s'manager_audio' | s'playURL' | s'Playing URL:' | s'C:\Users\Jose Lozano\AppData\Roaming\Fantasy Grounds\audios\Small Fireball-SoundBible.com-1381880822.mp3'
Runtime Notice: s'[191.446]' | s'manager_audio' | s'onReceive' | s'Name of Trigger:' | s'Sword trigger'
Runtime Notice: s'[191.447]' | s'manager_audio' | s'playSoundRecord' | s'Sound Record Name' | s'Small Fireball-SoundBible.com-1381880822.mp3'
Runtime Notice: s'[191.448]' | s'manager_audio' | s'playURL' | s'Playing URL:' | s'C:\Users\Jose Lozano\AppData\Roaming\Fantasy Grounds\audios\Small Fireball-SoundBible.com-1381880822.mp3'
Runtime Notice: s'[210.209]' | s'manager_audio' | s'onReceive' | s'Name of Trigger:' | s'Sword trigger'
Runtime Notice: s'[210.21]' | s'manager_audio' | s'playSoundRecord' | s'Sound Record Name' | s'Small Fireball-SoundBible.com-1381880822.mp3'
Runtime Notice: s'[210.211]' | s'manager_audio' | s'playURL' | s'Playing URL:' | s'C:\Users\Jose Lozano\AppData\Roaming\Fantasy Grounds\audios\Small Fireball-SoundBible.com-1381880822.mp3'

lozanoje
April 15th, 2020, 18:01
Tested as a client connected to host. The attack using the same character with the same attack, but using a client does pull the trigger, so it works for client, not for gm.

celestian
April 15th, 2020, 18:02
Tested as a client connected to host. The attack using the same character with the same attack, but using a client does pull the trigger, so it works for client, not for gm.

Show gm rolls/text.

Like I said, start simple. Start with just "tesT" and have the GM say "test" in chat.

lozanoje
April 15th, 2020, 18:11
Show gm rolls/text.

Like I said, start simple. Start with just "tesT" and have the GM say "test" in chat.

I did, see image I attached in my previous post, typing "test" as GM works (in my example I typed "Sword" and worked with a "Sword" trigger).

More tests: If I enable, as you suggest, "Chat: Show GM rolls", it also works for an attack made by the GM.

celestian
April 15th, 2020, 18:21
More tests: If I enable, as you suggest, "Chat: Show GM rolls", it also works for an attack made by the GM.

That's a requirement for all rulesets. Sounds will not trigger if you are not showing them to players and the DM initiates the text. Was covered in the tutorial video but perhaps I should make an additional note in the AO thread to make it more clear.

lozanoje
April 15th, 2020, 18:36
That's a requirement for all rulesets. Sounds will not trigger if you are not showing them to players and the DM initiates the text. Was covered in the tutorial video but perhaps I should make an additional note in the AO thread to make it more clear.

So, if it works as expected, can we close this ticket? :-) Thanks a lot for taking your time to solve this!

celestian
April 15th, 2020, 19:11
So, if it works as expected, can we close this ticket? :-) Thanks a lot for taking your time to solve this!

There is no ticket but yes, we can certainly consider this resolved ;) Thanks for your vigilance in reporting this issue.

I probably wont add this version to the AO thread until I have the chance to run this rev in my game on Saturday to make sure I don't find anything else. But SW folks can certainly grab the one posted here for now.

lozanoje
April 20th, 2020, 10:31
Found another issue, follow up in the official thread of AO:

https://www.fantasygrounds.com/forums/showthread.php?53583-AudioOverseer-(Audio-Management-Extension)&p=498696&viewfull=1#post498696

celestian
April 21st, 2020, 22:31
Found another issue, follow up in the official thread of AO

I have reviewed the code and did some tentative searching and nothing pops out as obvious to me on this. My guess is SW does some custom desktop/tower code? Right now the "chat" windowclass is at the very minimum that it can be far as I know for my fuctionality.

lozanoje
April 22nd, 2020, 00:12
I have reviewed the code and did some tentative searching and nothing pops out as obvious to me on this. My guess is SW does some custom desktop/tower code? Right now the "chat" windowclass is at the very minimum that it can be far as I know for my fuctionality.

So I guess is Ikael the one who knows what modifications SW does to the Tower code. I hope he reads this and have the time to check it.

Ikael
April 22nd, 2020, 06:29
So I guess is Ikael the one who knows what modifications SW does to the Tower code. I hope he reads this and have the time to check it.

Indeed SavageWorlds have custom made Dice Tower due to Legacy purposes. In v5.2 development I started to get rid of the legacy so it could use CoreRPG Dice Tower at some point. Work is not complete yet. SavageWorlds ruleset have lots of legacy still remaining in it because it is one of the very first rulesets ever developed 15 years ago. I am doing my best to update it use as much CoreRPG as possible in each development cycles.

lozanoje
April 24th, 2020, 13:03
Indeed SavageWorlds have custom made Dice Tower due to Legacy purposes. In v5.2 development I started to get rid of the legacy so it could use CoreRPG Dice Tower at some point. Work is not complete yet. SavageWorlds ruleset have lots of legacy still remaining in it because it is one of the very first rulesets ever developed 15 years ago. I am doing my best to update it use as much CoreRPG as possible in each development cycles.

Ok, so until you make, in a future release, the SW ruleset use CoreRPG Dice Tower instead of Legacy, for AudioOverseer to work with SW, celestian should recode that part involving SW DiceTower, if he has time.

Understood, thanks!

celestian
April 24th, 2020, 15:39
Ok, so until you make, in a future release, the SW ruleset use CoreRPG Dice Tower instead of Legacy, for AudioOverseer to work with SW, celestian should recode that part involving SW DiceTower, if he has time.

Understood, thanks!

That's not how it works in this case. I did not write any parts of the code in AO to interact with the Dice tower. AO works with CoreRPG layered rulesets. In the case of SWADE the "dice tower" is not layered on CoreRPG but customized code and because of that AO will not play nice with it.

lozanoje
April 24th, 2020, 16:46
That's not how it works in this case. I did not write any parts of the code in AO to interact with the Dice tower. AO works with CoreRPG layered rulesets. In the case of SWADE the "dice tower" is not layered on CoreRPG but customized code and because of that AO will not play nice with it.

No problem, celestian.

I am aware that until SW ruleset uses CoreRPG Tower, AO wont work. So I will go back to DOE, in case it keeps working, since it is no longer maintained.

Ikael
April 25th, 2020, 01:00
No problem, celestian.

I am aware that until SW ruleset uses CoreRPG Tower, AO wont work. So I will go back to DOE, in case it keeps working, since it is no longer maintained.

Can you update SavageWorlds to v5.2 and try again. From screenshots I am seeing that you are using old version and that error happen if extension overwrites the Chat without respecting functions that SavageWorlds overwrites. In the v5.2 I have removed the Chat overwrite functions and made them use CoreRPG instead. Your issue might have been resolved due to this.

lozanoje
April 25th, 2020, 10:07
Can you update SavageWorlds to v5.2 and try again. From screenshots I am seeing that you are using old version and that error happen if extension overwrites the Chat without respecting functions that SavageWorlds overwrites. In the v5.2 I have removed the Chat overwrite functions and made them use CoreRPG instead. Your issue might have been resolved due to this.

I've used 5.2.1 from test channel (also tried with 5.2 stable release) and it didnt work, I made a video (sorry for my english, i'm not native nor something close to).

https://www.youtube.com/watch?v=JC56PVjaulY

lozanoje
May 1st, 2020, 14:43
I have to test it deeper in my next game, but seems that 5.2.3 from Test channel works!!!! (Ikael was about to fix a bug with Dice Tower, and looks like he already made it by 5.2.3)

Thank you, guys!