Post by steammagic on Nov 3, 2006 13:00:37 GMT -6
Captital security for Maurader (wndering_monster_player)player?
I'm intersted in adding security for the captials when the Lord falls, that is when the Lord of that faith is killed, all his buildings go back to being owned by the wandering_monster_player, the game's term for mauraders or neutral player.
From the scenario.gs I found how you set up the captial security. I want to add monster spawning when someone tries a "free grab," that is the Lord dies, the place is left empty and a nearby player with a bald eagle or spotted dog can snag a level 3 city.
I added the wandering_monster_player as below and it does not seem to be working...any ideas?
CAPITAL SECURITY FOR HARD AI CONTROLED PLAYERS ******************* BEGIN *****
; *************************************************************************
p numcomputers ge
getmultiplayerflag not and
getdifficultylevel HARD_LEVEL eq and{/security_loc loc UNITTYPELAND findemptylocation def
/security_unit_dict f get{/ent exch cvlit def security_loc xy_to_x_y unittypedict ent 0 get get p ent 1 get iscomputer?{10 mul}if addunitnow
/u exch def /a exch def
a u UNIT_FLAGS 3 copy getunitdata UNITFLAG_VOLUNTEER or setunitdata
ent 2 get{artifactdict exch get /art_type exch def a u 2 copy art_type createartifactnow wieldartifactifroom}forall a setup_new_army currentscenario 2 sub EARTH eq{a ARMY_OWNER getarmydata 2 eq{a deletearmynow}{/security_brain cvx f a u UNIT_UNIQUE_ID getunitdata -1 setchampionbrain pop}ifelse}{/security_brain cvx f a u UNIT_UNIQUE_ID getunitdata -1 setchampionbrain pop}ifelse}forall}if}ifelse end end end}/dummy 15 dict replace
/security_unit_dict <<
LIFE{
{/liwiz 9001{}} {/licr1 3000{}} {/limis 2500{}} {/limis 2500{}}
}
DEATH{
{/dewiz 9001{}} {/decr1 3000{}} {/demis 2500{}} {/demis 2500{}}
}
ORDER{
{/orwiz 9001{}} {/orcr2 3000{}} {/ormis 2500{}} {/ormis 2500{}}
}
CHAOS{
{/chwiz 9001{}} {/chcr1 3000{}} {/chmis 2500{}} {/chmis 2500{}}
}
EARTH{
{/eawiz 9001{}} {/eacr1 3000{}} {/eamis 2500{}} {/eamis 2500{}}
}
AIR{
{/aiwiz 9001{}} {/aicr2 3000{}} {/aimis 2500{}} {/aimis 2500{}}
}
FIRE{
{/fiwiz 9001{}} {/ficr1 3000{}} {/fimis 2500{}} {/fimis 2500{}}
}
WATER{
{/wawiz 9001{}} {/wacr2 3000{}} {/wamis 2500{}} {/wamis 2500{}}
}
WANDERING_MONSTER_PLAYER{
{/dewiz 9001{}} {/decr1 3000{}} {/demis 2500{}} {/demis 2500{}}
}
>> replace bind def
; *************************************************************************
; CAPITAL SECURITY FOR HARD AI CONTROLED PLAYERS ******************* END **
I'm intersted in adding security for the captials when the Lord falls, that is when the Lord of that faith is killed, all his buildings go back to being owned by the wandering_monster_player, the game's term for mauraders or neutral player.
From the scenario.gs I found how you set up the captial security. I want to add monster spawning when someone tries a "free grab," that is the Lord dies, the place is left empty and a nearby player with a bald eagle or spotted dog can snag a level 3 city.
I added the wandering_monster_player as below and it does not seem to be working...any ideas?
CAPITAL SECURITY FOR HARD AI CONTROLED PLAYERS ******************* BEGIN *****
; *************************************************************************
p numcomputers ge
getmultiplayerflag not and
getdifficultylevel HARD_LEVEL eq and{/security_loc loc UNITTYPELAND findemptylocation def
/security_unit_dict f get{/ent exch cvlit def security_loc xy_to_x_y unittypedict ent 0 get get p ent 1 get iscomputer?{10 mul}if addunitnow
/u exch def /a exch def
a u UNIT_FLAGS 3 copy getunitdata UNITFLAG_VOLUNTEER or setunitdata
ent 2 get{artifactdict exch get /art_type exch def a u 2 copy art_type createartifactnow wieldartifactifroom}forall a setup_new_army currentscenario 2 sub EARTH eq{a ARMY_OWNER getarmydata 2 eq{a deletearmynow}{/security_brain cvx f a u UNIT_UNIQUE_ID getunitdata -1 setchampionbrain pop}ifelse}{/security_brain cvx f a u UNIT_UNIQUE_ID getunitdata -1 setchampionbrain pop}ifelse}forall}if}ifelse end end end}/dummy 15 dict replace
/security_unit_dict <<
LIFE{
{/liwiz 9001{}} {/licr1 3000{}} {/limis 2500{}} {/limis 2500{}}
}
DEATH{
{/dewiz 9001{}} {/decr1 3000{}} {/demis 2500{}} {/demis 2500{}}
}
ORDER{
{/orwiz 9001{}} {/orcr2 3000{}} {/ormis 2500{}} {/ormis 2500{}}
}
CHAOS{
{/chwiz 9001{}} {/chcr1 3000{}} {/chmis 2500{}} {/chmis 2500{}}
}
EARTH{
{/eawiz 9001{}} {/eacr1 3000{}} {/eamis 2500{}} {/eamis 2500{}}
}
AIR{
{/aiwiz 9001{}} {/aicr2 3000{}} {/aimis 2500{}} {/aimis 2500{}}
}
FIRE{
{/fiwiz 9001{}} {/ficr1 3000{}} {/fimis 2500{}} {/fimis 2500{}}
}
WATER{
{/wawiz 9001{}} {/wacr2 3000{}} {/wamis 2500{}} {/wamis 2500{}}
}
WANDERING_MONSTER_PLAYER{
{/dewiz 9001{}} {/decr1 3000{}} {/demis 2500{}} {/demis 2500{}}
}
>> replace bind def
; *************************************************************************
; CAPITAL SECURITY FOR HARD AI CONTROLED PLAYERS ******************* END **