Technical issues - about modifying AI

Moderators: Developers, Auxillaries

South
First Sergeant
First Sergeant
Posts: 503
Joined: Sun May 12, 2013 3:45 pm
Location: Changchun

Technical issues - about modifying AI

Post by South »

Me again. I'm now having trouble with modifying AI...mainly about the rule of AI purchasing tier buildings.
For example, in ModernCombat, how could I make AI of PLA build T1, T2 and T3 in order (never build T3 unless T2 is complete) and ignore (never build) T4?
I tried to modify rules_tech_purchase.ai, but even slightly modify would cause fatal AI error. Are there any tutorial about this? (I've learned about C and Pascal before, so programming is not a problem)
I_am_a_Spoon
Lieutenant Colonel
Lieutenant Colonel
Posts: 1480
Joined: Sun May 05, 2013 10:58 pm
Steam Username: I_am_a_Spoon
Location: Perth, Western Australia

Re: Technical issues - about modifying AI

Post by I_am_a_Spoon »

I'm not sure there's anyone on the team who can actually help you. We haven't had a proper AI guy since before release.
South
First Sergeant
First Sergeant
Posts: 503
Joined: Sun May 12, 2013 3:45 pm
Location: Changchun

Re: Technical issues - about modifying AI

Post by South »

OK I see...so you guys are simply modifying it to fit new units and more?
BTW, the AI seems like written by Pascal/Delphi...already get AI of tiers done, but still don't understand the whole structure of the AI.
I_am_a_Spoon
Lieutenant Colonel
Lieutenant Colonel
Posts: 1480
Joined: Sun May 05, 2013 10:58 pm
Steam Username: I_am_a_Spoon
Location: Perth, Western Australia

Re: Technical issues - about modifying AI

Post by I_am_a_Spoon »

South wrote:OK I see...so you guys are simply modifying it to fit new units and more?

Pretty much.
User avatar
Darkbladecr
1st Lieutenant
1st Lieutenant
Posts: 894
Joined: Sun May 05, 2013 11:57 am
Steam Username: Darkbladecr
Location: London
Contact:

Re: Technical issues - about modifying AI

Post by Darkbladecr »

I modified Relic's AI coding and got some help from some AI coders to actually get an AI ingame. But honestly it is not ideal. For the building of tiers you should look in:
ModernCombat\Data\ai\rules_tech_purchase.ai

and put some variables that are not activated until a single T2 building is complete or something along those lines.
Image
South
First Sergeant
First Sergeant
Posts: 503
Joined: Sun May 12, 2013 3:45 pm
Location: Changchun

Re: Technical issues - about modifying AI

Post by South »

Darkbladecr wrote:I modified Relic's AI coding and got some help from some AI coders to actually get an AI ingame. But honestly it is not ideal. For the building of tiers you should look in:
ModernCombat\Data\ai\rules_tech_purchase.ai

and put some variables that are not activated until a single T2 building is complete or something along those lines.

Thank you DB. I modified the condition and demanding value, and the AI looks right now.
You are the Jesus of all CoH modder :D
South
First Sergeant
First Sergeant
Posts: 503
Joined: Sun May 12, 2013 3:45 pm
Location: Changchun

Re: Technical issues - about modifying AI

Post by South »

BTW, does it involves re-animation works when resizing the model, like you've done to PLA T3 and T4 building in 1.012?
I_am_a_Spoon
Lieutenant Colonel
Lieutenant Colonel
Posts: 1480
Joined: Sun May 05, 2013 10:58 pm
Steam Username: I_am_a_Spoon
Location: Perth, Western Australia

Re: Technical issues - about modifying AI

Post by I_am_a_Spoon »

I_am_a_Spoon wrote:I'm not sure there's anyone on the team who can actually help you.

Glad to see I was wrong. :)
User avatar
Darkbladecr
1st Lieutenant
1st Lieutenant
Posts: 894
Joined: Sun May 05, 2013 11:57 am
Steam Username: Darkbladecr
Location: London
Contact:

Re: Technical issues - about modifying AI

Post by Darkbladecr »

South wrote:BTW, does it involves re-animation works when resizing the model, like you've done to PLA T3 and T4 building in 1.012?

all resizing requires re-animation.
Image
South
First Sergeant
First Sergeant
Posts: 503
Joined: Sun May 12, 2013 3:45 pm
Location: Changchun

Re: Technical issues - about modifying AI

Post by South »

Darkbladecr wrote:
South wrote:BTW, does it involves re-animation works when resizing the model, like you've done to PLA T3 and T4 building in 1.012?

all resizing requires re-animation.

I see...
Post Reply