Some hours ago I posted my newly created library in the asset section.
This library allows the map maker to directly implement campaign AIs with advanced behaviour in both maps and projects.
For example, it allows you to define, which just a few actions:
Build Order
Units and peculiar units behaviour (e.g. wandering around)
Expansions
Harassment
Retreat in attack waves
Cheating
Custom races support
To see an example, which also can be used as a reference, of InsaneAI, just download the InsaneAI Battleground map, from the same assets page.
InsaneAI supports waves defined in the AI module and fully functional GUI and ingame documentation via hints.
InsaneAI Battleground
The example map is a melee like map to show the power of InsaneAI, in which campaign AIs will play in a melee like mode.
The testing over this map has been much shorter than on the AI itself, so if any bug arises, just report it to me.
Why this thread?
I'm looking for feedback or even extensive testing (I've done it, but I'm one and I can do this only during free time).
There are some features I would like to flesh out more and make better, like the auto-alignment of the supplies in the supply regions.
Also, if you have some cool ideas or suggestions just tell me.
Regards :)
Rollback Post to RevisionRollBack
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
If I was still working with this game I would definitely check it out.
Are you using the melee galaxy code? The waves, the stock loop on tick, whatnot. E.g. do you have the CPU overhead of the melee base or is this entirely brand new?
For example, in order to create build order you just define some points and pass them to the appropriate action. Then the AI will time the "Add as bully action with rebuild count 1" and will readd them when they died decrementing the effective rebuild count you passed via counter.
Also, for example, you can define a region for supplies, and it will build supply in this region trying to align them (just by using points, this feature actually should be improved a bit, it's far from perfect).
The waves are done by the map maker, just by using AI personality. For example, InsaneAI could be used to code all of Starcraft Mass Recall AIs with ease, and, if used well, also to code a melee like AI, but they always must be specific on the map (it needs regions and points to work).
Since I know you are (in positive, I remember reading your guide to SC1 modding some years ago), I am sure you can understand what it is by just looking at the example map in the galaxy editor for a few minutes ;)
I just tried to make Campaign AIs easy to code and bug free by a clean trigger interface which allows the player to do at least what the old good World Editor AI module did.
Rollback Post to RevisionRollBack
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
Everyone on this site seems to know me but I don't know them :X
Yeah I get the gist of it judging by your description. It's like a front-end for manually blocking out bullies. My original solution was just to roll them through preplaced structures that were not constructed, then have a layer of regions activate bullies in a timed sequence before looping. I found I had to loop the bullies to get them to build a lot of structures really quickly. I later moved on to having a setup that basically broke apart the melee code, restructured how the attack waves worked, and gutted the looping stock behavior to net back 20-30fps. But the in-combat performance is still really bad where I left off. I had success bridging this with existing bully-based trigger AI.
I'm assuming then that because you are using attack waves it doesn't handle defense, does it? How about expanding? I had some trouble getting the AI to expand really fast and reliably build a lot of structures at those expansions. Like, say, a Terran takes 10 bases and drops 8 rax/8fact/16 turrets at each in about 5-6 minutes. Usually the AI would take the bases after a long delay and then maybe build 1-2 structures every few minutes. But with bullies this is probably easier, right?
Defence is easy, it just call a number (customizable) of warrior units FROM the defined (expansion, guarded, town, ecc...) region where the attacked unit is once for a clock. Why only the region where it is? Because this is a campaign AI, and it should be quite static in defence. ;)
This way defence gives a feeling of escalation. The more you attack, the more they defend.
Expansion is done this way: you just place points where you want the AI to expand (one for each building, like CC, Turrets, even units if you like), and add a region which cover also resources, to be used later.
When you reach a certain point in the build order (you can check by setting the flag string and use generic event to intercept it), you can trigger the expansion. First, you add the region I was talking about before, this way the AI will start placing warriors and detectors there at random, making also the region available for defence.
Then you can add the points for the units at the expansion to the build order and reduce the build time to, for example, 0. This way the AI will start building in the points in parallel (if it has the resources, and always in the given order) and, when a town hall (e.g. CC) is completed in the region, will also add workers and send them to mine. It will also build extractors for vespene.
Of course, adding points follow the FIFO model, so if you trigger an expansion while you have other points in the build order it will place that at the end of the queue. Of course, by using again the flag this can be easily regulated. For a working example, check the InsaneAI Battleground example map. :)
Yes, of course. I got the idea to allow custom units watching the Jayborino video of your campaign. Of course, the AI must still play Starcraft. If you want it to play Civilization or Dota it will not work :)
It actually does not care what is in the tech tree, you have to manually define each unit to be what you want in the way you want. Maximum customization. As I told in the first post and in the project page, this is no plug and play AI. This is a tool to make campaign AIs easy to code ;)
I see other errors in what I presume is the example map. But I never got those errors at home. Are you able to run the map at all? Can you try and report me when the error shows up? Also, I like more the editor GUI, for I think is much more cleaner to watch to (mainly because of the horrible id the galaxy put on the variables and functions.
Also, the error is given when you access a_units_detector_abilities[][] or when accessing the Unit Group?
Sounds a lot different than anything I was looking at before, I'll definitely need to check the map at some point. Were I ever to work with sc2 again, there's quite possibly something I could gleam from the source to improve my own project. Expanding was the weakest part of my AI - attacking, defending, building and everything was entirely automated and worked extremely well, but they were very lax in expanding in particular.
The conceptual problem I found with automation is that you cannot make it work for everyone in every situation. The map maker should have control when making maps and taking out this control, even for performance or improved "intelligence" is bad, from my point of view.
It would create a situation similar to SC1, where the AI will do what it wants and you cannot (by just using editor) set it in any specific way. :)
Rollback Post to RevisionRollBack
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
I see other errors in what I presume is the example map. But I never got those errors at home. Are you able to run the map at all? Can you try and report me when the error shows up? Also, I like more the editor GUI, for I think is much more cleaner to watch to (mainly because of the horrible id the galaxy put on the variables and functions.
Also, the error is given when you access a_units_detector_abilities[][] or when accessing the Unit Group?
The problem is that n_index can go up to 50 because the loop uses Warrior's index cap while the units detectors abilities goes up to 10. Thus 11 is past the array's end resulting in this error.
The other trigger errors are in the native library caused by cutscene mode trying to disable some hotkey. Maybe the error interferes with the execution of other things, but I doubt that.
Yes, you are right... I checked in the editor, here's a screenshot in the attachment.
The problem is that I uses a_units_detector_abilities instead of a_units_warrior_abilities, which is the correct one.
The reason of this error is a mistake while I was copy and pasting istructions for detectors and warriors, as you can see. Thank you very very much for reporting this, I fixed it in my own version, and when I will release an update I will include the fix. :)
ATTACHMENTS
Error.png
Rollback Post to RevisionRollBack
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
The AI supports per-mission builds, compositions, attack behaviors, group sizes, etc. and can still benefit from triggers. It's just it also functions like melee where a lot of things are handled under the hood for efficiency. My campaign was rather large, so avoiding repeat work where possible was going to be necessary to see it complete in only a few years.
As an example of its flexibility, I am certain I could tack it onto your AI as-is and get benefits from both.
Is your project posted somewhere? I'm very curious to how did you implemented those things and I would certainly like to follow your progresses, even if the project itself is (from what I got) more or less abandoned :)
Rollback Post to RevisionRollBack
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
- Fixed bug in Add Unit for detectors. Wrong index was used. This could cause script crash under certain circumstances.
- Fixed bug that could possibly not allow the AI to build vespene in the main town in certain circumstances (e.g. custom races).
- Add a new way to define a build order step: using existing unit. this way the default bully system is completely sobstituted and the always rebuild bully bug solved. Of course, you need to actually set the rebuilt count in the unit property to Never to have it work correctly.
- Tested the AI with Xeyed custom race by Supernova134.
Rollback Post to RevisionRollBack
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
InsaneAI
Some hours ago I posted my newly created library in the asset section.
This library allows the map maker to directly implement campaign AIs with advanced behaviour in both maps and projects.
For example, it allows you to define, which just a few actions:
To see an example, which also can be used as a reference, of InsaneAI, just download the InsaneAI Battleground map, from the same assets page.
InsaneAI supports waves defined in the AI module and fully functional GUI and ingame documentation via hints.
InsaneAI Battleground
The example map is a melee like map to show the power of InsaneAI, in which campaign AIs will play in a melee like mode.
The testing over this map has been much shorter than on the AI itself, so if any bug arises, just report it to me.
Why this thread?
I'm looking for feedback or even extensive testing (I've done it, but I'm one and I can do this only during free time). There are some features I would like to flesh out more and make better, like the auto-alignment of the supplies in the supply regions. Also, if you have some cool ideas or suggestions just tell me.
Regards :)
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
Author of InsaneAI library, InsaneCredits library, InsaneDebug library, InsaneTransmission library, InsaneUI library and InsaneBriefing library.
Author of Mercenary Business - Top 10 Rock The Cabinet 2017: Co-op edition.
If I was still working with this game I would definitely check it out.
Are you using the melee galaxy code? The waves, the stock loop on tick, whatnot. E.g. do you have the CPU overhead of the melee base or is this entirely brand new?
@IskatuMesk: Go
I just used the GUI trigger editor.
For example, in order to create build order you just define some points and pass them to the appropriate action. Then the AI will time the "Add as bully action with rebuild count 1" and will readd them when they died decrementing the effective rebuild count you passed via counter.
Also, for example, you can define a region for supplies, and it will build supply in this region trying to align them (just by using points, this feature actually should be improved a bit, it's far from perfect).
The waves are done by the map maker, just by using AI personality. For example, InsaneAI could be used to code all of Starcraft Mass Recall AIs with ease, and, if used well, also to code a melee like AI, but they always must be specific on the map (it needs regions and points to work).
Since I know you are (in positive, I remember reading your guide to SC1 modding some years ago), I am sure you can understand what it is by just looking at the example map in the galaxy editor for a few minutes ;)
I just tried to make Campaign AIs easy to code and bug free by a clean trigger interface which allows the player to do at least what the old good World Editor AI module did.
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
Author of InsaneAI library, InsaneCredits library, InsaneDebug library, InsaneTransmission library, InsaneUI library and InsaneBriefing library.
Author of Mercenary Business - Top 10 Rock The Cabinet 2017: Co-op edition.
Everyone on this site seems to know me but I don't know them :X
Yeah I get the gist of it judging by your description. It's like a front-end for manually blocking out bullies. My original solution was just to roll them through preplaced structures that were not constructed, then have a layer of regions activate bullies in a timed sequence before looping. I found I had to loop the bullies to get them to build a lot of structures really quickly. I later moved on to having a setup that basically broke apart the melee code, restructured how the attack waves worked, and gutted the looping stock behavior to net back 20-30fps. But the in-combat performance is still really bad where I left off. I had success bridging this with existing bully-based trigger AI.
I'm assuming then that because you are using attack waves it doesn't handle defense, does it? How about expanding? I had some trouble getting the AI to expand really fast and reliably build a lot of structures at those expansions. Like, say, a Terran takes 10 bases and drops 8 rax/8fact/16 turrets at each in about 5-6 minutes. Usually the AI would take the bases after a long delay and then maybe build 1-2 structures every few minutes. But with bullies this is probably easier, right?
@InsaneMst: Go
Interesting. Does it work with custom units added to the default tech tree? Like the mercenaries for instance.
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
I ran into a trigger error in your library (https://snag.gy/2My8SU.jpg).
@IskatuMesk: Go
Defence is easy, it just call a number (customizable) of warrior units FROM the defined (expansion, guarded, town, ecc...) region where the attacked unit is once for a clock. Why only the region where it is? Because this is a campaign AI, and it should be quite static in defence. ;)
This way defence gives a feeling of escalation. The more you attack, the more they defend.
Expansion is done this way: you just place points where you want the AI to expand (one for each building, like CC, Turrets, even units if you like), and add a region which cover also resources, to be used later.
When you reach a certain point in the build order (you can check by setting the flag string and use generic event to intercept it), you can trigger the expansion. First, you add the region I was talking about before, this way the AI will start placing warriors and detectors there at random, making also the region available for defence.
Then you can add the points for the units at the expansion to the build order and reduce the build time to, for example, 0. This way the AI will start building in the points in parallel (if it has the resources, and always in the given order) and, when a town hall (e.g. CC) is completed in the region, will also add workers and send them to mine. It will also build extractors for vespene.
Of course, adding points follow the FIFO model, so if you trigger an expansion while you have other points in the build order it will place that at the end of the queue. Of course, by using again the flag this can be easily regulated. For a working example, check the InsaneAI Battleground example map. :)
@Bilxor: Go
Yes, of course. I got the idea to allow custom units watching the Jayborino video of your campaign. Of course, the AI must still play Starcraft. If you want it to play Civilization or Dota it will not work :)
It actually does not care what is in the tech tree, you have to manually define each unit to be what you want in the way you want. Maximum customization. As I told in the first post and in the project page, this is no plug and play AI. This is a tool to make campaign AIs easy to code ;)
@Ahli634: Go
I see other errors in what I presume is the example map. But I never got those errors at home. Are you able to run the map at all? Can you try and report me when the error shows up? Also, I like more the editor GUI, for I think is much more cleaner to watch to (mainly because of the horrible id the galaxy put on the variables and functions.
Also, the error is given when you access a_units_detector_abilities[][] or when accessing the Unit Group?
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
Author of InsaneAI library, InsaneCredits library, InsaneDebug library, InsaneTransmission library, InsaneUI library and InsaneBriefing library.
Author of Mercenary Business - Top 10 Rock The Cabinet 2017: Co-op edition.
Looks like a lot of effort put into this, good job :)
It'll definitely be a lot of fun looking at the source code
@InsaneMst: Go
Sounds a lot different than anything I was looking at before, I'll definitely need to check the map at some point. Were I ever to work with sc2 again, there's quite possibly something I could gleam from the source to improve my own project. Expanding was the weakest part of my AI - attacking, defending, building and everything was entirely automated and worked extremely well, but they were very lax in expanding in particular.
@IskatuMesk: Go
The conceptual problem I found with automation is that you cannot make it work for everyone in every situation. The map maker should have control when making maps and taking out this control, even for performance or improved "intelligence" is bad, from my point of view.
It would create a situation similar to SC1, where the AI will do what it wants and you cannot (by just using editor) set it in any specific way. :)
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
Author of InsaneAI library, InsaneCredits library, InsaneDebug library, InsaneTransmission library, InsaneUI library and InsaneBriefing library.
Author of Mercenary Business - Top 10 Rock The Cabinet 2017: Co-op edition.
The problem is that n_index can go up to 50 because the loop uses Warrior's index cap while the units detectors abilities goes up to 10. Thus 11 is past the array's end resulting in this error.
The other trigger errors are in the native library caused by cutscene mode trying to disable some hotkey. Maybe the error interferes with the execution of other things, but I doubt that.
@Ahli634: Go
Yes, you are right... I checked in the editor, here's a screenshot in the attachment.
The problem is that I uses a_units_detector_abilities instead of a_units_warrior_abilities, which is the correct one.
The reason of this error is a mistake while I was copy and pasting istructions for detectors and warriors, as you can see. Thank you very very much for reporting this, I fixed it in my own version, and when I will release an update I will include the fix. :)
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
Author of InsaneAI library, InsaneCredits library, InsaneDebug library, InsaneTransmission library, InsaneUI library and InsaneBriefing library.
Author of Mercenary Business - Top 10 Rock The Cabinet 2017: Co-op edition.
@InsaneMst: Go
The AI supports per-mission builds, compositions, attack behaviors, group sizes, etc. and can still benefit from triggers. It's just it also functions like melee where a lot of things are handled under the hood for efficiency. My campaign was rather large, so avoiding repeat work where possible was going to be necessary to see it complete in only a few years.
As an example of its flexibility, I am certain I could tack it onto your AI as-is and get benefits from both.
@IskatuMesk: Go
Is your project posted somewhere? I'm very curious to how did you implemented those things and I would certainly like to follow your progresses, even if the project itself is (from what I got) more or less abandoned :)
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
Author of InsaneAI library, InsaneCredits library, InsaneDebug library, InsaneTransmission library, InsaneUI library and InsaneBriefing library.
Author of Mercenary Business - Top 10 Rock The Cabinet 2017: Co-op edition.
@InsaneMst: Go
Nope, all of my work is private. And yeah, it's been abandoned for a while.
@IskatuMesk: Go
I can understand that. Good luck anyway with all your projects. You are welcome to pass by to provide feedback whenever you want :)
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
Author of InsaneAI library, InsaneCredits library, InsaneDebug library, InsaneTransmission library, InsaneUI library and InsaneBriefing library.
Author of Mercenary Business - Top 10 Rock The Cabinet 2017: Co-op edition.
Big update:
Changelog
v1.1 - Jan 06, 2017 :
- Fixed bug in Issue Orders to detectors units. Wrong index was used. Reported by Ahli634.
- Overhaul of variables structure. Now everything uses records!
- Improved alignement of structures in supply regions.
- Improved rebuild behaviour.
- Custom resource support added.
- Better hints and grammar.
- Supply structures can now use abilities too.
- Reduced the overall number of cycles of the AI, resulting in a slight improvement in performance.
Also uploaded two other libraries, if anyone is interested: InsaneCredits and InsaneDebug. You can follow the link in my signature.
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
Author of InsaneAI library, InsaneCredits library, InsaneDebug library, InsaneTransmission library, InsaneUI library and InsaneBriefing library.
Author of Mercenary Business - Top 10 Rock The Cabinet 2017: Co-op edition.
Good work {:'-D
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
Author of InsaneAI library, InsaneCredits library, InsaneDebug library, InsaneTransmission library, InsaneUI library and InsaneBriefing library.
Author of Mercenary Business - Top 10 Rock The Cabinet 2017: Co-op edition.
Rather small but important update:
Changelog
v1.2 - Feb 16, 2017:
- Fixed bug in Add Unit for detectors. Wrong index was used. This could cause script crash under certain circumstances.
- Fixed bug that could possibly not allow the AI to build vespene in the main town in certain circumstances (e.g. custom races).
- Add a new way to define a build order step: using existing unit. this way the default bully system is completely sobstituted and the always rebuild bully bug solved. Of course, you need to actually set the rebuilt count in the unit property to Never to have it work correctly.
- Tested the AI with Xeyed custom race by Supernova134.
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
Author of InsaneAI library, InsaneCredits library, InsaneDebug library, InsaneTransmission library, InsaneUI library and InsaneBriefing library.
Author of Mercenary Business - Top 10 Rock The Cabinet 2017: Co-op edition.