Page 1 of 1
Dumb AI? They won't go for an extra CP
Posted: Mon Feb 28, 2011 3:08 am
by DarthFannel
Well, I am working on my mods but I decided to have fun with my test map, so I added a 5th CP, but the bots are never trying to capture it, of course I added it to my LUA in objectives just like this:
Code: Select all
function ScriptPostLoad()
--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}
--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}
--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:Start()
EnableSPHeroRules()
end
Nothing happens, they just ignore it (it is in the exact center of the map, so, the layout of CPs is shaped like a cross, with no planning they go all the way to the enemy CPs, not to the closest one), when I capture it almost no bots spawn from it (and of course, the CP has capture region and spawn path.) this can be annoying if I decide to make a map with more than 4 CPs.
Re: Dumb AI? They won't go for an extra CP
Posted: Mon Feb 28, 2011 5:11 am
by DarthD.U.C.K.
are you sure you named the 5th cp "cp5" in ze?
its really strange that the bots dont go for the cp because ive placed a cp without any reference sin the lua and the ai went for it.
Re: Dumb AI? They won't go for an extra CP
Posted: Mon Feb 28, 2011 6:18 am
by DarthFannel
Positive, it is kind of weird, I will try to delete the stuff and try again, first I thought it was cuz uncheck Common in the munge process when I repeatedly check the mapping, but I cleaned and munged with Common and nothing, I'll check this place later and post any changes...
Re: Dumb AI? They won't go for an extra CP
Posted: Mon Feb 28, 2011 12:07 pm
by kinetosimpetus
Did you set up a capture region?
Re: Dumb AI? They won't go for an extra CP
Posted: Mon Feb 28, 2011 1:38 pm
by DarthFannel
kinetosimpetus wrote:Did you set up a capture region?
Of course, capture region and spawn path. BTW, the CP was supposed to be neutral at the beginning, now by accident I gave it to a team, and even then the bots ignore it, I think they barely spawn from it, and the path has 7 nodes.
EDIT: Nope, still not working, I'll try to add another later, doing manual clean, etc.
Re: Dumb AI? They won't go for an extra CP
Posted: Mon Feb 28, 2011 5:41 pm
by modmaster13
Do you have the right .odf for the CP?
Re: Dumb AI? They won't go for an extra CP
Posted: Mon Feb 28, 2011 8:00 pm
by DarthFannel
modmaster13 wrote:Do you have the right .odf for the CP?
Yes... I just select a CP, then pick "Place" and it "copies" the shipped CP to put a new one, seriously, I have been making maps at least for 3 years.
EDIT: Now they go for it, I Cleaned manually, munged with 4 cps, and just added the 5th in a different place (since I am putting the structures, etc.), I can't figure what happened, but I hope it doesn't happen again.
(Not 100% Solved in my opinion, but for now, nothing seems different from the usual procedure.)
Re: Dumb AI? They won't go for an extra CP
Posted: Mon Feb 28, 2011 8:45 pm
by modmaster13
Just checking.

Re: Dumb AI? They won't go for an extra CP
Posted: Mon Feb 28, 2011 8:59 pm
by Teancum
If the CP is far from the others you'll have to adjust the weight of your planning (hubs/connections) to entice the AI to go there. AI will always take the shortest path, so they'll typically shy away from far CPs.
Re: Dumb AI? They won't go for an extra CP
Posted: Mon Feb 28, 2011 9:09 pm
by Fiodis
Teancum wrote:If the CP is far from the others you'll have to adjust the weight of your planning (hubs/connections) to entice the AI to go there. AI will always take the shortest path, so they'll typically shy away from far CPs.
Would relative distance prevent AI from
spawning there as well?
Re: Dumb AI? They won't go for an extra CP
Posted: Mon Feb 28, 2011 9:24 pm
by Teancum
Hmm, possibly. Can't say for sure, but AFAIK you can also 'weight' the CP so that more AI spawn there in the CP's properties.
Re: Dumb AI? They won't go for an extra CP
Posted: Tue Mar 01, 2011 12:54 am
by DarthFannel
Since it was a test, there were no Planning Paths or barriers, only the cps in flat terrain, BTW, I still have to add the extra CPs to the LUA, for now it doesn't matter if the CP is in a corner far away, some bots still go to take it.
Re: Dumb AI? They won't go for an extra CP
Posted: Tue Mar 01, 2011 2:54 pm
by Teancum
Yeah, the definitely won't go for that CP then. With no planning AI take the shortest route to the nearest objective - even if that means through a wall or into a bottomless pit.
Re: Dumb AI? They won't go for an extra CP
Posted: Tue Mar 01, 2011 4:51 pm
by DarthFannel
Teancum wrote:Yeah, the definitely won't go for that CP then. With no planning AI take the shortest route to the nearest objective - even if that means through a wall or into a bottomless pit.
Misunderstanding? I sucessfully added the 5th and even with no planning they go for it no matter how far is it, the original problem didn't make sense in that context.
Re: Dumb AI? They won't go for an extra CP
Posted: Tue Mar 01, 2011 9:55 pm
by Teancum
All I'm saying is that if you don't have planning then that's your issue, plain and simple.