Author Topic: AI fix plugin  (Read 11226 times)

Offline Mistral

  • Administrator
  • Axe Thrower
  • *****
  • Posts: 409
    • View Profile
AI fix plugin
« on: January 08, 2021, 10:57:15 PM »
So last 10-12 days i worked on this plugin.
so firstly you need to know that this is meant for singleplayer only.
(mostly for new custom campanigns that people will be creating in future i hope).
(if you want you can actually use this in multiplayer when you play vs comps, but remember that all players in lobby must install this plugin or game will drop)

And there was @dannyldd who tested this shit for me. (and give me ideas for this plugin too though).
he streamed this on twitch so you can see this in actual game there: https://www.twitch.tv/dannyldd
I recommend to see some last videos where he gets raped by tonns of DKs and sappers from AI.
(all comps mages are very aggressive and less stupid with my plugin now)

bugs fixes :critter:
1) cataputs less stupid now, cause they now not afraid to shoot when there allied buildings nearby.
2) fixed raise dead bug when mana was spent but skeleton not created when someone was standing on body. Now skeleton still creates nearby if place blocked.

"small" AI improvements :pig:
1) only 1 peon repair buildings, so player cannot lure all peons from base of stupid comp in one go.
2) comps collect more lumber before they focus on gold so they always have some wood.
3) comps build more packed bases now so they need less space to full development.
4) war units of comps not go to TH left upper corner when they wait for attack, they just standing near birth place (barracks, etc). so they no more get stuck in center of base or block peons from mining.
5) comps now can powerbuild (repair unfinished buildings to build faster)
6) comps build 50% arrow towers and 50% cannon towers. (not really random, this is depends on the number of towers, so this will not get drop in multiplayer)
7) ships now not patroling from oil rig to wharf, instead they just swim in random patrol. so they now not get stuck between tankers and comps can get oil normally.
8 ) comps will try to restuck peons if they get stuck and standing still. (20-30% less of fully stuck and stopped mining peons i think. But still happens sometimes, cause comps is just too stupid, especially if there is a real labyrinth on base).

"medium" AI improvements. (moslty magic) :peon:
1) now mages tends to cast more blizzard/dd to your base to kill buildings.
2) hooman mages can now sometimes use inviz to other mage. then they sneak to your base and cast blizz to peons or th. (AI need to have both inviz and blizz spells for this to work obviously) (and this thing is rare though)
3) ogre mages using runes more often and they place them right on your units in center of your army, so beware now))
4) fixed broken raise dead spell for AI. now comps DKs can use this too.
5) all comps casters should now use spells more often.

"big" AI improvements. :wc2:
1) Aggressive mages, they now running to attack with main army and then they cast deathly spells when they get to player base. And main point of this is that comps now can transport them with transports in water maps when they running to attack your base.
(sometimes i saw in water maps that when they spend all mana they stand to shore and call for transport and if you allow them to live long enough you can see how they get to transport and go home to regen mana)
2) AI can build sappers now. And no this is not spawn with triggers or anything, this is normal build like all other units.
to enable this in your custom campanign or map you must set this to AI in file ai.bin with AI-editor in WarDraft.
Someone who already used this should know that there was variable for sappers like for other units, but was seemingly unused. So this is used now.
(And you need to set build rate for flyers too, cause its build rate for inventor buildings not just flyers, and as we know sappers builds from inventors too.)
3) So sappers now not very stupid. They run to attack with main army (just like mages now too). And when they get to enemy they demolish if there is no friendly units near and if there is friends then they sometimes can even use normal melee attacks.

not-included "big" AI improvements. :salty:
1) so apparently there was a way to make AI build skeletons and demons from mage towers/temples. And again its not spawn with triggers - its normal train from building.
this was removed from this version of plugin because its not needed for all campanigns and somewhere can even interfere.
but you just need to know that there is we have possibility itself to do this if someone need though.
and actually not just skeletons and demons but other units (heroes and etc) and not just mage towers/temples but other buildings too.


So i thinking now to maybe add some of this things to my triggers system.

last NEW update was 11.01.2021
« Last Edit: January 11, 2021, 08:11:34 AM by Mistral »

Offline dannyldd

  • Grunt
  • ***
  • Posts: 225
    • View Profile
Re: AI fix plugin
« Reply #1 on: January 09, 2021, 06:21:24 AM »
I didn't really thought you would like to release this wonderful plugin made by YOU, my friend...

All credits go to @Mistral for doing all of this possible. I'm just a little stupid tester who never thought any of this could have ever been implemented to Warcraft2, Battle net edition. He's the absolute genius to bring us all new possibilities to the game.

If you can, I really encourage to support him with any money donation.

In the other hand if you like my gameplays on single player guys, please join my little stream community in https://twitch.tv/dannyldd to keep up motivated.

