Forums » Suggestions
wgaf.cfg LOAD command
I'd like another version of this command or a parameter for this one. What I want to be able to do is LOAD my command file and have the VO client actually perform a rename/load/delete on the file so that the commands are loaded exactly once and no commands added to the file are missed.
Thanks,
--Harpo
Thanks,
--Harpo
Late tonight, after I come back from Aikibudo class (despite my recent injury), I'll post my load bind. I have one such thing wich does what you need.
I used it when I was toying with binds. With VO in a window and a text editor, I'd re-code the binds, switch to VO and hit my Load bind button wich reloads that script and does the work.
The main wgaf file from VO loads my custom binds file wich itself has the bind to the load command to reload itself. This way, I dont have to restart VO as I make changes to that file.
I used it when I was toying with binds. With VO in a window and a text editor, I'd re-code the binds, switch to VO and hit my Load bind button wich reloads that script and does the work.
The main wgaf file from VO loads my custom binds file wich itself has the bind to the load command to reload itself. This way, I dont have to restart VO as I make changes to that file.
I'm not sure what you said, but I look forward to seeing it! :)
Is there documentation somewhere on all the allowed commands in wgaf.cfg?
Thanks,
--Harpo
Is there documentation somewhere on all the allowed commands in wgaf.cfg?
Thanks,
--Harpo
okay, about that... the problem, as I see it, is that while it loads the cfg file, it does it ON TOP OF the existing cfg file, so any binds existing in the current cfg file which are not overwritten by the new one will remain. This becomes a problem because I have some pilot files with more commands than others, and so playing them will not actually get rid of the unused commands, but rather just use them as they are on the other character (such as alternate hails... this is a bad thing)
So how do you get it to 'forget' the previous settings before loading the new cfg file?
So how do you get it to 'forget' the previous settings before loading the new cfg file?
include lines in the seperate files like so:
bind "" < alias that is in any of the other files but not this one >
(ie, nothing in the " ")
bind "" < alias that is in any of the other files but not this one >
(ie, nothing in the " ")
First, locate your main VO wgaf.cfg file.
On Mac, right-click (aka, Control+Click) the Vendetta application and select "Show Package Content" in the contextual menu (or whatever it's actually called: I'm running my OS in french so I forgot english spelling). The wgaf.cfg file should be in the first level of the window that opens up.
I don't know where they are on Windows or Linux. Dig it up.
Then, using a simple text editor, add these lines in the wgaf.cfg file:
alias reset "load /Volumes/G5Data/XUsers/mouser/Vendetta/wgaf_mgl.cfg"
bind "+" reset
now, obviously, you have to change the path name to your very own wgaf file so that it points to one of your own. Mine is called 'wgaf_mgl.cfg'.
Save and close the main wgaf.cfg file.
Using a text editor, create your own file, pointed to by the path in the alias command above.
Add bind commands you wish to use.
As Celkan points out, the list of commands you can show in there is located here:
http://www.vendetta-online.com/manual/app_commands.html
while a sticky thread dedicated to custom binds is located at the top of the General forum, at this link:
http://www.vendetta-online.com/x/msgboard/1/3229
You'll find a number of binds in there. Not all work as advertised so some thinkering is in order.
For example, mine contains this:
===========================
alias reset "load /Volumes/G5Data/XUsers/mouser/Vendetta/wgaf_mgl.cfg"
bind "+" reset
echo "Custom settings loading..."
alias duel_target "activatechattab 0; duel challenge %target%"
alias duel_accept "activatechattab 0; duel accept %target%"
bind D duel_target
bind A duel_accept
alias hail0 "msg %target% Hi. I am Lieutenant-Concil of the Coalition of Itan. Have a safe voyage."
bind 0 hail0
alias hail1 "msg %target% Hi. I am Lieutenant-Concil Mogul Velaio of the Coalition of Itan. What are your intentions?"
bind 1 hail1
alias hail2 "msg %target% Hi. I am Lieutenant-Concil Mogul Velaio of the Coalition of Itan. Cease your attack or be prepared to defend yourself."
bind 2 hail2
alias hail3 "msg %target% Hi. I am Lieutenant-Concil Mogul Velaio of the Coalition of Itan. Your actions force me to act upon them."
bind 3 hail3
echo "Custom settings loaded."
===========================
(and then some). Omit the =='s.
In the above binds code, I've got
'+' wich reloads my custom binds. The echo messages ensures me it was loaded properly.
'D' wich asks the selected target (ship) to enter a duel
'A' wich accepts a duel from an invitation
and 0, 1, 2 and 3 wich show four different custom hail messages to the selected target. This is more flexible than the 1-only hail message VO has by default, and could allow you to have different hail messages for any of your alts (I dont have alts that I use so I only have these hails).
On Mac, right-click (aka, Control+Click) the Vendetta application and select "Show Package Content" in the contextual menu (or whatever it's actually called: I'm running my OS in french so I forgot english spelling). The wgaf.cfg file should be in the first level of the window that opens up.
I don't know where they are on Windows or Linux. Dig it up.
Then, using a simple text editor, add these lines in the wgaf.cfg file:
alias reset "load /Volumes/G5Data/XUsers/mouser/Vendetta/wgaf_mgl.cfg"
bind "+" reset
now, obviously, you have to change the path name to your very own wgaf file so that it points to one of your own. Mine is called 'wgaf_mgl.cfg'.
Save and close the main wgaf.cfg file.
Using a text editor, create your own file, pointed to by the path in the alias command above.
Add bind commands you wish to use.
As Celkan points out, the list of commands you can show in there is located here:
http://www.vendetta-online.com/manual/app_commands.html
while a sticky thread dedicated to custom binds is located at the top of the General forum, at this link:
http://www.vendetta-online.com/x/msgboard/1/3229
You'll find a number of binds in there. Not all work as advertised so some thinkering is in order.
For example, mine contains this:
===========================
alias reset "load /Volumes/G5Data/XUsers/mouser/Vendetta/wgaf_mgl.cfg"
bind "+" reset
echo "Custom settings loading..."
alias duel_target "activatechattab 0; duel challenge %target%"
alias duel_accept "activatechattab 0; duel accept %target%"
bind D duel_target
bind A duel_accept
alias hail0 "msg %target% Hi. I am Lieutenant-Concil of the Coalition of Itan. Have a safe voyage."
bind 0 hail0
alias hail1 "msg %target% Hi. I am Lieutenant-Concil Mogul Velaio of the Coalition of Itan. What are your intentions?"
bind 1 hail1
alias hail2 "msg %target% Hi. I am Lieutenant-Concil Mogul Velaio of the Coalition of Itan. Cease your attack or be prepared to defend yourself."
bind 2 hail2
alias hail3 "msg %target% Hi. I am Lieutenant-Concil Mogul Velaio of the Coalition of Itan. Your actions force me to act upon them."
bind 3 hail3
echo "Custom settings loaded."
===========================
(and then some). Omit the =='s.
In the above binds code, I've got
'+' wich reloads my custom binds. The echo messages ensures me it was loaded properly.
'D' wich asks the selected target (ship) to enter a duel
'A' wich accepts a duel from an invitation
and 0, 1, 2 and 3 wich show four different custom hail messages to the selected target. This is more flexible than the 1-only hail message VO has by default, and could allow you to have different hail messages for any of your alts (I dont have alts that I use so I only have these hails).
Cunjo, I'm not sure how you would go about zapping any previous settings.
What you could have is a bunch of clear code at the beginning of your personal wgaf.fcg file wich overwrites any key binds:
bind 0
basically removes any bind to zero that there was before.
You could add this blanking stuff at the top of your personal wgaf file or perhaps create a nobinds.cfg file wich you load at the top of every personal wgaf file.
Keep in mind that chain-loading using 'load' sometimes fails. I've had issues in the past loading a file from a loaded file. The load command was described to me in the past by one of the devs as a quick hack that wasn't meant to become a programing language so your mileage may vary.
Also, when loading a gaf fails, VO removes any offending code from it's own wgaf.cfg file.
This is the reason why I made myself an external wgaf file that would not get zapped by VO's wgaf.cfg file. In the worse case scenario, only the load command and bind to + would get lost.
What you could have is a bunch of clear code at the beginning of your personal wgaf.fcg file wich overwrites any key binds:
bind 0
basically removes any bind to zero that there was before.
You could add this blanking stuff at the top of your personal wgaf file or perhaps create a nobinds.cfg file wich you load at the top of every personal wgaf file.
Keep in mind that chain-loading using 'load' sometimes fails. I've had issues in the past loading a file from a loaded file. The load command was described to me in the past by one of the devs as a quick hack that wasn't meant to become a programing language so your mileage may vary.
Also, when loading a gaf fails, VO removes any offending code from it's own wgaf.cfg file.
This is the reason why I made myself an external wgaf file that would not get zapped by VO's wgaf.cfg file. In the worse case scenario, only the load command and bind to + would get lost.
"Council," not "Concil".
It doesn't look good for a Lieutenant/Council member to misspell his or her own rank, if you catch my drift. ;)
It doesn't look good for a Lieutenant/Council member to misspell his or her own rank, if you catch my drift. ;)
Eh. Didn't notice. That what you get from english being your second language.
Thanks.
nb; to my defense, I'm not elected yet so that was temporary anyhow. Just more temporary than initially thought but we should have final guild structure by christmas. That's totally off-topic however.
Thanks.
nb; to my defense, I'm not elected yet so that was temporary anyhow. Just more temporary than initially thought but we should have final guild structure by christmas. That's totally off-topic however.
I guess I didn't explain what I'm after good enough.
My external file is going to be loaded every second. It will contain message commands to players. After each set of messages is sent I don't want them repeated. Another program will be writing to the message file. VO client will load it each second. I'd like the client to rename the file before loading it so that it cannot be written to while it is loading. Then I'd like the VO client to delete the file after it is executed. Then repeat the process the next second (roguelazer showed me how to repeat the process).
Thanks
My external file is going to be loaded every second. It will contain message commands to players. After each set of messages is sent I don't want them repeated. Another program will be writing to the message file. VO client will load it each second. I'd like the client to rename the file before loading it so that it cannot be written to while it is loading. Then I'd like the VO client to delete the file after it is executed. Then repeat the process the next second (roguelazer showed me how to repeat the process).
Thanks
VO can't write to any files other than errors.log, wgaf.cfg, config.ini, the other error logs, and navroute files.
I think what you are trying to do is a bit more complicated than VO allows, however.
I think what you are trying to do is a bit more complicated than VO allows, however.
Well, depending on what he wants to make it do, it sounds like some of the things we have PFS doing in the background.
@csgno1:
Since VO can't modify other files on the system, your external program or script has to handle clearing out your "message" file each time that VO reads from it. This usually isn't a problem, but some weird timing bugs can result if you aren't careful.
@csgno1:
Since VO can't modify other files on the system, your external program or script has to handle clearing out your "message" file each time that VO reads from it. This usually isn't a problem, but some weird timing bugs can result if you aren't careful.
I specifically meant the VO client renaming a file. VO has no ability to do that, and quite frankly, I'm not making any sense out of what he wants. I'd get the point a bit better if he made a list of what he wants.
If it's just the message thing, then yes, PFS should be able to handle that at some point.
*stares at Nerde*
If it's just the message thing, then yes, PFS should be able to handle that at some point.
*stares at Nerde*
Hi,
What I want is related to avoiding the weird timing bugs. I could make it foolproof if VO added a rename file and delete file command. Since VO reads the command file it is the logical choice to clear it, since it knows exactly when it was loaded.
Rename is good because it's an atomic command, it will only happen if the file is closed.
Or a command to 'tail' the input file and load only new lines. That would to the trick as well.
I don't know what FPS is. If it's a program to write commands and manage the command file I want to do something similar. I've started one and want my generated commands to be reliably read. It's working for me now, just managing it with a timer, but I think we can all do more and do it easier if the VO client added some facility for us.
Thanks,
--Harpo
What I want is related to avoiding the weird timing bugs. I could make it foolproof if VO added a rename file and delete file command. Since VO reads the command file it is the logical choice to clear it, since it knows exactly when it was loaded.
Rename is good because it's an atomic command, it will only happen if the file is closed.
Or a command to 'tail' the input file and load only new lines. That would to the trick as well.
I don't know what FPS is. If it's a program to write commands and manage the command file I want to do something similar. I've started one and want my generated commands to be reliably read. It's working for me now, just managing it with a timer, but I think we can all do more and do it easier if the VO client added some facility for us.
Thanks,
--Harpo
I've touted the need of a /system command wich allowed piping bind commands to the OS level.
Obviously, what you'd do in /system is platform dependent (with Mac/Linux sharing some Posix commonality).
The problem is that you'd still need a means for VO to pipe chat system to some bind/script and vice versa. Then, you'd have solid grounds for bots script.
Obviously, what you'd do in /system is platform dependent (with Mac/Linux sharing some Posix commonality).
The problem is that you'd still need a means for VO to pipe chat system to some bind/script and vice versa. Then, you'd have solid grounds for bots script.
I remember now thanks
/system would work for me :)
system 'rename infile infile2'
load infile2
system 'delete infile2'
rinse and repeat
Actually the more I think about having something like tail to read an input file the more I like it.
system 'rename infile infile2'
load infile2
system 'delete infile2'
rinse and repeat
Actually the more I think about having something like tail to read an input file the more I like it.