Re: Corbeau's ruleset (2.5)
Posted: Wed Sep 06, 2017 9:42 am
BTW, would it be possible to assign veteran levels based on the type of terrain the city producing the unit is placed on?
Freeciv - because civilization should be free!
http://forum.freeciv.org/f/
Code: Select all
[effect_5yrPlan]
type = "Output_Add_Tile"
value = 1
reqs =
{ "type", "name", "range"
"Building", "Five Year Plan", "Player"
"CityTile", "Center", "Player"
"OutputType", "Shield", "Local"
}
I haven't tested this, but I don't see why Veteran_Build shouldn't be able to use Terrain_Type requirements at Local range.Corbeau wrote:BTW, would it be possible to assign veteran levels based on the type of terrain the city producing the unit is placed on?
It would have to be "CityTile", "Center", "Local", but yeah, that should work.Corbeau wrote:QUESTION: Is there a way for a Wonder to give +1 shield to each city? Something like this:
Code: Select all
[effect_5yrPlan] type = "Output_Add_Tile" value = 1 reqs = { "type", "name", "range" "Building", "Five Year Plan", "Player" "CityTile", "Center", "Player" "OutputType", "Shield", "Local" }
Oh, thanks. Didn't really think it would be possible! So, more possibilities to make a mess open up!Caedo wrote:I haven't tested this, but I don't see why Veteran_Build shouldn't be able to use Terrain_Type requirements at Local range.Corbeau wrote:BTW, would it be possible to assign veteran levels based on the type of terrain the city producing the unit is placed on?
I've checked, the requirement type is just "Terrain", without a "_Type". As noted in some of the comments of the supplied rulesets' files, everything relevant about effect requirement vectors can be found in /doc/README.effects, in your Freeciv install directory.Corbeau wrote:I'm trying to figure out the combination, but I can't make sense of the requirement syntax. Would it be something like
"Terrain_Type", "Mountain", "Local"
?
Is there a comprehensive tutorial/manual about requirement syntax? I'm trying to figure it out, but I guess things are complicated because different effects interpret requirement fields in a different way, according to their particular need, correct?
Yeah, I admit that the "Local" range is a bit confusing. It's basically everything where an OOP-developer would write "this" (or "self" if we're working with Python), and then some. For example, basic information on the current tile is part of the "Local" range. I mean, it's obviously not part of the "City" range (since e.g. terrain type exists outside of cities), but there's no dedicated "Tile" range.Corbeau wrote:For example, it's perfectly clear what ranges like "Player" and "Continent" mean. But what is "Local"? And why doesn't "Give veteran bonus to a unit created in a city on a mountain" ask for the "City" range instead of "Local"?
Unfortunately, it's not possible to give the additional Defend_Bonud to some units, only against some units. The UnitType, UnitFlag etc. requirement types (which are only available at "Local" range) are evaluated against the attacking unit, not the defending unit. Otherwise, City Walls would give a defense bonus to land units (but not sea units) within the city, instead of defending against land units from outside the city.Corbeau wrote:Would it be possible to give additional Defence Bonus in, say, forests and jungles only to some units? Looking at some examples, I'd say the answer is yes.
"Upgrade_Unit" is an effect type, not a requirement type. That it's "checked at player range" means that for the requirements, only the range "Player" and bigger ones (e.g. "Allied", "Team" and "World") are valid. I'm not sure if requirements at other ranges are simply ignored, always evaluate to FALSE or cause an error while loading, but either way, they don't work.Corbeau wrote:Also, when I asked about Military Academy that would upgrade one unit in each city it is built in (multiple cities), JTN said "The "Upgrade_Unit" effect is checked at player range." But what if I put range as "Local" (or "City")?