Page 1 of 1

cultural victory option : the majority of world's culture

Posted: Tue Jul 17, 2018 8:41 am
by fomalhaut
We can set options about cultural victory in game.ruleset. ('victory_min_points' and 'victory_lead_pct' )
But simply thinking, as the number of players increases, the market share of top player will decrease.

example
1st:1000/2nd:300/3rd:250/4th:200 (world's culture:1750/1st player's share:57%)

1st:1000/2nd:300/3rd:250/4th-9th:200 (world's culture:3350/1st player's share:30%)
Is it possible to regard 30% as "cultural domination" ?

So I think 1st player needs to have more than half of world' culture to win.

Re: cultural victory option : the majority of world's culture

Posted: Tue Jul 24, 2018 8:29 pm
by Ignatus
Support. I also don't know how victory_min_points interacts with MinCulture setting in Victory effect, isn't it an overhead setting? Probably we should move the lead_pct setting also into effects, like MinCulturePct requirement with various ranges.

I have played a game in Experimental (2.6 beta2) which was won by culture earlier then my explorer landed from my first caravel to another shore, just because I have built libraries and other players haven't; that was, like, too fast. Probably you also should not be allowed to win by culture until you have met all existing civilizations, or how can you impress them otherwise? (This is doable with effects). Or there should be some combination of cultural, military and happiness relative strengthes to make cultural overcoming more sensible. I also suppose that culture mechanics might be just included into rebel costs - if they fall to negative, you just assimilate the cities even without doing anything, and if a player has negative rebel cost in his capital to any other player, he loses.

Re: cultural victory option : the majority of world's culture

Posted: Tue Jul 24, 2018 8:48 pm
by cazfi
Ignatus wrote:I have played a game in Experimental (2.6 beta2) which was won by culture earlier then my explorer landed from my first caravel to another shore, just because I have built libraries and other players haven't; that was, like, too fast.
Sounds like victory_min_points is WAY too low... and checking the experimental ruleset it really is only 1000. For comparison, variant2 uses 1000000.

Re: cultural victory option : the majority of world's culture

Posted: Wed Jul 25, 2018 8:28 pm
by JTN
cazfi wrote:Sounds like victory_min_points is WAY too low... and checking the experimental ruleset it really is only 1000. For comparison, variant2 uses 1000000.
=> hrm bug #766716

Re: cultural victory option : the majority of world's culture

Posted: Wed Aug 01, 2018 4:50 pm
by fomalhaut
"To win cultural victory, 1st rank player needs to have more than half of total world's culture points."
Is it possible to set this condition by lua script?

Re: cultural victory option : the majority of world's culture

Posted: Wed Aug 01, 2018 9:35 pm
by JTN
I think you could disable the built-in cultural victory and implement your own criteria with Lua (Player):victory() -- players' culture is available to Lua with (Player):culture(), checked on the turn_started signal. (Haven't tried it.)

Re: cultural victory option : the majority of world's culture

Posted: Thu Aug 02, 2018 6:47 am
by Alien Valkyrie
Does AI strive for lots of culture, even when regular culture victory is turned off? Because otherwise, doing it via lua script could lead to inefficient AI behavior.

Re: cultural victory option : the majority of world's culture

Posted: Thu Aug 02, 2018 7:32 am
by JTN
Good question. AI does not currently seek culture points, even if regular culture victory is enabled.

Re: cultural victory option : the majority of world's culture

Posted: Fri Aug 03, 2018 3:18 am
by fomalhaut
JTN wrote:I think you could disable the built-in cultural victory and implement your own criteria with Lua (Player):victory() -- players' culture is available to Lua with (Player):culture(), checked on the turn_started signal. (Haven't tried it.)
Completed! my first lua script :D
(Messages are added for test play.)

Code: Select all

-- Cultural Domination Victory
function cultural_victory_callback()
 min_to_win = 500  -- Minimum culture points for cultural domination victory
 world_culture = 0
  for player in players_iterate() do
    if player.is_alive then
      local each_culture = player:culture()
      world_culture = world_culture + each_culture
    end
  end
  notify.event(nil, nil, E.CHAT_MSG,"world culture points : %d",world_culture)
  for player in players_iterate() do
    if player.is_alive then
      local each_culture2 = player:culture()
       if each_culture2 > world_culture * 0.5 then  -- required market share
        if each_culture2 > min_to_win then
         local winner = player
         edit.player_victory(winner)
        else
        notify.event(player, nil, E.CHAT_MSG,"your culture points : %d (more than 50 percent share)",each_culture2)
        end
       else
       notify.event(player, nil, E.CHAT_MSG,"your culture points : %d (less than 50 percent share)",each_culture2)
       end
    end
  end
end

signal.connect('turn_started', 'cultural_victory_callback')
But I noticed that there is 1 turn left to end.
The winner needs to survive last turn.
"turn_started" is wrong?