• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] Artificial Intelligence - My first Project!

Status
Not open for further replies.
Level 5
Joined
Jun 5, 2009
Messages
121
Artificial Intelligence - Wanna post your project? :)

Hello Hive-Members!

Update from Drobots.w3x to Drobots 1.1.w3x
Update notes:
- Added "Drobots 2th Stage"!
- Added Spell "Drobot diddle"!
- Fixed some bugs
- Drobot Trap doesnt work good, fix next update!


NOTE: THAT IS ONLY A MAP FOR SEE THE SYSTEM NOT A PLAYABLE MAP, feel free to edit the map and make your own Drobot map!

Drobots

The Drobots are robotig meele units that fight with each other, heal, and duplicate hisself if they have enough Metal Pieces, Drobots are very strong, cause they build their own army with Duplicating and killing other units on the map (random). If a drobot get attacked, other drobots will come to help him

Features:
- Carry Metal automatic (only if it get createt by dying units)
- Helping each other if a Drobot gets attacked
- Healing hisself to 100% Hp for 1 Metal (only if the drobot has 1 metal)
- Duplicate hisself for 1 Metal (only if the drobot has 1 metal)
- If more than 30 Drobots on the map, they get "Level-Up" after that, everytime if - drobots on map get more than 30 they will debuild 2 of it and build a Drobot 2th Stage(called D2S)


Characteristics:
- In 90% they stay in a area where much enemys and split small on map

Metal Pieces

Metal Pieces can be found by all units, except Drobot, if a unit die (building, hero, drobot wahtever) it has a 42% chance to create a Metal Piece there, if anywhere spawns a Metal Piece, drobots will carry it.

If u want to use my Drobots, it is the easyst way u start with my map and deleting all waht u dont need (Credits Trigger, Income etc)


Its my first selfmade project, i hope u guys like it, i like it much :D

Dont forget to give Credits and + rep if u like/use the Drobots, thanks :)

right now iam working on a map for it, nearly finish would say 70%)

Drobot model by olofmoleman, thank you olofmoleman!
http://www.hiveworkshop.com/forums/...r-droid-47726/?prev=search=spider&d=list&r=20

Metal Piece Icon by Huinipachutli, thank you Huinipachutli!
http://www.hiveworkshop.com/forums/icons-541/btnplateupg1-111607/?prev=search=metal&d=list&r=20
 

Attachments

  • Drobots 1.1.rar
    10.3 MB · Views: 331
Last edited:
Level 4
Joined
Mar 23, 2008
Messages
87
They're som nasty little buggers aren't they? Awesome :D +rep

Edit:
Looked through the scripting and it's suprisingly not that complicated :D
I'm going to try this for myself one of these days. Thanks for the inspiration :D
 
Last edited:
Level 5
Joined
Jun 5, 2009
Messages
121
They're som nasty little buggers aren't they? Awesome :D +rep

Edit:
Looked through the scripting and it's suprisingly not that complicated :D
I'm going to try this for myself one of these days. Thanks for the inspiration :D

np :) i want to add some buildings, and maybe if there are more than 20 drobots, that 3 go together to better and stronger drobot, who has the same abillitys like a normal (duplicate hisself...^^)

Update to 1.1
 
Last edited by a moderator:
Level 5
Joined
Jun 5, 2009
Messages
121
No double posting please.
I'll have a look at it when I get home :)

1. will never happens again^^
2. okay, did you saw the first version?

GUI bad, but idea of map not bad.

Yes because iam really new at triggering, its my first project, the problem is the conversion from my mind to the map with my knowledge of triggers, i need to learn more, but i learn every day so i have confidence ^^

a big problem is that my english isnt really good, for this post i needed 3 times to look at a german to english translation ^^ and in the editor there are only engineering words
 
Level 2
Joined
Apr 13, 2009
Messages
11
it's a good idea and the map is fine, you just need to make it leakless and continue developing the Drobot ai.

It would be good for you to read this: http://www.hiveworkshop.com/forums/triggers-and-scripts-269/things-that-leak-35124/ to learn more about leaks. I saw some location leaks and unit group leaks.

