• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

WIP Periods, royalty names & wars

DeathDaisy

Freebooter
Storm Modder
continuing the work we started in the Hilda Sparre thread, Ive been adding lots more wars to the freeplay StartStoryline.c. most are just taken from lists on wikipedia so maybe some are weird, but I felt more diverse starting conditions trumps minute accuracy :p

that said I went kinda overboard and added lots of things like realms joining and leaving ongoing wars and other pointless things no one will ever notice. especially the 1500s were very confusing since thats pretty much still the middle ages, with overlapping wars with kingdoms being allies and enemies at the same time, but early explorers needs some action so added a whole bunch at random anyway

I've also added royalty names for all nations from 1500-1830! except the netherlands because they were pretty much a republic from start to finish from what I can tell, except when they didnt exist for most of early explorers? could be wrong.

I also changed monarch for portugal in the napoleonic period in periods.c, it had The Most Faithful Majesties of Pedro III & Maria I, but Pedro had been dead for several years in 1790 so now its just Maria I. and changed the " of Sweden" royal title to "King of Sweden" for swedish kings since it seems titles are put before the name sadly. could go with putting "of Sweden" in their name tho, maybe thatd look kinda cool. other fun stuff is that Oliver Cromwell is now Lord Protector of England for a few years. added the new titles to common.ini

anyway, it also got me thinking about the period year spans, specially the late ones. revolutions spans from 1770 to 1789, and france default royal title there is "The Republic of France", which is weird since the first republic was founded in 1792 ie in the napoleonic era. they had a king for the entire duration of the revolutions era. and napoleon is default for napoleonic, obviously, but that means hes emperor in 1790, before the revolution itself.

my suggestion would be maybe moving the start date for napoleonic to 1800? that feels like a natural end to the old world and the start of the modern one with napoleon seizing power in 1804, the death of the enlightenment movement and the start of the romantic era. Id also wish moving revolutions forward to 1775 or something, but that's not as big a deal. I think napoleonic def starts too early tho.

would those changes make sense? I see hornblower starts in 1798.. would maybe moving napoleonic to -98 or thereabout be alright, even tho its an uneven number? or setting hornblower in 1800, but since its based on existing fiction I suppose that would kinda ruin it

anyway, its not the end of the world honestly, but worth some thought? meanwhile attaching what I got so far, so you can see the terrible mess that is one hundred million ifs for different years and countries :shock I havent tried all of the added things in-game because that would be madness, but Ive jumped into a selection of different dates and havnt had any problems. wouldnt be surprised if it needs some polish tho, all things considered :ninja
 

Attachments

  • Periods.c
    45.3 KB · Views: 219
  • StartStoryline.c
    50.3 KB · Views: 216
  • common.ini
    73.4 KB · Views: 239
Didn't look at the actual code, but HOLY CRAP anyway! :shock

I've been wondering how hard it might be to add in pre-programmed relation changes that occur at specific dates.
Should be possible, I reckon. But would take some doing...
 
Didn't look at the actual code, but HOLY CRAP anyway! :shock

I've been wondering how hard it might be to add in pre-programmed relation changes that occur at specific dates.
Should be possible, I reckon. But would take some doing...
wouldn't be that hard if there was an object/array somewhere which had the date and the relation changes which has to occur.
 
They'd just need to be executed.
The main tricky bit though is how to make it work together with/avoid interference from the random nation relation changes.
 
They'd just need to be executed.
The main tricky bit though is how to make it work together with/avoid interference from the random nation relation changes.
I think you should have the option to have either realistic relation changes or random relation changes.
 
That would perhaps be the only way to make it work. A pre-ordained peace treaty or declaration of war is going to look silly if the nations in question already made peace / declared war randomly last month. xD So have one or the other, but not both.
 
I haven't had a chance to analyse the FreePlay "StartStoryline.c" yet, but the revised monarchs in "Periods.c" look alright. The comment about the French Republic not existing until 1789, therefore being wrong for the "Revolutions" period, is valid, so I'm changing the default French king at that time to be His Most Christian Majesty Louis XVI.
 
Amazing work there!

