Example Tribes and their recipes: Difference between revisions

From PSwiki
Jump to navigation Jump to search
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:




Tribe Name: "Eagle Gobble Tribe Oja2" , defined with ID 9 in [[TribesTable|tribes table]] , tribal recipe ID 105
== Tribe Name: "Eagle Gobble Tribe Oja2" , ID 9 , tribal recipe ID 105 "Peaceful Gobble Upkeep Tribe" ==
 
tribal recipe 105 "Peaceful Gobble Upkeep Tribe" has this algorithm:
tribal recipe 105 "Peaceful Gobble Upkeep Tribe" has this algorithm:
  brain(GobbleTribesman); aggressivity(neutral); growth(conservatory); unity(organised); sleepPeriod(nocturnal);
  brain(GobbleTribesman); aggressivity(neutral); growth(conservatory); unity(organised); sleepPeriod(nocturnal);
Line 11: Line 10:


[[Tribe Scripting#SleepPeriod|sleepPeriod]]: nocturnal
[[Tribe Scripting#SleepPeriod|sleepPeriod]]: nocturnal
=== Members ===
3 Hunter and 1 Warrior of the Eagle Gobble type.


===Recipes===
===Recipes===
Line 21: Line 23:


Then the engine selects "Peaceful Gobble Tribe Spots" and executes it fully, because it has persistent=0 , it's then removed from the tree.
Then the engine selects "Peaceful Gobble Tribe Spots" and executes it fully, because it has persistent=0 , it's then removed from the tree.
WARNING: this script has '''Serpent''' Gobble Hut spots.


  Peaceful Gobble Upkeep Tribe
  Peaceful Gobble Upkeep Tribe
Line 46: Line 50:
goWork: send 'tribe:work' event, which triggers GoToWork behaviour. GoToWork: goes to the location, plays animation work, waits x seconds, returns home.
goWork: send 'tribe:work' event, which triggers GoToWork behaviour. GoToWork: goes to the location, plays animation work, waits x seconds, returns home.


'''RECIPE: Peaceful Gobble Evolve Tribe.''' 


'''RECIPE: Gobble Build Campfire.'''  contains percept(selection,tribe:build), this one calls Behaviour "GoBuild", which executes  
== Tribe Name: "Peaceful Gobble Tribe" , ID 3 , tribal recipe ID 103 "Peaceful Gobble Tribe" ==
3 members: 1 warrior , 2 hunters Eagle Gobble type.
 
location: /teleport me map hydlaa_plaza 164194.14 -437924.8 10323.0
 
 
Starting with no assets and no resources, they start to gather fish, until they reach 10 fishes. Then they build a campfire.
 
'''RECIPE:''' Then the engine selects "Peaceful Gobble Tribe Spots" and executes it fully, because it has persistent=0 , it's then removed from the tree.
 
'''WARNING:''' this script has '''Serpent''' Gobble Hut spots.
 
'''RECIPE:''' '''"Peaceful Gobble Tribe"''' has "Peaceful Gobble Evolve Tribe" as algorithm.
 
'''RECIPE: "Peaceful Gobble Evolve Tribe"''' contains "Gobble Build Campfire" as requirement. 
 
'''RECIPE: Gobble Build Campfire.'''  contains
 
locateBuildingSpot(Campfire) : searches the campfire location in the current assets, spot must be status=1 (NOT USED). Then set it as INCONSTRUCTION to avoid other members to use the same one.
 
percept(selection,tribe:build), this one calls Behaviour "GoBuild", which executes  
  <build pickupable="false" />
  <build pickupable="false" />
build uses the wait time item previously loaded in variables.

Latest revision as of 17:16, 1 October 2023


Tribe Name: "Eagle Gobble Tribe Oja2" , ID 9 , tribal recipe ID 105 "Peaceful Gobble Upkeep Tribe"

tribal recipe 105 "Peaceful Gobble Upkeep Tribe" has this algorithm:

brain(GobbleTribesman); aggressivity(neutral); growth(conservatory); unity(organised); sleepPeriod(nocturnal);
loadRecipe(Do Nothing); loadRecipe(Gobble Upkeep); loadRecipe(Warrior Patrol Home); loadRecipe(Peaceful Gobble Tribe Spots);

brain: GobbleTribesman is associated to each member of the tribe, and defines some basic behaviours like: peace_meet, tribesman_attacked, Explore, HuntResource, Breed, GoBuild, ...

aggressivity: neutral

sleepPeriod: nocturnal

Members

3 Hunter and 1 Warrior of the Eagle Gobble type.

Recipes

Initially the engine loads all recipe and the structure looks like this:

Peaceful Gobble Upkeep Tribe
  Do Nothing
  Gobble Upkeep
  Warrior Patrol Home
  Peaceful Gobble Tribe Spots

Then the engine selects "Peaceful Gobble Tribe Spots" and executes it fully, because it has persistent=0 , it's then removed from the tree.

WARNING: this script has Serpent Gobble Hut spots.

Peaceful Gobble Upkeep Tribe
  Do Nothing
  Gobble Upkeep
  Warrior Patrol Home

Then the engine selects "Warrior Patrol Home" and executes it, it's persistent=1, so it stays in the list.

Then the engine selects "Gobble Upkeep" and executes it, it's persistent=1, so it stays in the list. it adds one new recipe "Hunter Hunt Resource", which is executed and removed immediately.

Peaceful Gobble Upkeep Tribe
  Do Nothing
  Gobble Upkeep
    Hunter Hunt Resource
  Warrior Patrol Home

Then the engine selects "Do Nothing" and executes it, it's persistent=1, so it stays in the list.


RECIPE: Gobble Upkeep

select(Hunter,1); locateBuildingSpot(Campfire); goWork(60); alterResource($REPRODUCTION_RESOURCE,0); wait(60.0);

locateBuildingSpot: searches a reserved spot in the tribe home location

goWork: send 'tribe:work' event, which triggers GoToWork behaviour. GoToWork: goes to the location, plays animation work, waits x seconds, returns home.


Tribe Name: "Peaceful Gobble Tribe" , ID 3 , tribal recipe ID 103 "Peaceful Gobble Tribe"

3 members: 1 warrior , 2 hunters Eagle Gobble type.

location: /teleport me map hydlaa_plaza 164194.14 -437924.8 10323.0


Starting with no assets and no resources, they start to gather fish, until they reach 10 fishes. Then they build a campfire.

RECIPE: Then the engine selects "Peaceful Gobble Tribe Spots" and executes it fully, because it has persistent=0 , it's then removed from the tree.

WARNING: this script has Serpent Gobble Hut spots.

RECIPE: "Peaceful Gobble Tribe" has "Peaceful Gobble Evolve Tribe" as algorithm.

RECIPE: "Peaceful Gobble Evolve Tribe" contains "Gobble Build Campfire" as requirement.

RECIPE: Gobble Build Campfire. contains

locateBuildingSpot(Campfire) : searches the campfire location in the current assets, spot must be status=1 (NOT USED). Then set it as INCONSTRUCTION to avoid other members to use the same one.

percept(selection,tribe:build), this one calls Behaviour "GoBuild", which executes

<build pickupable="false" />

build uses the wait time item previously loaded in variables.