Page 1 of 1

Effect: Output_Add_Tile - need help

Posted: Wed Oct 29, 2014 11:56 am
by Ducan
Hallo everyone

I want to create my own ruleset for a little project I am working on. But I have problems with the requirements for the effects.
I plan to create an effect, that adds food, shield or trade to the output of the Citycenter tile by research tech (without building).

I tried it this way:

Code: Select all

[effect_Tools]
name	= "Output_Add_Tile"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Tools", "Player"
      "CityTile", "Center", "Local"
      "OutputType", "Shield", "Local"
    }
or this way:

Code: Select all

[effect_Tools]
name	= "Output_Add_Tile"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Tools", "Player"
      "Terrainclass", "Land", "City"
      "OutputType", "Shield", "Local"
    }
Both effects didn't work. After research of the Tech the output of the Citytile in the center was still 2 Food + 1 Shield like before the research.
Can somebody help me with the requirements I need to make it work?

Re: Effect: Output_Add_Tile - need help

Posted: Mon Nov 24, 2014 8:47 pm
by bard
I think your code is right, because I use a similar effect in my ruleset. In my case, the bonus is to luxury and science, but they do not appear painted in the city view, there are no extra icons drawn on the city tile, they are only taken into account in the text info. Maybe it happens the same when the bonus is to shields or food, too.
Take a look to the economy info shown when you click with the left button over the output of the city, and check there if the extra shield is actually produced or not.

Re: Effect: Output_Add_Tile - need help

Posted: Tue Nov 25, 2014 1:33 pm
by ngunjaca
as bard i also have some similar code in my mod, but it does not add shield instead it adds trade to the city center tile. in my case it works. for the sake of testing i tried your code (the first one) and in freeciv 2.4.3 it works as it should - it adds one shield to the city center tile after i researched the required tech.
what version of freeciv are you using? maybe there is something else wrong

Re: Effect: Output_Add_Tile - need help

Posted: Tue Nov 25, 2014 4:12 pm
by bard
ngunjaca is right, shields and food should appear drawn in the city tile. Now I see that default rules are full of this kind of effects.
Try to check that "Tools" is the actual name of the tech in your techs.ruleset:
name = _("Tools")