Forums » Community Projects

Make Friends, v1.0.0

123»
Jun 23, 2007 Scuba Steve 9.0 link
Jun 23, 2007 yodaofborg link
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.
Jun 23, 2007 Scuba Steve 9.0 link
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.
Jun 24, 2007 yodaofborg link
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
Jun 24, 2007 Scuba Steve 9.0 link
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.
Jun 24, 2007 yodaofborg link
Thanks man. You rock ;)
Jun 24, 2007 Scuba Steve 9.0 link
*** 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"
Jun 24, 2007 Theomyr link
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.
Jun 24, 2007 JestatisBess link
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.
Jun 24, 2007 Aleksey link
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
Jun 25, 2007 Scuba Steve 9.0 link
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!
Jun 27, 2007 a1k0n link
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.
Jun 27, 2007 mr_spuck link
the problem is ... there is no declare()! :P
Jun 27, 2007 a1k0n link
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().
Jun 27, 2007 raybondo link
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.
Jun 27, 2007 raybondo link
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.
Jun 27, 2007 mr_spuck link
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.
Jun 28, 2007 Scuba Steve 9.0 link
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.
Jul 03, 2007 raybondo link
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.
Jul 04, 2007 mr_spuck link
hmm .. ok. user defined commands were what I was looking for though. not that big of deal yet anyway.