If I understand this correctly, this
Code:
                if(GetDataYear() > 1556){
                    Periods[GetCurrentPeriod()].Royal.Spain.Name = "Felipe IV";
should be Felipe II, and Felipe III, who should be next, is missing altogether (he's the same person as Felipe II of Portugal, so same date).

Also Carlos el Hechizado should be Carlos II el Hechizado. The numbering is used for all other kings so this shouldn't be an exception (arguably the "el Hechizado" part and other nicknames shouldn't be added because most if not all mentions of the monarchs ingame are for formal occasions and these popular nicknames wouldn't be used in such occasions, especially in cases like "el Hechizado", which menas "the Bewitched" and was referencing his mental and physical disabilities).

Spain was neutral with the US in the War of 1812.

I've already expressed elsewhere my opinion on why Spain should be at war with France and have Fernando VII as king from 1808 onwards. Although José I was technically the king, he didn't control half the country and none of its colonies (his envoys were immediately executed for treason when they reached Cuba), and his coronation was consideed invalid by the let's call them "loyalists", who acclaimed Fernando VII instead and acted in his name, despite him being exiled/imprisoned in France.
 
Last edited:
Amazing work there!

If I understand this correctly, this
Code:
                if(GetDataYear() > 1556){
                    Periods[GetCurrentPeriod()].Royal.Spain.Name = "Felipe IV";
should be Felipe II, and Felipe III, who should be next, is missing altogether (he's the same person as Felipe II of Portugal, so same date).

hm, dunno how I missed that, but obviously I did. I vaguely remember reading something about the holy roman empire and being sorta confused, but that may be someone else.

Also Carlos el Hechizado should be Carlos II el Hechizado. The numbering is used for all other kings so this shouldn't be an exception (arguably the "el Hechizado" part and other nicknames shouldn't be added because most if not all mentions of the monarchs ingame are for formal occasions and these popular nicknames wouldn't be used in such occasions, especially in cases like "el Hechizado", which menas "the Bewitched" and was referencing his mental and physical disabilities).
I dropped the nicknames for most monarchs for that reason, but I just found "el Hechizado" especially funny so I added that :p but I can drop it if its better

Spain was neutral with the US in the War of 1812.
that war was already added before I went at it so I didnt check that, but I can change it so spain is neutral no problem

I've already expressed elsewhere my opinion on why Spain should be at war with France and have Fernando VII as king from 1808 onwards. Although José I was technically the king, he didn't control half the country and none of its colonies (his envoys were immediately executed for treason when they reached Cuba), and his coronation was consideed invalid by the let's call them "loyalists", who acclaimed Fernando VII instead and acted in his name, despite him being exiled/imprisoned in France.

I mostly just used a list on wikipedia which doesnt give a lot of nuance, so Im sure youre right. updating the files soon with those changes. :onya
 
I'm doing a bit of editing on it as well. For one thing, @DeathDaisy, unless you object, I'd like to restructure it. Instead of big nested "if" blocks like this:
Code:
    if(GetDataYear() >= 1500){
       Periods[GetCurrentPeriod()].Royal.Spain.Name = "Fernando II";
       if(GetDataYear() > 1504){
           Periods[GetCurrentPeriod()].Royal.Spain.Name = "Juana I";
           Periods[GetCurrentPeriod()].Royal.Spain.Title = XI_ConvertString("Her Most Catholic Majesty");
           if(GetDataYear() > 1516){
               Periods[GetCurrentPeriod()].Royal.Spain.Name = "Carlos I";
               Periods[GetCurrentPeriod()].Royal.Spain.Title = XI_ConvertString("His Most Catholic Majesty");
               if(GetDataYear() > 1556){
                   Periods[GetCurrentPeriod()].Royal.Spain.Name = "Felipe IV";
               }
           }
       }
   }
I'd like to substitute specific, single "if" blocks like this:
Code:
    if(GetDataYear() >= 1500)
   {
       Periods[GetCurrentPeriod()].Royal.Spain.Name = "Fernando II";
       Periods[GetCurrentPeriod()].Royal.Spain.Title = XI_ConvertString("His Most Catholic Majesty");
       if(GetDataYear() > 1504 && GetDataYear() <= 1516)
       {
           Periods[GetCurrentPeriod()].Royal.Spain.Name = "Juana I";
           Periods[GetCurrentPeriod()].Royal.Spain.Title = XI_ConvertString("Her Most Catholic Majesty");
       }
       if(GetDataYear() > 1516 && GetDataYear() <= 1556) Periods[GetCurrentPeriod()].Royal.Spain.Name = "Carlos I";
       if(GetDataYear() > 1556 && GetDataYear() <= 1598) Periods[GetCurrentPeriod()].Royal.Spain.Name = "Felipe II";
       if(GetDataYear() > 1598 && GetDataYear() <= 1621) Periods[GetCurrentPeriod()].Royal.Spain.Name = "Felipe III";
   }
Felipes corrected as per @Homo eructus' suggestion. (I've been using Wikipedia as the source as well. For any given king, it gives the dates of his reign, his predecessor and his successor, which is how I traced from Carlos I to Felipe III. ;))
 
I'm doing a bit of editing on it as well. For one thing, @DeathDaisy, unless you object, I'd like to restructure it. Instead of big nested "if" blocks like this:
Code:
    if(GetDataYear() >= 1500){
       Periods[GetCurrentPeriod()].Royal.Spain.Name = "Fernando II";
       if(GetDataYear() > 1504){
           Periods[GetCurrentPeriod()].Royal.Spain.Name = "Juana I";
           Periods[GetCurrentPeriod()].Royal.Spain.Title = XI_ConvertString("Her Most Catholic Majesty");
           if(GetDataYear() > 1516){
               Periods[GetCurrentPeriod()].Royal.Spain.Name = "Carlos I";
               Periods[GetCurrentPeriod()].Royal.Spain.Title = XI_ConvertString("His Most Catholic Majesty");
               if(GetDataYear() > 1556){
                   Periods[GetCurrentPeriod()].Royal.Spain.Name = "Felipe IV";
               }
           }
       }
   }
I'd like to substitute specific, single "if" blocks like this:
Code:
    if(GetDataYear() >= 1500)
   {
       Periods[GetCurrentPeriod()].Royal.Spain.Name = "Fernando II";
       Periods[GetCurrentPeriod()].Royal.Spain.Title = XI_ConvertString("His Most Catholic Majesty");
       if(GetDataYear() > 1504 && GetDataYear() <= 1516)
       {
           Periods[GetCurrentPeriod()].Royal.Spain.Name = "Juana I";
           Periods[GetCurrentPeriod()].Royal.Spain.Title = XI_ConvertString("Her Most Catholic Majesty");
       }
       if(GetDataYear() > 1516 && GetDataYear() <= 1556) Periods[GetCurrentPeriod()].Royal.Spain.Name = "Carlos I";
       if(GetDataYear() > 1556 && GetDataYear() <= 1598) Periods[GetCurrentPeriod()].Royal.Spain.Name = "Felipe II";
       if(GetDataYear() > 1598 && GetDataYear() <= 1621) Periods[GetCurrentPeriod()].Royal.Spain.Name = "Felipe III";
   }
Felipes corrected as per @Homo eructus' suggestion. (I've been using Wikipedia as the source as well. For any given king, it gives the dates of his reign, his predecessor and his successor, which is how I traced from Carlos I to Felipe III. ;))
if thats better I have no objections!

