Random gender

Users who are viewing this thread

In this script male troops spawn randomly gender.
But this code work male and female troops, I want to work just for male troops not for female,
what should I do?
red lines female troops.

random_mixed_gender = (ti_on_agent_spawn, 0, 0, [],
[(try_begin),
(store_trigger_param_1, ":agent_no"),
(agent_get_troop_id, ":troop_no", ":agent_no"),
(this_or_next|neq, ":troop_no", "trp_hacli_vatandas_kadin"),
(this_or_next|neq, ":troop_no", "trp_mogol_vatandas_kadin"),
(this_or_next|neq, ":troop_no", "trp_eyyubu_vatandas_kadin"),
(this_or_next|neq, ":troop_no", "trp_selcuklu_vatandas_kadin"),
(this_or_next|neq, ":troop_no", "trp_nomad_woman"),
(this_or_next|neq, ":troop_no", "trp_bizans_vatandas_kadin"),
(this_or_next|neq, ":troop_no", "trp_hashasi_vatandas_kadin"),
(this_or_next|neq, ":troop_no", "trp_kipcak_vatandas_kadin"),
(this_or_next|neq, ":troop_no", "trp_papa_vatandas_kadin"),
(this_or_next|neq, ":troop_no", "trp_bulgar_vatandas_kadin"),
(this_or_next|neq, ":troop_no", "trp_trabzon_vatandas_kadin"),
(this_or_next|neq, ":troop_no", "trp_gurcistan_vatandas_kadin"),
(this_or_next|neq, ":troop_no", "trp_kibris_vatandas_kadin"),
(this_or_next|neq, ":troop_no", "trp_village_walker_2"),
(this_or_next|neq, ":troop_no", "trp_spy_walker_2"),
(this_or_next|neq, ":troop_no", "trp_xerina"),
(this_or_next|neq, ":troop_no", "trp_rebel_peasent_woman"),
(this_or_next|neq, ":troop_no", "trp_musican_female_2"),
(this_or_next|neq, ":troop_no", "trp_kaybolmus_kiz"),
(this_or_next|neq, ":troop_no", "trp_esir_kadin"),
(this_or_next|neq, ":troop_no", "trp_kipchak_women"),
(this_or_next|neq, ":troop_no", "trp_kipchak_women_2"),

(this_or_next|neq, ":troop_no", "trp_rebel_peasent_woman"),
(is_between, ":troop_no", "trp_novice_fighter", "trp_son_asker"),
(store_random_in_range, ":gender", 2, 5),
(troop_set_type, ":troop_no", ":gender"),
(try_end),
])
 
Solution
All troops in this range are affected
(is_between, ":troop_no", "trp_novice_fighter", "trp_son_asker"),

The easiest way would be to place all female troops to one place on the troop list for example after trp_son_asker.
Change the range above to your needs.


Your script above could work but the red code comes after

(is_between, ":troop_no", "trp_novice_fighter", "trp_son_asker"),

The last
(this_or_next|neq, ":troop_no", "trp_rebel_peasent_woman"),

should be
(neq, ":troop_no", "trp_rebel_peasent_woman"),
All troops in this range are affected
(is_between, ":troop_no", "trp_novice_fighter", "trp_son_asker"),

The easiest way would be to place all female troops to one place on the troop list for example after trp_son_asker.
Change the range above to your needs.


Your script above could work but the red code comes after

(is_between, ":troop_no", "trp_novice_fighter", "trp_son_asker"),

The last
(this_or_next|neq, ":troop_no", "trp_rebel_peasent_woman"),

should be
(neq, ":troop_no", "trp_rebel_peasent_woman"),
 
Last edited by a moderator:
Upvote 0
Solution
Back
Top Bottom