Wanted: Retreat!
Moderator: Moderators
Wanted: Retreat!
Here's a challenge, LUA people:
Can you make a script that causes a Group to retreat to the previous waypoint, if the total hitpoints of the Group go below 50%? That'd be really, really handy, as a model for making meta-behavioral scripts, if nothing else.
Can you make a script that causes a Group to retreat to the previous waypoint, if the total hitpoints of the Group go below 50%? That'd be really, really handy, as a model for making meta-behavioral scripts, if nothing else.
- 1v0ry_k1ng
- Posts: 4656
- Joined: 10 Mar 2006, 10:24
this is borderlining on a cheat LUA, usually it takes micro and concentration to retreat and repair units..
It wouldnt be hard to make a lua widget that makes units move so they are always engaging the enemy target from their maximum range, a lua widget which makes units jinx randomly making projectiles miss etc.. I just dont think we should..
It wouldnt be hard to make a lua widget that makes units move so they are always engaging the enemy target from their maximum range, a lua widget which makes units jinx randomly making projectiles miss etc.. I just dont think we should..
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
I don't think lua cheatish automation widgets are bad by itself, but if people don't know how to get them it you get unfair situations.i wonder how we can control the "wildgrow" of lua "cheat" widgets...
I think for 0.75b1, lua UI should be enabled by default and new installers should include popular lua widgets..
-
- Posts: 250
- Joined: 22 Jul 2006, 19:58
I don't think IA would to this better than a human, the will always retreat when you don't want, or not as you want etc..1v0ry_k1ng wrote:this is borderlining on a cheat LUA, usually it takes micro and concentration to retreat and repair units..
It wouldnt be hard to make a lua widget that makes units move so they are always engaging the enemy target from their maximum range, a lua widget which makes units jinx randomly making projectiles miss etc.. I just dont think we should..
This is about better automation of large-unit behavior, and giving players better control over their forces when they get really huge. In the game I'm building, players will routinely have fairly big forces, on larger maps, and it'd be great if they could be controlled better when the player is not concentrating on them, instead of simply getting slaughtered when the player looks away.
It's in the category of, "players do this manually all the time, I just want it to be automated, like it already is in most modern game engines (using morale systems and other things)".
Second off, the use of this is not at all confined to just one scenario. It'd be great, for example, to be able to put units "on alert", and they would engage the next found enemies (imagine being able to do this with a group of fighters or gunships, for example).
The examples of possible meta-behavioral stuff are endless. If we had a number of these, and could hook AIs into LUA, then we could take a lot of the burden off of AI designers to build these themselves, and then AIs would both be easier to maintain, and the designers could concentrate on things that are more important (economy control, base design, strategic combat planning, scouting).
However, I need some example code to work with, because I'm still too tied up in what I'm getting done. Whatever code it is, needs to only check the status of the Group every 5 seconds or so, and it needs to go quickly- so I'd suggest instead of brute-force polling every Unit in the Group, it just counts the number of Units in the Group now as opposed to the initial number when the call is invoked (reset every minute or three).
It's in the category of, "players do this manually all the time, I just want it to be automated, like it already is in most modern game engines (using morale systems and other things)".
Second off, the use of this is not at all confined to just one scenario. It'd be great, for example, to be able to put units "on alert", and they would engage the next found enemies (imagine being able to do this with a group of fighters or gunships, for example).
The examples of possible meta-behavioral stuff are endless. If we had a number of these, and could hook AIs into LUA, then we could take a lot of the burden off of AI designers to build these themselves, and then AIs would both be easier to maintain, and the designers could concentrate on things that are more important (economy control, base design, strategic combat planning, scouting).
However, I need some example code to work with, because I'm still too tied up in what I'm getting done. Whatever code it is, needs to only check the status of the Group every 5 seconds or so, and it needs to go quickly- so I'd suggest instead of brute-force polling every Unit in the Group, it just counts the number of Units in the Group now as opposed to the initial number when the call is invoked (reset every minute or three).
- 1v0ry_k1ng
- Posts: 4656
- Joined: 10 Mar 2006, 10:24
this would be better as a groupAI by the sound of it.
my idea for a retreat widget would be you place markers manually on the map "retreat". the LUA widget then moves any unit on less than 50% HP to the nearest marker. at that marker you could set up some conbots with a repeat repair area command.
this seriously would be haxx though.
my idea for a retreat widget would be you place markers manually on the map "retreat". the LUA widget then moves any unit on less than 50% HP to the nearest marker. at that marker you could set up some conbots with a repeat repair area command.
this seriously would be haxx though.
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
Set their moveorder to Roam?Argh wrote:Second off, the use of this is not at all confined to just one scenario. It'd be great, for example, to be able to put units "on alert", and they would engage the next found enemies (imagine being able to do this with a group of fighters or gunships, for example).
EDIT: I also hear that moveorders can be set via cob script. If you tied this into 1944's suppression / morale script, you could probably do quite a bit
Roam has hard-coded limitations on the area that a Roaming unit can cover. If that distance was flexible and settable via COB, then that particular wrinkle could be achieved. However, what I'm looking for is practical methods and software solutions for a variety of these kinds of problems, not just a single solution for a single problem. Solving the "retreat" puzzle makes a lot of other things possible.Set their moveorder to Roam?