Blood and Iron - Diplomatic Module

techumseh

Deity
Joined
Mar 12, 2002
Messages
2,281
Location
BC wine country
I'd like to resume working on the ToT scenario 'Blood and Iron', a project I shelved in 2008. It was always intended as a diplomatic as well as a military strategy scenario. This was impossible to achieve using ToT and its macro events language. Now with Lua, it may be achievable. The intent of this thread is to explore that possibility. I would very much appreciate any advice or suggestions from anyone with some Lua knowledge. Thanks!
 
Are you looking at this scenario to be completely linear/historical (this event will happen, then that event will happen, etc.) or allow for some ambiguity/other outcomes? (this event may happen, that event may happen). @McMonkey and I were exploring using a dialogue box that would present players with diplomatic choices in our Philip of Macedon scenario before he went on sabbatical. There was the historical choice, and then a "what if" decision or two.
 
Prussia under Bismarck fought 3 wars to enable the creation of the German Empire (2nd Reich): Denmark, Austria and France. Each war had limited aims and was preceded by a carefully thought out diplomatic strategy that ensured a short and successful war. I've made a preliminary list of preconditions and outcomes of each one:

I. War with Denmark
Prerequisites:
Danish annexation
Austrian treaty
Schlieswig-Holstein resolution
Benefits:
increased German influence
improved army

II. War with Austria
Prerequisites:
Improved Army
moderate German influence
Italian Alliance
French neutrality
Benefits:
Strong German influence
Powerful Army
Expanded territory

III. War with France
Prerequisites:
Powerful Army
German hegemony
Austrian Territorial Integrity/Neutrality
Bavarian Alliance
British and Russian neutrality
French Declaration of War
Benefits:
German Empire
Victory
 
Are you looking at this scenario to be completely linear/historical (this event will happen, then that event will happen, etc.) or allow for some ambiguity/other outcomes? (this event may happen, that event may happen). @McMonkey and I were exploring using a dialogue box that would present players with diplomatic choices in our Philip of Macedon scenario before he went on sabbatical. There was the historical choice, and then a "what if" decision or two.

Excellent question! I would like, as much as possible, to give the Prussian player their historical options, with realistic consequences for each one. For example, after the defeat of Austria at the Battle of Koniggratz, there was a great clamor among the aristocracy for the annexation of Austrian territory. Bismarck fought against this, since his aim was not the conquest of Austria, but it's exclusion from German affairs. He also saw that leaving Austria intact meant that it would likely stay neutral in the Franco-Prussian War, which he was already planning.

In game terms, it might look like this: Once the scenario conditions for Austrian defeat are achieved, the Prussian player could make peace with annexations, or research a specific tech or build something that would trigger a Lua event that restored captured Austrian cities. In the event he kept the Austrian cities, there would be a good chance that Austria would enter the next war on France's side, with possible defections among the German states as well. The choice would be up to the Prussian player.

(edit) He could also opt to continue the war with Austria, which would likely result in French intervention.
 
Sure. So for example, on turn 3 we wanted there to be an event where Philip would have to decide if he would marry Audata in order to forge peace with a powerful nearby tribe you start at war with, but they can only choose to do so if they have 250 gold for a dowry. The player would be presented with 3 options that pop up in a dialogue box.

(please bear in mind that this is mostly Grishnach code that I then tried to get working so it might not work line by line. Also, there are better ways to organize lua files now, but I repeat the code, such as it is, to give you an idea of how it worked).

Code:
if turn == 3 then
        --g Illyrians can be appeased with towns of Upper Macedonia, and the marriage of Philipp to Audata.
        dialog = civ.ui.createDialog()
        dialog.title = "Potential peace with the Dardanians."
        dialog.width = 300
        dialog:addText("Our envoys have negotiated a potential peace deal with King Bardylis of the Dardanians. In exchange for control of Upper Macedonia, the old king is willing to halt his warriors and spare Lower Macedonia. To cement this deal he expects you to marry his daughter Audata and pay a tribute of 250 talents. Do we have any option but to agree sire?")
        --dialog:addImage("PicEvents_Test1.bmp")
        if tribeAliases.macedonTribe.money >= 250 then
            dialog:addOption("Agree to the treaty and marry Audata.", 1)
            dialog:addOption("This is too high a price to pay. Tell King Bardylis we'll meet him on the battlefield.", 2)
        else
            dialog:addOption("If only we had enough money to pay that old rascal ...", 3)
        end
     
        state.turn3_illyriansDecision = dialog:show()

