Ally Selected Units
Moderator: Moderators
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Ally Selected Units
This is a simple widget that shows which units are selected by your teammates when playing coop.
Maybe useful for others as well or maybe there is already something like this, i dont know.
I didnt had a chance to test this in real games so far, so it is BETA. Any bug reports or improvement ideas are very welcome.
One idea is to use different colors for different teammates. At the moment all selection circles are just green regardless of the player who selected that unit.
BTW: This only works for teammates who have this widget too!
v2.0
----
-optimized sending
-debug mode disabled
v1.9
------
-ally units triangle changed to pentagon
-fixed: markers appearing behind terrain/in front of units
-marker now not ground only: airplanes fixed
Updated 1.85:
-Zlib compression added
-small improvements
UPDATE 1.1:
-improved network load
-different colors for each teammate
Download in SpringDownloader or at
http://www.springinfo.info/index.php?page_id=690#136
Maybe useful for others as well or maybe there is already something like this, i dont know.
I didnt had a chance to test this in real games so far, so it is BETA. Any bug reports or improvement ideas are very welcome.
One idea is to use different colors for different teammates. At the moment all selection circles are just green regardless of the player who selected that unit.
BTW: This only works for teammates who have this widget too!
v2.0
----
-optimized sending
-debug mode disabled
v1.9
------
-ally units triangle changed to pentagon
-fixed: markers appearing behind terrain/in front of units
-marker now not ground only: airplanes fixed
Updated 1.85:
-Zlib compression added
-small improvements
UPDATE 1.1:
-improved network load
-different colors for each teammate
Download in SpringDownloader or at
http://www.springinfo.info/index.php?page_id=690#136
- Attachments
-
- coop.jpg
- screenie
- (84.69 KiB) Downloaded 87 times
Last edited by very_bad_soldier on 26 Aug 2009, 19:38, edited 5 times in total.
Re: Coop: Selected Units
Excellent work, no problems here, will test further.
- [PinK]triton
- Posts: 8
- Joined: 25 Sep 2008, 01:27
Re: Coop: Selected Units
Great job, but did u think about lock selected stuff? i mean that when u select units others teammates cant use it.
coop mod is really interesting. I think its a really nice futur way of playing RTS, but it needs improvements.
A nice thing would be that players should have different functions with rank maybe... best rank would be able to control anything, lower rank would only listen orders ^^...(rank wont be only way to make teams ofc)
I really can imagine a team of 8 players with 1 boss 2 captains and 6 soldats.
-Boss say strategy and dont needs to control units, he focus on how metal and energy is spend on units/eco (would be nice to have a widget to set ratio about buildpower priority between spam units/defences and make eco)
-2 captains makes build orders and cons and choose to which soldats they give units to attack with (we would need a very fast widget to share units to players).
-6 soldats micro units only, each captain have 3 soldats and share them units, because soldats have no units at start.
Also soldat would be usefull as fast as u can have 5 scouts in a game.
It was example of wat i imagine about a new way to play rts and i think it can be done on balanced annihilation with few changes only.
I didnt think about this only to lead some nubs ill be ok to be a soldat too and only focus on attack/raids.
Sorry for my english and how i typed this i hope ull understand what i thought.
P.S : i am not code programmer so it just an idea, i cant make this alone
coop mod is really interesting. I think its a really nice futur way of playing RTS, but it needs improvements.
A nice thing would be that players should have different functions with rank maybe... best rank would be able to control anything, lower rank would only listen orders ^^...(rank wont be only way to make teams ofc)
I really can imagine a team of 8 players with 1 boss 2 captains and 6 soldats.
-Boss say strategy and dont needs to control units, he focus on how metal and energy is spend on units/eco (would be nice to have a widget to set ratio about buildpower priority between spam units/defences and make eco)
-2 captains makes build orders and cons and choose to which soldats they give units to attack with (we would need a very fast widget to share units to players).
-6 soldats micro units only, each captain have 3 soldats and share them units, because soldats have no units at start.
Also soldat would be usefull as fast as u can have 5 scouts in a game.
It was example of wat i imagine about a new way to play rts and i think it can be done on balanced annihilation with few changes only.
I didnt think about this only to lead some nubs ill be ok to be a soldat too and only focus on attack/raids.
Sorry for my english and how i typed this i hope ull understand what i thought.
P.S : i am not code programmer so it just an idea, i cant make this alone
Re: Coop: Selected Units
maybe better as gadget, so all would see it
edit: i didnt play coop, so let me make this small suggestion: different color for halo/border for teammate
edit: i didnt play coop, so let me make this small suggestion: different color for halo/border for teammate
Re: Coop: Selected Units
Suggestion.
When one Player gives a command to a unit or units,until they finish doing it no one else can give them further orders.
This way there will be no fighting over control.
The first one to grab units is the one to control them.
Take a group,tell them to move somewhere.
If they haven't finished yet nobody can give them any other orders.
If one of the units in the group reached it's destination but other members haven't it still shouldn't be unlocked to the use of other players.Not until all the members of the group that has been given this same command have finished their movement and reached the destination.
I guess there will need to be exceptions like patrol commands.
When one Player gives a command to a unit or units,until they finish doing it no one else can give them further orders.
This way there will be no fighting over control.
The first one to grab units is the one to control them.
Take a group,tell them to move somewhere.
If they haven't finished yet nobody can give them any other orders.
If one of the units in the group reached it's destination but other members haven't it still shouldn't be unlocked to the use of other players.Not until all the members of the group that has been given this same command have finished their movement and reached the destination.
I guess there will need to be exceptions like patrol commands.
Re: Coop: Selected Units
Thx for with widget!
Trit:
I think this only works with players who know each other well.
In fact, im only willing to coop with very few players. Since if you trust the other player, things will go 100x smoother.
Trit:
I think this only works with players who know each other well.
In fact, im only willing to coop with very few players. Since if you trust the other player, things will go 100x smoother.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Coop: Selected Units
In CA of course (selectionsend, shows ally selections in yellow), but it shows selected units of all your allies. Beware of bandwidth, jK lectured me on that.very_bad_soldier wrote:Maybe useful for others as well or maybe there is already something like this, i dont know.
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Coop: Selected Units
Thanks! I tried to implement but it seems to be impossible to deselect units by Lua or to make it impossible for the player to select certain units, at least I wasnt able to figure out.[PinK]triton wrote:Great job, but did u think about lock selected stuff? i mean that when u select units others teammates cant use it.
coop mod is really interesting.
Dont like it, its too important in coop mode to actually be able to do stuff like that.Gota wrote: Suggestion.
When one Player gives a command to a unit or units,until they finish doing it no one else can give them further orders.
You dont see me surprisedCarRepairer wrote: In CA of course (selectionsend, shows ally selections in yellow), but it shows selected units of all your allies. Beware of bandwidth, jK lectured me on that.
I found the Un-/Pack-functions your widget, very useful, thanks. I knew I had seen functions like that but could not find them by myself since they are well hidden in that VFS-namespace or how it is called in Lua.
I tried another approach as your widget. I only send the difference to the current selection instead of the whole selection. I think it could reduce network load a lot, but have not tested in real games yet. Are Lua message guaranteed to arrive at the receiver? Lost messages would mean strange bugs in this approach.
Does that "SelectionChanged"-Callin actually work? I could not find a reference to it in the wiki and in the sources. Or is it only planned for future compatibility?
P.S.
New version upped...
Re: Coop: Selected Units
You can deselect units via Lua, by doing a GetSelection() type call, removing items from the result, then calling a SetSelection() type call with the new table.very_bad_soldier wrote:Thanks! I tried to implement but it seems to be impossible to deselect units by Lua or to make it impossible for the player to select certain units, at least I wasnt able to figure out.[PinK]triton wrote:Great job, but did u think about lock selected stuff? i mean that when u select units others teammates cant use it.
coop mod is really interesting.
...
Does that "SelectionChanged"-Callin actually work? I could not find a reference to it in the wiki and in the sources. Or is it only planned for future compatibility?
I have never got the SelectionChanged callin to fire, and it's not in widgets.lua atm, don't know why it's still around.
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Coop: Selected Units
Hm, can't find any references to those functions in the wiki and not in the spring sources. Calling them fails too. You actually used them already?Niobium wrote: You can deselect units via Lua, by doing a GetSelection() type call, removing items from the result, then calling a SetSelection() type call with the new table.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Coop: Selected Units
I didn't know SelectionChanged doesn't work. Oh well, my widget works regardless of that fact but thanks for letting me know.
- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Re: Coop: Selected Units
You basically have to use CommandsChanged if you want a callin for when the selection changes.
Re: Coop: Selected Units
Thats why I added 'type' after them, because theres a few variants.very_bad_soldier wrote:Hm, can't find any references to those functions in the wiki and not in the spring sources. Calling them fails too. You actually used them already?Niobium wrote: You can deselect units via Lua, by doing a GetSelection() type call, removing items from the result, then calling a SetSelection() type call with the new table.
http://springrts.com/wiki/Lua_UnsyncedR ... cted_Units
http://springrts.com/wiki/Lua_UnsyncedC ... _Selection
Easiest is probably:
Spring.GetSelectedUnits() -> { [1] = unitID, ... }
Spring.SelectUnitArray( { [1] = unitID1 , [2] = unitID2 , ...} [,boolean append] ) -> nil
With table.remove/insert
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Coop: Selected Units
Oh dear, silly me
Thanks for the hint...
Thanks for the hint...
Re: Coop: Selected Units
Even if you could make it impossible, you would need to override that behaviour at points. You don't want somebody going Ctrl-A, or even Ctrl-Z at times.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Coop: Selected Units
Already taken care of, there's an upper limit to the amount of data I'm sending.neddiedrow wrote:Even if you could make it impossible, you would need to override that behaviour at points. You don't want somebody going Ctrl-A, or even Ctrl-Z at times.
Re: Coop: Selected Units
may I have permission to include this in gundam?
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Coop: Selected Units
Of course you can. The same applies for the easy facing thingie.
But I am sure this one can still be improved a lot. I will try to implement some of the good ideas from this thread.
But I am sure this one can still be improved a lot. I will try to implement some of the good ideas from this thread.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Coop: Selected Units
Interesting idea but yes this could end up with strange errors if something goes wrong. If you saw in my widget I took the easy way out by only transmitting up to 10 selected units. This means there is no need for a "difference report" like you use. The reason I am satisfied with the 10 unit limit is that beyond that many units I find that it's not really useful information to know that my ally is briefly selecting 200 units on the screen, or he did a ctrl-A. For the most part all I need to know is stuff like:very_bad_soldier wrote:I tried another approach as your widget. I only send the difference to the current selection instead of the whole selection. I think it could reduce network load a lot, but have not tested in real games yet. Are Lua message guaranteed to arrive at the receiver? Lost messages would mean strange bugs in this approach.
He is selecting that constructor over there so he's building something.
He has selected 10 of these tanks among his army so he's probably about to use this squad or all the tanks nearby, to either attack something or get into a new position.