is it possible to create villages ?

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Post Reply
WhiteKnight
Posts: 4
Joined: Thu Jun 04, 2015 4:04 pm

is it possible to create villages ?

Post by WhiteKnight »

Hi,
I don't like when cities are popped all around the map, I set the minimal distance between cities to 5. Now I would like to know if it would be possible to create a new tile improvement. That I would call "village".

a village should be...

... created by migrant, when created the migrant should be disbanded.

... built only in range of a city.

... giving a food and tax bonus to the city in range. I don't want something like irrigation which need to be operated by a citizen, I really want a bonus.

... captured by enemies, in that case the city lost his bonus.



is it possbile to do something like that ?
WhiteKnight
Posts: 4
Joined: Thu Jun 04, 2015 4:04 pm

Re: is it possible to create villages ?

Post by WhiteKnight »

after some tests and no response I conclude this is not possible.

here the best I made so far (using the fortress)

Code: Select all

[effect_village1]
type    = "Output_Add_Tile"
value   = 4
reqs    =
    { "type", "name", "range"
      "Base", "Fortress", "City"
      "CityTile", "Center", "Local"
      "OutputType", "Shield", "Local"
    }
that will add +4 to shields output if there is at least one fortress in the city range. Adding more fortress won't give bonuses. I dindn't found any way to solve that problem. I also found no way to build a base that will disband his builder.

using script would be great, but here again I think it's not possible. One thing, wich could help is to have functions like base_built, base_destroyed, base_occupied and base_lost. I don't say these functions would be enough, but it sounds necessary to have them.

here is something I would like to do by scripting :

Code: Select all

function base_created_CB( tile, base_name, unit_builder )

  city = unit_builder:get_homecity(  ) 

  if tile:city_exists_within_max_city_map( city ) --X--
    city:add_effect( "OutputType", "Shield", 5 ) --X--
    return true
  end

  city =   tile:get_nearest_city(  ) --X--
  city:add_effect( "OutputType", "Shield", 5 ) --X--
  return true

end
all --X-- marks functions that I didn't equivalent in the documentation http://freeciv.wikia.com/wiki/Lua_reference_manual
WhiteKnight
Posts: 4
Joined: Thu Jun 04, 2015 4:04 pm

Re: is it possible to create villages ?

Post by WhiteKnight »

just a screen of why I want to do that :
Image
Post Reply