![]() |
#2
|
||||
|
||||
![]()
Le plus lourd des documents
************************************************** *********** Scopes Several triggers and commands can change the current scope. Whenever the scope is changed, every trigger from there on will refer to the country or province changed to. Some triggers accept a THIS as an argument, which refers to the country or province that received the event ally Scope: country Syntax: ally = { triggers… } From country to country. Picks a random ally. owner Scope: province Syntax: owner = { triggers… } From province to country. controller Scope: province Syntax: controller = { triggers… } From province to country. Emperor Scope: country Syntax: emperor = { triggers… } From country to emperor. capital_scope Scope: country Syntax: capital_scope = { triggers… } From country to capital. <num> Scope: province Syntax: <num> = { triggers… } To a specific province. <tag> Scope: country Syntax: <tag> = { triggers… } To a specific country. any_neighbor_province Scope: province Syntax: any_neighbor_province = { triggers… } To any neighbouring province. any_neighbor_country Scope: country Syntax: any_neighbor_country = { triggers… } To any neighbouring country. ************************************************** *********** Triggers and boolean container trigger. or boolean container trigger. not boolean container trigger. year Scope: <none> Syntax: year = x Returns true if x is the current year or an earlier year. month Scope: <none> Syntax: month = x Returns true if x is the current month or an earlier month treasury Scope: country Syntax: treasury = x Returns true if the treasury contains x or more gold. prestige Scope: country Syntax: prestige = x Returns true if the current country has x or more prestige. luck Scope: country Syntax: luck = yes/no Returns true if the current country is one of the lucky countries. wartax Scope: country Syntax: wartax = yes/no Returns true if the country is raising war taxes. war Scope: country Syntax: war = yes/no Returns true if the current country is at war. inflation Scope: country Syntax: inflation = x Returns true if the current country’s inflation value is x or above x. stability Scope: country Syntax: stability = x Returns true if the current stability value is equal to x or above x. war_exhaustion Scope: country Syntax: war_exhaustion = x Returns true if the country’s war exhaustion is equal to x or above x. blockade Scope: country Syntax: blockade = x Returns true if the blockade percentage is equal to x or above x. manpower Scope: country Syntax: manpower = x Returns true if the country has a manpower value equal to x or higher than x. max_manpower Scope: country Syntax: max_manpower = x Returns true if the country’s maximum manpower is equal to x or higher than x. manpower_percentage Scope: country Syntax: manpower_percentage = x Returns true if the country has a manpower percentage of x or above x. number_of_loans Scope: country Syntax: number_of_loans = x Returns true if the country has x number of loans or more than x loans. num_of_monopolys Scope: country Syntax: num_of_monopolys = x Returns true if the country has x monopolies or more than x monopolies. num_of_cots Scope: country Syntax: num_of_cots = x Returns true if the country has x number of Center of Trades or more than x Center of Trades. is_bankrupt Scope: country Syntax: is_bankrupt = yes/no Returns true if the country is bankrupt. land_maintenance Scope: country Syntax: land_maintenance = x Returns true if the country has a land maintenance value of x or higher. naval_maintenance Scope: country Syntax: naval_maintenance = x Returns true if the country has a naval maintenance value of x or higher. army_tradition Scope: country Syntax: army_tradition = x Returns true if the country has an army tradition value of x or higher. navy_tradition Scope: country Syntax: navy_tradition = x Returns true if the country has a naval tradition value of x or higher. badboy Scope: country Syntax: badboy = x Returns true if the country has a badboy (reputation) value of x or higher. production_efficiency Scope: country Syntax: production_efficiency = x Returns true if the country has a production efficiency of x or higher. trade_efficiency Scope: country Syntax: trade_efficiency = x Returns true if the country has a trade efficiency of x or higher. owns Scope: country Syntax: owns = province number Returns true if the country owns the specified province. controls Scope: country Syntax: controls = province number Returns true if the country controls the specified province. is_core Scope: country Syntax: is_core = province number/this Returns true if the specified province is a core of the current country. By using this you can test if another province is a core of the same country as the current province. For example : any_neighbor_province = { is_core = this } has_discovered Scope: country Syntax: has_discovered = continent Returns true if the current country has discovered the specified continent. is_emperor Scope: country Syntax: is_emperor = yes/no Returns true if the current country is the home of the emperor. elector Scope: country Syntax: elector = yes/no Returns true if the current country is one of the elector states. num_of_revolts Scope: country Syntax: num_of_revolts = x Returns true if there are x or more revolts in the country. revolt_percentage Scope: country Syntax: revolt_percentage = x Returns true if the percentage of revolts in the country are x or higher. num_of_cities Scope: country Syntax: num_of_cities = x Returns true if the country has x or more cities. num_of_ports Scope: country Syntax: num_of_ports = x Returns true if the country has x or more ports. general Scope: country Syntax: general = x Returns true if the country has x or more generals. admiral Scope: country Syntax: admiral = x Returns true if the country has x or more admirals. conquistador Scope: country Syntax: conquistador = x Returns true if the country has x or more conquistadors. explorer Scope: country Syntax: explorer = x Returns true if the country has x or more explorers. is_monarch_leader Scope: country Syntax: is_monarch_leader = yes/no Returns true if the current monarch also is a leader. defender_of_faith Scope: country Syntax: defender_of_faith = yes/no Returns true if the country is the defender of faith. num_of_trade_agreements Scope: country Syntax: num_of_trade_agreements = x Returns true if the number of trade agreements the country has is x or more. num_of_trade_embargos Scope: country Syntax: num_of_trade_embargoes = x Returns true if the number of trade embargoes the country has is x or more. num_of_allies Scope: country Syntax: num_of_allies = x Returns true if the number of allies the country has is x or more. num_of_royal_marriages Scope: country Syntax: num_of_royal_marriages = x Returns true if the number of royal marriages a country has is x or more. num_of_vassals Scope: country Syntax: num_of_vassals = x Returns true if the number of vassals a country has is x or more. num_of_unions Scope: country Syntax: num_of_unions = x Returns true if the number of unions a country has is x or more. ADM Scope: country Syntax: adm = x Returns true if the current monarch has an administrative skill value equal to x or higher. DIP Scope: country Syntax: dip = x Returns true if the current monarch has a diplomatic skill value equal to x or higher. MIL Scope: country Syntax: mil = x Returns true if the current monarch has a military skill value equal to x or higher. port Scope: province Syntax: port = yes/no Returns true if the current province has a port. cot Scope: province Syntax: cot = yes/no Returns true if the current province has a Center of Trade. owned_by Scope: province Syntax: owned_by = tag/this Returns true if the specified country owns the current province. If this is used the scope has to be changed so that the target nation can be compared to the country that received the event. culture_group Scope: country Syntax: culture_group = culture group name/this Returns true if the country in the current scope belongs to the same culture-group. If this is used as culture-type the scope has to be changed so that the target nation can be compared to the country that received the event. primary_culture Scope: country Syntax: primary_culture = culture name/this Returns true if the country in the current scope has the specified culture. If this is used as culture-type the scope has to be changed so that the target nation can be compared to the country that received the event. accepted_culture Scope: country Syntax: accepted_culture = culture name/this Returns true if the country in the current scope accepts the specified culture. If this is used as the culture-type the scope has to be changed so that the target nation can be compared to the country that received the event. religion Scope: country/province Syntax: religion = religion name/this Returns true if the country/province in the current scope follows the same religion. If this is used as the religion-type the scope has to be changed so that the target nation can be compared to the country that received the event. religion_group Scope: country Syntax: religion_group = religion group name/this Returns true if the country in the current scope belongs to the same religion-group. If this is used as the religion-type the scope has to be changed so that the target nation can be compared to the country that received the event. is_religion_enabled Scope: <none> Syntax: is_religion_enabled = religion type (ex. protestant) Returns true if that particular religion type has been enabled. government Scope: country Syntax: government = government type Returns true if the country has the specified government type. advisor Scope: country Syntax: advisor = advisor type Returns true if country has hired an advisor of the specified advisor type. infantry Scope: country Syntax: infantry = x Returns true if the country has x or more infantry. cavalry Scope: country Syntax: cavalry = x Returns true if the country has x or more cavalry. artillery Scope: country Syntax: artillery = x Returns true if the country has x or more artillery. big_ship Scope: country Syntax: big_ship = x Returns true if the country has x or more big ships. light_ship Scope: country Syntax: light_ship = x Returns true if the country has x or more light ships. galley Scope: country Syntax: galley = x Returns true if the country has x or more galleys. transport Scope: country Syntax: transport = x Returns true if the country has x or more transport ships. infantry_fraction Scope: country Syntax: infantry_fraction = x Returns true if the country has an infantry fraction of x or higher. cavalry_fraction Scope: country Syntax: cavalry_fraction = x Returns true if the country has a cavalry fraction of x or higher. artillery_fraction Scope: country Syntax: artillery_fraction = x Returns true if the country has an artillery fraction of x or higher. big_ship_fraction Scope: country Syntax: big_ship_fraction = x Returns true if the country has a big ship fraction of x or higher. light_ship_fraction Scope: country Syntax: light_ship_fraction = x Returns true if the country has a light ship fraction of x or higher. galley_fraction Scope: country Syntax: galley_fraction = x Returns true if the country has a galley fraction of x or higher. transport_fraction Scope: country Syntax: transport_fraction = x Returns true if the country has a transport fraction of x or higher. idea Scope: country Syntax: idea = name of idea Returns true if the country has embraced the specified idea. exists Scope: <none> Syntax: exists = country tag Returns true if the specified country exists. relation Scope: country Syntax: relation = { who = tag/this value = y } Returns true if the specified country has a relation value of y or higher. If this is used the scope has to be changed so that the target nation can be compared to the country that received the event. technology_group Scope: country Syntax: technology_group = technology group name Returns true if the country has the specified technology group. is_colony Scope: province Syntax: is_colony = yes/no Returns true if the current province is a colony. has_country_flag Scope: country Syntax: has_country_flag = flag name Returns true if the current country has the specified country flag (added by a previous event or set in one of the history files). has_province_flag Scope: province Syntax: has_province_flag = flag name Returns true if the current province has the specified province flag (added by a previous event). has_country_modifier Scope: country Syntax: has_country_modifier = modifer name Returns true if the current country has the specified country modifier (added by a previous event). has_province_modifier Scope: province Syntax: has_province_modifier = modifer name Returns true if the current province has the specified province modifier (added by a previous event). continent Scope: province Syntax: continent = name of continent Returns true if the current province belongs to the specified continent. num_of_electors Scope: country Syntax: num_of_electors = x Returns true if there are currently x electors or more. native_size Scope: province Syntax: native_size = x Returns true if the native size of a province is equal to x or higher. native_ferocity Scope: province Syntax: native_ferocity = x Returns true if the native ferocity value is equal to x or higher. native_hostileness Scope: province Syntax: native_hostileness = x Returns true if the native hostileness value is equal to x or higher. citysize Scope: province Syntax: citysize = x Returns true if the city size in a province is equal to x or higher. hre Scope: province Syntax: hre = yes/no Returns true if the province belongs to the Holy Roman Empire. casus_belli Scope: country Syntax: casus_belli = country tag Returns true if the current country has a casus belli on the specified country. has_building Scope: province Syntax: has_building = building type Returns true if the province has the specified building. trade_goods Scope: province Syntax: trade_goods = trade goods type Returns true if the province’s trade goods match the specified trade goods type. diplomats Scope: country Syntax: diplomats = x Returns true if the current country has x or more diplomats available. spies Scope: country Syntax: spies = x Returns true if the current country has x or more spies available. missionaries Scope: country Syntax: missionaries = x Returns true if the current country has x or more missionaries available. colonists Scope: country Syntax: colonists = x Returns true if the current country has x or more colonists available. merchants Scope: country Syntax: merchants = x Returns true if the current country has x or more merchants available. total_ideas Scope: country Syntax: total_ideas = x Returns true if the current country has x or more ideas in total. free_ideas Scope: country Syntax: free_ideas = x Returns true if the current country has x or more free slots for ideas. monthly_income Scope: country Syntax: monthly_income = x Returns true if the current country has a monthly income of x or more. tag Scope: country Syntax: tag = country tag Returns true if the current country has a country tag that matches the specified tag. knows_country Scope: country Syntax: knows_country = country tag Returns true if the current country has discovered the specified country’s capital. neighbour Scope: country Syntax: neighbour = country tag Returns true if the current country is a neighbour to the specified country. regency Scope: country Syntax: regency = yes/no Returns true if the current country is ruled by a regency. units_in_province Scope: province Syntax: units_in_province = x Returns true if there are x or more units in the current province. infantry_in_province Scope: province Syntax: infantry_in_province = x Returns true if there are x or more infantry units in the current province. galleys_in_province Scope: province Syntax: galleys_in_province = x Returns true if there are x or more galleys in the current province. war_with Scope: country Syntax: war_with = country tag Returns true if the current country is at war with the specified country. unit_in_battle Scope: country Syntax: unit_in_battle = yes/no Returns true if the country has any unit that is fighting a battle. unit_in_siege Scope: country Syntax: unit_in_siege = yes/no Returns true if the country has any unit that is taking part in a siege. unit_has_leader Scope: country Syntax: unit_has_leader = yes/no Returns true if any unit in the current country has a leader. is_papal_controller Scope: country Syntax: is_papal_controller = yes/no Returns true if the current country is the papal controller. num_of_religion Scope: country Syntax: num_of_religion = { religion = religion type value = x } Returns true if the there are x or more followers of the specified religion type. <policiesname> Scope: country Syntax: policy name = x Returns true if the country’s specified policy slider has a value of x or higher. (policy name =aristocracy_plutocracy/centralization_decentralization/ innovative_narrowminded/mercantilism_freetrade/offensive_defensive/land_naval/ quality_quantity/serfdom_freesubjects) <tech_table> Scope: country Syntax: technology name = x Returns true if the amount of money invested in the specified technology is equal to x or higher. (technology name = land_tech/naval_tech/trade_tech/production_tech/government_tech) <buildingname> Scope: country Syntax: building name = x Returns true if the current country has x or more buildings of the specified building type. <tradegoods> Scope: country Syntax: trade goods name = x Returns true if the current country owns x or more provinces with the specified trade goods type. <religion> Scope: country Syntax: religion name = x Returns true if the current country has a tolerance equal to x or higher for the specified religion type. <advisor> Scope: country Syntax: advisor type = x Returns true if the current country has an advisor with a skill value equal to x or higher. ************************************************** **************************************** class CContinentTrigger : public CTrigger {public: virtual void Assign( CToken token ); virtual bool Evaluate(CEventScope &scope); protected: const CContinent* _pContinent; }; class CAnyNeighborCountryTrigger : public CAndTrigger {public: virtual bool Evaluate(CEventScope &scope); protected: }; class CNumOfElectorsTrigger : public CIntTrigger {public: virtual bool Evaluate(CEventScope &scope); }; class CNativeSizeTrigger : public CIntTrigger {public: virtual bool Evaluate(CEventScope &scope); }; class CNativeFerocityTrigger : public CIntTrigger {public: virtual bool Evaluate(CEventScope &scope); }; class CNativeHostilenessTrigger : public CIntTrigger {public: virtual bool Evaluate(CEventScope &scope); }; class CCitySizeTrigger : public CIntTrigger {public: virtual bool Evaluate(CEventScope &scope); }; class CHRETrigger : public CBoolTrigger {public: virtual bool Evaluate(CEventScope &scope); }; class CCasusBelliTrigger : public CTrigger {public: CCasusBelliTrigger(); virtual void Assign( CToken token ); virtual bool Evaluate(CEventScope &scope); protected: CCountryTag _Tag; }; class CAdvisorSkillTrigger : public CIntTrigger {public: CAdvisorSkillTrigger( const CAdvisorType* pType ); virtual bool Evaluate(CEventScope &scope); protected: const CAdvisorType* _pAdvisorType; }; class CTradeGoodsCountTrigger : public CIntTrigger {public: CTradeGoodsCountTrigger( const CTradeGoods* pTradeGoods ); virtual bool Evaluate(CEventScope &scope); protected: const CTradeGoods* _pTradeGoods; }; class CDiplomatsTrigger : public CIntTrigger {public: virtual bool Evaluate(CEventScope &scope); }; class CSpiesTrigger : public CIntTrigger {public: virtual bool Evaluate(CEventScope &scope); }; class CMissionariesTrigger : public CIntTrigger {public: virtual bool Evaluate(CEventScope &scope); }; class CColonistsTrigger : public CIntTrigger {public: virtual bool Evaluate(CEventScope &scope); }; class CMerchantsTrigger : public CIntTrigger {public: virtual bool Evaluate(CEventScope &scope); }; class CTotalIdeasTrigger : public CIntTrigger {public: virtual bool Evaluate(CEventScope &scope); }; class CFreeIdeasTrigger : public CIntTrigger {public: virtual bool Evaluate(CEventScope &scope); }; class CMonthlyIncomeTrigger : public CValueTrigger {public: virtual bool Evaluate(CEventScope &scope); }; class CTagTrigger : public CTrigger {public: CTagTrigger(); virtual void Assign( CToken token ); virtual bool Evaluate(CEventScope &scope); protected: CCountryTag _Tag; }; class CKnowsCountryTrigger : public CTrigger {public: CKnowsCountryTrigger(); virtual void Assign( CToken token ); virtual bool Evaluate(CEventScope &scope); protected: CCountryTag _Tag; };
__________________
Un Worms peut en cachez un autre |
|
|