BULGARIA....?

PC/MAC : Commander the Great War is the latest release in the popular Commander series to bring the thrill, excitement and mind-breaking decision making of these difficult times to life.

Moderators: Slitherine Core, The Lordz

operating
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 500
Joined: Tue Nov 25, 2008 5:36 pm

BULGARIA....?

Post by operating » Thu Oct 22, 2015 1:33 am

Once again both Serbia and Belgium have surrendered, Entente used gas first, the Gallipoli invasion was repulsed, captured 10 Russian cities, sank dreadnaughts from; England, France, Russia and Italy, killed off 1107 Entente aircraft, 1200 Russians, captured all of Egypt by June 1916 and yet : WHERE IS BULGARIA? (picking it's friggin nose RED). Edited by moderator

Warning, communicate in a normal and polite manner or risk a ban.

nehi
2nd Lieutenant - Elite Panzer IVF/2
2nd Lieutenant - Elite Panzer IVF/2
Posts: 720
Joined: Sat Oct 17, 2015 1:51 pm

Re: BULGARIA....?

Post by nehi » Fri Oct 23, 2015 7:42 pm

some event stoped bulgaria from entering the war... its similar when u r able to capture france before italy joins (same red color and everlasting 4-6 turn for example)

Robotron
Lieutenant Colonel - Panther D
Lieutenant Colonel - Panther D
Posts: 1230
Joined: Tue Nov 23, 2010 3:35 pm

Re: BULGARIA....?

Post by Robotron » Sat Oct 24, 2015 9:13 am

As far as I can see by looking at the code:

starting with gameturn#20 the game performs a check for every neutral faction by adding up the production values of all cities of an alliance and the cities of the neutral faction and then adding 50 to the result. If one alliance's total value is greater than the other one's, neutral factions whose alignment (a value between 0 and 100) is leaning toward that alliance (< 50 for CP and >50 for Entente) further gravitate towards "the winning team".

Casualities, manpower, morale and total unit strength don't seem to play a role in the calculation.

operating
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 500
Joined: Tue Nov 25, 2008 5:36 pm

Re: BULGARIA....?

Post by operating » Sat Oct 24, 2015 4:33 pm

Robotron wrote:As far as I can see by looking at the code:

starting with gameturn#20 the game performs a check for every neutral faction by adding up the production values of all cities of an alliance and the cities of the neutral faction and then adding 50 to the result. If one alliance's total value is greater than the other one's, neutral factions whose alignment (a value between 0 and 100) is leaning toward that alliance (< 50 for CP and >50 for Entente) further gravitate towards "the winning team".

Casualities, manpower, morale and total unit strength don't seem to play a role in the calculation.
Thanks Robotron!

That formula needs to be reconfigured. Presently in SP that makes sense, but in MP it does not fly. The reason being that the AI does not disband SGs, where in MP most if not all players disband most if not all SGs, giving nations like Russia a huge positive PP increase (-1 PP upkeep per SG), most English, French and Italian SGs as well get canned to increase PP, to sum it up: The number of Entente SGs far outnumber the CP SGs, so for all practical purposes CP is way in the hole PP wise, unless CP has an exceptional MP match with capturing cities, then again these captured cities (for the most part) take forever to regenerate PP, especially if they were fought over resulting in major damage to said city.

Matter-o-fact, if in SP it is easier to have alliance gains using the same disbanding as described above to gain an unfair advantage over the AI, that's why the above formula is a "joke"! Who in their right mind is going to leave 2 English garrisons at 2 PP upkeep cost each for perhaps years at a time in North America and Greenland? Disband them! Of course it's going to save England a ton of PP over the long run. Now if the game chose to prevent disbanding, then perhaps neutrals such as Bulgaria would react differently... Or the reality is: Change the above formula or remove it all together and set historical dates to when nations entered the war to be in effect, if CTGW was to be PC (politically correct), pure chaos otherwise. One of the best diplomatic setups for WWI is in the game SCWWI where a player can buy diplomat points.

Dumbfounded, Bob

operating
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 500
Joined: Tue Nov 25, 2008 5:36 pm

Re: BULGARIA....?

Post by operating » Sun Oct 25, 2015 5:15 am

I don't understand why there is a +50 for both sides? The +50 seems to cancel oneanother out, the same as giving "0" to each side, does not make sense. :? Also, What does alliance 1 and 2 mean?
function CheckFactionDOWBalance(faction)

if game.date.year == 1914 and game.turn < 20 then
return true
end

allianceStrength = {}
allianceStrength[1] = 0
allianceStrength[2] = 0
for f in game.factions do
if f.alliance.id ~= 0 then
allianceStrength[f.alliance.id] = allianceStrength[f.alliance.id] + GetFactionEconomicStrength(f)
end
end

if faction.luaData.alignment > 50 and allianceStrength[1] + GetFactionEconomicStrength(faction) + 50 >= allianceStrength[2] then
return true
end
if faction.luaData.alignment < 50 and allianceStrength[2] + GetFactionEconomicStrength(faction) + 50 >= allianceStrength[1] then
return true
end
return false
end

DanielHerr
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 117
Joined: Sun Jan 11, 2015 7:51 pm
Contact:

Re: BULGARIA....?

Post by DanielHerr » Sun Oct 25, 2015 6:03 pm

That function simply returns true or false. The +50 is only a part of the internal computation of the result, as is all the other code in it. Alliances 1 and 2 are just ids for allied and central.
danielherr.github.io

DanielHerr
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 117
Joined: Sun Jan 11, 2015 7:51 pm
Contact:

Re: BULGARIA....?

Post by DanielHerr » Sun Oct 25, 2015 6:14 pm

Also, GetFactionEconomicStrength in game_resources.lua adds the production of all the factions cities and part of convoy cargo. So disbanding small garrisons or upkeep costs have no effect on the result of CheckFactionDOWBalance.
danielherr.github.io

Robotron
Lieutenant Colonel - Panther D
Lieutenant Colonel - Panther D
Posts: 1230
Joined: Tue Nov 23, 2010 3:35 pm

Re: BULGARIA....?

Post by Robotron » Sun Oct 25, 2015 6:59 pm

@operating: if I'm not mistaken, the +50 ist meant to guarantee that neutral factions will carry on shifting toward their "favored" alliance even if that alliance is -50 pp behind.

operating
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 500
Joined: Tue Nov 25, 2008 5:36 pm

Re: BULGARIA....?

Post by operating » Mon Oct 26, 2015 2:57 pm

I guess what I mean is: What is the sum total the game is using on a particular turn to determine which way an alliance is moving, or for that matter, how many PP is needed to secure a positive/negative alliance. If the game is computing this on each turn, it has to be arriving at some "set number", then of course the player should know this set number, instead of guessing. Now Daniel infers the convoys in route are also included into this computation, I'll give it a go in the lua files to see where this is mentioned. Usually PP is counted the turn after a convoy reaches port, not before (there's no guarantee the convoy reaches port). If what Daniel says is true, there may be as many as 5 100 PP entente convoys at one time on the map (4 English and 1 French) totaling 500 PP, there's just no way that CP can top that to achieve alliance leverage. Usually between turn 7 to turn 10 "North Sea Blockade" goes into effect with just 1 Attack on CP shipping.