For example:
  • Run Drobot RUN
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units in (Playable map area))) Less than or equal to 19
        • Then - Actions
          • Unit - Order (Random unit from (Units of type Drobot)) to Attack-Move To (Random point in (Playable map area))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in (Units in (Playable map area))) Greater than or equal to 20
            • Then - Actions
              • Unit - Order (Random unit from (Units of type Drobot)) to Attack-Move To (Random point in (Playable map area))
              • Wait 0.10 seconds
              • Unit - Order (Random unit from (Units of type Drobot)) to Attack-Move To (Random point in (Playable map area))
              • Wait 0.10 seconds
              • Unit - Order (Random unit from (Units of type Drobot)) to Attack-Move To (Random point in (Playable map area))
            • Else - Actions
There are both unit group leaks and location leaks in that trigger

I also noticed that the metal icon was not working (it was green) probably because you used a wrong import path explained here: http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/how-to-import-an-icon-7287/.

There is also no need for the custom music ingame, but if you want to keep it I suggest that you encode it to reduce the size of the map. It is explained here: http://www.hiveworkshop.com/forums/...78/how-to-use-custom-music-in-your-map-31249/.
 
Level 5
Joined
Jun 5, 2009
Messages
121
it's a good idea and the map is fine, you just need to make it leakless and continue developing the Drobot ai.

It would be good for you to read this: http://www.hiveworkshop.com/forums/triggers-and-scripts-269/things-that-leak-35124/ to learn more about leaks. I saw some location leaks and unit group leaks.

For example:
  • Run Drobot RUN
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units in (Playable map area))) Less than or equal to 19
        • Then - Actions
          • Unit - Order (Random unit from (Units of type Drobot)) to Attack-Move To (Random point in (Playable map area))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in (Units in (Playable map area))) Greater than or equal to 20
            • Then - Actions
              • Unit - Order (Random unit from (Units of type Drobot)) to Attack-Move To (Random point in (Playable map area))
              • Wait 0.10 seconds
              • Unit - Order (Random unit from (Units of type Drobot)) to Attack-Move To (Random point in (Playable map area))
              • Wait 0.10 seconds
              • Unit - Order (Random unit from (Units of type Drobot)) to Attack-Move To (Random point in (Playable map area))
            • Else - Actions
There are both unit group leaks and location leaks in that trigger

I also noticed that the metal icon was not working (it was green) probably because you used a wrong import path explained here: http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/how-to-import-an-icon-7287/.

There is also no need for the custom music ingame, but if you want to keep it I suggest that you encode it to reduce the size of the map. It is explained here: http://www.hiveworkshop.com/forums/...78/how-to-use-custom-music-in-your-map-31249/.


thanks, i know how to import icons, i just deleted it by mistake,
i dont know waht a leak is but i think its a thing in a map waht doesnt work exactly or make laggs? i read this now with that leaks, and
developing the AI is very hard only with triggers, i need more knowledge about Jass/vJass

do you know how to trigger or script that drobots will carry Metal Piece if they see one? not only if the metal get createt :(

now i am building a drobot map, the terrain and the triggers are finisht (for the drobots) only triggers for player and the AI not finisht, in this map the drobots can build buildings, Swarmbuilding and Drobot Tower, very kick ass these drobots :p
 
Level 4
Joined
Mar 23, 2008
Messages
87
now i am building a drobot map, the terrain and the triggers are finisht (for the drobots) only triggers for player and the AI not finisht, in this map the drobots can build buildings, Swarmbuilding and Drobot Tower, very kick ass these drobots :p

Looking forward to it :)

Also: My own AI map is taking shape :D Made a pretty advanced wander and enemy detection script yesterday. Now all i need to do is to make my bots procreate, attack and retreat as they need to
 