This basically says that on turn 3, there's going to be a dialogue box entitled "Potential Peace with the Dardanians" that says the "Our envoys have negotiated..." bit above. Below the text, there would be two options if the player had greater than 250 gold, and only one option if they had less than 250 gold.

"Agree to the treaty and marry Audata"
"This is too high a price to pay..."

Or, if broke, "If only we had enough money."

Depending on what you picked, three things would happen. If you married Audata, you gave up 9 cities and 250 gold to the Dardanians, but in exchange, you got a peace treaty:

Code:
        if state.turn3_illyriansDecision==1 then
            --g -A Sign the peace deal & marry Audata, giving up Upper Macedonia. (*Lyncestis, Cellae, Europos, Aridea, Arnissa, Pelium, Celetrum, Aiane & Aiginion to the Dardanians. Peace with the Dardanians. 250 talents to Dardanians.)
            JUSTONCE("AudataMarriage", function()
                        dialog = civ.ui.createDialog()
            dialog.title = "Peace for love. And land."
            dialog.width = 300
            dialog:addText("King Philipp agrees to the treaty. The enormous sum of 250 talents is handed over to the Dardanians, officially as bridewealth for the hand of Bardylis' daughter, Audata. Additionally, the Macedon army evacuates large swathes of lands in Upper Macedon. For now ...")
            --dialog:addImage("PicEvents_Option1.bmp")
            dialog:show()
            state.audataMarried=true
            enforcePeace(Macedon, Illyria, true)
            tribeAliases.macedonTribe.money = tribeAliases.macedonTribe.money - 250
            tribeAliases.illyrianTribe.money = tribeAliases.illyrianTribe.money + 250
                local illyrianCitiesDowry = {"Lyncestis", "Cellae", "Aridea", "Arnissa", "Pelium", "Aiane", "Aiginion", "Cellae", "Lychnidus"}
                for _, cityName in pairs(illyrianCitiesDowry) do
                local city = findCityByName(cityName)
                    if city.owner ~= Illyria then
                        for unit in city.location.units do
                        print("Destroyed " .. unit.type.name .. " at " .. unit.x .. "," .. unit.y .. "," .. unit.z)
                        civ.teleportUnit(unit, cityAliases.pella.location)
                        unit.homeCity = None
                        end
         
                    city.owner = Illyria
                    print("Gave ownership of " .. cityName .. "to Illyria")
                    end
                end
            end)
        end

If however you decided to refuse the marriage offer (or lack the money for it) then the war would continue. Note that I don't know if the "dialogue:addImage("PicEvents_Option2.bmp." will work - I think this was something Grishnach and TNO were talking about for a new version of ToTPP that would have allowed commands to draw stuff on maps, etc., but neither of them are around now to ask.

Code:
        if state.turn3_illyriansDecision==2 then
            --g -B This is too high a price to pay. Tell King Bardylis we'll meet him on the battlefield
            dialog = civ.ui.createDialog()
            dialog.title = "WAR!!!"
            dialog.width = 300
            dialog:addText("Enraged, King Philip rejects the shameful proposal. Never will he accept Dardanian control of Macedon soil, nor a Dardanian hussy as his wife! The Dardanians renew their attacks with fury.")
            --dialog:addImage("PicEvents_Option2.bmp")
            dialog:show()
        end

        if state.turn3_illyriansDecision==3 then
            --g -C Macedon does not have the gold ...
            dialog = civ.ui.createDialog()
            dialog.title = "War ..."
            dialog.width = 300
            dialog:addText("If only Macedon had enough money to pay the Dardanians off ... Realizing that Macedon may well lack the funds to even continue its campaign, the Dardanians renew their attacks.")
            --dialog:addImage("PicEvents_Option2.bmp")
            dialog:show()
        end
    end --g end of fork turn==3

Anyway, while you're thinking through the scenario, figure out what options you want available and what the consequences are and it will be possible to have different paths. If @McMonkey ever comes back for good I hope we will finish Philip and the events above because I think a "choose your own plausible historical adventure" scenario would be much fun. Bismarck sounds like a great scenario to do this with, since it seems like you'd want half the fun to be the diplomacy.

Edit - 99% the add imagine will not work and that is why I edited it out -- of the events in the first place.
 
Top Bottom