Ruleset mystery. Solvers welcome.

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
User avatar
Corbeau
Elite
Posts: 1022
Joined: Mon Jan 13, 2014 11:13 pm

Ruleset mystery. Solvers welcome.

Postby Corbeau » Tue Dec 18, 2018 12:40 pm

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?

Akechi
Posts: 32
Joined: Thu Dec 07, 2017 12:17 pm

Re: Ruleset mystery. Solvers welcome.

Postby Akechi » Tue Dec 18, 2018 5:16 pm

[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.

User avatar
Corbeau
Elite
Posts: 1022
Joined: Mon Jan 13, 2014 11:13 pm

Re: Ruleset mystery. Solvers welcome.

Postby Corbeau » Tue Dec 18, 2018 6:33 pm

Thank you.

* jumps out the window

User avatar
Corbeau
Elite
Posts: 1022
Joined: Mon Jan 13, 2014 11:13 pm

Re: Ruleset mystery. Solvers welcome.

Postby Corbeau » Sat May 11, 2019 7:13 am

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.

User avatar
Caedo
Elite
Posts: 474
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: Ruleset mystery. Solvers welcome.

Postby Caedo » Sat May 11, 2019 8:17 am

You're missing a range there.
~S.C. L.

User avatar
Corbeau
Elite
Posts: 1022
Joined: Mon Jan 13, 2014 11:13 pm

Re: Ruleset mystery. Solvers welcome.

Postby Corbeau » Sat May 11, 2019 8:20 am

Now I feel embarrassed.