PDA

View Full Version : Adding local sound files in linux



skj310
June 14th, 2023, 13:08
Hey there support ... am keen to try this out and see how things go. Just wanted to validate how we are adding file paths within the file import dialogue; assuming there's a sound folder local to the fgdata folder.

So ... i should point out i've had great success using @Celestian's audio overseer from forge, using my local custom sound files for combat SFX, and ambient music. All works swimmingly well and thankfully the extension continues to work with v4.4.x!!! So happy that. Within AudioOverseer I'll have a path like:
file:///home/skj310/.smiteworks/fgdata/music/SFX/action-surge.ogg

but using that path with the "Import Sound Files" tool just gives an error of:

ERROR: One or more filepaths unable to be processed, or needs to be in the data folder

have tried a number of iterations of the above like:
music/SFX/action-surge.ogg
or
music//SFX//action-surge.ogg
or
file:////home//skj310//.smiteworks//fgdata//music//SFX//action-surge.ogg

No luck so far, and drag/drop from the file explorer doesn't work either. Is someone able to provide a little more guidance?

Keep up the good works.

Laerun
June 14th, 2023, 21:38
Create a folder called: "sounds" folder in the FG Data main directory and point the audio integration with the same path you use.
-=================================-
https://www.fantasygroundsacademy.com/post/integrating-syrinscape-local-audio-files-with-fantasy-grounds-unity

Moon Wizard
June 15th, 2023, 08:19
I just had one of my developers test this on his Ubuntu machine; and he didn't have any issues adding.

Make sure that you put the full path of the each file in the Import Files window. It accepts a local file path, not URL.
(i.e. /home/skj310/.smiteworks/fgdata/music/SFX/action-surge.ogg)

Regards,
JPG

nephranka
June 15th, 2023, 10:56
I just had one of my developers test this on his Ubuntu machine; and he didn't have any issues adding.

Make sure that you put the full path of the each file in the Import Files window. It accepts a local file path, not URL.
(i.e. /home/skj310/.smiteworks/fgdata/music/SFX/action-surge.ogg)

Regards,
JPG

Works in Fedora, once you create the folder.

skj310
June 15th, 2023, 12:19
I just had one of my developers test this on his Ubuntu machine; and he didn't have any issues adding.

Make sure that you put the full path of the each file in the Import Files window. It accepts a local file path, not URL.
(i.e. /home/skj310/.smiteworks/fgdata/music/SFX/action-surge.ogg)

Regards,
JPG

yeeesh ... so used to having to put file:/// or some form like that in ... didn't even think to just try the standard linux way ... nice! Thank you!

skj310
June 16th, 2023, 08:02
Sorry to bug again, but is there a write up somewhere on how to configure / use the new triggers, their patterns, and the form of regex being used?

skj310
June 16th, 2023, 08:04
Oook ... found this: https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/2078932993/Using+Sound+Links ... my bad. Parking my question for the time while i review. Cheers!

Trenloe
June 16th, 2023, 08:34
The pattern matching format is that of LUA.

https://www.lua.org/pil/20.2.html

roshne
June 17th, 2023, 03:55
Anyone willing to provide a regex example for matching spells, like "Lightning Bolt" OR "Electric Arc" OR "Chain Lightning" ?

Trenloe
June 17th, 2023, 08:58
Anyone willing to provide a regex example for matching spells, like "Lightning Bolt" OR "Electric Arc" OR "Chain Lightning" ?
It'll probably be easier to do a trigger for one spell, then copy it twice and edit for the other spells. Otherwise this would get pretty complex and probably end up with more work in the long run.

Trenloe
June 17th, 2023, 09:03
Anyone willing to provide a regex example for matching spells, like "Lightning Bolt" OR "Electric Arc" OR "Chain Lightning" ?
But this would match all three - up to Lightning Bo

^[ELC][ilh][gea][hci][tn][nr ][iL][nci][g ][ Ah][Brt][ocn]

masterqgj
June 17th, 2023, 19:27
Can someone give me an hint on how to solve this problem?

I have players with "Focus Rifles" and some "blabla Heavy Rifle" and others even a "Heavy Laser Rifle". I want to play different sounds. But if i say: "Rifle = Sound X" that Sound X is played even when someone attacks using an "Heavy Rifle" or "Heavy Laser Rifle".
So basically, i want sound X to be played in general whenever an item contains the word "Rifle", except it's an "Heavy Rifle" or an "Laser Rifle"?

roshne
June 18th, 2023, 00:45
It'll probably be easier to do a trigger for one spell, then copy it twice and edit for the other spells. Otherwise this would get pretty complex and probably end up with more work in the long run.

