			
Problems			
PracticeThrowing doesn't work right			
Take Wood to Storage Pit: should take the whole tree			
"Take Wood to Building Site: should take tree, not Scaffold."			
			
New Mimicking Stuff			
Take Wood to WorkShop			
Throwing villagers in the sea			
Stealing stuff from other towns			
			
			
			
			
			
			STATUS : Changed

Player Action	Creature Action	Creature Desire	Detection in the Code	
Put food in worship site		Compassion	Pot::EndPhysics and Pot::ApplyThisToObject	Pot/cpp
Cast magic food in worship site		Compassion	Spell::ApplyDefaultSpellEffect	SpellFood.cpp
Put food in storage pit		Compassion	Pot::EndPhysics and Pot::ApplyThisToObject	Pot/cpp
Cast magic food in storage pit		Compassion	Spell::ApplyDefaultSpellEffect	SpellFood.cpp
Put wood in storage pit		Compassion	Pot::EndPhysics and Pot::ApplyThisToObject	Pot/cpp
Cast magic wood in storage pit		Compassion	Spell::ApplyDefaultSpellEffect	SpellFood.cpp
Specifies where building is built / Put wood by building site	"Done (misnamed ""Build"")"	Compassion	Scaffold::EndPhysics	Scaffold.cpp
Cast magic wood by building site	?	Compassion	Spell::ApplyDefaultSpellEffect	Pot/cpp
Reposition town objects	Not Done	Compassion	Tree::EndPhysics	Tree.cpp
Give town protection by shield		Compassion	Spell::ApplyDefaultSpellEffect	SpellSeed.cpp
Bring people to worship	DanceWithVillagers	Playfulness	Town::SetWorshipPercentage	Town.cpp
Make artefact to encourage activity	DanceWithVillagers	Playfulness	Town::AddArtifact	Town.cpp
Throw animal/villager to damage him		Anger	"Object::ThrowObjectFromHand (or maybe on collision with object, ask Scawen)"	Object.cpp
Attack object by throwing something at it		Anger	"Object::ThrowObjectFromHand (or maybe on collision with object, ask Scawen)"	Object.cpp
Attack object with fire		Anger	Spell::ApplyDefaultSpellEffect	SpellSeed.cpp
Attack object with devastating magic		Anger	Spell::ApplyDefaultSpellEffect	SpellSeed.cpp
Throw object to impress		Impress	Object::ThrowObjectFromHand	Object.cpp
Use magic to impress		Impress	Spell::ApplyDefaultSpellEffect	SpellSeed.cpp
Make villager perform activity: FARMER	GetFoodFromField	Compassion	Villager::SetVillagerDisciple	Villager.cpp
Make villager perform activity: FORESTER	BringWoodToStoragePit	Compassion	Villager::SetVillagerDisciple	Villager.cpp
Make villager perform activity: FISHERMAN	BringFishToStoragePit	Compassion	Villager::SetVillagerDisciple	Villager.cpp
Make villager perform activity: BUILDER	Build	Compassion	Villager::SetVillagerDisciple	Villager.cpp
Make villager perform activity: MISSIONARY	DanceWithVillagers	Playfulness	Villager::SetVillagerDisciple	Villager.cpp
Cast magic wood in workshop		Compassion	Spell::ApplyDefaultSpellEffect	SpellFood.cpp
Put wood in workshop		Compassion	Pot::EndPhysics and Pot::ApplyThisToObject	Pot/cpp
Throw living things in the sea		Playfulness		
Learn creature spells from the player as well				
				
Strategy				
We need an enum: MIMIC_STAGE				
	MIMIC_STAGE_NOTICE			
	MIMIC_STAGE_COPY_ACTION			
	MIMIC_STAGE_COPY_DESIRE			
	MIMIC_STAGE_LAST			
				
"We need a MimicState in the creature, including"				
BOOL	IsMimickingFlag			
DETECTED_PLAYER_ACTION	PlayerAction			
GameThingWithPos*	ObjectPlayerActedOn			
MIMIC_STAGE	Stage			
ULONG	NumTimesPerformedActionDuringThisStage			
ULONG	MaxNumTimesToPerformActionDuringThisStage			
				
