AI netgame teams

A forum for discussing map making ideas and problems for the Myth series.
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

AI netgame teams

Post by fildred13 »

Is it possible to create a team on a netgame map controlled by the AI? For instance, two small human teams are trying to steal the bacon, while a massive dark-units team ALSO tries to steal the bacon? I've been pouring over the loathing docs and it seems like no, but maybe I'm missing something? I see ways to detect the number of players and such, but I can't see a way to make a team which doesn't have a human leader because ALL the units from that team are deleted when the map starts up if there isn't a human in that seat. Not to mention the fact that there is no actual team for the purposes of scoring, so territories and such is impossible because it doesn't track how many are controlled by the AI "team 3."

Any ideas?
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
jason_ac
Posts: 132
Joined: Thu Jan 02, 2014 2:51 am
Location: USA
Contact:

Re: AI netgame teams

Post by jason_ac »

I want to know the same thing! (and where did my thread go about this?)

It sounds like it's possible, because it sounds like this plugin does something like that:
http://tain.totalcodex.net/items/show/c ... n-the-dark

If you find out how to do it, I'd very curious to hear what secrets you learn.
For manuals and tips about Myth, visit http://tinyurl.com/MythGuides
vinylrake
Posts: 3591
Joined: Wed Apr 07, 2004 12:52 pm
Location: here
Contact:

Re: AI netgame teams

Post by vinylrake »

Just take a netgame map, copy the mesh and units and then you create and script as many enemy 'teams' as you want.

Barbarian Valley has one player and two game-AI controlled teams all playing a custom game. There's no reason you couldn't script an AI to play a game, but it would be a lot easier to script a flag game than a ball game, since with a flag game you know where the game targets are and can plan accordingly. I don't know how you could script a decent bacon AI team, unless you just sent the computer controlled team for the ball with some scouting and semi-intelligent responses coded in for the times you run into other players.
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: AI netgame teams

Post by fildred13 »

The plug is currently a solo/coop plug in which you do just that: you play on the multi maps with a small team and I have scripted an enemy team which plays territories or ctf or steal the bacon or whatever. The question is if I can do all that without having to script the flags/balls themselves, which takes a ton of map actions to do as well as the netgames do with 0 map actions, because it is hard-coded into the game.

Also, doing the single player method, there is no team display with how many flags are held.

Probably the biggest loss, though, is that you can only play as one side EVER. So, on Gimble for example, you ALWAYS have the same start point. It would be nice to be able to program the AI just once, and to let the player randomly fight for one of those teams, instead of the same one every time.

It works as a solo/coop experience, but all those little niceties are lost. Like the hard-coded scoring systems, the variable game time, the "flag captured, lost, etc" sounds, all of which require separate map actions if done with scripting, 0 if done by the game itself. Not to mention the smallest things like team-coloring based on YOUR colors instead of whatever I choose for the team ahead of time.

Most of all it is mapaction conservation. I lose an awful lost of map actions and precious map action perameters just setting up the polygons for the flags, geoms for the balls, etcetcetc.
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: AI netgame teams

Post by fildred13 »

And Jason,

I disassembled Clue to have a look.

Clue's system only works because they are scripted through the nose. Basically, they way he does it wouldn't work for "normal" myth game modes. His bots are, technically, all a part of team -1, and set to uncontrollable/ambient life. They are then told EXACTLY what to do, from moving to attacking. They wouldn't behave like the normal AI in terms of attacking "enemies" on a platoon move, for example. They don't register as "teams" in the F7 menu, either, because they aren't teams at all. To myth, they are no different from the squirrels and sparrows that populate countless myth levels.
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
jason_ac
Posts: 132
Joined: Thu Jan 02, 2014 2:51 am
Location: USA
Contact:

Re: AI netgame teams

Post by jason_ac »

