Page 1 of 1

PLUGIN ... Random AI Aggression?

Posted: Thu Jan 27, 2011 5:08 pm
by Merr
Pip,

I'm experimenting again, but with the StartTurnPost ....

In theory, your VP PLUGIN uses the StartTurn to issue the aggression (34) when a hostile VP is taken ... right?

So, I'm trying to see if randomizing the aggression in StartTurnPost (afterwards) would work ... Hard to tell :roll:

The code below assumes I have only TEAM #1 change aggression ... 33% chance it won't change from 34.

Code: Select all

FUNCTION StartTurnPost(side)
{
int i ;

	// alternate AI Team Aggression ... does it work?
	if(side == 1)
	{
		i = Rand(1,3) ;
		
		if ( i == 1 )
		{
			SetTeamAggression(1, 1, 64) ;
		}
		if ( i == 2 )
		{
			SetTeamAggression(1, 1, 0) ;
		}
	}
}
Am I on the right track?

Posted: Mon Jan 31, 2011 4:31 pm
by pipfromslitherine
IIRC the aggression isn't changed when a VP is taken, the plugin simply uses the aggression settings to make units which are going after VPs move appropriately and attack stuff.

I see no reason your code wouldn't work.

Cheers

Pip