Robotron
Lieutenant Colonel - Panther D
Lieutenant Colonel - Panther D
Posts: 1230
Joined: Tue Nov 23, 2010 3:35 pm

Re: BULGARIA....?

Post by Robotron » Mon Oct 26, 2015 3:51 pm

Convoys are being defined by faction, spawn-location, unit health (100), interval, first spawn turn and whether they can be blocked or not.

Code: Select all

function DefineConvoy(faction, x, y, cargo, interval, spawnturn, blockadable)
  if blockadable == nil then
    blockadable = 0
  end

  faction = game:GetFactionById(faction)

  local convoy =
  {
    unit = -1,
    x = x,
    y = y,
    cargo = cargo,
    interval = interval,
    spawnturn = spawnturn,
    blockadable = blockadable
  }
Those values get defined in 1914.lua.

Code: Select all

  
  DefineConvoy(0, 0, 58, 100, 10, 10)  --  USA low  (french convoy)

  DefineConvoy(1, 0, 6, 100, 20, 5)  -- Canada high
  DefineConvoy(1, 17, 32, 100, 20, 15) -- Canada centre
  DefineConvoy(1, 137, 76, 100, 10, 12)  -- Africa west
  DefineConvoy(1, 39, 76, 100, 10, 8)  -- Africa east

  DefineConvoy(2, 116, 0, 100, 5, 7) -- Sweden
  DefineConvoy(2, 32, 76, 100, 10, 6, 1) -- Africa west1
  DefineConvoy(2, 102, 1, 100, 7, 12, 1) -- Narvik
  DefineConvoy(2, 24, 76, 100, 12, 14, 1) -- Africa west2