fildred13 wrote:The plug is currently a solo/coop plug in which you do just that
If you end up deciding to not finish this (because you can't make it do what you want), I'd be interested in taking a look at it. Seeing what I can learn from what you did to see if it will help in what I'm trying to accomplish (once I get around to working on it :P )
For manuals and tips about Myth, visit http://tinyurl.com/MythGuides
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: AI netgame teams

Post by fildred13 »

I notice in the Unit Control action a new feature in 1.8 - "Detach to Team Index."

I tried detaching some player units (team 0) to the enemies (team 1) in on a solo map, but it doesn't seem to do anything? Do I need to provide something more than just the index and the monsters(subj)?

and @jason: this plug isn't getting dropped any time soon. It has been my pet project for years, and it is slowly growing to the point where I'm willing to release it. As it stands, it is a series of solo/coops set on the bungie multi maps in which you control a small, randomized team (10-25 units, depending on the map). Each map has a chosen game type, like Territories on Cracks in the Cloudspine, CTF on Gimble, STB on Raid on the Plains, etc. A few maps appear multiple times, like cracks which has a CTF variant and a terries variant. Usually 2-team, but a few 3 and 4 team battles too. What makes this plug unique is that you are a small part of a large AI army, facing a VERY large opposing force. You must use your forces intelligently not to win the war singlehandedly, but to influence a few key battles in such a way as to secure the win for your team. All the maps are 13 minutes of carefully scouting, skirmishing, and battling for a little piece of dominance on the battlefield. There are some unique elements or objectives on most maps, too. Like powerful cannons raining hell on cracks in the cloudspine, or "gates" on desert between your ears spawning endless waves until they are destroyed. I'm doing my best to make it a fun, unique way to experience the multiplayer maps as a solo player. Or, on Heroic and Legendary, a challenge even for 2-5 players working together. The biggest selling point I have is how different the battle will be every time - most AI groups have at least 5 different ways they'll go about whatever their specific objective is, and this leads to a unique battle every time.

The reason I'm asking about all this AI netgame teams drama is because I would like to make a multiplayer version of this plug - 2 large AI armies go at it just the same as in the solo version, but they are evenly matched. The only difference will be the player groups on either side, trying to influence the battle for their team. My HOPE is that I'll be able to combine the efforts, obviously, so that I don't have to finish each map and then go through a conversion process for each one to take it from setup and balanced for SOLO to setup and balanced for MULTI - I would like to do it all in one swipe.

If you are asking just so you can start your own project, feel free to ask away about anything in particular. I've developed a pretty good system that you're free to decompile and look at when I get around to releasing the plug. But Barbarian Valley is a great place to start, it does it differently than me, but has a similar end result.
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
jason_ac
Posts: 132
Joined: Thu Jan 02, 2014 2:51 am
Location: USA
Contact:

Re: AI netgame teams

Post by jason_ac »

fildred13 wrote:Barbarian Valley is a great place to start, it does it differently than me, but has a similar end result.
My needs will be simple. Do you think your basic framework is simpler, or BV's?

BTW, I do voice acting, if you need that for your plugin.
For manuals and tips about Myth, visit http://tinyurl.com/MythGuides
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: AI netgame teams

Post by fildred13 »

It very much depends on what you're doing. Barbarian Valley can show you how to script the custom gametype that they invented for that mesh, where as I have scripted several more standard gametypes into mine. Barbarian valley also is a little inefficient imho, but only because they didnt HAVE to be more efficient - they achieved their goals and made an awesome plug their way. Every wave I have can spawn with different combinations of troops, and can choose different moves and such, resulting in a wildly branching battle. Plus, I reuse platoons over and over, respawning them if they die and re-randomizing them, meaning very few MA achieve a LOT of randomization and do a lot of work for me, making the battlefield feel that much more alive with that much less effort.

What is it you are trying to achieve?

And regarding voice acting, good to know, but seeing as my plug is multi-in-solo, the announcer does me just fine :D
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
jason_ac
Posts: 132
Joined: Thu Jan 02, 2014 2:51 am
Location: USA
Contact:

Re: AI netgame teams

Post by jason_ac »

I want to make a solo level, intended to be played as a co-op, using standard netmaps, playing standard netgame types.

The idea would be, for a newbie, to give a feel for the multiplayer experience, but in a sandbox where they can experiment by themselves, any time of day.

I'd be satisfied, to start, if it had to be, to be saddled with many limitations: Just 1 map, hardcoded # of teams & start positions, stupid AI.

The ideal would be to improve any of those limits: All maps, choose # of teams and your start position, and smart AI.
For manuals and tips about Myth, visit http://tinyurl.com/MythGuides
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: AI netgame teams

Post by fildred13 »

Well that is similar to what I am doing, but exceedingly more difficult.

I should start by saying, that was my original goal. But all the troubles I'm about to lay out, I learned the hard way. Mostly, though, the important thing is that we already have multiplayer myth - in the multiplayer area. I tried to recreate that in solo and eventually I figured out it was a fruitless endeavor - the AI just isn't as fun or engaging to play as a real human opponent. To a person trying to learn the game I would say: play the campaign. Learn the units, and then hop online and be ready to be beat soundly for 20 games. And you'll watch and learn and soon you'll be having a ball.

But anyways, here's what I learned:

If you want the AI to have the same number of units as the human player, it is going to be ESPECIALLY difficult. Only the worst Myth II player would lose to even the best scripted AI assault if numbers are even. They just can't do the little things that a human player can, like side-stepping archers and running a dwarf back between shots. Not to mention identify a good defensive location to take when they meet enemies in the field. These things CAN be scripted in to some degree, but it is sloppy and incredibly painstaking and, most of all, takes a crazy amount of heavy map actions, like GEOMs and MUNGs, just to make it work at all. The AI doesn't understand FFA at all, and short of some serious scripting will struggle to use limited troops to respond intelligently to dynamic threats - the AI will never watch two mutual enemies destroy each other. You can do all this to some extent, but beyond a 2 to MAYBE 3 team battle, you're going to hit the MA params limit I guarantee it, and then you're SOL.

Because if these are training grounds for a newb in multi, well the campaign has prepared them for 2team, the best that it can. They know the units by now, and the basic tactics. What they don't know is just how far a warlock can shoot when he CTRL-clicks in front of your troops, and how dangerous a trow is when controlled intelligently instead of charging. Again, you can accomplish these things but only with a TON of map actions, (detecting nearby power units, walking the trow toward him, detecting X melee units, determining their location, moving AWAY from those melee, redetecting threats and targets, repeat.) A TON of MA just for one unit which even then won't behave as well as a human controlled counterpart. Fighting the AI just can't teach how to fight a human.

They'll also never learn the jockeying for position that occurs before an lmoth, for example. The AI is much better at fighting, attacking, and defending, than it is standing aimlessly on a flag avoiding mortar balls and cocktails.

But that is assuming the AI needs to play as smart as a human, or something approximating it. If you give up those nuances, which the newb will pick up quickly once they enter multiplayer, then it becomes much more reasonable. I would recommend playing the barbarian valley plug. I argue that that teaches a lot of the important concepts you're talking about, but gives the AI a significant numbers advantage to make up for the lack of real intelligence. Splitting attacking and defending troops, identifying advantages in units and terrain, scouting, etc. Not to mention it is a FFA if memory serves, which should help the newb learn to let the enemy of my enemy blow my enemy to smithereens.

If, however, you WANT it to be a stomp and you're literally just showing the person how multi gametypes work, I again have to recommend just taking them into the multiplayer and showing them the ropes real quick. I use a WHOLE bunch of cheats to make my solo plug work. In terries, in order to save a TON of mapactions, a unit must actually be present at a terries flag for it to be considered "captured," a significant difference from just walking by a flag capping it for your team. Or the AI kicking the balls, forget it. I use special ghols which are allowed to pick up the ball, which then get highlighted with contrail effects to make it clear where the ball is. All of this is easy for a player to understand and adapt to, but a newb trying to learn multi will only be confused by these rule modifications.

To get back to your main idea: "to give a feel for the multiplayer experience," nothing but multiplayer can provide that. I think what I am working on is as close an approximation as you are going to get, and even that is a very stylized and different from the base game. I also cannot stress how long it will take. I don't know how much experience you have scripting myth maps, but it is no different from making good stop-motion animation or 3D models, both of which you said you have experience with - it takes a TON of time to script a good multi-experience for solo which is only compounded the more teams you add. If you have never scripted a full myth map before, go do 3 now. Focus on getting a full understanding of polygon TUNIs and GEOMs, PLAToons and Platoon MOVes and SCOuTs, LEGIons, and most of all MUNGers.

When you are ready to tackle this idea, know the following:
Of course it will only be one map to start.
The number of teams and starts WILL be hardcoded, because the MA limit doesn't allow that much forking logic.
The AI WILL be "dumb," or at least as dumb as it is in solo.

I recommend doing something small first, like a 2team CTF on gimble. You can have enemy ghol scouting patrols, some ~10 man platoons that follow the path with the least enemies toward the flag, and you can have the enemy set up defence lines in smart positions. If you have all 1024 map actions to make those few units play SMART on that small map, you might make something pretty good for a newbie trying to learn the ropes. For your second map, do terries, because it is just a more complicated CTF in the end. (Well, more than that, you have to use alternating TUNI's to detect "Are enemies here?" "Are friends here?" and then use MATH functions to add a dark point, then add a light point, etc, then a math to compare the dark and light points each pass, and if one team doesnt control them all then reset it all and start again, then switch to sudden death scoring at the end of the time limit and the moment one team has more points than the other, award the win then.)

Check out my Dream Cycle (the plug which does all this) when I release it. You can copy the endgame scripts and stuff and you'll get a good sense of how I did all this. If you can't wait, start with Barb Valley and I'm sure you'll figure it out. Plus I'm here with all this knowledge about doing this and you can always ask about specifics.
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
jason_ac
Posts: 132
Joined: Thu Jan 02, 2014 2:51 am
Location: USA
Contact:

Re: AI netgame teams

Post by jason_ac »

I'm ok with the AI being very dumb, and see how I like that arrangement. Far dumber in tactics than any of the examples you gave. This level would be more like a training dummy, than an actual MP simulator. I'd probably have the # of units vary with Difficulty...on Normal, AI number = player's # of troops. On higher difficulty, AI outnumbers. I'm ok if the player stomps the AI.

My hope is to address several newbie issues:
* You can get stomped so fast in MP that you get discouraged, don't get time to really feel out the gametype & map, etc.
* There are so many maps & gametypes, that you see each one only every so often, so it takes a while for them to sink in, and learn the maps.
* Not enough people are on or no one is hosting (or it's all AvA) when you want to get some practice time.
* If it's solo, you feel no pressure to do well, so you relax, and learn better (the maps, the gametype, thinking about strategies).
* You want to try a variety of "crazy" unit trades & strategies, while feeling no pressure to "perform".
For manuals and tips about Myth, visit http://tinyurl.com/MythGuides
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: AI netgame teams

Post by fildred13 »

Go for it. I hope it pans out well. I worry what can be learned about multi from solo, but I would love to see what you come up with.

http://www.memecenter.com/fun/2817879/i ... ultiplayer
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
jason_ac
Posts: 132
Joined: Thu Jan 02, 2014 2:51 am
Location: USA
Contact:

Re: AI netgame teams

Post by jason_ac »

LOL@meme

I think it might be useful in a number of ways. Like, you could learn a map somewhat by wandering it now solo in a netgame...but that's boring/unmotivating. It might be more fun, and you might pay more attention to terrain & approaches & formations & being adaptable/reactive, if there was some AI roaming to kill you.

It's a good way to learn the mechanics/rules for a gametype. Some people won't read manuals, or it won't sink in, and trying to learn in a real MP game, they're either so anxious, or getting stomped so fast, they're not learning. In this setup, they can leisurely examine what's happening on the overhead, f7, & the announcer history as the game unfolds.

You can imagine a unit trade & strategy to use, and test playing it out. It may fail utterly against humans, but at least here you might already determine that before trying it in MP. Or you'll get a chance to refine & concretely game-out how you think it would fare, then walk into MP knowing what it is you'd like to try and do.

And they can repeat any these things as much as they want, whenever they want, regardless of who's online.
For manuals and tips about Myth, visit http://tinyurl.com/MythGuides
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: AI netgame teams

Post by fildred13 »

Yeah but most of those things don't work in solo plugs, hence my push for an AI netgame feature in map making.

f7 flat out doesn't work, because enemy teams arent displayed, let alone flag rally flags or body count scores.
Learning the mechanics and rules of a gametype implies the game follows the same rules and mechanics, which by the very nature of having to script it, you can't match exactly.
There is no unit trading in solo.

If we could create AI teams on a netmap it would be perfect. As a solo plug, though, it simply won't be an appropriate learning experience for a newbie - too much is drastically different.
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
Post Reply