Ill post my updated startstoryline.c so you can copy over some other changes if you havent done them already, but maybe its easier for you if I just put the updated parts here too
I put this at the start of early explorers
Code:
if(GetDataYear() >= 1500){    // DeathDaisy: England becomes Britain in 1707
        Periods[GetCurrentPeriod()].Nations.Name.England = "England";
        Periods[GetCurrentPeriod()].Nations.OfficialName.England = "England";
        Nations[GetNationIDByType(ENGLAND)].Desc = "English";
    }
and this at the golden age of theft and murder¨
Code:
if(GetDataYear() > 1706){    // DeathDaisy: England becomes Great Britain
        Periods[GetCurrentPeriod()].Nations.Name.England = "Britain";
        Periods[GetCurrentPeriod()].Nations.OfficialName.England = "Great Britain";
        Nations[GetNationIDByType(ENGLAND)].Desc = "British";
    }
so england is england until 1707. Ive tried it in game and it seems to work

I also dun this in the war of 1812, I would guess you have already dun the same thing, but cant hurt to save you the trouble if you havent gotten there yet xD
Code:
if(GetDataYear() >= 1808){    // DeathDaisy: suggestion from Homo Eructus!
        SetNationRelationBoth(SPAIN,FRANCE,RELATION_ENEMY);
    }
    if (GetDataYear() >= 1812 && GetDataYear() <= 1815)    // GR: War of 1812
    {
        SetNationRelationBoth(ENGLAND, SPAIN,    RELATION_NEUTRAL); // DeathDaisy: from enemy to neutral, suggestion from Homo eructus
        SetNationRelationBoth(ENGLAND, AMERICA,    RELATION_ENEMY);
        SetNationRelationBoth(SPAIN, AMERICA,    RELATION_NEUTRAL);    // DeathDaisy: from enemy of neutral, suggestion from Homo eructus
        //SetNationRelationBoth(SPAIN, FRANCE,    RELATION_ENEMY); // DeathDaisy: added above at an earlier date, also suggested by Homo eructus
    }

