Page 1 of 1

? on NM when city is captured

Posted: Tue Nov 06, 2018 5:00 pm
by operating
It's been awhile since getting into this game, trying to clear out some of the fog. If a standard city is lost what's the cost in NM to the owner (gain to who captures it) ? IIRC the owner took a -10 NM for a city, also a -5 NM for a fort. I did read the lua file where it said a -100 to the owner, also +50 to who captures it (these 2 figures I am not sure how they actually affect NM) . I believe the NM + or - only happens once per city for entire scenario/match. Meaning if the city is recaptured there is "NO" change to either sides' NM. If anybody has a clear concise answer to my question, please fill in the details. Thank you

Re: ? on NM when city is captured

Posted: Tue Nov 06, 2018 5:58 pm
by nehi
operating wrote: Tue Nov 06, 2018 5:00 pm It's been awhile since getting into this game, trying to clear out some of the fog. If a standard city is lost what's the cost in NM to the owner (gain to who captures it) ? IIRC the owner took a -10 NM for a city, also a -5 NM for a fort. I did read the lua file where it said a -100 to the owner, also +50 to who captures it (these 2 figures I am not sure how they actually affect NM) . I believe the NM + or - only happens once per city for entire scenario/match. Meaning if the city is recaptured there is "NO" change to either sides' NM. If anybody has a clear concise answer to my question, please fill in the details. Thank you
losing standard city doesnt affect nm

it does just through losing its production, so unconquered city with PP 0 has same effect as conquered, as long as it has PP 0

Re: ? on NM when city is captured

Posted: Tue Nov 06, 2018 7:11 pm
by operating
Hello nehi.!

Perhaps in earlier versions there was an NM loss, however I am a little confused after viewing the body lines of this morale script, then again above that reads "no longer used". At one time Kirk23 specifically spelled out the city NM loss/gain effect on the game, which I had reiterated in one my earlier posts at this forum. I do not recall changes to this city loss NM in the "readme" from updates. Currently I am in a match (as you know) where OE has only lost 3 cities Jeruslaham, Gaza and Erzurumum (excuse the spelling), yet my NM is at 60, sure I have had a ton of casualties, but it should not add down to 60. OE at one time did capture SaraKamish and one other Russian city, before being put to the sword. I'm still a little perplexed trying to sort the NM out.

Thanks, Bob


function ChangeFactionMorale(faction, change)
faction.luaData.eventMorale = faction.luaData.eventMorale + change
--~ if faction.morale < 0 then
--~ faction.morale = 0
--~ end
end

-- No longer used
--~ function CombatMoraleEffect(attacker, defender, attackerLosses, defenderLosses, retreat)
--~ ChangeFactionMorale(attacker.faction, math.floor(-attackerLosses / 10))
--~ ChangeFactionMorale(defender.faction, math.floor(-defenderLosses / 10))
--~ end

-- no longer used
-- Drop from damage to cities, effect is permanent
--~ function DestructionMoraleEffect(attacker, damage)
--~ ChangeFactionMorale(attacker.faction, -damage / 10)
--~ end


-- no longer used
--~ function CaptureMoraleEffect(captor, construction)
--~ if construction.type == Construction.TYPE_CITY or construction.type == Construction.TYPE_FORTRESS then
--~ -- morale loss for original owner
--~ local owner = construction.hex.originalFaction
--~ ChangeFactionMorale(owner, -100)

--~ -- morale boost for captor's factions
--~ for faction in captor.factions do
--~ ChangeFactionMorale(faction, 50)
--~ end
--~ elseif construction.type == Construction.TYPE_CAPITAL then
--~ -- morale loss for original owner
--~ local owner = construction.hex.originalFaction
--~ ChangeFactionMorale(owner, -200)

--~ -- morale boost for captor's factions
--~ for faction in captor.factions do
--~ ChangeFactionMorale(faction, 100)
--~ end
--~ end
--~ end

function DeptMoraleEffect(faction, dept)
ChangeFactionMorale(faction, dept)
end

Re: ? on NM when city is captured

Posted: Tue Nov 06, 2018 7:41 pm
by nehi
jerusalem has event, it costs a lot of nm to lose it

bombed cities / lowered production affects nm too, as described in that about losing regular city

taking foreign cities doesnt improve own nm, except it does some production as capital cities

Re: ? on NM when city is captured

Posted: Tue Nov 06, 2018 8:36 pm
by Robotron
All lines of code starting with -- or --~ are no longer used.
These are just lines of code that were made defunct.

Every line of code you posted starts with either -- or ~--
There are also multiple occasion of "comments" like -- No longer used
in the code snippet you posted made by coders of earlier versions of the game.

So, it's all not longer used.