Page 1 of 1

Ruleset mystery. Solvers welcome.

Posted: Tue Dec 18, 2018 12:40 pm
by Corbeau
LT42 ruleset has the following effects regarding unit gold upkeep:

1) Upkeep_Factor = 1
2) Unit_Upkeep_Free_Per_City = 1

All other instances of those effects with "OutputType", "Gold", "Local" are negated for Monarchy. However, this is not what the outcome is. In some instances, it looks like Unit_Upkeep_Free_Per_City is actually 2, and in larger cities 4, but there is no effect reducing upkeep deoending on city size.

Any ideas? Are there other effects that may affect this? Something in the code?

Re: Ruleset mystery. Solvers welcome.

Posted: Tue Dec 18, 2018 5:16 pm
by Akechi
[effect_upkeep_free_units_gold_base_despotism_funda]
[effect_upkeep_free_units_gold_base_communism_monarchy]
[effect_upkeep_free_units_shield_base_monarchy_communism_funda]
[effect_upkeep_free_units_shield_base_anarchy_despotism]
[effect_upkeep_free_units_food_base_despotism_funda]
[effect_upkeep_free_units_food_base_republic_communism_democracy]
All of above effect lacks

Code: Select all

"type", "name", "range"
sentences in nreqs.

// off-topic thing
[effect_hoover_dam_1]
It seems duplicated effects.

Re: Ruleset mystery. Solvers welcome.

Posted: Tue Dec 18, 2018 6:33 pm
by Corbeau
Thank you.

* jumps out the window

Re: Ruleset mystery. Solvers welcome.

Posted: Sat May 11, 2019 7:13 am
by Corbeau
Maybe not necessary to open a new thread every time so I'll use this one.

Problem. This:

Code: Select all

[effect_migration_size_1_granary]
type	= "Migration_Pct"
value	= 1000
reqs	=
    { 	"type", "name", "range", "negated"
	"Minsize", "1", "City", FALSE
	"Minsize", "2", "City", TRUE
	"Building", "Granary", FALSE
    }
creates the error:
In entry_str_get() [../../freeciv-2.5.7/utility/registry_ini.c:3136]: secfile 'data/LT48/effects.ruleset' in section 'effect_migration_size_1_granary': Assertion 'ENTRY_STR == pentry->type' failed.

However, when I remove the last line:
"Building", "Granary", FALSE

the effect work fine.

Re: Ruleset mystery. Solvers welcome.

Posted: Sat May 11, 2019 8:17 am
by Alien Valkyrie
You're missing a range there.

Re: Ruleset mystery. Solvers welcome.

Posted: Sat May 11, 2019 8:20 am
by Corbeau
Now I feel embarrassed.