Offline Szwagier

  • Ogre Mage
  • ********
  • Posts: 1707
    • View Profile
Re: AI fix plugin
« Reply #2 on: January 09, 2021, 11:33:47 AM »
In my opinion cannon for AI is bad idea
Also I would change for 2-3 peons repair, if you attack with catapult one peon wont repiar  tower

magic? mages got now prority? or will attack near building?(like farm) instead attack units/towers?

less place, will ai block itself?

ships patrol in random place? its possible they will patrol to player base?

sappers? if you hit sapper they with demolsih himself, what if he is in ai base? will he destroy player unit+ ai buldings?

http://www.youtube.com/user/SzwagierR


Equinox - the dumbest person in this game, do not argue with an idiot, because he will bring you to his level and overcome with experience

Offline Mistral

  • Administrator
  • Axe Thrower
  • *****
  • Posts: 409
    • View Profile
Re: AI fix plugin
« Reply #3 on: January 09, 2021, 10:28:40 PM »
Hmm why canon bad? Player can build canon why AI not allowed?)

Hmm maybe 2 peons to rep can be better.

Ships patroling like griffons now so maybe sometimes can swim to player.

Sappers maybe can but i will think how fix this

About block themselves maybe can be. But in all tests nothing happened.

Mages now run to attak with main army (and sappers too) this allows to make AI put them in transport and go to your base. Before mages was usseles in water maps with attak. Only for defense maybe but cannot attak at all cause cannot get to your island to cast spells.
« Last Edit: January 09, 2021, 10:32:48 PM by Mistral »

Offline Szwagier

  • Ogre Mage
  • ********
  • Posts: 1707
    • View Profile
Re: AI fix plugin
« Reply #4 on: January 10, 2021, 09:29:47 AM »
Hmm why canon bad? Player can build canon why AI not allowed?)

Hmm maybe 2 peons to rep can be better.

Ships patroling like griffons now so maybe sometimes can swim to player.

Sappers maybe can but i will think how fix this

About block themselves maybe can be. But in all tests nothing happened.

Mages now run to attak with main army (and sappers too) this allows to make AI put them in transport and go to your base. Before mages was usseles in water maps with attak. Only for defense maybe but cannot attak at all cause cannot get to your island to cast spells.


Cause AI wont build base like player like block with farms and cannon to def farms
http://www.youtube.com/user/SzwagierR


Equinox - the dumbest person in this game, do not argue with an idiot, because he will bring you to his level and overcome with experience

Offline dannyldd

  • Grunt
  • ***
  • Posts: 225
    • View Profile
Re: AI fix plugin
« Reply #5 on: January 10, 2021, 10:37:09 AM »
Hmm why canon bad? Player can build canon why AI not allowed?)

Hmm maybe 2 peons to rep can be better.

Ships patroling like griffons now so maybe sometimes can swim to player.

Sappers maybe can but i will think how fix this

About block themselves maybe can be. But in all tests nothing happened.

Mages now run to attak with main army (and sappers too) this allows to make AI put them in transport and go to your base. Before mages was usseles in water maps with attak. Only for defense maybe but cannot attak at all cause cannot get to your island to cast spells.

The reason why I suggested you 1 peon in the first place, is because from Starcraft you can see only 1 Terran SCV (worker) to just repair a building. As the AI, you don't need more to repair because if you're attacking that building then you most probably can destroy if, if not more enemies come after you. With 2 you're just delaying oponnent's economy, which means more workers to be built from script. Also, it's not being considered the fact if there's only one farm from the other extreme of map then AI will be wasting 2 workers to be sent there only to repair (if ever can).

1 is perfect as it is, in my opinion.

Offline dannyldd

  • Grunt
  • ***
  • Posts: 225
    • View Profile
Re: AI fix plugin
« Reply #6 on: January 10, 2021, 10:39:36 AM »
I don't understand, what's the problem if AI cannot build as a player ? That doesn't work as an argument that cannon towers are useless. The thing is making AI smarter and specially, a choice for content creator to choose if AI build cannon towers or not. The rule is 50scout-50cannons so what's the problem still ? You can either way set the amount of towers to be built, and if you dont want to build cannon towers, you can pre-place them so there won't be any further being built.

It's just working well in my opinion with the new plugin.

Offline Szwagier

  • Ogre Mage
  • ********
  • Posts: 1707
    • View Profile
Re: AI fix plugin
« Reply #7 on: January 10, 2021, 06:44:32 PM »
this is not sc, if player send 10 dragons, ai will repair towers with one peon, , if player use catapult to hit tower ai will repair tower with one peon, if player hit with jug tower, ai will send one peon to repiar


1 peon is bad, 3 should be fine


Ai wont repair any build if you hit them with land units expect catapults if they are far
http://www.youtube.com/user/SzwagierR