Level 2
Joined
Apr 13, 2009
Messages
11
do you know how to trigger or script that drobots will carry metal piece if they see one? Not only if the metal get createt :(

This should work as a metal detection trigger (haven't tested it).

  • Find Metal
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set DrobotSwarm = (Units of type Drobot)
      • Unit Group - Pick every unit in DrobotSwarm and do (Actions)
        • Loop - Actions
          • Set DrobotMetalPoint1 = (Position of (Picked unit))
          • Item - Pick every item in (Playable map area) and do (Actions)
            • Loop - Actions
              • Set DrobotMetalPoint2 = (Position of (Picked item))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of (Picked item)) Equal to Metal Piece
                  • (Distance between DrobotMetalPoint1 and DrobotMetalPoint2) Less than or equal to 800.00
                • Then - Actions
                  • Unit - Order (Picked unit) to Right-Click (Picked item)
                • Else - Actions
              • Custom script: call RemoveLocation(udg_DrobotMetalPoint2)
          • Custom script: call RemoveLocation(udg_DrobotMetalPoint1)
      • Custom script: call DestroyGroup(udg_DrobotSwarm)
Looking forward to the next version.
 
Level 5
Joined
Jun 5, 2009
Messages
121
do you know how to trigger or script that drobots will carry metal piece if they see one? Not only if the metal get createt :(

This should work as a metal detection trigger (haven't tested it).

  • Find Metal
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set DrobotSwarm = (Units of type Drobot)
      • Unit Group - Pick every unit in DrobotSwarm and do (Actions)
        • Loop - Actions
          • Set DrobotMetalPoint1 = (Position of (Picked unit))
          • Item - Pick every item in (Playable map area) and do (Actions)
            • Loop - Actions
              • Set DrobotMetalPoint2 = (Position of (Picked item))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of (Picked item)) Equal to Metal Piece
                  • (Distance between DrobotMetalPoint1 and DrobotMetalPoint2) Less than or equal to 800.00
                • Then - Actions
                  • Unit - Order (Picked unit) to Right-Click (Picked item)
                • Else - Actions
              • Custom script: call RemoveLocation(udg_DrobotMetalPoint2)
          • Custom script: call RemoveLocation(udg_DrobotMetalPoint1)
      • Custom script: call DestroyGroup(udg_DrobotSwarm)
Looking forward to the next version.

oh okay nice i will try it, + rep if works

EDIT: waht variable is that?
Set DrobotMetalPoint2 = (Position of (Picked item))
 
Level 4
Joined
Mar 23, 2008
Messages
87
EDIT: waht variable is that?
Set DrobotMetalPoint2 = (Position of (Picked item))

Point variable ;)
Oh, and maybe you should use Pick Random N Units instead of Every for the find metal trigger, and maybe set time to 30 instead of 1

Also, ideas:
It would be awesome if you made this into a team defense type of map :D
Players can also pick up metal pieces and sell them for gold/wood or use it for something?
Drobots should need 2 metal pieces to make a copy, and should always drop 1 metal piece when destroyed.

 
Level 5
Joined
Jun 5, 2009
Messages
121
awwww

i am very tired cause i am workin on that map now 20 hours, tell me your minds about team controlled map, mean drobots carry metal and using metal automaticly and u can only fight with your hero vs a other hero and his drobots or waht?^^

and i am really pissed of the drobots, in my map they lagging around and somethime they do NOTHING really nothing, i can attack them and kill them but they do nothing, and then next second they agree perfectly and good...
i can share my work waht i did for now in that map, to see waht i mean, 70% works and 30% works not and next test nothing work, and next test all works, i dont know why, but i thing its the hundred of orders

i build a timer trigger that the order to help other drobots only all 20 seconds can given, but they are very buggy now

here my work for now (specialy look to the south in the kitchen waht the worker do, and the libary, and at the garbage hall^^(i love details))

and sorry about the triggers etc, most of them are german, cause it is easyer for me to work with it, just use http://dict.leo.org/ende?lang=de&lp=ende to translaite if u wanna know anything, or if leo dont know waht means ask me whenever you want

notice, its not a beta, its maybe a alpha, just to see on waht iam working now, if u wanna support me tell me waht leaks or fixx the leaks, cause now i cant work on that map, i am too tired
 

Attachments

  • Kopie von A Robotic plague 2.0.rar
    1.8 MB · Views: 119
Level 7
Joined
Dec 19, 2008
Messages
276
all handles leak + orders LEAK (These can't be fixed, ty Blizzard)

Orders leaks never will let you make powerfull AI (Reduce number of orders in amount of time but AI will don't have fast respond.

Don't be tired and don't make something when you tired, it will be terrible. :)

Don't ignore me or i will curse you. xD
 
Level 5
Joined
Jun 5, 2009
Messages
121
hehe

i am looking your nano survival now^^

EDIT: your survival... its too hard? first we tryed it as medic and engeneer, than 2 engeneer, than engeneer and sniper, but all the time we get killed by in us spawning creeps with dmg that is higher than my and his hitpoints togheter, its a funny map and hard too survive, but these creeps that are spawning in you and than onehittting you, they are too extreme, and i dont mean the invisible one, i can make them visible as sniper^^
 
Last edited:
Level 4
Joined
Mar 23, 2008
Messages
87
i am very tired cause i am workin on that map now 20 hours, tell me your minds about team controlled map, mean drobots carry metal and using metal automaticly and u can only fight with your hero vs a other hero and his drobots or waht?^^

I mean a regular build map, just with drobots on them. All players are allied and have to destroy all the drobots in order to win. Maybe a custom hero with anti-drobot spells. And the drobots should have a lair with turrets and drobot guards. :D
So in the beginning of the map you have to defend yourself against incoming waves of drobots, later on you have to build an army to go after the lair :D
 
Level 5
Joined
Jun 5, 2009
Messages
121

I mean a regular build map, just with drobots on them. All players are allied and have to destroy all the drobots in order to win. Maybe a custom hero with anti-drobot spells. And the drobots should have a lair with turrets and drobot guards. :D
So in the beginning of the map you have to defend yourself against incoming waves of drobots, later on you have to build an army to go after the lair :D

lol did you downloaded my map?! thats close on my map, try it^^
 
Level 4
Joined
Mar 23, 2008
Messages
87
lol did you downloaded my map?! thats close on my map, try it^^

Haven't tried the latest one yet, no, I'll try it now ;)
In the meanwhile, attached is my contribution to the subject. I hope you enjoy it. It's not done yet, but it is a good start methinks :D
On a side note: How come Drobots 1.1 takes over 10mb?



Edit:
Ok tested it.
I think it's a tad big.
Where does the aliens fit in btw? There was an intro but tbh i wasn't paying attention, too little drobot action! :D
I think maybe more of a regular build type map with an invasion of drobots from the future would prove better gameplay.
oooooh... thought just hit. how cool wouldn't it be if at certain intervals time rifts would open at pseudu random places in the map and drobots would pour out! :D pseudo as in not starting locations of players.

Ok, my opinion is that the map is a little too big and too many things are happening at once (or not happening) so i don't know where to go in the beginning, what to do, or who or where the enemy is. The gameplay is too vague, it needs to be more defined.
 

Attachments

  • SpiderAI_A03.w3x
    59 KB · Views: 82
Level 5
Joined
Jun 5, 2009
Messages
121
lol

yes because this is waht i createt for now, its not finisht, i would change all but you are right, its much cooler in a nearly standard map that there drobots sproud out and trying to kill everwhere on the "planet"(map^^)

i test your AI now, and iam well-rested now :grin:

EDIT: well... yes okay its a AI... they dont lay eggs or anything or? and they dont leveling or get stronger if they killing creeps? why they killing creeps? and how can they stay alive if they dont get anything except gold, do they use gold?^^ you said "In the meanwhile, attached is my contribution to the subject" can you explain that?^^

On a side note: How come Drobots 1.1 takes over 10mb?

i dont know lol
 
Last edited:
Level 3
Joined
Dec 6, 2005
Messages
67
lol you know what would be fun... some kind of AI contest, get a neutral person to make a map, agree on some unit stats, then develop the AI system... searching, killing, etc... then on game day we can put all the different AI scripts on the neutral map and watch the bots interact in a new world

On a side note: How come Drobots 1.1 takes over 10mb?
its a 10mb mp3
 
Level 4
Joined
Mar 23, 2008
Messages
87
i test your AI now, and iam well-rested now :grin:

EDIT: well... yes okay its a AI... they dont lay eggs or anything or? and they dont leveling or get stronger if they killing creeps? why they killing creeps? and how can they stay alive if they dont get anything except gold, do they use gold?^^
They don't lay eggs yet, but i mean to implement that.
They wander around and detect enemies and calculate if they have the upper hand and attack if they do, if not they retreat.
When they attack now they just follow the assigned leader, i'm going to change that to attack move 128.00 in front of the leader.



you said "In the meanwhile, attached is my contribution to the subject" can you explain that?^^

In the meanwhile - while i test your map
Attached contribution - the map
Subject - Artificial Intelligence :)
 
