PDA

View Full Version : audio capability and custom scripting



marcus_egan
March 31st, 2010, 06:30
I had two questions:


1. Does FG support any sort of audio playback for the players that can be cued by the GM? I can only speak as a player, but I've found that the right music for a particular situation can really add to my immersion.


2. Is there any capability to customize and add to the functionality of the app through a scripting language of some sort? I seem to recall reading something about Lua being used for this, but I can't find it in the forums.

Thanks.

Griogre
March 31st, 2010, 08:15
1) FG does not suport any audio playback that can be cued by the GM. However some GM's use their VOIP programs to do this, in particular Ventrillo seems good for this.

2) Yes. Here's a link to the library on this site: https://www.fantasygrounds.com/modguide/scripting.xcp
FYI LUA manipulation of outside files has been cut off for security reasons. If you have specific questions feel free to ask.

marcus_egan
March 31st, 2010, 08:26
thanks for your response.

that sounds like a fine solution to help convey a mood with some music.

I'm a little confused about the scripting though. You mentioned that LUA manipulation of outside files has been cut off? I guess I don't understand the distinction between "inside" and "outside" files.

This is really interesting to me because I sort of have to learn LUA for my job anyway and I could kill two birds with one stone. Not to mention, it could make learning it more enjoyable.

Griogre
March 31st, 2010, 08:45
"Outside" might not have been the best description. I tired and heading to bed. :p Outside in this case means any non FG files. The LUA scripting language does have the capicity to kick off other exes or programs. That is the functionality has been turned off in the version of LUA used by FG. If this had been left on you could kick off WinAmp or something with a LUA script in FG. Aside from audio synch issues, allowing this type of thing would expose the clients to security risks from malware.

marcus_egan
March 31st, 2010, 15:48
ok, thanks again for the information.

I think I understand more clearly now. Perhaps I should ask the question in a different way. As a GM, what options do I have to customize the app through LUA to enhance the toolset or the experience?

Or if "options" is too broad, does anyone care to share any examples of how LUA has improved their game through FG?

Czarisyn
March 31st, 2010, 16:13
For ambient music, I plan on using ShoutCast to broadcast it. As for chat, we use Skype.

So far those have worked fairly well

marcus_egan
March 31st, 2010, 16:23
shoutcast eh? haven't heard of that one.

I will check it out, thanks man!

Tenian
March 31st, 2010, 17:05
In FGII there are two ways to modify the game via LUA:

1) The ruleset: The ruleset is the core game mechanics, typically it contains the definitions for every object you need to run the game, from what a character sheet contains/looks like to what happens when you roll the dice.

2) Extensions: Extensions offer the ability to replace/add elements to an existing ruleset. These might be simple changes such as altering some fonts/graphics (a skin) to more complex changes like adding fumble rules, a calendar, etc.

If you check out the wiki (https://oberoten.dyndns.org/fgwiki) you'll find information on a number of Extensions/Rulesets.

dm-crazy
April 1st, 2010, 22:00
If u dont know nothing about scropting, like me! u can use FG2 + Ventrilo + virtual audio cable...

marcus_egan
April 1st, 2010, 23:30
virtual audio cable? tell me more

EugeneZ
April 2nd, 2010, 00:10
virtual audio cable? tell me more

From another of my own posts:

Virtual Audio Cable (https://software.muzychenko.net/eng/vac.html). I was sort of surprised that I couldn't find a free solution but I was happy to pay for it. Besides, judging by the guy's update history (last updated Feb 2010) it's actually more complex than it looks.

Anyway, if someone wants to use that software, or a free alternative, what I do is this:

1) Create two virtual audio devices. Let's call them VAC1 and VAC2.
2) Run three instances of Audio Repeater (comes with VAC). It's not CPU instensive or anything and I've never had a problem running three instances. If you start them via command-line or batch script, you can even hide them in the systray.
3) Instance #1: Pipe from mic to VAC1. (Tip: Set this audio repeater to mono mode.)
4) Instance #2: Pipe from VAC2 to VAC1.
5) Instance #3: Pipe from VAC2 to Windows System Default.
6) Configure your Skype to use VAC1 as a "mic."
7) Configure your MP3 player (I use foobar2000) to output sound to VAC2.

Ideally, you want to launch the three Audio Repeater instances via batch script so that they can be started with a click and just go to your systray. Out of sight out of mind.

I was going to post my batch script here but when I went to look for it... it has mysterious vanished. I don't really get how it's even starting now. I'll need to go dig it up or re-write it or whatever and then I'll post it.

dm-crazy
April 2nd, 2010, 03:16
Compendium of videos tutoriais! (https://www.youtube.com/results?search_query=ventrilo+music+bot&aq=f)
Take a look! :P