Auto Skirm widget - Page 2

Auto Skirm widget

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Auto Skirm widget

Post by Google_Frog »

I've updated it. Now it works with patroland fight orders. Skirms will try to keep at max range and resume their fight/patrol as normal when done.

@Hacked: I like unit white lists because players are given complete control over which units they want the widget to affect as long as they know where to look up the unit names (Modit) and how to open a lua file.

Is there a way to get actual range in a direction? Currently units which get bonus/penalties to range due to height variation don't take this into account and end up either staying too close or too far away.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Auto Skirm widget

Post by TheFatController »

As long as you're comparing lists of static values for ranges you could cut out the square root there by storing a list of all the UnitDefs maxWeaponRangeSquared etc and comparing those instead, not sure if it's even too CPU intensive but that may help if so
Hacked
Posts: 116
Joined: 15 Aug 2008, 18:06

Re: Auto Skirm widget

Post by Hacked »

i see the appeal of a whitelist.
if i could i would code in an on/off switch in the built list for units, because its convenient and situations are always different during a game.
i should look back into coding my own lua

good job on a great widget tho ^
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

Re: Auto Skirm widget

Post by Evil4Zerggin »

At least be glad that he's releasing it here publicly instead of keeping it secret for his own nefarious purposes :p

In any case, excellent job, Google. I've always wanted to code something similar to this, but never got around to it. Maybe someday I'll code that rangestate widget...
User avatar
Wisse
Posts: 263
Joined: 10 Jul 2006, 17:50

Re: Auto Skirm widget

Post by Wisse »

Could you make auto-rocko/strom-missile-dodge widget while you're at it.

I think this widget isn't all that bad couse it doesn't give you much advantage anyway. But I'm kinda scared what comes next, because it looks like we're gonna get out-microed by AI soon, which is sad.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Auto Skirm widget

Post by hoijui »

Wisse wrote:But I'm kinda scared what comes next, because it looks like we're gonna get out-microed by AI soon, which is sad.
yeahh.. and then we gonna take over the rest of the virtual, and after that the real world!! :D
aehh.. i mean.... they will.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Auto Skirm widget

Post by imbaczek »

Wisse wrote:Could you make auto-rocko/strom-missile-dodge widget while you're at it.
trepan thought of that, there's no way for lua to know projectile positions.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Auto Skirm widget

Post by TheFatController »

I think you forget gl.ReadPixels! :P
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Auto Skirm widget

Post by Gota »

why not avoid enemies for scout units?..lets automate the entire game..
Itll all be about what unit queue you make..
BaNa
Posts: 1562
Joined: 09 Sep 2007, 21:05

Re: Auto Skirm widget

Post by BaNa »

First of all, cool widget, i hope no mod includes it by default. Wisse your leet thud comkills are now reproducible using AI!
imbaczek wrote:
Wisse wrote:Could you make auto-rocko/strom-missile-dodge widget while you're at it.
trepan thought of that, there's no way for lua to know projectile positions.
ah, but it can read enemy positions no? So if we take a 1v1 rocko standoff for instance, you would be alright by taking the distance between the unit and the enemy, calculating how much time it takes for the rocket to cover that distance, and periodically changing direction in less than that amount of time.

Or if you can check when the unit fires (again, no need for projectile position), you could dodge only t<T after the shots (T being the flight time). If you can check for unit fire, you could dodge multiple rockos this way.
ZellSF
Posts: 1187
Joined: 08 Jul 2006, 19:07

Re: Auto Skirm widget

Post by ZellSF »

why not avoid enemies for scout units?
If you've played Dark Reign, you know this is a good idea.
lets automate the entire game..
Please do, I really look forward to playing against a challenging AI.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Auto Skirm widget

Post by KDR_11k »

Wisse wrote:Could you make auto-rocko/strom-missile-dodge widget while you're at it.
Just micro your units so they miss their waypoint and start driving in circles :P.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Auto Skirm widget

Post by Argh »

there's no way for lua to know projectile positions.
Well, yeah... there is. Little expensive for that purpose, though, due to the cost of tracking a projectileID, IIRC.

Spring.GetProjectilePosition

( projectileID ) --> px, py, pz

Spring.GetProjectileVelocity

( projectileID ) --> vx, vy, vz
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Auto Skirm widget

Post by imbaczek »

but does it work in unsynced code? IIRC it doesn't.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Auto Skirm widget

Post by Argh »

IDK. Then again, I always saw this as something that will eventually get refined and turned into a modular Gadget... or something that we're all going to want to ban from our games. Player aids like this are pretty high on my list of stuff to try and figure out a good way to control for, frankly.

That said, when tested, this wasn't terribly scary yet- it really needs to start the Units in motion earlier, and send them farther away, so that it isn't canceled by Units issuing themselves Orders, and happens soon enough to actually matter.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Auto Skirm widget

Post by KDR_11k »

imbaczek wrote:but does it work in unsynced code? IIRC it doesn't.
It'll probably work in unsynced gadgets but I doubt it'll accept widgets.
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Re: Auto Skirm widget

Post by Acidd_UK »

Could this be rolled into the next version of CA (if it hasn't already been?) please?
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Auto Skirm widget

Post by Licho »

Its already in CA, just enable it.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Auto Skirm widget

Post by zwzsg »

Gota wrote:Oh no....
Noruas wrote:WHAT HAVE U DONE THIS IS THE END OF MICRO.
smoth wrote:
Sheekel wrote:Mod devs have the ability to block the use of certain widgets in their mods, right?
I sure as fuck will block this.
lurker wrote:Now, if it gets developed into a viable skirmish AI that actively targets and monitors the terrain...
TheFatController wrote:It would be great if every new widget release didn't become a discussion about mod lua blocking so people could actually discuss the widget..
Hacked wrote:i don't understand why the most vocal forum users are so scared of lua recently
Wisse wrote:I think this widget isn't all that bad couse it doesn't give you much advantage anyway. But I'm kinda scared what comes next, because it looks like we're gonna get out-microed by AI soon, which is sad.
hoijui wrote:yeahh.. and then we gonna take over the rest of the virtual, and after that the real world!! :D
aehh.. i mean.... they will.
Gota wrote:why not avoid enemies for scout units?..lets automate the entire game..
BaNa wrote:First of all, cool widget, i hope no mod includes it by default. Wisse your leet thud comkills are now reproducible using AI!
This makes me want to turn the KP AI gadget into a widget, spend a little time to ensure it doesn't conflict too much with manually given orders, and maybe even change its unit list to BA unit names!

Also, why hasn't any C++ coder yet changed an AI\Bot-libs\*.dll into a \AI\Helper-libs\*.dll?

No really, it has been litterally years since forumers have prophetised AIs, widgets, and other automations will be the end of all human intelligence in Spring game, so this has been going on for too long, please quit it with the doomsday warnings, let's bring in the apocalypse already and see what happens! Now that I can, I'm really tempted to haste the Day of Reckoning that will judge who's the most clever between AI and average Spring player.
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: Auto Skirm widget

Post by Pressure Line »

the 'average' spring player (based on my observations of forum, lobby and game activity) has an IQ just above room temperature (in *C, thats 22-24*C) so it probably wouldn't be too hard zwzsg.
Post Reply

Return to “Lua Scripts”