64 LOG_ERROR,
"Too long ruleset summary. It can be only %d bytes long. "
65 "Put longer explanations to ruleset description.",
172 switch (
preq->source.kind) {
178 const struct impr_type *pimprove =
preq->source.value.building;
182 "%s: World-ranged requirement not supported for "
183 "%s (only great wonders supported)",
list_for,
188 "%s: %s-ranged requirement not supported for "
189 "%s (only wonders supported)",
list_for,
201 "%s: MinCalFrag requirement used in ruleset without "
206 "%s: MinCalFrag requirement %d out of range (max %d in "
207 "this ruleset)",
list_for,
preq->source.value.mincalfrag,
225 "%s: ServerSetting requirement %s isn't visible enough "
226 "to appear in a requirement. Everyone should be able to "
227 "see the value of a server setting that appears in a "
236 "%s: ServerSetting requirement setting %s isn't about a "
284 switch (
preq->source.kind) {
288 "%s: Requirement list has multiple local-ranged extra "
289 "requirements (did you mean to make them tile-ranged?)",
302 switch (
preq->source.kind) {
306 "%s: Requirement list has both tile terrain and terrainclass requirement",
314 "%s: Requirement list has both tile terrain and terrainclass requirement",
323 "%s: Requirement list has duplicate %s requirement at Tile range",
333 if (
rc > 1 &&
preq->present) {
335 switch (
preq->source.kind) {
362 "%s: Requirement list has multiple %s requirements",
371 "%s: Requirement list has more %s requirements than "
381 "%s: Requirement list has more %s requirements than "
392 "%s: Requirement list has more %s requirements than "
403 "%s: Requirement list has more %s requirements than "
564 "The effect Action_Success_Target_Move_Cost has the"
565 " requirement {%s} but the action %s isn't"
566 " (single) unit targeted.",
580 "The effect Action_Success_Actor_Move_Cost has the"
581 " requirement {%s} but the action %s isn't"
582 " performed by a unit.",
598 "The effect %s has the"
599 " requirement {%s} but the action %s doesn't"
600 " roll the dice to see if it fails.",
614 "Effects have conflicting or invalid requirements!");
653 "Barbarian boat (%s) needs to be able to move at sea.",
665 if (
ptype->transport_capacity <= 1) {
667 "Barbarian boat %s has no capacity for both "
668 "leader and at least one man.",
679 "Barbarian boat %s cannot transport "
680 "barbarian cargo %s.",
731 "Ferryboat (%s) needs to be able to move at sea.",
740 "Inspire_Partisans effect present, but no units with partisan role.");
757 "Gold producing improvement %s with genus other than \"Convert\"",
765 "Disasterproof improvement %s with genus other than \"Improvement\"",
778 "Space part %s with genus other than \"Special\"",
785 "%s is a nonsellable building with a nonzero upkeep value",
832 "Boolean effect %s can get disabled, but it can't get "
867 "Cost based free tech method, but tech cost style "
868 "\"Civ I|II\" so all techs cost the same.");
896 "Tech \"%s\" requires itself indirectly via \"%s\".",
910 "Tech \"%s\" requires a tech in its research_reqs."
911 " This isn't supported yet. Please keep using req1"
912 " and req2 like before.",
925 "Tech \"%s\" has the requirement %s in its"
926 " research_reqs. This requirement may change during"
927 " the game. Changing requirements aren't supported"
939 "Tech \"%s\" bonus message is not format with %%s for a bonus tech name.",
948 "The government form %s reserved for revolution handling has been set as "
949 "default_government.",
967 "Tech %s does not exist, but is initial "
968 "tech for everyone.",
975 "Tech %s is initial for everyone, but %s has "
976 "no root_req for it.",
992 "Tech %s does not exist, but is tech for %s.",
1000 "Tech %s is initial for %s, but they have "
1001 "no root_req for it.",
1010 && pnation->init_buildings[0] !=
B_LAST) {
1012 "Barbarian nation %s has init_buildings set but will "
1018 "The government form %s reserved for revolution handling has been set as "
1019 "initial government for %s.",
1037 "There seems to be obsoleted_by loop in update "
1054 "The unit type '%s' has the 'Spy' unit type flag but "
1055 "not the 'Diplomat' unit type flag.",
1063 if (
putype->paratroopers_range < 0
1067 "The paratroopers_range of the unit type '%s' is %d. "
1068 "That is out of range. Max range is %d.",
1077 "Unit type '%s' would build size %d cities. "
1078 "City sizes must be from 1 to %d.",
1086 els.logger = logger;
1097 "There is no base %s effect.",
1116 "There is no base %s effect.",
ename);
1133 "Disasters have conflicting or invalid requirements!");
1143 "Goods have conflicting or invalid requirements!");
1153 _(
"Buildings have conflicting or invalid requirements!"));
1159 _(
"Buildings have conflicting or invalid obsolescence req!"));
1169 "Governments have conflicting or invalid requirements!");
1179 "Specialists have conflicting or invalid requirements!");
1189 "Extras have conflicting or invalid requirements!");
1195 "Extras have conflicting or invalid removal requirements!");
1199 && !(pextra->rmcauses
1202 "Requirements for extra removal defined but not "
1203 "a valid remove cause!");
1219 "Road '%s' integrates with '%s' but not vice versa!",
1232 "City styles have conflicting or invalid requirements!");
1248 if (
paction->min_distance < 0) {
1256 "Action %s: min distance (%d) larger than "
1257 "any distance on a map can be (%d).",
1265 "Action %s: max distance is %d. "
1266 "A map can't be that big.",
1273 "Action %s: min distance is %d but max distance is %d.",
1287 "The action %s can't block %s.",
1296 "Action Enabler Actor Reqs")
1298 "Action Enabler Target Reqs")) {
1300 "Action enabler for %s has conflicting or invalid "
1312 "An action enabler for %s has a target "
1313 "requirement vector. %s doesn't have a target.",
1329 "Action enabler for %s has a local DiplRel "
1330 "requirement %s in target_reqs! Please read the "
1331 "section \"Requirement vector rules\" in "
1332 "doc/README.actions",
1386 "diplchance_initial_odds: \"%s\" not supported.",
1394 "%s both enters and frightens a hut at the same time.",
1429 "There's no basic city style for nation style %s",
1439 "Music Styles have conflicting or invalid requirements!");
1448 "%s has %s as animal to appear, but it's not native to the terrain.",
1458 "%s has %s as a resource, but it's not a resource extra.",
1489 "Unit class %s cannot exist anywhere.",
1499 "Achievement %s has no message for consecutive gainers though "
1500 "it's possible to be gained by multiple players",
1515 "There's nation %s listed in embedded nations, but there's "
1550 if (!
BV_ISSET(pextra->conflicts, idx)) {
1551 log_debug(
"Autoconflicting resource %s with %s",
1645 log_normal(
_(
"Disabling 'barbarians' setting for lack of suitable "
const char * achievement_rule_name(struct achievement *pach)
#define achievements_re_active_iterate(_p)
#define achievements_re_active_iterate_end
bool action_distance_inside_max(const struct action *action, const int distance)
enum action_actor_kind action_get_actor_kind(const struct action *paction)
struct action_auto_perf * action_auto_perf_slot_number(const int num)
struct req_vec_problem * action_enabler_suggest_repair(const struct action_enabler *enabler)
struct req_vec_problem * action_enabler_suggest_improvement(const struct action_enabler *enabler)
const char * action_rule_name(const struct action *action)
const char * action_id_rule_name(action_id act_id)
bool action_would_be_blocked_by(const struct action *blocked, const struct action *blocker)
int action_dice_roll_initial_odds(const struct action *paction)
enum action_target_kind action_get_target_kind(const struct action *paction)
struct action_enabler_list * action_enablers_for_action(action_id action)
#define action_by_result_iterate(_paction_, _result_)
#define ACTION_DISTANCE_MAX
#define enabler_get_action(_enabler_)
#define ACTION_AUTO_MOVED_ADJ
#define action_auto_perf_actions_iterate_end
static struct action * action_by_number(action_id act_id)
#define action_enabler_list_re_iterate_end
#define ACTION_DISTANCE_LAST_NON_SIGNAL
#define action_enabler_list_re_iterate(action_enabler_list, aenabler)
#define action_has_result(_act_, _res_)
#define action_by_result_iterate_end
#define action_auto_perf_actions_iterate(_autoperf_, _act_id_)
#define action_iterate_end
#define action_has_result_safe(paction, result)
#define action_iterate(_act_)
#define action_id_get_target_kind(act_id)
#define ACTION_ODDS_PCT_DICE_ROLL_NA
bool actres_legal_target_kind(enum action_result result, enum action_target_kind tgt_kind)
void astr_free(struct astring *astr)
#define BV_ISSET(bv, bit)
const char * city_style_rule_name(const int style)
static const struct city struct citystyle * city_styles
#define log_deprecation(message,...)
const char * disaster_rule_name(struct disaster_type *pdis)
#define disaster_type_re_active_iterate(_p)
#define disaster_type_re_active_iterate_end
bool iterate_effect_cache(iec_cb cb, void *data)
int get_potential_improvement_bonus(const struct impr_type *pimprove, const struct city *pcity, enum effect_type effect_type, const enum req_problem_type prob_type, bool consider_multipliers)
int effect_cumulative_max(enum effect_type type, struct universal *unis, size_t n_unis)
int effect_cumulative_min(enum effect_type type, struct universal *for_uni)
#define MAX_NUM_TECH_LIST
const char * government_rule_name(const struct government *pgovern)
#define governments_re_active_iterate(_p)
#define governments_re_active_iterate_end
bool is_building_sellable(const struct impr_type *pimprove)
const char * improvement_rule_name(const struct impr_type *pimprove)
bool is_wonder(const struct impr_type *pimprove)
bool is_great_wonder(const struct impr_type *pimprove)
bool improvement_has_flag(const struct impr_type *pimprove, enum impr_flag_id flag)
const char * improvement_name_translation(const struct impr_type *pimprove)
#define improvement_re_active_iterate_end
#define improvement_re_active_iterate(_p)
#define log_verbose(message,...)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define log_debug(message,...)
#define log_normal(message,...)
bool is_native_to_class(const struct unit_class *punitclass, const struct terrain *pterrain, const bv_extras *extras)
bool can_unit_type_transport(const struct unit_type *transporter, const struct unit_class *transported)
const char * nation_rule_name(const struct nation_type *pnation)
struct nation_type * nation_by_rule_name(const char *name)
enum barbarian_type nation_barbarian_type(const struct nation_type *nation)
#define nations_re_active_iterate_end
#define nations_re_active_iterate(_pnat_)
const char * req_to_fstring(const struct requirement *req, struct astring *astr)
req_vec_num_in_item req_vec_vector_number(const void *parent_item, const struct requirement_vector *vec)
struct req_vec_problem * req_vec_suggest_repair(const struct requirement_vector *vec, requirement_vector_number get_num, const void *parent_item)
const char * universal_rule_name(const struct universal *psource)
void req_vec_problem_free(struct req_vec_problem *issue)
const char * universal_type_rule_name(const struct universal *psource)
enum req_unchanging_status is_req_unchanging(const struct req_context *context, const struct requirement *req)
#define requirement_vector_iterate_end
#define requirement_vector_iterate(req_vec, preq)
Road_type_id road_number(const struct road_type *proad)
void(* rs_conversion_logger)(const char *msg)
#define ruleset_error(logger, level, format,...)
static struct compatibility compat[]
const char * server_setting_name_get(server_setting_id id)
enum sset_type server_setting_type_get(server_setting_id id)
server_setting_id ssetv_setting_get(ssetv enc)
bool server_setting_exists(server_setting_id id)
void setting_ruleset_lock_clear(struct setting *pset)
struct setting * setting_by_name(const char *name)
struct setting * setting_by_number(int id)
enum sset_category setting_category(const struct setting *pset)
bool setting_enum_set(struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
void setting_ruleset_lock_set(struct setting *pset)
bool setting_is_visible_at_level(const struct setting *pset, enum cmdlevel plevel)
bool formats_match(const char *format1, const char *format2)
const char * specialist_rule_name(const struct specialist *sp)
#define specialist_type_re_active_iterate_end
#define specialist_type_re_active_iterate(_p)
struct advance * require[AR_SIZE]
struct packet_ruleset_control control
int global_init_techs[MAX_NUM_TECH_LIST]
struct packet_game_info info
struct civ_game::@31::@35::@40 ruledit
struct civ_game::@31::@35 server
size_t embedded_nations_count
struct civ_game::@30 rgame
struct packet_calendar_info calendar
struct government * default_government
struct government * government_during_revolution
rs_conversion_logger logger
int init_techs[MAX_NUM_TECH_LIST]
enum free_tech_method free_tech_method
bv_actions diplchance_initial_odds
enum tech_cost_style tech_cost_style
const struct unit_type * obsoleted_by
const char * style_rule_name(const struct nation_style *pstyle)
int basic_city_style_for_style(struct nation_style *pstyle)
#define music_styles_re_active_iterate_end
#define music_styles_re_active_iterate(_p)
#define styles_re_active_iterate_end
#define styles_re_active_iterate(_p)
int fc_snprintf(char *str, size_t n, const char *format,...)
struct advance * advance_by_number(const Tech_type_id atype)
struct advance * advance_requires(const struct advance *padvance, enum tech_req require)
struct advance * valid_advance_by_number(const Tech_type_id id)
const char * advance_rule_name(const struct advance *padvance)
Tech_type_id advance_number(const struct advance *padvance)
#define advance_re_active_iterate(_p)
#define advance_req_iterate(_goal, _padvance)
#define advance_re_active_iterate_end
#define advance_req_iterate_end
const char * terrain_rule_name(const struct terrain *pterrain)
#define terrain_re_active_iterate_end
#define is_ocean(pterrain)
#define terrain_re_active_iterate(_p)
#define terrain_resources_iterate_end
#define terrain_resources_iterate(pterrain, _res, _freq)
const char * goods_rule_name(struct goods_type *pgood)
#define goods_type_re_active_iterate_end
#define goods_type_re_active_iterate(_p)
bool utype_is_cityfounder(const struct unit_type *utype)
struct unit_type * get_role_unit(int role, int role_index)
bool utype_has_role(const struct unit_type *punittype, int role)
int num_role_units(int role)
const char * utype_rule_name(const struct unit_type *punittype)
const char * uclass_rule_name(const struct unit_class *pclass)
static bool uclass_has_flag(const struct unit_class *punitclass, enum unit_class_flag_id flag)
#define unit_type_re_active_iterate(_p)
#define unit_class_re_active_iterate_end
static bool utype_has_flag(const struct unit_type *punittype, int flag)
#define unit_class_re_active_iterate(_p)
#define UNIT_MAX_PARADROP_RANGE
#define uclass_index(_c_)
#define unit_type_re_active_iterate_end