We need a new enum DETECTED_PLAYER_ACTION corresponding to the table above.				
We need a new table in the spreadsheet:	DETAIL_MIMIC_PLAYER_ACTION_TABLE			
Fields are:	Mimicking Action	NoticingAction	CorrespondingDesire	AverageMaxNumTimesToPerformActionDuringThisStage
				
"Function: SetCreatureIntoStateOfMimicking(DETECTED_PLAYER_ACTION detected_action, GameThingWithPos *object)"				
	assert(IsMimickingFlag==FALSE)			
	IsMimickingFlag=TRUE			
	ObjectPlayerActedOn = object			
	Stage = MIMIC_STAGE_NOTICE			
	NumTimesPerformedActionDuringThisStage=0			
	MaxNumTimesToPerformActionDuringThisStage=CalculateRandomisedNumTimesToPerformThisStage			
				
				
"We need a function, ProcessMimicState(), called in the creature's main Process Loop, or even in ProcessDecision."				
"validate ObjectPlayerActedOn. If to be deleted, IsMimickingFlag = FALSE"				
if(IsMimickingFlag && Mental->Agenda.CurrentPlan.IsValid() == FALSE)				
	if NumTimesPerformedActionDuringThisStage>=MaxNumTimesToPerformActionDuringThisStage			
		Stage++		
		if (Stage<MIMIC_STAGE_LAST)		
			NumTimesPerformedActionDuringThisStage=0
			MaxNumTimesToPerformActionDuringThisStage=CalculateRandomisedNumTimesToPerformThisStage
		else	// Finished!
			IsMimickingFlag=FALSE; 
			return;
	switch(Stage)		
	case MIMIC_STAGE_NOTICE:		
		Force Noticing Action	
	case MIMIC_STAGE_COPY_ACTION:		
		Force Copying Action	
	case MIMIC_STAGE_COPY_DESIRE:		
		ForceDominantDesire	
	NumTimesPerformedActionDuringThisStage++		
			
At the moment we have:	" void GPlayer::MakeCreatureEmpathiseWithPlayer(CREATURE_DESIRES desire, float increase, MapCoords *pos)"		
			
"This should be replaced by GPlayer::ConsiderMakingCreatureMimicPlayer(DETECTED_PLAYER_ACTION detected_action, GameThingWithPos *object_acted_on)"			
			
"Function: ConsiderMakingCreatureMimicPlayer(DETECTED_PLAYER_ACTION detected_action, GameThingWithPos *object_acted_on)"			
if creature is wearing the rope or the creature is especially curious			
if creature can see the object acted on			
if creature is available for reaction and is not currently mimicking the player			
	"then my_creature->SetIntoStateOfMimicking(detected_action, object_acted_on)"		
"Mental->AttitudeToPlayer.PerceivedPlayerDesires.IncreaseDesire(corresponding_desire, increase);"			
			
"This function ConsiderMakingCreatureMimicPlayer must be called in each of the places above, eg: Pot::AddResourceToPos, if the conditions are right."			
			
LearnActionAndConsiderMimickingPlayer should be replaced by LearnAction. MimicPlayer is now done separately.			
GPlayer::MakeCreatureEmpathiseWithPlayer should be removed			
"Consider getting rid of WhatToDoNext function, now it is subsumed by MimicState(although there are other uses, eg: vomitting?)"			
			
Residual Questions / Problems			
Under what circumstances should mimicry kick in?? Only when the creature is on the rope leash??			
Creature needs to know actions before he can use them.			
Creatures should not learn to mimic when they themselves do something..			
Rope should not pull creature away when he is mimicking the player			
"We need to check all the detected player actions can be detected, and are only triggered in the right circumstances."			
			
Player Action	Creature Action	Creature Desire	Detection in the Code
Take object home	Bring something home	BringThingsHome	
Throwing object at enemy creature	Throw at enemy creature	Anger	
Throwing object at other object	Hurl	Anger	
Shepherd	Put animals in pen	Compassion	
Use water spell on crops	Cast water on crops	Compassion	
Put out fire with the water spell	Put out fire with water spell	Compassion	
Stealing object from town outside influence	Steal object	Steal	
Impress with magic	Impress with magic	Impress	
Impress by throwing	Impress by throwing	Impress	
Break rocks	Break rocks	Anger
Throw the football in the goal	Play football / be attacker	To Play
Catch the football	Play football / be defender	To Play
		
		
		
		
		
		
		
		
		
		
		
		
		






























































































