Forums » Community Projects
Scuba, that rules! I been asking for group members to auto *friendly* since the start of groups! You rule!
Oh, a make enemy option might be nice, sometimes I run into someone and they will be a green dot to me, in a group battle, this can be just as confusing!
*note* I love this part...
*--And keep in mind, you can't see what ghosts are doing to your wife.* :D
[edit]
errm, I'm dumb, I guess if you don't set them as friends, they are enemies.
Oh, a make enemy option might be nice, sometimes I run into someone and they will be a green dot to me, in a group battle, this can be just as confusing!
*note* I love this part...
*--And keep in mind, you can't see what ghosts are doing to your wife.* :D
[edit]
errm, I'm dumb, I guess if you don't set them as friends, they are enemies.
Yeah, anyone not explicitly friended is set as an enemy. I use, uhh, the defaults so that anyone who is good for blowing up is getting blown up.
Hmm, seems setting NPC's to friendlies also makes all Station guards and Strikeforce bots green. Is there a way to determine a station guard from a trade bot? And if so, could you not include Station guards/SF as NPC's ?
Just a question, great lua script, my radar works pretty much like I've always wanted it to now :D
Just a question, great lua script, my radar works pretty much like I've always wanted it to now :D
Ah, I suppose it's possible. Let me look into it for a future version. Will have to wait until after I get back from Richmond on Thursday though.
Thanks man. You rock ;)
*** Also it might slow down your client since the radar function is called N times per frame(one per person in the sector) and I'd have to search their actual name for "*Strike Force" or "*Station Guard" or "*Aerna Seeker"
I seem to get only half the screen or so when doing /lua radar.open(). The right half is gone, or rather the window is too small, so it's impossible to see some options. Same in both full screen and window mode... Sorry, can't take screenshot while the window is open so I can't show you how it looks.
I'm getting the same problem as Theomyr. I can't even turn serco to hate because i can't see that side of the dialog box.
To put it shortly: this addon owns. Was very handy at Nation War today!
However there are some annoyances. Duel partners are not marked as red, and those who just damaged me are not marked as well. Maybe if someone damages you they should be auto-added to foes list? Maybe there should be also "primary" and "temporary" lists
Also, I want to specify differently those who have good standing with my faction and those who have bad standing. I am not a pirate, so I don't want to see in red everyone whom I can attack! I rather want to see in green everyone whom I wouldn't attack.
And last but not least there should be a posibity to filter by guild (is it alread there?) and set different lists for different characters
Quick way to revert back to default settings would be useful too
To Theo and Jest: try resizing the window. You should be able to drag right bottom conner of it. It is hard to find that draggable pixel, but it's doable. I have the same problem with VOKB GUI
However there are some annoyances. Duel partners are not marked as red, and those who just damaged me are not marked as well. Maybe if someone damages you they should be auto-added to foes list? Maybe there should be also "primary" and "temporary" lists
Also, I want to specify differently those who have good standing with my faction and those who have bad standing. I am not a pirate, so I don't want to see in red everyone whom I can attack! I rather want to see in green everyone whom I wouldn't attack.
And last but not least there should be a posibity to filter by guild (is it alread there?) and set different lists for different characters
Quick way to revert back to default settings would be useful too
To Theo and Jest: try resizing the window. You should be able to drag right bottom conner of it. It is hard to find that draggable pixel, but it's doable. I have the same problem with VOKB GUI
Okay, it might be a week or two before I can work on this again fully due to personal issues(ugh), but here's the laundry list for version 1.4.0:
This list is "Yeah, that would be neat if I could do that", not, "This will definitely be in v1.4.0"
However, assuming I won't run into technical problems(Hey! I can't even hack together a function that sort of works like that ><), then most of these if not all will be in the next major version.
DONE -Dynamic resizing of main window.
DONE -Per character friends and enemies lists
DONE -Preset loading/saving for toggles
DONE--On/off toggles for friends and enemies lists
DONE-Option to set strikeforces and station guards to hostile
SCREW THAT-Option to set hivebots and station turrets to hostile
DONE -Tab completion for adding players to the lists.
Todo for version 1.5.0:
-Quick way to revert to default radar behavior(I'd rather not spend the time on this unless numerous people want it, though)
-Toggle to take faction standing into account
-Flag people who hit you(or you hit) as hostile
--Pick how long they stay hostile to you
Edit: Keep the suggestions coming!
This list is "Yeah, that would be neat if I could do that", not, "This will definitely be in v1.4.0"
However, assuming I won't run into technical problems(Hey! I can't even hack together a function that sort of works like that ><), then most of these if not all will be in the next major version.
DONE -Dynamic resizing of main window.
DONE -Per character friends and enemies lists
DONE -Preset loading/saving for toggles
DONE--On/off toggles for friends and enemies lists
DONE-Option to set strikeforces and station guards to hostile
SCREW THAT-Option to set hivebots and station turrets to hostile
DONE -Tab completion for adding players to the lists.
Todo for version 1.5.0:
-Quick way to revert to default radar behavior(I'd rather not spend the time on this unless numerous people want it, though)
-Toggle to take faction standing into account
-Flag people who hit you(or you hit) as hostile
--Pick how long they stay hostile to you
Edit: Keep the suggestions coming!
Very nice work. I have some Lua style suggestions, though, just because your work is likely to be used as an example since we haven't released any information whatsoever!
Regarding the iup._G.x = y hack you're doing: The correct way to declare a global is declare("x",y). [This also works for functions, like declare("loadradar", function() stuff end)] And since 'radar' is already declared you don't need to use iup._G.radar. But it's better style to encapsulate your own functions in your own namespace, like this:
declare("ScubaSteve", {})
function ScubaSteve.buddydump(...) ... end
etc.
If you want to access your functions without the ScubaSteve prefix, make a local reference to them in the file:
local buddydump,isBuddy,strintable = ScubaSteve.buddydump, ScubaSteve.isBuddy, ScubaSteve.strintable
Having said that, if the functions you're writing are only to be used within your own module, you might as well just do this:
local function buddydump(...) ... end
and then you don't have any global namespace issues, as the function is local to your .lua file (and be careful with it: the function is only visible to code below the function declaration, unlike with global functions). But functions you want to make accessible to other modules should go into some sort of globally-declared table.
In this case you're kind of hijacking the already-declared radar table. You might want to declare a MakeFriends and use MakeFriends.open() instead or something.
Regarding the iup._G.x = y hack you're doing: The correct way to declare a global is declare("x",y). [This also works for functions, like declare("loadradar", function() stuff end)] And since 'radar' is already declared you don't need to use iup._G.radar. But it's better style to encapsulate your own functions in your own namespace, like this:
declare("ScubaSteve", {})
function ScubaSteve.buddydump(...) ... end
etc.
If you want to access your functions without the ScubaSteve prefix, make a local reference to them in the file:
local buddydump,isBuddy,strintable = ScubaSteve.buddydump, ScubaSteve.isBuddy, ScubaSteve.strintable
Having said that, if the functions you're writing are only to be used within your own module, you might as well just do this:
local function buddydump(...) ... end
and then you don't have any global namespace issues, as the function is local to your .lua file (and be careful with it: the function is only visible to code below the function declaration, unlike with global functions). But functions you want to make accessible to other modules should go into some sort of globally-declared table.
In this case you're kind of hijacking the already-declared radar table. You might want to declare a MakeFriends and use MakeFriends.open() instead or something.
the problem is ... there is no declare()! :P
Haha. Whoops. Well anyway, most of them should be local functions. Oh, and you can use GetBuddyInfo(charid) instead of having to cache your buddies' names and search for them in isBuddy.
edit: the next client release should have declare().
edit: the next client release should have declare().
Here's a modified version that doesn't use iup._G because that is being removed.
http://www.ratelis.com/radar.lua
I also changed the alignment of the right-side checkboxes because I thought it looked really bad.
http://www.ratelis.com/radar.lua
I also changed the alignment of the right-side checkboxes because I thought it looked really bad.
For tab completing, there's a function called TabCompleteName(partialname) that returns either the next best match or nil if it can't find anything.
It only completes names that the client has seen since it has run.
It only completes names that the client has seen since it has run.
Is there any way to bind functions to keys or create commands?
The closest we got right now is by redefining GKProcessCommand() and catching whatever is passed to it, but that is quite ugly and the commands made that way aren't bindable.
The closest we got right now is by redefining GKProcessCommand() and catching whatever is passed to it, but that is quite ugly and the commands made that way aren't bindable.
Awesome, I'll make sure to use the whole namespace dealie and whatnot as soon as I get to rewrite the whole radar thing into more generic functions and multiple files and whatnot to make the script easier to maintain.
Thanks for the info overall, you two.
Edit: Ray, I wonder why I didn't do that in the first place. Checkboxes look much better now, thanks.
Thanks for the info overall, you two.
Edit: Ray, I wonder why I didn't do that in the first place. Checkboxes look much better now, thanks.
mr_spuck:
gkinterface.BindCommand(inputcode, cmd)
gkinterface.UnbindCommand(cmd)
where inputcode = keycode + 268435456
and keycode = iup.K_F or iup.K_SPACE, etc...
This is this way because keyboard keys and joystick buttons are done through this command.
cmd = "Jettison" for example.
There are ways to create user-defined commands, but I'm not going to go into it right now.
gkinterface.BindCommand(inputcode, cmd)
gkinterface.UnbindCommand(cmd)
where inputcode = keycode + 268435456
and keycode = iup.K_F or iup.K_SPACE, etc...
This is this way because keyboard keys and joystick buttons are done through this command.
cmd = "Jettison" for example.
There are ways to create user-defined commands, but I'm not going to go into it right now.
hmm .. ok. user defined commands were what I was looking for though. not that big of deal yet anyway.