another thought I had when talking about the realistic relation changes, one thing that would be cool and much more unintrusive on existing mechs is changing the royalty at their real dates. idk how to do it yet tho; I havent quite worked out how arrays work or how to set timers for specific dates in an efficient way? are quest cases the way to go? where would you go about putting them? optimally itd be wicked cool if thered be an entry in the tavern rumours for it too xD
 

Attachments

  • StartStoryline.c
    51.5 KB · Views: 182
Last edited:
I wouldn't spend too much time on royalty. Their only purpose in the game is for their names and titles to appear in governor dialogs when you beg forgiveness, buy a LoM or gain land from promotions. Privateers and naval officers won't see royal names often, and everyone else probably won't see them at all. Also, remember that they didn't have radio in those days so the news that King Fred II had died and King Jim III was now on the throne would take some time to reach the Caribbean. All of which means that getting it right to the exact day or even month is an unnecessary level of precision. I've been setting the date of transition depending on how much of the year the earlier monarch was in power; if the succession happened in January then set it one year earlier than if it happened in August, for example.

Relations are much more important because they determine who's going to attack you at sea, and who you're allowed to attack if you have a LoM. Random relation changes make things interesting during the game, but it might be a nice touch to have an initial log entry explaining which war is in effect at the start of the game.
 
I wouldn't spend too much time on royalty. Their only purpose in the game is for their names and titles to appear in governor dialogs when you beg forgiveness, buy a LoM or gain land from promotions. Privateers and naval officers won't see royal names often, and everyone else probably won't see them at all. Also, remember that they didn't have radio in those days so the news that King Fred II had died and King Jim III was now on the throne would take some time to reach the Caribbean. All of which means that getting it right to the exact day or even month is an unnecessary level of precision. I've been setting the date of transition depending on how much of the year the earlier monarch was in power; if the succession happened in January then set it one year earlier than if it happened in August, for example.

Relations are much more important because they determine who's going to attack you at sea, and who you're allowed to attack if you have a LoM. Random relation changes make things interesting during the game, but it might be a nice touch to have an initial log entry explaining which war is in effect at the start of the game.
that's true, I just find such details really cool :p

a log entry about which wars would also be nice tho! thats shouldnt be too hard, right? just a lot of work writing them for all the different wars xD
 
Should indeed be quite easy. Plus: It'll make your hard work more visible! I like the idea. :onya
it could even go into the tavern news, just like with the changing relations.
 
There's not much point - it's a piece of background information to explain why the relations are set the way they are at the start of the game. Tavern news or governor dialog could be used to tell the player of changes in relations if the option to have wars start and end on accurate dates rather than at random is ever implemented, though.

How do you add something to tavern news? It could be useful to put things into the news for storyline or quest purposes. Especially if it can be limited to a specific tavern - an event which is significant in Port Royale might not be of so much interest to the people of Cartagena, for example.
 
cant hurt to have a piece of tavern news there from the start ;) aint improbable ppl would be talking about the war. Im always a bit disappointed when its wholly empty when I ask the tavern keeper in the start :p but def lower prio than the journal to be sure

anyway, where would be best to put the journal entries? can they go right into the startstoryline? or is it better in that place with the player type logs?
 
Back
Top