Size: 2131
Comment:
|
Size: 4715
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
| ## page was renamed from Object CityResource The City Resource objects can reference details about the various resources of city the script is run in. |
Line 3: | Line 4: |
m_city.cityManager.resource.iron.workPeople | '''City resource objects can be referenced as:''' |
Line 5: | Line 6: |
m_city.cityManager.resource.stone.workPeople | . ''m_city.cityManager.resource.property '''or''' city.resource.property'' |
Line 7: | Line 8: |
m_city.cityManager.resource.wood.workPeople | The .property at the end is how you will specify which detail you are referencing. Using the table below, you can for example get the loyalty of the city with ''city.resource.support''. |
Line 9: | Line 10: |
m_city.cityManager.resource.maxPopulation | '''Properties''' ||<tablewidth="796px" tableheight="123px"#cccccc>'''Property ''' ||<#cccccc>'''Type''' ||<#cccccc>'''Description ''' || ||maxPopulation ||int ||Returns the maximum population possible in the city based on cottage levels. || ||curPopulation ||int ||Returns the current population in the city. || ||workPeople ||int ||Returns the total number of the city's population assigned to the labor force. || ||support ||int ||Returns the city's loyalty. || ||complaint ||int ||Returns the city's grievance. || ||troopCostFood ||int ||Returns the city's upkeep based on troops. || ||taxIncome ||int ||Returns the amount of gold gained per hour based on the tax rate. || ||gold ||int ||Returns the amount of gold in the city. || ||food ||int ||Returns the amount of food in the city. || ||wood ||int ||Returns the amount of wood in the city. || ||stone ||int ||Returns the amount of stone in the city. || ||iron ||int ||Returns the amount of iron in the city. || |
Line 11: | Line 25: |
m_city.cityManager.resource.workPeople | <<BR>><<BR>> The following city resource objects are available for each type of in-game resource. For example, you can reference the amount of workers assigned to iron production with ''city.resource.iron.workPeople''. <<BR>> Each of the following should be used in the format city.resource.xxx.property, for example: ''city.resource.food.amount''. <<BR>> Available in-game resource types here would be food, wood, stone, and iron. |
Line 13: | Line 30: |
m_city.cityManager.resource.support | ||<tablewidth="796px" tableheight="123px"#cccccc>'''Property ''' ||<#cccccc>'''Type''' ||<#cccccc>'''Description ''' || ||xxx.workPeople ||int ||Returns the amount of the city's population assigned to the labor force for this particular resource, ie - ''city.resource.food.workPeople'' returns population assigned to farm production. || ||xxx.increaseRate ||int ||Returns the amount per hour of the city's gain in this particular resource, ie - ''city.resource.food.increaseRate'' returns food income per hour, before upkeep is deducted. || ||xxx.storeRercent ||int ||Returns the amount of this particular resource that is stored in the warehouse, ie - ''city.resource.food.storeRercent'' returns the % of food saved by the warehouse if one exists. These all default to 25% unless changed via warehousepolicy. Yes there is a typo in the name, it's Rercent not Percent. || ||xxx.amount ||int ||Returns the amount of this particular resource in the city, ie - ''city.resource.iron.amount'' returns how much iron the city has. || ||xxx.max ||int ||Returns the maximum production capacity for this particular resource in the city, ie - ''city.resource.iron.max'' returns how much iron the city can have before production will stop. || |
Line 15: | Line 37: |
m_city.cityManager.resource.food | <<BR>><<BR>> The following city resource objects are also available for each type of in-game resource, but do not use the same format to reference them. <<BR>> The following should be used as ''m_city.cityManager.property.xxx '''or''' city.property.xxx'', for example to reference the amount of reserved food in the city, you would use ''city.reservedResource.food''. <<BR>> Available in-game resource types here would be gold, food, wood, stone, and iron. |
Line 17: | Line 42: |
m_city.cityManager.resource.food.amount m_city.cityManager.resource.food.increaseRate m_city.cityManager.resource.food.max m_city.cityManager.resource.food.storeRercent m_city.cityManager.resource.troopCostFood m_city.cityManager.resource.gold m_city.cityManager.resource.taxIncome m_city.cityManager.resource.iron m_city.cityManager.resource.iron.amount m_city.cityManager.resource.iron.increaseRate m_city.cityManager.resource.iron.max m_city.cityManager.resource.iron.storeRercent m_city.cityManager.resource.stone m_city.cityManager.resource.stone.amount m_city.cityManager.resource.stone.increaseRate m_city.cityManager.resource.stone.max m_city.cityManager.resource.stone.storeRercent m_city.cityManager.resource.wood m_city.cityManager.resource.wood.amount m_city.cityManager.resource.wood.increaseRate m_city.cityManager.resource.wood.max m_city.cityManager.resource.wood.storeRercent m_city.cityManager.castle.resource.support m_city.cityManager.castle.resource.troopCostFood m_city.cityManager.castle.resource.workPeople m_city.cityManager.castle.resource.herosSalary m_city.cityManager.castle.resource.maxPopulation m_city.cityManager.castle.resource.populationDirection m_city.cityManager.castle.resource.gold m_city.cityManager.castle.resource.curPopulation m_city.cityManager.castle.resource.complaint m_city.cityManager.castle.resource.taxIncome m_city.cityManager.estResource.gold m_city.cityManager.estResource.food m_city.cityManager.estResource.wood m_city.cityManager.estResource.stone m_city.cityManager.estResource.iron m_city.cityManager.!ResourceProduction.food m_city.cityManager.!ResourceProduction.wood m_city.cityManager.!ResourceProduction.stone |
||<tablewidth="796px" tableheight="123px"#cccccc>'''Property ''' ||<#cccccc>'''Type''' ||<#cccccc>'''Description ''' || ||estResource.xxx ||int ||Returns the estimated amount of this particular resource, ie - ''city.estResource.wood'' would return the estimated wood amount in the city. Estimated resources are what the bot thinks it should have based on income and use, and may vary slightly from the actual amount the server thinks it has. The bot updates the actual amount with the server the same as the Evony client does, on a delay. || ||!ResourceProduction.xxx ||int ||Returns the percentage amount of labor force assigned to this particular resource, ie - ''city.!ResourceProduction.wood'' would return 100 when you have 100% possible assigned to it. Since gold is not produced by labor force, it is not valid as a resource here. || ||reservedResource.xxx ||int ||Returns the amount of this particular resource that is reserved for upkeep, etc. For example ''city.reservedResource.gold'' would return the amount of gold needed in that city for hero salary for 24 hours. || |
Line 98: | Line 48: |
CategoryVariables | [[ObjectCity|City]] |
The City Resource objects can reference details about the various resources of city the script is run in.
City resource objects can be referenced as:
m_city.cityManager.resource.property or city.resource.property
The .property at the end is how you will specify which detail you are referencing. Using the table below, you can for example get the loyalty of the city with city.resource.support.
Properties
Property |
Type |
Description |
maxPopulation |
int |
Returns the maximum population possible in the city based on cottage levels. |
curPopulation |
int |
Returns the current population in the city. |
workPeople |
int |
Returns the total number of the city's population assigned to the labor force. |
support |
int |
Returns the city's loyalty. |
complaint |
int |
Returns the city's grievance. |
troopCostFood |
int |
Returns the city's upkeep based on troops. |
taxIncome |
int |
Returns the amount of gold gained per hour based on the tax rate. |
gold |
int |
Returns the amount of gold in the city. |
food |
int |
Returns the amount of food in the city. |
wood |
int |
Returns the amount of wood in the city. |
stone |
int |
Returns the amount of stone in the city. |
iron |
int |
Returns the amount of iron in the city. |
The following city resource objects are available for each type of in-game resource. For example, you can reference the amount of workers assigned to iron production with city.resource.iron.workPeople.
Each of the following should be used in the format city.resource.xxx.property, for example: city.resource.food.amount.
Available in-game resource types here would be food, wood, stone, and iron.
Property |
Type |
Description |
xxx.workPeople |
int |
Returns the amount of the city's population assigned to the labor force for this particular resource, ie - city.resource.food.workPeople returns population assigned to farm production. |
xxx.increaseRate |
int |
Returns the amount per hour of the city's gain in this particular resource, ie - city.resource.food.increaseRate returns food income per hour, before upkeep is deducted. |
xxx.storeRercent |
int |
Returns the amount of this particular resource that is stored in the warehouse, ie - city.resource.food.storeRercent returns the % of food saved by the warehouse if one exists. These all default to 25% unless changed via warehousepolicy. Yes there is a typo in the name, it's Rercent not Percent. |
xxx.amount |
int |
Returns the amount of this particular resource in the city, ie - city.resource.iron.amount returns how much iron the city has. |
xxx.max |
int |
Returns the maximum production capacity for this particular resource in the city, ie - city.resource.iron.max returns how much iron the city can have before production will stop. |
The following city resource objects are also available for each type of in-game resource, but do not use the same format to reference them.
The following should be used as m_city.cityManager.property.xxx or city.property.xxx, for example to reference the amount of reserved food in the city, you would use city.reservedResource.food.
Available in-game resource types here would be gold, food, wood, stone, and iron.
Property |
Type |
Description |
estResource.xxx |
int |
Returns the estimated amount of this particular resource, ie - city.estResource.wood would return the estimated wood amount in the city. Estimated resources are what the bot thinks it should have based on income and use, and may vary slightly from the actual amount the server thinks it has. The bot updates the actual amount with the server the same as the Evony client does, on a delay. |
ResourceProduction.xxx |
int |
Returns the percentage amount of labor force assigned to this particular resource, ie - city.ResourceProduction.wood would return 100 when you have 100% possible assigned to it. Since gold is not produced by labor force, it is not valid as a resource here. |
reservedResource.xxx |
int |
Returns the amount of this particular resource that is reserved for upkeep, etc. For example city.reservedResource.gold would return the amount of gold needed in that city for hero salary for 24 hours. |