Equinox - the dumbest person in this game, do not argue with an idiot, because he will bring you to his level and overcome with experience

Offline Mistral

  • Administrator
  • Axe Thrower
  • *****
  • Posts: 409
    • View Profile
Re: AI fix plugin
« Reply #8 on: January 11, 2021, 08:14:04 AM »
Ok some new update.

2 peons repair.
fixed some small bugs.
fixed unstuck mechanism of stucked units (i think it can help to fix 30% more of stucked units problems)
fixed runes spell cast for AI, now more smart and not laggy.

Offline dannyldd

  • Grunt
  • ***
  • Posts: 225
    • View Profile
Re: AI fix plugin
« Reply #9 on: January 11, 2021, 03:35:19 PM »
Ok some new update.

2 peons repair.
fixed some small bugs.
fixed unstuck mechanism of stucked units (i think it can help to fix 30% more of stucked units problems)
fixed runes spell cast for AI, now more smart and not laggy.

Fantastic job and work as always commander. I really encourage to see your new plugins recently made.

Offline dannyldd

  • Grunt
  • ***
  • Posts: 225
    • View Profile
Re: AI fix plugin
« Reply #10 on: August 08, 2024, 01:28:54 PM »
Most recently used. In Ed mods and my own too.

Lastest version: January 28th, 2023.

2 files:

1) AI_FIX + SaveLoad Fix functions. This plugin is universal and work in base game or any other mod.

2) ONLY SaveLoad FIX. This plugin is also universal and works in base game or any other mod. This plugin is a CORE feature that never was addressed by Blizzard and should ALWAYS be used in war2 SINGLE PLAYER experience. All thanks to Ed. I added up my file to explain Save-Load bugs in Warcraft 2 single player, but also the explanation by Ed himself. Once again, thank you a lot Ed for this feature alone for Single Player.

***Note: Don't set both plugins combined in Plugin folder or may cause some bugs.
-----
Features from AI_FIX_PLUGIN as far as I've been testing for about 3 years:

Computers can:
1- now build cannon towers 50-50 with guard towers. Depending on how many towers are set up to build in ai_script.
2- now use Raise of the dead from Death knights. Cast it on fresh corpses and sometimes spawn several skeletons at once near the player.
3- can now grab their units with transports if have sieged up an island on the map and prepare them to siege the next one. In base game they're stucked forever in one single island. Blizzard never probably saw this happening since attacks are so small to even destroy one entire island from player.
4- no "default" rally points for computers anymore. Some base game missions like human11 have these "functional" rally points which are still buggy. Units now wait next to barracks so then they attack when the "attack" order is ready to be initiated from ai_script.

5- mages can cast invisibility spell on other mage and use blizzard to harass player workers. Like multiplayer
6- death knights can cast unholy armor + haste on other DK and use Death & decay on player workers. Like multiplayer.
7- Computer can now train goblin sappers/demo squads, if they're set up to be built on ai_script. Now computers can launch sappers to attack the player alongside their armies. Either ground or with transports.
8- Ogre mages can cast runes on a player unit.

9- Computer army units are way less likely to get stucked in base, around townhall or shorelines, due to these previously mentioned rally points in 4-. Units used to get stucked in shorelines trying to reach transports.

10- Computers can grab their mage/DKs on player base if they're drained of mana. As long as the unit is still alive, the transport will come back to get it to go back home.

11- only 2 peons to repair their buildings, instead of their whole set of workers.

12- power build with 2 peons

13- ships patrol around the map instead of between shipyard and oil platform. This allows computer ships to get way less stucked than base game, which is also caused by oil tankers.

14- computers can build around their base way better now with 1x1 tiles distribution. It also used to be buggy, even on multiplayer since they needed way more space to build big buildings, which was usually 3x3 tiles from required space. It also caused bugs on base game campaign maps because of this same reason.

15- Mages / DKs can attack player with ground armies or transports and use their spells.

16- Death knights use death coil now instead of whirlwind against gryphon/dragons.

NOTE**:
In case you know a little bit on how to modify AI_SCRIPTS in Warcraft 2, I highly advice that if you ever wanted to explore the full potential from ai_fix_plugin, you have to enable computers to train Goblin Sappers/Demo Squads, Raise of the dead for Death Knights, Mage invisibility NOR Runes for Ogres in order to see them using all of their tech available.
In base game, since computers can be set to train Sappers or researching these spells, they still do nothing. Now with ai fix plugin, sappers have an actual AI behavior to attack player and use these 3 spells.

I can't remember more at the moment, maybe there's more stuff. Yet, these plugins are universal and can work from base game to any other possible mod.

Once again, thanks to Ed for making this ever possible.
« Last Edit: August 19, 2024, 07:40:12 PM by dannyldd »