Notice both CP convoys from Africa and the Narvik convoy being the only ones that can be blocked by having a "1" assigned as last value.

The "economic value" of convoys is calculated by dividing the unit strength/cargo (100) by the convoys "interval" value.

Code: Select all

  -- Convoys
  for _, convoy in pairs(faction.luaData.convoys) do
    value = value + convoy.cargo / convoy.interval
  end

  return value
end



So, the "economic value" is not 100, but rather a number between 5 and 20...for example: the Sweden Convoy has an "interval" value of 5 and would give 20pp (convoy.cargo (100) / convoy.interval (5) = 20) that are going into the economic strength calculation.

Regarding faction shifts: in 1914.lua every faction is getting assigned a value between 0 and 100..."0" meaning it joins the CP and "100" meaning joining the Entente and "50" meaning perfectly neutral.

Any faction that is NOT totally neutral ("50") will ALWAYS shift toward it's favoured alliance after gameturn#20, AS LONG AS that alliance is "winning" - meaning the sum of it's cities total PPs + Convoys value (see above) + 50 (an arbitray value chosen by the coders to help the CP I guess) is greater than that of the enemy alliance.

Barring special events this shifting process can not be reversed, only temporarily stopped. Of course if the enemy alliance is gaining more and more cities, this temporary halt will eventually become permanent, that's the reason why Bulgaria will stop it's way toward the CP alliance in some games.

Hope this helps.
Last edited by Robotron on Mon Oct 26, 2015 8:30 pm, edited 1 time in total.

operating
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 500
Joined: Tue Nov 25, 2008 5:36 pm

Re: BULGARIA....?

Post by operating » Mon Oct 26, 2015 7:42 pm

Well you are leagues ahead of me in understanding the lua language and how to interpret what it says. OK you made sensibility of some of what is going on here, however, the Entente convoys still outnumber the German convoys anywhere from 3 to 1 up to 5 to 1 (or so), still giving Entente an advantage in alliance calculations towards alliance leanings.. Historically, I do not know if production was the chief incentive for Bulgaria to enter the war? I believe they entered for other reasons, going from there I believe this production model being used as a diplomatic avenue to war or not, is an enigma. Perhaps the bar scale setting associated with Bulgaria, ect., could be adjusted upwards to counter the production manipulation from Entente players. I have no idea how many players utilize disbanding to up their production levels, or rather reduce their overhead costs, to arrive at a better net PP? The cost savings could be applied to management assets that do not incur any maintenance up keep costs in PP: such as shell production, ect..

Robotron
Lieutenant Colonel - Panther D
Lieutenant Colonel - Panther D
Posts: 1230
Joined: Tue Nov 23, 2010 3:35 pm

Re: BULGARIA....?

Post by Robotron » Mon Oct 26, 2015 8:43 pm

Well, you could always experiment around by modifying line 133 in game_diplomacy.lua to make "pro CP neutrals" less susceptible to Entente's production lead.
Try setting "GetFactionEconomicStrength(faction) + 50" to 75 or even 100?

Code: Select all

  if faction.luaData.alignment < 50 and allianceStrength[2] + GetFactionEconomicStrength(faction) +50  >= allianceStrength[1] then
btw: I'm also planning to release my own mod, featuring 50 new events and extensive tweaking/re-balancing. Just have to find out how to "kill" commanders first. :)

operating
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 500
Joined: Tue Nov 25, 2008 5:36 pm

Re: BULGARIA....?

Post by operating » Mon Oct 26, 2015 10:08 pm

Robotron wrote:Well, you could always experiment around by modifying line 133 in game_diplomacy.lua to make "pro CP neutrals" less susceptible to Entente's production lead.
Try setting "GetFactionEconomicStrength(faction) + 50" to 75 or even 100?

Code: Select all

  if faction.luaData.alignment < 50 and allianceStrength[2] + GetFactionEconomicStrength(faction) +50  >= allianceStrength[1] then
btw: I'm also planning to release my own mod, featuring 50 new events and extensive tweaking/re-balancing. Just have to find out how to "kill" commanders first. :)
These days, I play nothing other than CTGW in MP, so all I can imagine is that whoever I am up against would also have to have the same changes to the game as I have. Personally, I hate fudging with the game. If you could: Try and see if your mod could be placed in the CTGW scenario selection panel, that would be awesome! :wink:

DanielHerr
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 117
Joined: Sun Jan 11, 2015 7:51 pm
Contact:

Re: BULGARIA....?

Post by DanielHerr » Mon Oct 26, 2015 10:18 pm

operating wrote:Try and see if your mod could be placed in the CTGW scenario selection panel, that would be awesome!
That would be nice, but I don't think it is possible.
danielherr.github.io

Robotron
Lieutenant Colonel - Panther D
Lieutenant Colonel - Panther D
Posts: 1230
Joined: Tue Nov 23, 2010 3:35 pm

Re: BULGARIA....?

Post by Robotron » Mon Oct 26, 2015 11:31 pm

DanielHerr wrote:That would be nice, but I don't think it is possible.
I'm afraid he's right since all scenarios are meant to use the same scripts as there are no seperate folders designated to be used for different mods/scenarios. One could probably have multiple installations of CTGW, one for every mod, but that seems quite unwildy to me. Oh well... :?

operating
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 500
Joined: Tue Nov 25, 2008 5:36 pm

Re: BULGARIA....?

Post by operating » Tue Oct 27, 2015 1:05 am

DanielHerr wrote:
operating wrote:Try and see if your mod could be placed in the CTGW scenario selection panel, that would be awesome!
That would be nice, but I don't think it is possible.
Yes, it's possible all you need to do is get the owner's consent. What's the harm in asking? :)

You guys might be a little new around here: There was a Eastern Front mod done by Kirk that was included within the scenario selection list, as if it was a standard game. This was done at least 2-3 versions ago, at some time it was taken down, can't remember why, regardless, it worked just like a standard scenario, no messing around with download sites....

Robotron
Lieutenant Colonel - Panther D
Lieutenant Colonel - Panther D
Posts: 1230
Joined: Tue Nov 23, 2010 3:35 pm

Re: BULGARIA....?

Post by Robotron » Tue Oct 27, 2015 3:25 pm

@operating: okay, I'll try to explain:

you CAN easily include a new scenario IF the only things that you are planning to change are unit setups, starting technologies, PP, morale and starting faction alignment. That's easily done because those changes are handled by editing a single file namely 1914.lua, 1915.lua, 1916.lua etc. and this is probably what kirk did when he released his East Front Scenario.

BUT as soon as you plan to change the rules for diplomacy, economy, UI behaviour, events, new factions or other more esoteric stuff (like Sabrata and Daniel Herr did for their mods) you'll have to modify A LOT of the other scripts too as they are connected and interacting in a multitude of ways. And multiplayer opponents will have to make sure they are using the same modified files either by renaming or overwriting the original scripts to make sure the games can properly communicate with each other.

operating
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 500
Joined: Tue Nov 25, 2008 5:36 pm

Re: BULGARIA....?

Post by operating » Wed Oct 28, 2015 7:38 pm

Where it was announced today that the owner in not going to make any changes to the balance or features of the game, the only logical way Bulgaria is going to be able to enter the war, is if Entente makes a DOW on Bulgaria, unless by some fluke CP get's an PP advantage in MP... Highly unlikely against an experienced player... Bulgaria historically entered Oct. 11th, 1915...

Robotron
Lieutenant Colonel - Panther D
Lieutenant Colonel - Panther D
Posts: 1230
Joined: Tue Nov 23, 2010 3:35 pm

Re: BULGARIA....?

Post by Robotron » Wed Oct 28, 2015 8:32 pm

Yeah and you know why? I'm quoting Wikipedia here:
What kept the Bulgarian interest the most was indeed the balance of military power. The situation on the major European fronts was at that time developing markedly in favor of the Central Powers and while the Allied operation in Gallipoli turned into a costly stalemate the Russians were being driven out of Galicia and Poland.
The Entente wasn't "playing very good" back then and so Bulgaria joined. If the Allies had played a better "game" Bulgaria would'nt have joined. So, it seems quite realistic to me the way the game is set up. 8)

DanielHerr
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 117
Joined: Sun Jan 11, 2015 7:51 pm
Contact:

Re: BULGARIA....?

Post by DanielHerr » Wed Oct 28, 2015 8:44 pm

It seems unrealistic to me. It should take into account many other aspects, particularly military size, technological advantages, and casualties.
danielherr.github.io

Post Reply

Return to “Commander - The Great War”