OpenRA / OpenRA

Open Source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert written in C# using SDL and OpenGL. Runs on Windows, Linux, *BSD and Mac OS X.
https://www.openra.net
GNU General Public License v3.0
14.76k stars 2.69k forks source link

Bots could use the Chronosphere #18267

Open Mailaender opened 4 years ago

Mailaender commented 4 years ago

This is probably difficult to implement.

KOYK commented 4 years ago

Maybe use AI's chrono as a 2 step thing as a work around. First the AI "tags" its units and then give the illusion of chrono by doing the chrono visual effect, reset timer and just move those units in the target location.

dnqbob commented 4 years ago

ummm... There is a idea that won't change the engine and if you and players don't mind.

You can simply make an alternative support power only for bot owner which create several tanks at certain hostile position and disappear after count down, and use the Chronosphere sound effect.

dnqbob commented 4 years ago

To apply an actually meaningful Chronosphere operation, there is much things to fix to the engine, which includes:

  1. Squad fix. A chrono squad will get in formation for this support power. It is better to fix entire squad system like the planning that the AI project will do.
  2. AI support power fix for Chronosphere only.

I think the two above is probably enough to make related section refactored. So if you demand a quick and convenient application, you can use the comment above.

KOYK commented 4 years ago

I had that idea too, tho the problem with it is that you will get tanks to spawn from no ware, that could be lame for some players the same way as killing the AIs ore trucks to stop its economy while the AI gets money every X seconds out of no ware as a bonus. Hence I end up to this, like having the AI actually build the units and then just remove them from map and spawn new ones at the enemy location. I mean this can be a work around until the AI gets a major face lift. I am sure it can be done in LUA in user maps.

dnqbob commented 4 years ago

Yes, it is a problem. I applied my idea in SP, and it localization version which is released. To solve this I change this Bot-Only superweaon's name to "Instant Wormhole(AI)" and in description I tell players it is a cheating weapon by AI that will spawn units from nowhere.

I think RA can be better at here though, the units will get killed after a time (fake teleport back) which means they will only exist for a short time and will not join the AI rush team.

We always expain to our localization version players that AI cheat is a have to. AI needs to be tough to make players prepared for PVP, not in order to beat players out of sense.

dnqbob commented 4 years ago

But... what if player is going to hijack one of the fake units?

KOYK commented 4 years ago

But... what if player is going to hijack one of the fake units?

Hmm yeah, also husks return after chrono, I don't remember if they return after an enemy mechanic repairs them or not, I guess they do return? but still if thats the case it feels hard to solve.

KOYK commented 4 years ago

The problem with the chronosphere power is that it needs to be "clicked" 2 times, once on the units and once on the target location. I don't know if it possible to fool the bots to consider the chrono like it is a two powers and have them use it twice with a delay. Tho I doubt that is possible no matter how optimistic I am for that idea :smile: , without adding some short of C# code I guess, tho I have no idea about C#, so you guys know better if thats a good idea or not.

At least IC feels more easy to add, to the AI, I guess by using some conditions based on units that are low on health or something. Tho thats an other subject.

dnqbob commented 4 years ago

Engine code needs a lot of improvements to finish this, and we also need to think if the code here can be reuse to other components in the future and make senses in logic for people who maintain this. So... a lot of work&thinking.