Ironclads navigate rivers & civil war.

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
Post Reply
rstd2
Posts: 3
Joined: Sat Aug 19, 2017 7:03 pm

Ironclads navigate rivers & civil war.

Post by rstd2 »

I'm still quite terrible at this game, but I do have a few suggestions for the game [Civ2Civ3].

Firstly, Ironclads can navigate rivers like Triremes. I recall them doing this in the American and Russian civil wars and it makes sense too since they're small-ish and not sail-driven.

Secondly, Civil Wars can occur more... spontaneously. Several famous ones (The American One/English Revolution) occurred without the occupation of your capital. Perhaps if there is continuous civil disorder or, in the case of the experimental features in the Civ2Civ3 ruleset, a low "culture" rating, then a Civil War has a *very* small chance of occurring after your civilization is X cities large.

Feel free to leave any comments/criticisms!
User avatar
GriffonSpade
Elite
Posts: 578
Joined: Mon Apr 29, 2013 4:41 pm

Re: Ironclads navigate rivers & civil war.

Post by GriffonSpade »

rstd2 wrote:I'm still quite terrible at this game, but I do have a few suggestions for the game [Civ2Civ3].

Firstly, Ironclads can navigate rivers like Triremes. I recall them doing this in the American and Russian civil wars and it makes sense too since they're small-ish and not sail-driven.

Secondly, Civil Wars can occur more... spontaneously. Several famous ones (The American One/English Revolution) occurred without the occupation of your capital. Perhaps if there is continuous civil disorder or, in the case of the experimental features in the Civ2Civ3 ruleset, a low "culture" rating, then a Civil War has a *very* small chance of occurring after your civilization is X cities large.

Feel free to leave any comments/criticisms!
This is actually possible, it's 'Revolution Unhappiness', I believe, and occurs if riots last 2(?) turns. Oddly enough, it only occurs in Democracies. There seems to be separation of reality from gameplay in that the US government often seems to be represented as a Democracy in game, while it should actually be a Republic. (No Democracies exist in real life beyond the municipal level)
User avatar
Alien Valkyrie
Elite
Posts: 513
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: Ironclads navigate rivers & civil war.

Post by Alien Valkyrie »

GriffonSpade wrote:
rstd2 wrote:Secondly, Civil Wars can occur more... spontaneously. Several famous ones (The American One/English Revolution) occurred without the occupation of your capital. Perhaps if there is continuous civil disorder or, in the case of the experimental features in the Civ2Civ3 ruleset, a low "culture" rating, then a Civil War has a *very* small chance of occurring after your civilization is X cities large.

Feel free to leave any comments/criticisms!
This is actually possible, it's 'Revolution Unhappiness'
I believe rstd2 was talking about civil war, not mere revolutions.
~ AVL
User avatar
GriffonSpade
Elite
Posts: 578
Joined: Mon Apr 29, 2013 4:41 pm

Re: Ironclads navigate rivers & civil war.

Post by GriffonSpade »

Caedo wrote:
GriffonSpade wrote:
rstd2 wrote:Secondly, Civil Wars can occur more... spontaneously. Several famous ones (The American One/English Revolution) occurred without the occupation of your capital. Perhaps if there is continuous civil disorder or, in the case of the experimental features in the Civ2Civ3 ruleset, a low "culture" rating, then a Civil War has a *very* small chance of occurring after your civilization is X cities large.

Feel free to leave any comments/criticisms!
This is actually possible, it's 'Revolution Unhappiness'
I believe rstd2 was talking about civil war, not mere revolutions.
Oh, it only kicks off government change rather than secession? Weird. I don't think I've ever actually allowed my cities to stay in riot while playing Democracy.

In that case, I'm with rstd2.
Akechi
Posts: 34
Joined: Thu Dec 07, 2017 12:17 pm

Re: Ironclads navigate rivers & civil war.

Post by Akechi »

Prerequisite: Freeciv 2.6 or after.

To make your wishes come true:
0) Duplicate civ2civ3 ruleset and change name what you want (otherwise you will lose original civ2civ3 data).
1-1) Change Ironclad unit class to Trireme instead of Sea.
1-2) Duplicate +1 movement bonus of Nuclear Power to Sea unit class and change to Ironclad unit type.
1-3) Duplicate bonus of Magellan's Expedition to Sea unit class and change to Ironclad unit type.
2) Add below script to script.lua (number of cities, culture and happiness affects this civil war).

Code: Select all

--[[
Random chance to civil war due to total cities, culture and happiness.

In each turn started, we check:
  1st: we check total cities against civil war threshold.
    Check passed if player has city equal or more than minimum number of cities for civil war.
  2nd: we check total cities.
    Check passed if player passes probability of total cities / (1000 + total cities).
  3rd: we check culture.
    Check passed if player passes probability of 2000 / (2000 + culture).
  4th: we check happiness (instead of normal civil war check).
    Check passed if player passes probability of (total cities - celebrating cities + unhappy cities) / (total cities * 2).
If all of the above checks passed, civil war will occur at 100%.
--]]
function random_chance_to_civil_war(turn, year)
  local total_cities = 0
  local civil_war_threshold = tonumber(server.setting.get("civilwarsize"))
  local celebrating_cities = 0
  local unhappy_cities = 0

  -- Check each player.
  for target_player in players_iterate() do
    total_cities = target_player:num_cities()

    -- Check total cities against minimum number of cities for civil war.
    if total_cities >= civil_war_threshold then
      -- Check total cities.
      if random(0, 1000 + total_cities - 1) < total_cities then
        notify.player(target_player, "You passed total cities check to civil war. Pay attention to your city.")

        -- Check culture.
        if random(0, 2000 + target_player:culture() - 1) < 2000 then
          notify.player(target_player, "You passed culture check to civil war. Pay attention to your culture.")

          -- Initialize city count.
          celebrating_cities = 0
          unhappy_cities = 0

          -- Count city for check happiness.
          for target_player_city in target_player:cities_iterate() do
            if target_player_city:is_celebrating() then
              celebrating_cities = celebrating_cities + 1
            elseif target_player_city:is_unhappy() then
              unhappy_cities = unhappy_cities + 1
            end
          end

          -- Check happiness.
          if random(0, total_cities * 2 - 1) < total_cities - celebrating_cities + unhappy_cities then
            notify.player(target_player, "You passed happiness check to civil war. Prepare for against the rebel.")

            -- Raiding party!
            target_player:civil_war(100)
          end
        end
      end
    end
  end

  -- Continue processing.
  return false
end

signal.connect("turn_started", "random_chance_to_civil_war")
There is no element of civil war chance due to government.
If you set civilwarsize server option to 2, you will find rise and fall of civilizations.
If you feel civil war too few or too much occur, change formula as you like.
Post Reply