Tried that, if there is one pattern, it works, if there are more than one nothing plays.

Trenloe
June 18th, 2023, 10:17
Tried that, if there is one pattern, it works, if there are more than one nothing plays.
I'm not sure we're on the same page. Can you give an example of what works and what doesn't please? Maybe provide some screenshots.

roshne
June 18th, 2023, 16:57
I'm not sure we're on the same page. Can you give an example of what works and what doesn't please? Maybe provide some screenshots.

ok, this works ...

57824

This does not

57823

I'd rather have 100 sounds linking to multiple "triggers", than 400 individual triggers

The attack triggers would be even worse, it should be Pattern, then select a sound for each sub result (Miss/Crit/Fumble/Hit)

masterqgj
June 18th, 2023, 17:03
ok, this works ...

57824

This does not

57823

I'd rather have 100 sounds linking to multiple "triggers", than 400 individual triggers

The attack triggers would be even worse, it should be Pattern, then select a sound for each sub result (Miss/Crit/Fumble/Hit)

Signed, i thought that it's an "or" condition in the first place too. Maybe we can get a toggle to decide on our own if it's "or" or "and"?

roshne
June 18th, 2023, 17:05
But this would match all three - up to Lightning Bo

^[ELC][ilh][gea][hci][tn][nr ][iL][nci][g ][ Ah][Brt][ocn]

I've done simple Regex in the past, and can usually parse what they are doing, but this is pretty advanced, I can follow the first

^[ELC] - Match first character to be E, L, or C

do the subsequent sets [] match the 2nd, 3rd, 4th, etc. chars, or just seem to?

Is there a set that says ... I don't care what comes after match it? both [.-?] and [-?] don't seem to work.

Trenloe
June 18th, 2023, 18:27
ok, this works ...

57824

This does not

57823

I'd rather have 100 sounds linking to multiple "triggers", than 400 individual triggers

The attack triggers would be even worse, it should be Pattern, then select a sound for each sub result (Miss/Crit/Fumble/Hit)
Teay, that won't work because the patterns use AND Boolean logic, not OR. Hence why I was suggesting making copies of the each of the complete records - one for each spell.

Trenloe
June 18th, 2023, 18:30
do the subsequent sets [] match the 2nd, 3rd, 4th, etc. chars, or just seem to?
Yep. And, of course, this isn't foolproof - if there was some other spell that had a combination of the different letters, then it would match. Hence why I made the suggestions of multiple records - one per spell.

roshne
June 18th, 2023, 18:30
Teay, that won't work because the patterns use AND Boolean logic, not OR. Hence why I was suggesting making copies of the each of the complete records - one for each spell.

Which is what I have had to do, not ideal IMHO.

Would be nice for a radio button toggling between AND/OR, next to each pattern.

roshne
June 18th, 2023, 18:31
Signed, i thought that it's an "or" condition in the first place too. Maybe we can get a toggle to decide on our own if it's "or" or "and"?

I will second that suggestion!

LordEntrails
June 18th, 2023, 19:24
Which is what I have had to do, not ideal IMHO.

Would be nice for a radio button toggling between AND/OR, next to each pattern.
I hope someone has added this to the wish list. After all this is just the first release of this function. I wouldn't expect it to have everything. Agile software development and Minimal Viable Product and all that.

roshne
June 19th, 2023, 00:31
Yep. And, of course, this isn't foolproof - if there was some other spell that had a combination of the different letters, then it would match. Hence why I made the suggestions of multiple records - one per spell.

You imply that except for the first set, the order isn't fixed, Does this regex "^[A][b][c]" match both "Abc" and "Acb"?

I kinda wish they'd have implemented the POSIX regex rather than LUA regex, I understand the former much better than the later.

Moon Wizard
June 19th, 2023, 01:13
We are using the system that Lua offers for pattern matching.
https://www.lua.org/pil/20.2.html

Regards,
JPG

Trenloe
June 19th, 2023, 01:18
You imply that except for the first set, the order isn't fixed, Does this regex "^[A][b][c]" match both "Abc" and "Acb"?
[A][c] would always match Abc - as each set of data in [...] is the possible combinations for that single character placement.

[B]^[ELC][ilh][gea] means that the first letter can be either E, L or C; the second letter can be either i, l or h; third can be either g, e or a.

^[ELC][ilh][gea] would match on:

Eig
Eie
Eia
Elg
Ele
Ela
Ehg
...
... and so on...
... up to...
Cha