Level 5
Joined
Jun 5, 2009
Messages
121
lol you know what would be fun... some kind of AI contest, get a neutral person to make a map, agree on some unit stats, then develop the AI system... searching, killing, etc... then on game day we can put all the different AI scripts on the neutral map and watch the bots interact in a new world


its a 10mb mp3

lol thats a awesome idea XD XD XD i think, drobot AI vs spider AI vs another AI and all wanna kill everything on the map lol

but if we do that i need to learn scripting, my drobots sucks they laggin around as hell

and bomi, can u add a multiboard who shows how much spiders alive? like in the drobot map of me, trigger calls Drobot scanner, variable G is a unit group and varibale yxz is a leaderboard
 
Level 5
Joined
Jun 5, 2009
Messages
121
Lets see waht the wc3 AI editor can

i try to create now just creeps and abillitys like duplicate etc, and than i try to create a AI with the wc3 AI editor, lets see waht it brings^^

EDIT: ok, i can only choose standard buildings and units to build that and has a preference of... so i need to edit all existing buildings etc to give the drobots a AI with the WC3 AI Editor, i work on it, i will give a feedback later
 
Last edited:
Level 4
Joined
Mar 23, 2008
Messages
87
Ok, I surrender. My AI is not going to be developed for wc3 any more :(
Turns out after 25+ units/spider the 'for group' loops begins to take up too much resources and the map starts to lagg. Should've seen that coming :(

Oh well, it was a fun project while it lasted :)
And i should mention that it probably would be possible to make a lag free version with hashtables, but alas, I'm not familiar enough with them, nor have i updated to 1.24.
So for now this project is on hold for me. Time to work on my mini-games map again :D
 

