Dumb AI? They won't go for an extra CP

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
DarthFannel
Private Second Class
Posts: 60
Joined: Tue Jul 20, 2010 9:53 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Mexico City

Dumb AI? They won't go for an extra CP

Post 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.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Dumb AI? They won't go for an extra CP

Post 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.
User avatar
DarthFannel
Private Second Class
Posts: 60
Joined: Tue Jul 20, 2010 9:53 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Mexico City

Re: Dumb AI? They won't go for an extra CP

Post 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...
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: Dumb AI? They won't go for an extra CP

Post by kinetosimpetus »

Did you set up a capture region?
User avatar
DarthFannel
Private Second Class
Posts: 60
Joined: Tue Jul 20, 2010 9:53 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Mexico City

Re: Dumb AI? They won't go for an extra CP

Post 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.
modmaster13
General
General
Posts: 777
Joined: Wed Aug 18, 2010 4:23 pm
Games I'm Playing :: COD SWBF
xbox live or psn: KrypticcElementt
Location: Twitter @_KrypticElement
Contact:

Re: Dumb AI? They won't go for an extra CP

Post by modmaster13 »

Do you have the right .odf for the CP?
User avatar
DarthFannel
Private Second Class
Posts: 60
Joined: Tue Jul 20, 2010 9:53 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Mexico City

Re: Dumb AI? They won't go for an extra CP

Post 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.)
modmaster13
General
General
Posts: 777
Joined: Wed Aug 18, 2010 4:23 pm
Games I'm Playing :: COD SWBF
xbox live or psn: KrypticcElementt
Location: Twitter @_KrypticElement
Contact:

Re: Dumb AI? They won't go for an extra CP

Post by modmaster13 »

Just checking. :cpu:
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Dumb AI? They won't go for an extra CP

Post 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.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Dumb AI? They won't go for an extra CP

Post 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?
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Dumb AI? They won't go for an extra CP

Post 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.
User avatar
DarthFannel
Private Second Class
Posts: 60
Joined: Tue Jul 20, 2010 9:53 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Mexico City

Re: Dumb AI? They won't go for an extra CP

Post 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.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Dumb AI? They won't go for an extra CP

Post 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.
User avatar
DarthFannel
Private Second Class
Posts: 60
Joined: Tue Jul 20, 2010 9:53 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Mexico City

Re: Dumb AI? They won't go for an extra CP

Post 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.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Dumb AI? They won't go for an extra CP

Post by Teancum »

All I'm saying is that if you don't have planning then that's your issue, plain and simple.
Post Reply