EMFTeam / EMF

Extended Mechanics & Flavor
34 stars 18 forks source link

Random world kingdoms and empires lack HIP/EMF's custom creation & usurpation requirements. #612

Open zijistark opened 5 years ago

zijistark commented 5 years ago

If the alternate start parameters dejure_kingdoms or dejure_empires are set to random, which of course is the default, all de jure kingdoms and empires on the map will be dynamically-created [by hard-code] titles that have no allow for custom creation / usurpation requirements. For EMF, that means that none of these titles will ever obey our title_king_basic_allow or title_emperor_basic_allow triggers.

Major consequences, from a quick glance back at those standard triggers, include:

Though I'm loathe to embark upon any big(ish) project before release at this point (I wanted to release HIP tonight), I just don't think we can tolerate this mess of incoherency and/or tons of mechanics we'd have to disable (while still not protecting against various bad stuff that isn't a mechanic on its own). We need a solution either before Furry1's release or Furry2's release.

Nevertheless, I could be convinced still to simply disable all of the mechanics aforementioned which would be broken by the lack of our title create/usurp triggers for Furry1 and enact a few measures to minimize the incoherency of the Titular Title Creation game rule (i.e., for our statically-defined titular titles which still retain their allow, never allow their creation in a random de jure scenario).

Facts:

My conceptual solution:

Code-generate a fairly large number of spare kingdom and empire titles (larger than on the map historically, because the alternate start parameters for de jure kingdom/empire size can be set to make them more numerous/small). These titles will have an allow which enforces the appropriate standard creation/usurpation requirements in a world with random de jure setup. They'll otherwise be active = no in title history.

In our on_alternate_start on_action handler (which executes before on_startup), simply swap out the hard-code-generated titles on the map de jure with random selections from the spare titles, then deactivate + destroy the hard-code-generated titles after granting the spare statically-defined title to hard-code-generated title's holder (if any).

The only thing which might make this hard but could be deferred until a later time would be assigning colors to the spare titles which are fairly distant from each other & probably putting them into color classes (grouped by various title flags or scripted triggers) which the on_alternate_start title-switcher could use to do its best to pick spare titles for usage on the map that do not have a similar color to adjacent de jure titles.

Upon consideration of how much work I'd probably want to put into this, perfectionist as I am, I think this "real solution" ought to be deferred until Furry2. For Furry1, we'll simply have a more vanilla-like experience with random de jure setup, and I can disable the various mechanics which rely upon these standard title creation/usurpation conditions' existence.