Attachments

  • SpiderAI_A04.w3x
    62.3 KB · Views: 69
Level 5
Joined
Jun 5, 2009
Messages
121
awww :(

Ok, I surrender. My AI is not going to be developed for wc3 any more :(
Turns out after 25+ units/spider the 'for group' loops begins to take up too much resources and the map starts to lagg. Should've seen that coming :(

Oh well, it was a fun project while it lasted :)
And i should mention that it probably would be possible to make a lag free version with hashtables, but alas, I'm not familiar enough with them, nor have i updated to 1.24.
So for now this project is on hold for me. Time to work on my mini-games map again :D

ahhhhh! bomi! my onlyst project member XD why they laggin with 25 units? my units doesnt lagger after 100+, i thinkt trigger are better or only cause u can do more? do they more lagg ?
 
Last edited:
Level 4
Joined
Jun 14, 2008
Messages
72
I was told that if i post problem here somone would help me make an AI...

i need ai for all the races that will make them use the custom units I have put in without it, they cannot get to small islands around my map all town halls produce a second type of peon/peasant that can creat shipyards, these ship yards produce the campagins transport ship, frigget, and battleship/juggarnaught when i tryed to build the AI my self i created errors so can someone please make AI???
 

Attachments

  • The Island big.w3x
    237.3 KB · Views: 62
Level 3
Joined
Dec 6, 2005
Messages
67
@turtlelink2 i'd suggest making your own thread for that, your problem is going to be that the basic game AI is going to fail you... even if you code a custom AI to build the shipyard and then build ships, then tell units to ferry across, u'll then have to make a script for them to attack things on the island, otherwise when they drop off they'll just stand around waiting (like neutral hostiles). Basically you're going to need to code your own AI to handle combat strategies and what not
 
Level 4
Joined
Mar 23, 2008
Messages
87
ahhhhh! bomi! my onlyst project member XD why they laggin with 25 units? my units doesnt lagger after 100+, i thinkt trigger are better or only cause u can do more? do they more lagg ?

Hehe, It's because my AI trigger does way too amny things at the same time. It starts of with a For group loop (otherwise known as pick every unit in <rect> and do: ) then it checks for what mode it is in, if its in wander mode it selects its next destination. unit pos + 256.00 + new angle. then it goes on to check if that pos is pathable, and retries if it isn't. next it checks if there are any enemies around (another for group loop) in a range of 1024, then checks if there is any more units around the unit it found if it found any units and sum their hp, divides the sum on the spiders around the detecting spider (another for group loop) and calculates wheter or not it should attack. If it decides to attack it gathers all nearby spiders into "slaves" (another for group loop) and appoints itself into leader.
All this is triggered every two second for EVERY spider on the map, which of course puts an enourmous strain on the cpu xD

When SCII comes out, I might try to make it for that. (Rumor has it that SCII WE will be far superior to wc3's and that the scripting language will be based on C and much more powerful :D)
 
Level 5
Joined
Jun 5, 2009
Messages
121
ahahah good ideas incoming :D

okay waht you think about that:
add all spiders to a unit group, or maybe give them 1 food need, and if food is more than 30 create 1 Spiderswarmcave at random unit of spider and remove 1 spider and add it to spiderswarcavemunitgroup take of this trigger and make new who only adds to the other spiderswarcave, or the map is full of these, i think about a big fat egg like castel big, if they are more tan 10 units


means, not more than 30 spiders
my next mind:

if a unit get added to spiderswarmcaveunitgroup chance scake of spiderswarmcave +0.1(only visual is not important)

if a unit dies of unit type spiderswarmcave create x units and x is how much units addet to spiderswarmcavegroup

but now the better thing, forget waht i said its only to tell you my alternative

if on playable map more than 30 spiders than remove 2 spiders and add 1 spider level 2 and take trigger on Spider level 2 trigger and take this trigger off

spider level 2 trigger says if more than 29 spiders on playable map, remove 2 and create 1 spider level 2 take on trigger spider level 2 trigger 2 and take off this trigger

spider level 2 trigger 2 says if more than 28 than.. u know waht i mean, and u can do this to endlessness xD

and the spiders lvl 2 are double stronger than the level 1, make them little bigger, or a other color, its very much work but if u do this u can make your map (not so much spiders but a cool colony) and than a ohter idea:

if there more than 5 spiders, actions add all spiders of playable map to unitgroup
than only commands for the unit group, that the group never walk alone, cause your spiders very easy to kill alone, just need a footman, than next trigger if more than 10 add all spiders condition and contition2, condition 1 says of type spider, condition 2 says, if triggering unit is not in a group, so we have 2 groups of 5 spiders they walk and fight togheter :)

read it 2-3 times and than feedback please :p oh and, i deactivatet all triggers that not important (spider counter, gold and wood gain etc) it was laggin at first by 50 or more spiders :)





I was told that if i post problem here somone would help me make an AI...

i need ai for all the races that will make them use the custom units I have put in without it, they cannot get to small islands around my map all town halls produce a second type of peon/peasant that can creat shipyards, these ship yards produce the campagins transport ship, frigget, and battleship/juggarnaught when i tryed to build the AI my self i created errors so can someone please make AI???

use the AI editor of wc3, and change the basic units, do this work? not tested yet
 
Last edited:
Level 3
Joined
Dec 6, 2005
Messages
67
Hehe, It's because my AI trigger does way too amny things at the same time. It starts of with a For group loop (otherwise known as pick every unit in <rect> and do: ) then it checks for what mode it is in, if its in wander mode it selects its next destination. unit pos + 256.00 + new angle. then it goes on to check if that pos is pathable, and retries if it isn't. next it checks if there are any enemies around (another for group loop) in a range of 1024, then checks if there is any more units around the unit it found if it found any units and sum their hp, divides the sum on the spiders around the detecting spider (another for group loop) and calculates wheter or not it should attack. If it decides to attack it gathers all nearby spiders into "slaves" (another for group loop) and appoints itself into leader.
All this is triggered every two second for EVERY spider on the map, which of course puts an enourmous strain on the cpu xD

When SCII comes out, I might try to make it for that. (Rumor has it that SCII WE will be far superior to wc3's and that the scripting language will be based on C and much more powerful :D)

can't say i'm an expert but i'd almost guarantee you that it is a trigger flaw... i've ran a 12 player map with 11 allied enemies and me with a custom god like hero... i highly doubt your 25 spiders are preforming more actions then the 11 players whose AI's are constantly being run as well as the 1100 food worth of units in addition to some custom abilities and creeps... that or maybe my computer just pwnz yours :p, but i think its a design flaw somewhere
 
Level 4
Joined
Mar 23, 2008
Messages
87
but i think its a design flaw somewhere
The flaw is that instead of calculating the actions needed for each individual spider when the need arises, all the calculations is taking place at the excact same time (nearly). For group loops are designed so they can run multiple instances at once! Ok, this poses a problem for this kind of things, because i need to run multiple loops inside eachoter and passing variables between them. This is not supported, so i did a workaround. I created a mutex for the for group loops. This allows me to set a global integer inside the loop and retrieve it after the loop. Now, the problem here is that this bottlenecks the for group loop. Because the loop is designed so it runs inbetween eachother. Eg. without mutex I would end up with the global variable being changed before i could retrieve it outside the loop, meaning i wouldn't get the information i needed from each individual spider (and/or enemy).
Using hashtables i could solve this easily, problem being that i don't know enough about hashtables, and i haven't updated from 1.22 yet :p
 
Level 4
Joined
Mar 23, 2008
Messages
87
LOL? did you read anything waht i written?!?! ^^
Yes


if there more than 5 spiders, actions add all spiders of playable map to unitgroup
than only commands for the unit group, that the group never walk alone, cause your spiders very easy to kill alone, just need a footman, than next trigger if more than 10 add all spiders condition and contition2, condition 1 says of type spider, condition 2 says, if triggering unit is not in a group, so we have 2 groups of 5 spiders they walk and fight togheter :)

Not entirely sure what you mean by this, but I got an idea out of it.
Spiders always go in groups of min 5. They multiply and when they reach 10 they split into two groups.
This would be easier to make an AI with I think, because then i can order the whole unit group instead of each individual unit. I also need to make the system more independant somehow.
When spiders reach a certain number they go together and make a spawning ground. Spawning grounds makes young spiders into bigger spiders. (takes one spider and returns it after x seconds in a bigger version. Big spiders don't reproduce.
I'll make a big map with lots of player positions on it, it will be flat (no cliffs or water) so i dont have to care about pathing so much. Then I'll see what I can do about enemy detection without causing massive lags after 25 unit groups :)
 
Level 5
Joined
Jun 5, 2009
Messages
121
first: did you readed it 2-3 times? NO, thats why u dont understand waht i want to say, but i think u understand it cause you written my idea XD good make that now i am working too on a map with spiders, it was my first idea and where i saw your spiders with ai i become that big lust to make that too^^ and than:
MY ENGLISH IS BAD! :hohum:



i like this color :eekani:

EDIT: why does this dont work?

  • Untitled Spider Counter
    • Events
    • Conditions
    • Actions
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to (String((Player 1 (Red) Food cap)))
i have triggers like create multiboard etc set color set this make that, but it doesnt shows the food cap? (i changed it much times, it doesnt shows it, why? -.-)
 
Last edited:
Level 3
Joined
Dec 6, 2005
Messages
67
could be a variety of problems... first you need to make sure you show the multiboard, also multiboards cannot be made at map initilization, below is a basic working example

  • Melee Initialization
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 2 columns and 2 rows, titled Food
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row 0 to 8.00% of the total screen width
      • Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to (Name of Player 1 (Red))
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to (Name of Player 2 (Blue))
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to (String((Player 1 (Red) Food cap)))
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 2 to (String((Player 2 (Blue) Food cap)))
      • Multiboard - Show (Last created multiboard)
also, i think you're wanting Food Used not Food cap
 
Level 5
Joined
Jun 5, 2009
Messages
121
okay thanks Drenith i will try it

and Bomi, waht did you say if you make a broodmother? than u dont need hundrets of orders every spider lay egg and this and this, give the broodmother the spell of undead hero anub arak locust swarm, make him no sound no graphic no dmg etc, and than make the spell a cooldown for 60 seconds, than a trigger every 5.1 seconds say unit type broodmother use spell, and than if spell used spawn 6-14 eggs at position of triggering unit, and than u can add a spiderhunter hero who can silicen the spider for 2 min and has a cd of silence time + for every player 2 min = 2 min + 4 player means 10 min cd, understand?^^ so dont make trigger about how much players are ingame, i mean make the spell after you defined the player number for this map^^


EDIT: why does this not work? (see link below)
 

Attachments

  • Spider KI 1.1.rar
    129.5 KB · Views: 45
Last edited:
Status
Not open for further replies.
Top