Giter VIP home page Giter VIP logo

emf's People

Contributors

amphet1013 avatar bnormoyle avatar cybrxkhan avatar dangitsdaaaaang avatar delnarersike avatar escalonn avatar ese-khan avatar kingofcool avatar klorpa avatar mclemente avatar mijailpropagandaman avatar sourenics avatar thefinestsieve avatar zijistark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emf's Issues

More ambitions

  • Win a War (on_war_victory adds 7-day duration hidden timer that causes objective success)
  • Win a Holy War (similar, plus boost with the zealous and the theocrats)
  • Win a Crusade (a major ambition, to say the least)
  • 10 Years of Peace
  • 20 Years of Peace
  • Have 5 Children
  • Have 10 Children
  • Have 15 Children
  • Have 20 Children
  • Adopt a Lifestyle (implemented)
  • Improve Relations with Liege
  • Make a Friend
  • Win a Duel
  • Receive Commendation from Vassals
  • Become Independent

Actual, though minimal, dynamic Fourth Crusade coverage

A sometimes-happens-sometimes-doesn't event would start the Fourth Crusade chain at some variable point between 1187 and 1300 (but never if the start date was 1204) as long as Byzantium is in power and meets the Crusade requirements (at least 6 realm counties in Thessalonika, which is pretty much all of them on the vanilla map). Also, the Kingdom of Venice must exist.

The Crusade CB would be given a flag bypass to allow any scripted character to call the Crusade. This way, we can not misrepresent the Pope as ever having condoned a Crusade bringing harm to fellow Christians (Byzantium, and he never did, but he accepted some spoils after it was over).

Instead a narrative event will setup the, well, historical narrative pretext of the Fourth Crusade and start the Venetians' massive shipbuilding and sailor recruitment/training effort in Venice. Another narrative event, about a year later, will describe the Crusaders' inability to pay anywhere near their promised sum for the sailor mercenaries and freshly-built ships, the ensuing intrigue, the taking of an ex-Venetian outpost in Croatia as partial payment.

Outrage from the Pope, ignored by the Crusader commanders, and general clusterfuck really start to permeate the narrative flavor text about here.

We then cover the intrigue of the Komnenos exile in Swabia's many promises, which would more than sufficiently fund and enable the Fourth Crusade to be saved, in return for restoring him to his "rightful throne" (an act the Catholics believed would be welcomed by the people of Constantinople, communication being poor and their lack of awareness of the general Byzantine acceptance of the concept of a rightful brotherly palace coup contributing to that).

The King of Venice is then scripted to call a Crusade against k_byzantium / k_thessalonika (SWMH latter). He does. It works like any Crusade, but also, a fairly sizable spawn (about 5,000 soldiers) is provided under the command of Venice (horrible oversimplification but I think quite acceptable), as Crusade participation will be lower than usual (also, no holy orders will participate), and this is to represent the fact that so many soldiers had been waiting around, long from home, for action to happen anyhow. It's only 4-5,000 (real number was a bit over 8,000), because, of course, most of the Crusaders had gone home by the time the siege of Constantinople began.

Anyway, the Crusade CB does its magic against Byzantium. If it succeeds, the usurped title's liege is automatically switched to the [made de jure and activated] e_latin_empire, an empire title which the new Crusader King (or player) also becomes the owner. Upon success, a final narrative event speaks of the Pope's acceptance of the Crusade, and the formation of the Latin Empire.

A general sense of serious, tragic clusterfuck is communicated in the relatively short and simplified narratives.

Presto.

[DynamicLevies] temporary fallback maintenance pulse to reevaluate all tier > count rulers' dynlevy law

This is required until such point as Captain Gars fixes this bug with the title transfer on_actions. Basically, right now, the previous holder character scope is always null, so we miss-out on levy law reevaluations for realms that shrink in size.

  • Therefore, go ahead and, for all rulers tier > count, run the dyn_levies.0 event upon EMF's 90-day maintenance pulse or, for even faster re-evaluation, upon an EVENT_PROCESS_OFFSET-day isis pulse. This will ensure that shrinking realms also get the increased levy-law efficiency they deserve.

Leave this for last, as Paradox / Captain Gars should fix the bug quickly in a stint dedicated to CKII development starting Mon 6/23 and ending Fri 7/4. It's quite annoying to have to do global maintenance on this for no good reason (and adds unnecessary lag for levy-law adjustment for shrinking realms), so hopefully it's a non-issue shortly.

Pope tries to incentivize rulers into joining a called Crusade

Could also have a separate event text but otherwise identical chain for Caliphates, although Muslims seem to do a pretty good job of joining Jihad already for some reason.

Basically, when the [Catholic or Fraticelli] Pope calls a Crusade, he randomly sends letters out to a number of qualifying rulers of his religion that are not at war (though their lieges may be at war) and duke-tier or higher.

These letters will vary in their offers, usually just a plea for some minor piety-- other times, esp. for more powerful rulers, he will offer recompense from the Papal treasury or a very large piety grant.

AI will often join (this will be accomplished by event with join_attacker_wars) but may not depending upon factors like cynical, zealous, savings available, how much they want whatever accepting the offer would grant them, historical regional weighting (e.g., Franks will be significantly more likely to join than otherwise), etc.

Naturally, the player can choose to join a Crusade this way too. It does mean waiting a little longer for a letter (but one has to be sent to offer to join the war anyway). We can make it so, of the random selection of qualifying lords contacted, the player is always included so that they can rely on this varied mechanism if they so choose (though if they're at war, the letter won't come, and it's up to them).

This would be fun flavor, relatively easy to code, and it would encourage many more smaller lords to participate in the Crusades, which is both more fun and much more historical. It would also generally bring significantly more troops to the battlefield (but not balance-breaking levels-- only a tune-able random selection of the AI is ever contacted).

Overhaul dynasty member title request events

At the very least, don't fire the damn event chain when your son/brother/whatever is commanding one of the flanks in the battle that you're currently in together. Seeing as this chain potentially fires off an Adventurer chain and completely ruins relations with the family member (do believe it's -1000), some care ought to go into when it fires, flavor variance as it is quite repetitive, and a change-up of some of its mechanics. Can you lure the outraged family member back to your court?

Update mercenary compositions

Mercenary bands are almost all heavy infantry. This is both boring and subpar, as this means that the cultures don't get to use their cultural tactics. Changing the mercenary compositions to reflect their cultural biases will make things more interesting and make mercenaries more useful for everyone.

Lifestyle trait balancing, ambition, and event chain exit clauses

Let's make the full gamut of lifestyle traits actually likely possibilities for the average player. For the player, let's partially unhinge those MTTHs from the associated event chains but always provide ways to not choose a given a lifestyle (unlike, say, vanilla scholar/mystic).

Additionally, let's add an ambition 'Adopt a Lifestyle' which increases the chances of such 'possible' lifestyle trait event chains' occurrence by a fairly large factor-- say, 5x.

Let the player RP the adoption of a lifestyle. Who says one can't be kind and also get a thrill out of rough sex and torturing your enemies? (ahem GoT reference) OK, maybe that one's a stretch.

[DynamicLevies] dynlevy laws for major revolts

When a major revolt occurs, it will be necessary to adjust the dynlevy laws of both the liege and the revolt title before levy-raising occurs (thus in support code hooked from all the major_revolt CBs).

At first, we can just default the revolt case to operate as it would have without the advent of DynamicLevies, but then we'll want to extend it to apply the concept of realm_size-scaled levy-raising efficiency for the revolt title as well as for the liege. This will be made further complex by planned AF2 changes, however, that allow dynamic drop-outs/call-to-arms in Autonomy Faction revolts which allow faction members to choose whether to stay loyal upon revolt outbreak, so significant non-default extensions for the revolt case are a low priority.

For now:

  • In all major_revolt = yes CBs, give both the liege and the revolt leader a default levy efficiency law (possibly dynlevies_0, or possibly a compromised value, depending upon relative troop count balances, as it's likely that dynlevies_0 will yield far higher troop counts than otherwise would've been raised in a pre-DynamicLevies revolt) upon all their tier >= primary tier demesne titles on_addfor ROOT and in on_add_title for FROM.
  • Upon all such war end outcomes, invoke dynlevy.0 on both ROOT and FROM to restore their dynamic levy laws. Also clr_character_flag = dynlevy_dirty_revolt upon both ROOT and FROM
  • on_add mark both FROM and ROOT with the character flag dynlevy_dirty_revolt. This is a protection measure against failing to restore the dynlevy laws upon invalidation, as there is no CB on_action for invalidation.
  • Upon 90-day maintenance pulse, invoke dynlevy.0 on every ruler tier > count that has_character_flag = dynlevy_dirty_revolt and in_revolt = no. It clears the flags as it iterates through all of the rulers, whenever they were set
  • In the standard EMF ruler on_death flag/variable/trait inheritance handler (create it if it does not yet exist), always inherit the flag dynlevy_dirty_revolt into the scope of current_heir if it's set in the dying ROOT scope. This ensures that warleaders dying in the middle of revolts doesn't impact the dirty flag protection against war invalidation.
  • The above doesn't protect against cases of invalidation where ROOT or FROM abdicates in the middle of the war. This basically never happens, but if an airtight approach exists, we should use it, and one will be possible when the title transfer on_action FROMFROM bug is fixed. When that's the case, we create a handler event tapped to on_new_holder_inheritance and on_new_holder_usurpation that triggers when FROMFROM has_character_flag = dynlevy_dirty_revolt and simply transfer the flag to the new holder, ROOT. We leave the flag in FROMFROM.

Province revolt_risk, esp. in minority-group provinces, increases the longer war rages on

Let TOG rebel mechanics fire off increasing amounts of peasant revolts, esp. in non-culture_group provinces and the like, as wars rage on.

Would be subtle but something. I generally find simultaneous revolts when I'm trying to win a war to be a delight-- something unexpected to have to logistically crush before it gets out of hand as I deal with my enemy.

[DynamicLevies] complete new on_actions experiments

  • With a more sophisticated type of test, verify and discover the behavior of on_new_holder_inheritance.
  • Confirm hypothesis that FROMFROM (previous holder) scope does indeed get bound correctly after all. [ ANSWER: No, it is currently never bound. It is broken for all of the new on_actions. ]

Scenario customization decision: De Jure Shuffle

... which randomly alters the de jure borders of every kingdom on the map, by taking duchies from neighbor kingdoms with preference given from smallest to largest kingdoms.

Could also alter de jure empire borders, though I'm less interested in that. Would be pretty rad in combination with an equivalent of Shattered Balance Plus that will quickly lead to the establishment of an alternate, somewhat-random-somewhat-recognizable scenario.

[DynamicLevies] test and balancing suite

  • A maintenance event that runs for all counts and barons, checking whether they somehow have a primary title demesne law other than dynlevy_0 or none, respectively. Sends an alert to player if it happens, as this should never happen. [ Note that currently the baron case actually will "fail," but they'll be assigned dynlevy_0 always, which technically does no harm. ] Current design assumptions rest upon this never happening. If they do happen, send an alert to the player.
  • A console-triggered utility event invoked upon a character ID which displays their dynamic levy law in effect, hopefully displaying both the grade and levy law modifier.
  • Law calculator that makes it easy to assess any combination of PB laws with realm_size's consequent net vassal_levy modifiers (taxes would be nice too).

End the damn tumbling, insert interactive porno

Kill the vanilla "tumbling" event. It's old. It's repetitive. It lacks any positive RP characteristics.

Instead, sow your wild oats in stages. Using the interactive-immediate approach to character interaction, perhaps you happen to flirt with the girl/boy around court once or twice, with history to remember the relationship. This could be achieved from feast hooks, generally any social hook, random event whenever you're actually home at court, etc.

During stage 1, almost always give the player an exit strategy. It's debatable whether particularly lustful characters should be forced to act lustfully, but I tend to think the player should RP as they please. Maybe it's humorous or cruel or simply a 'Not Interested,' but the player should no longer receive flirtatious events from that character if they take the exit strategy (unless they're some other kind of events about fat chicks / horny suitors that just won't go away). Likewise, the AI should spurn the player sometimes.

During stage 2, a "special relationship" of sorts has been established. It may be quite awhile before another event happens when stage 2 is engaged after establishing an "interest" relationship, and it should be able to happen in multiple ways. The player and the other character both have an inkling there is mutual fondness, even if one of the characters won't act upon it. A "special meeting" might happen where one of the options of the dialogue (or as it comes up to the player) is to spend that one night together (proceeding directly to stage 3), give her / receive a poem, hold hands walking in the moonlight, whatever. If each of the characters proceeds past this, we get to...

Stage 3. Ker-blam. You've just fucked your son's wife. Or your sister (yes, open up the incest taboos completely-- people eat them up, for good reason). Or, if single, you've maybe proposed to her after one all-night affair. Or you've simply engaged in playboy for the night, and it's back to business (most of the time). Here "lover" status may or may not be achieved, depending upon how you choose / things chose to leave the encounter.

Damn the the tumbling.

Interactive, immediate character interaction

Let us throw off the shackles of CKII's mysterious feudal postal service and focus more upon up close and personal character-character interactions.

The idea here is to create interaction chains which are as easily extensible as possible with alternate flavor events and twists, in some ways borrowing from the draw of the Duel Engine in exploiting the increased immersion from non-delayed AI reaction.

This is really more of a meta-idea that should be used wherever possible.

Got a letter_event to send? Consider what a diplomatic envoy could do for the player instead. Brothers need to have it out in an argument? Maybe a little of this and then the duel engine if you choose the right adventure.

EU4 Conversion Decision Fix for a number of heresy takeovers, particularly for miaphysites

[ Justifications for why this is necessary for the EU4 converter can be left to OrdepNM if interested. Already discussed it with him. ]

In the the 'Prepare for Conversion to EUIV' decision:

For a predefined set of N heresy religions H_i for i=0..N-1 of a main religion P, check whether any of H_i for i=0..N-1 is the parent religion of P. If so, set the parent religion of P to noreligion, and then set H_i's parent religion to P.

Is a compromise which addresses a vanilla converter bug due to SoA takeover mechanics.

Improve the Papacy

  • Events representing the significant historical conflicts between secular realms and the Papacy
  • Events between cardinals (this isn't even in vanilla AFAIK. WTF)
  • Allow cardinals to plot against the Pope
  • Overall reduce Catholic MA somehow

Minimize AI's time to call-to-arms allies [unfair AI booster idea]

Improve the importance of AI alliances in a relatively high BATTLE_WARSCORE_MULT (though I think EMF will definitely be adopting 100 as its final resting place for that) environment. Give AI allies a higher chance to arrive in force before you've decimated the main defender. [This is for offensive wars against the AI by the player only.]

Use the new any_allied_character scope to automatically determine whether an AI would've heeded the call-to-arms (the opinion values are in defines.lua to my knowledge-- this should be knowable a priori in most cases w/o waiting for the CKII postal service to deliver CTA letters around before any wars are joined and troops mobilized), try to have the allied AI join instantly if they otherwise would (and are perhaps not already at war) with join_defender_wars in a standard CB supplement event. Thus, at least in some cases, allied AIs will instantly join defensive wars when they clearly otherwise would've had they the advent of fax machines. In the other cases, the hard-coded mechanic would be allowed to run its course.

Would require another big standard CB supplement being added to most CBs, though, which is a downer.

Probably not worth it. But when I'm scraping the bottom of the barrel someday for ways in which to add difficulty plausibly (sans the fax machine part), maybe this is worth a lick. If EMF's BATTLE_WARSCORE_MULT goes down to 100 from PB's 125 (I've been playing w/ 100 now for awhile and have been pleased with how its made wars generally more difficult and potentially ruinous, comparatively), it's probably not an issue. If EMF stays higher, that 25 days of extra AI mobilization time is easily decisive for a win for the player.

Invest in your adult education

This is something that I wanted to do for CTA: Hire a famous knight (or possibly discover him from within your ranks, or randomly encounter him) to train your personal combat prowess. Series of iEvents and friendly dueling rapidly levels up your CTA experience points. You don't have to endlessly lead armies in megawars to get chances at XP; you can also train, at your various expenses, on your own land and keep up the aristocratic military tradition that was so important in this age.

But I'd also like to do it for education generally.

Let adult rulers advance 1 or even 2 (in fairly extreme cases such as when starting from a tier 1 education) tiers in their education trait over time. Generally, this would take the form of hiring an expert of some kind or generally making some kind of commitment to the undertaking which would pose various costs, both upfront and along the way, sometimes in rather big, unexpected gambles. The nature of the undertaking and the possibilities it presents depends upon the education. [And it may well only apply to martial, diplomacy, stewardship, and maybe priest educations, if someone ever got around to writing the latter's flavor.]

Lots of opportunities for great relationship-building iEvents amongst some of these self-improvement paths. Especially in the cases where you have a "trainer" / "expert" / "mentor."

When you've gone as far as you can go, ideally such characters would have also been made fit in the process to be a loyal vassal or otherwise remain a part of your game and, if nothing else, a friend, if you get along well, in a lonely CKII world.

I'll leave this issue at that, as the dip/mil/stew education advancement trees (plus the upcoming DTA in PB to complement CTA), and there's a lot to simmer and brainstorm about there.

[DynamicLevies] scenario startup event that initializes all rulers in the world to correct levy laws

  • Invoke dynlevy.0 on all rulers (tier > count)
  • Set all count titles to dynlevy_0. If they're owned by a count, we did the right thing, and if they're not, they're pre-initialized to the correct value should they ever become the primary title of a new ruler. This makes it so we can totally ignore counts in our triggers for the rest of the game, as well as totally ignore all demotions of tier > duke to counts, because they'll automatically have the right new levy law. [ Demotion to baron works as well, because no levy law is set for baronies (they don't have vassals in order for a liege levy law to make sense). ]
  • Remove any default = yes from the laws codegen

Child education overhaul: keeping it fairly vanilla (unambitious) but changing it up

Toss out the top 10 most-occurring ward events and simply rewrite their flavor and change-up their trait trade-offs.

Then write 2 flavor variants of each. Pick a few and make them iEvents with the ward instead of the simple flavor randomization. Almost all of the default approaches to those events are ripe for a personal, immediate interaction series that actually could vary quite a bit from instance to instance of the chain.

Educating your kids is the only way to go in CKII (and that's good-- it's more character-character interaction, with your family, no less), but having to click past the same damn vanilla ward events over and over and over (my muscle memory can recognize the event and where to put my mouse to automatically get the "right answer" at this point before I've cognitively recognized the full first sentence of them) is just painful and exhausting.

Not only is the education shallow (no real trade-offs in option selection, only one real risk/gamble event comes up every so often) and braindead (the subject matter could be a lot more adult), but it's also just tired. For every CKII player out there.

So give players a fresh face. Even if the overhaul isn't quite the kind of overhaul I'd ideally like to see done to the education system (some remote parent involvement in guardianship, investment in child studies, chances to take children on trips that may give them major life experiences that shape them, trade-offs in parenting policy between randomly-seeded "innate" interests of child and what you're pushing them to grow to be), it'd be really straightforward. Just plain different, even without the higher variance and better events, would be enough of a major draw to be worth writing some events about learning bravery or cynicism.

Proper, efficient weather system

Not entirely clear on how exactly it'd work, but it's been done in the past and it seems like it should be possible. Perhaps route through on_actions? Scheduled event loop on Isis or on a specific "handler" province? Not sure...

But I'd limit it to outliers only, so only unusually bad or unusually good weather would be worthy of attaching a province modifier. Then pull the specific modifier from a pool based on the time of year (Winter? Rats got into the grain storage! Oh gods, I'm getting Lords of the Realm flashbacks) and set modifiers to expire on their own so we don't have to run maintenance events to remove them.

Open questions (exploratory) & performance design considerations for realm_size-scaled levies

A performance goal of NerfLevies is to only ever evaluate the anti-snowball levy-law-modifier adjustment event (i.e., the nerf-levies event) for a playable ruler when the realm_size for that ruler almost certainly changed (false positives OK, false negatives unacceptable). This is only a goal; it's neither clear whether it's yet possible to prevent all false negatives (uncaught realm_size changes) nor is meeting this goal required for NerfLevies to function.

This issue tracks current experimental work with patch 2.1.5.6's modding extensions to determine if all realm_size change cases can now be covered efficiently. These cases are:

  • Whenever a war involving the ruler ends (note that invalidated wars that somehow changed realm_size as a result of invalidation cannot be caught-- a case that I believe is totally irrelevant, however)
  • Whenever a new holding is built within the sub-realm of a ruler (fallback here would require a fairly long-term maintenance pulse to invoke the nerf-levies event globally to catch these tiny, incremental changes over time)
  • Whenever titles are usurped by the ruler (no low-impact fallback)
  • Whenever titles are inherited by the ruler (no low-impact fallback)
  • Whenever a character becomes a ruler generally (upon grant if not inherit/usurp)

It is presumed that the on_war_victory hook will be used to satisfy the first requirement, but is it even necessary? Could false positives (e.g., white peace, revolts, etc.) even be eliminated from the triggering system (and the dependency upon on_war_victory)?

  • If usurpation of titles can be registered via on_action, then theoretically this could/should include all usurp_title_plus_barony_if_unlanded and such other CB effects, making realm_size analysis post-war redundant. Can this be done? [ ANSWER: Yes. And just as efficiently. ]

Finally, the nerf-levies event itself is not expected to be extremely cheap to execute. It will likely be quite bloated with many nested if statements bearing down on the actual value of realm_size or its previous value-range. The complexity of this computation might be much higher if a very smooth diminishing-returns curve is designed for the nerf.

This is entirely due to the inability store numeric triggers like realm_size's values in variables for easy comparison and computation with other variable state. If the usurpation of titles on_action is called very frequently (e.g., say 40x in one CB completion for a Crusade or similar) and this forces the nerf-levies event to be reevaluated from scratch every time, this might also prove rather undesirable for performance.

In general, if the trigger sources are too trigger-happy, it may actually be more efficient to just reevaluate the nerf-levies event on all of the >=DUKE sub-realms on pulses and perhaps only use some smaller subset of the realm_size triggers purely for user experience (reduced mean update speed to reflect large changes) or no triggers at all.

  • How often are these new title exchange on_actions really invoked? Usurpation, particularly. [ ANSWER: Quite often, but not too often in terms of the actual day-to-day game event overhead. ]
  • Does on_new_holder duplicate the usurpation and inheritance forms of this on_action for the same game state change? [ ANSWER: There are a number of duplications in the current implementation, most of which in my test results detailed in HIP dev forum. They don't pose a problem to this application, though. ]
  • If the triggers are indeed too trigger-happy, could we use them to just mark the ruler's levy laws "dirty" (in need of recalculation), then have a maintenance event/pulse recalculate all "dirty" rulers in one batch operation, rather than recalculate nerf-levies' results upon every trigger? In this way, we could use the new triggers to inform a max-20-days-until-adjustment batch form of the nerf-levies event (more than fast enough for a levy law modifier), but we could limit the relatively expensive recalculation to single "significant realm_size events," which are actually very rare in game terms.

[ ANSWER: Simply take all on_new_holder_usurpation, on_new_holder, etc. trigger sources and, from their hidden-immediate handler events, simply schedule a dynamic levy law recalculation for the following game-day. Completely rolls all batch micro-events into a single operation and is a best practice in any case for working with these types of on_actions. ]

Once this exploratory work is done, the design of the trigger system for the nerf-levies event's enforcement (hopefully precisely when necessary, but as can be seen, batch operation with a delay might prove preferable) of levy-law modifiers upon all playable rulers at all times can be determined. NOTE: "All playable rulers" may be adjusted to simply be duke-tier or higher rulers for simplicity and to further cut overhead.

The nerf-levies event structure will then need to be designed for optimal efficiency at removing previous hidden character modifiers that scale down levy efficiency with realm_size and at applying the correct, new character modifier to scale levies for the character. Some challenges for the event design:

  • Memoization state of some kind to help prevent a brute-force linear search through all possible "previous" modifiers in order to remove the old before applying the new. Few actual executed steps should be necessary to find the stale character modifier to remove.

[ ANSWER: Use a variable as memoization state which is set to the actual integer value of the associated dynamic levy law modifier grade. Use a hard-coded, traditional binary search over the probably-64 modifier space checking the variable value range against literals in a traditional binary search. Execution will complete on the exact line of code which removes the correct character modifier. ]

[ ANSWER II: If hidden title laws are used, as is now planned but testing still remains in order to confirm feasibility, no memoization state is strictly necessary (adding a new law removes the old value). However, if a revoke_law set needs to be done for some reason upon pass, then the above approach should be used to efficiently only revoke_law 1, correct previous law setting rather than having 63 sequential revoke_laws. ]

  • Efficient mapping of realm_size trigger comparisons against literal values to the appropriate, corresponding modifiers for that exact realm_size-range levy-law modifier. Again, a binary search approach is attractive (O(lg N) realm_size triggers required to map-down to the right, new modifier and encode its memoization state for future updates into a variable).

[DynamicLevies] implementation of log-scaled liege levy obligations per realm_size, coincident with general liege levy overhaul for EMF

Logarithmically-scaled is just the basic gist. What kind of curve do we really want? How exactly is this mathematically parameterized? What are the parameters of our initial implementation, designed to work alongside PB levy laws and perhaps some unknown base_values static modifiers for liege levy law modifiers. That is still yet to be determined.

  • Configure min. levies to be raised at -100 opinion (vs. current -50 in PB). This should smooth out some of the steep gains in liege levy contribution at opinions [50,100], which usually only players enjoy, while benefitting the AI comparatively more. It will increase total effective liege levy factors
  • Random reminder note: Also, configure MIN_LEVY_PERCENT_TO_RAISE = 0.3 (+50% from PB/vanilla 0.2). Ends the whack-a-mole problem with realm-wide AF revolts
  • While keeping de jure territory liege levy factor bonuses (important to concentrate development of de jure demesne, though I would deemphasize the capital bonus in order to emphasize the capital duchy bonus in order to discourage packing capital provinces full of demesne baronies for demesne levies), almost completely remove patch 2.0's steep de jure territory liege levy factor maluses. They are not necessary with realm_size-scaled levies, and although their strategic added value is nice to be able to control, using them harshly does even more to encourage overly-static, boring borders. The liege levy factors should fall linearly with each de jure tier step outward from the de jure capital duchy, and the slope of that curve should probably be <= -0.2/tier starting at 1.2 in the capital duchy. This will definitely increase liege levy contributions for many realms and change a lot of balance, but as it were, most of the balancing at PB and SWMH was done for pre-2.0 rules anyway
  • With all the new defines in place and a little testing of them, record a 50-year savegame series archive. Extract the liege levy contributions of all barons and analyse that statistical distribution to see what what troop counts are now being realized for playable rulers. Use these numbers later to compare what a given scaled-levy-law modifier set would do to these numbers
  • Determine the PB default/common range of levy law offsets. Assume all obligations = low (not none) and all sliders at their default position (feudal max levies, city max taxes, and clergy balanced), but vary crown levies from crown_levies_0 to crown_levies_3. We still want crown levies to make a strategic difference, particularly for a large realm
  • Determine a compatible base_values static law modifier set. Compare with the old CK2+'s base_values set (all -1, IIRC)
  • Derive a first shot at a good parametric mathematical formula for the scaling curve from analysis. Invest in scripting to plot the results and such if helpful, as describing how this mechanics works will be part of a development diary, and any illustrative tools would be neat.
  • Implement the analysed mathematical scaling formula for the levy law modifiers in the existing law definition codegen.
  • Regenerate the whole damn dynlevies code to match the new behavior
  • Celebrate and play a game

Improve heresy generation

I'm thinking something like jordarkelf's No More Random Heresies, but better. In addition to making certain cultures favor specific heresies, I'd also like their presence to slowly increase the chance of other heretics appearing (especially with regards to individual heretics increasing chances of provincial heresy) and if the problem snowballs enough it'd be fun to have some sort of super heretic rebellion where they band together and declare independence or something akin.

Perhaps we also could crib something from the Decadence mechanic, but better? We could introduce a new mechanic whereby heresy is introduced as a modifier or trait "Sympathy for X Heresy" which gives you a chance to persuade the character, imprison them, and so forth. This would fit nicely into the previously mentioned improved character interaction model.

All-CBs integrated on_war_victory, on_war_loss "on_actions"

All CBs should call central "on_action clearinghouse" events whenever a CB is concluded, both for the victor and for the loser.

This allows easy hooks for mechanics which need to immediately update game state whenever territory changes hands, manage temporary opinion bonuses for victors, possible AI fulfillment of promises in land distribution, etc.

Reintroduction of custom succession war CBs

It's time to bring back succession crises and do so more intelligently than the old vanilla functionality. Come one, come all ye sons [and daughters, sometimes] of the fallen King/Sultan:

Now is the time to strike and make sure that the pretender with the most rightful claim, the best alliance with forces similar to the Vassal Faction, the best alliances with external rulers, the largest demesne, the most gold, or the strongest pact amongst each other sits upon the realm's mightiest of thrones, if God so wills it.

Hurry, your special-purpose casus belli will expire if you don't press your claim. Now is the time to take advantage of vassals' or other independent rulers' disdain for change: let them rally to a cause they can support in return for policy changes, privileges, or de facto alliances. Let the kingmakers take their swings and make their kings.

Or simply fend off multiple wars of succession at once as most of your landed former sons, whom never did get along with one another, each make their winner-takes-all bid for power against you simultaneously.

They were each, after all, your favorite before the day of your death. As one successfully builds kingdoms and empires, there is nothing more epic than to fight the inevitable wars of succession which will split them apart and unite them again, possibly leading to interesting and unexpected outcomes.

I suggest at least that a few succession CBs be added. One should be an open call to arms to vassals, who will choose sides dynamically. Ideas for intrigue with vassals, external rulers, external funding, pacts, how to make the AI best choose the most ripe opportunity to strike (if it desires as much), etc. much appreciated.

[DynamicLevies] build code generator for core dynlevy law set event

Completely dynamic event generation of dynlevy.0:

  • Efficient, logarithmic-time binary search algorithm for matching realm_size range to appropriate law
  • Require the number of distinct levy law classes to be a power of 2 for now to simplify the decision tree generation (realistically, 64 is the only which makes the most sense)
  • Support a linear translation of the scaling curve over realm_size, exempting anything under the given translation offset from any levy nerf. Offset parameter should be allowed to be arbitrarily positive [integer]
  • Skip tier < duke for search & set Instead, reduce event overhead and check this at call sites, since those call sites actually enqueue the event, which is significantly more costly overall than synchronous events. Further, the whole system, due to scenario startup event invariants should be immune from having to ever deal with tier < duke rulers, and as such, even those trigger sources should avoid be invoked for such rulers
  • Set the law for all demesne titles of tier >= primary title tier (that don't already have the law)
  • Event triggers on realm_size = $OFFSET+1 Nevermind. This is a flawed optimization. Instead, if one theorized that most levy law updates due to title exchanges were actually exempt from the anti-snowball nerf laws entirely ($OFFSET or fewer holdings, where offset is, e.g., 24), then it'd be a valid optimization to check this case exclusively from the tree-based search, but it'd be tenuous complexity for pennies.

Plots

Given that EMF is all about coherency, character-to-character relationships (and tracking thereof), mechanics, and flavor, EMF's take upon plot intrigue is going to be a big deal for players. I'm coming to the table in this discussion with just a sliver more than the notes/forethought given here, so I definitely need help developing plot ideas/mechanics, overall project strategy, and implementation detail.

Goals of the emf-plots project:

  • Determine a coherent strategy that will underpin all plots, including vanilla:
    • Plots are an excellent way to generate character relationship history information, and all of that will feed into the rest of EMF, definitely the VF, as well as back into plots.
      • STOMs (Stacking Targeting Opinion Modifiers) need to be used to track character-to-character "I did this to you" or "He did this to me" or "He helped me do this" types of relationships, sometimes in multiple categories.
      • Character variables tracking the number of times a character has plotted a certain category of plot should be used to feedback into likelihood of a repeated plot. Or just flags
    • Make sure that plot chances properly account for the relationship history between characters (checking things like STOMs) and other EMF-specific context, making incoherent love-you-but-simultaneously-plot-to-kill-your-son drivel just not happen.
    • Rate-limit plots. Don't let the same AIs plot over and over. Give them a cooldown. To a lesser extent, give them a greater cooldown to using the same plot over and over. It's annoying.
  • Adjust vanilla plots to be reasonable. Some of the vanilla plots are a bit imbalanced or annoying
  • Expand our generalized (i.e., not culture-specific) plot selection to at least cover the territory of the presently-defunct VIET Immersion through presumably simplified, ground-up implementation of the key plots we like and perhaps variants on those that we might not like as much in their present form (semantically)
  • Also expand our plot territory to cover some of the interesting plot concepts covered by CK2+
  • Add brand new, fresh plots. Some of them could be altogether original yet still generic. Many of them could be related to EMF-specific mechanics such as the Vassal Faction, its leadership, meeting outcomes, plots to sabotage a reputation, plots to sabotage an economy, plots to incite a cultural/religious revolt, plots to embezzle money, plots to force a character to do something, etc.

We need anything good and coherent really. These are opportunities for negative (for someone) intrigue, and they're important to most players, especially a lot of those who will be coming from VIET Immersion or CK2+.

Note that this issue is tied into the 'More ambitions' Issue, of course, since ambitions are usually just neutral or positive forms of plots.

Please feel free to respond with basic plots to add or any other ideas upon this subject. I do need help here.

More unreliable levy availability

Series of events which sweep province modifiers to bolster the ranks of levies and likewise wipe them out all over the place, all the time. Plans for snowballing through your weakening enemy just turned? Too bad.

Scenario customization decision: A Woman's World

If enacted, performs a reverse MB-GOTW (so named for the mod named for "Move Bitch, Get Out The Way"). All spouses switch sides (Queens become rulers, and Kings become ruler consorts). All children of the couple formerly of the father's dynasty become of the mother's. All [non-Muslim] titles' gender succession are set all the way down to enatic_succession.

Never been done before. Easy enough to implement. Novel for a few games (esp. if you want to restore Agnatic or at least achieve Gender Equality). Certainly gives a fresh face to all starting characters of interest.

One wrinkle that might be a big deal: Player would have to be exempt from the title transfer between spouses (and dynasty switching of children), or their starting character will be Game Over.

New demense law slider: Bureaucracy

Kind of like the crown levies slider but for taxes, but with some twists:

Bureaucracy:

Slider settings:

  • _None_ Default. No effects.
  • _Minimal_ Gives +1 demesne size. Negative vassal opinion. Requires tier at least duke.
  • _Sophisticated_ Gives +2 demesne size. Gives +7.5% blanket vassal tax law modifiers. Significant negative vassal opinion. Feudal vassal opinion hit is higher than theocracies which is higher than republics (due to relative, mutual benefits from improved efficiency of bureaucratic structure-- the 3 government types each adapt to more sophistication with varied degrees of efficiency). Requires tier at least king (or great duke w/ realm_size >= 30) and TECH_LEGALISM at least 4 anywhere in the direct demesne of the ruler.
  • _Maximum_ Gives +3 demesne size. Gives +15% blanket vassal tax law modifiers. Major vassal opinion hit. Same relative malus ratio for the 3 vassal classes as prior setting (should be quite high, as laws go, for feudal vassals, though not all that different). Requires at least king tier. Requires TECH_LEGALISM at least 6 anywhere within the ruler's direct demesne. This should put this setting into play somewhere around, oh, 1200-1250?

Liberal personality trait

[ Originally started as a proposed liberal and conservative personality trait. Conservative was eliminated later, however. The definition of "liberal" probably needs to be modified slightly to suit how it'd thus be applied in-game, and that trait may be renamed. ]

[Not to be confused with political crap-- these are personality traits.]

What do you think about adding 2 personality traits? I'm generally very conservative about this topic, but these 2 opposites actually better sense than a number vanilla traits in terms of utility and clarity and are independent of all the others. And I'd like to write event chains with access to them. Actually distinct axes of character personality.

A common path would to be liberal when young-- might be something that gets revealed on_adulthood-- and tend toward conservative as you become more of a part of the old guard.

It would have a very clear and distinct meaning that would be very useful immediately as modifiers in most MTTHs, ai_chance, etc. It would be helpful, e.g., regarding centralization acceptance, religious and cultural tolerance, would [ideally] impact events at feasts and such wildly. Definitely has more clear meaning than most personality traits, in terms of how to use it in the game (e.g., diligent vs. ambitious, cynical vs. zealous are a clusterfuck of ambiguity in terms of how to consistently apply in-game).

Chance of starting out conservative or liberal might be influenced by your relationship history + opinion with your father, mother, and mentor or other VIPs in the child's life. Thus, it's likely that conservatism (and liberalism to a slightly lesser extent) will run in families to some extent. Actions you take as an adult ruler will have clear awards/retractions/award of opposite trait effects. The traits themselves have some pretty clear modifiers.

@thefinestsieve Kan I Plz Haz Icons? But most importantly first, what do you think?

[DynamicLevies] 3 title transfer and 1 barony-built on_action handlers that trigger batch-optimized levy law reevaluation

In total, only two distinct events need to be written to cover 4 cases of demesne-size change triggers:

  • Handler for on_new_holder_usurpation that, for both ROOT and FROMFROM enqueues a deferred dynlevy.0 event to be executed upon the next day if and only if not = { has_character_flag = dynlevy_dirty }. If not dynlevy_dirty, then it also marks dynlevy_dirty. This is a massive batch title transfer (common in CBs and inheritances) optimization
  • Event trigger for above handler ensures FROMFROM is_alive = yes (makes sense, but also, it allows the event to be used for on_new_holder for filtering grants vs. creates)
  • Event trigger for above handler ensures FROMFROM != ROOT
  • Handler for on_new_holder_inheritance that does exactly the same thing, except that it only operates upon ROOT (FROMFROM is dead momentarily anyhow, if not already-- or abdicated).
  • Handler on on_new_holder barony-built case that does exactly the same thing as the inheritance handler, so they should be the same event
  • Handler for on_new_holder structured exactly like on_new_holder_usurpation. Therefore, use the same event registered on both on_actions. This case happens to magically cover grants
  • Modify dynlevy.0 codegen to clr_character_flag = dynlevy_dirty when finished
  • In all cases of preparing to trigger a levy-law reevaluation for a scope in these 2 events (for 6 total cases), also do the full dirty-flag-check, conditional-event-enqueue sequence for any_liege of the scoped character.

Vary the number of legally-held duchies as a bonus to some setting of the bureaucratic sophistication law slider

First, you need to know what I mean by bureaucratic sophistication law slider. See Issue #26. TL;DR: it's a more specific but fairly direct centralization slider.

Certain, higher levels (e.g., 3/5 and 5/5 if the currently-described system were elongated from 4 settings to 5, as seems likely with the increasing number of interesting mechanic-related bonuses and such have been conceived) would raise the legally-held duchies limit.

The game would start with a vanilla legal limit of 2, and through strategic pursuit of advancement of this law slider, a bonus to Sophisticated bureaucracy would be +1 legally-held duchies. The dynamic vassal opinion maluses when exceeding the then-variable limit would work almost like they were vanilla++ WAD-- no hordes of add_opinion_modifier or nasty crap like that from me, of course.

In fact, as a variant on the same concept, if starting at the TOG date, then the variable duchy limit might actually start at 1 and take either early progress on the bureaucracy slider to reach 2 or one would have to wait for the TECH_LEGALISM value in their capital province to reach 2 or 3 before the legal limit was auto-boosted to +2.

It can be done and in an airtight, efficient, precise way. I promise. Elaboration when the day comes or someone asks.

Battlefield interactive-immediate event chain series

Similar to the duel engine but full-on battle scenes played-out in choose-your-adventure style + randomization + "group" battle/melee rounds as you get the chance to carry-out tactics flavor. Event series would be extensive, so you could choose various cut-scene points to exit and return to the battle and main game. Lots of opportunities for historical research of military tactics of the era to be applied in-game.

Too many ideas worth listing right now; I'd rather be sketching the design, although feel free to add any that occur to you.

Simplify PB demesne law slider levy/tax modifers

PB's demesne law sliders' modifiers, particularly in combination with a dynamically-scaled levy law curve, are too difficult to analyze to allow for maximally effective overall army balancing or easy enough to understand net effects of the sliders' combinations for users to be able use them strategically. We should be able to express, first to ourselves, but also in clear and simple language (perhaps with some charts in the manual / dev. diaries) to our users, exactly how the trade-offs work.

Also, non-standard settings (varying from Low/Low/Low, Levies++/Taxes++/Balanced) are not a standard for a reason: few people ever use the higher settings of Obligations-- sometimes Medium for one or two.

Aside from strategic confusion about the net effects in combination with variable Focus vs. exploiting a different class and such, the opinion malus vs. the gain is just too high for almost every single imaginable scenario. This means we're wasting perfectly good law slider settings by making them never a worthwhile choice.

Dynamic levies will help with that; once your realm is pretty big, you're going to get a lot more noticeable gains from increasing Obligations, as the nonlinear scaling of total levies vs. realm_size is going to yield significantly decreasing returns upon expansion.

However, even with dynamic levies, it's suboptimal to have a design in which there does not exist a viable strategy for using every type of law combination.

Principles of overhaul:

  • There should be a single net max_levy and tax minimum (conceptually 0) across all combinations of Obligations vs. Focus for all 3 vassal classes (i.e., the same for all 3)
  • The net max_levy and tax maximum across all combinations of Obligations vs. Focus may differ for the 3 vassal classes (but, in practice, it won't for levies but will for taxes-- that's what building balancing is for)
  • It is Focus which controls the trade-off between levies and taxes, and thus it is Focus which shall be used as the independent variable for defining a vassal classes' ability to specialize in taxes, levies, or both most effectively with the each of its linear slider modifier curves' ratio to each other (which shall be a constant)
  • Obligations linearly scale across the same range for levies and across a different max. value for taxes, dependent on vassal class
  • The max_levy curve across either Focus or Obligations, while holding the value of one of them constant and varying the other, should be linear without exception
  • Vassal opinion maluses should be linear across each law slider increment for all demesne law sliders. Since opinion values are scaled linearly to result in actual taxes paid or levies produced, this means that, ceteris paribus, a slider increment is never a fundamentally poor choice. It all depends upon the amount of vassals above opinion 0 for taxes, and as for levies, the full opinion scale is used, so all law slider increments are potentially valid strategic moves for increasing net levies
  • Vassal opinions are +5 for the lowest Obligations law slider increment (None), which truly imply no obligations (tax or levy) for a vassal class beyond the base value law (50% levies from vassal sub-realm at 100 opinion, and no taxes from vassals)
  • Vassal opinion maluses are nonexistent for the Focus law sliders, as they are guaranteed to provide an equal trade-off at every increment

Scenario customization decision: Lucky Nations

Option to activate a lucky nations mechanic which consistently offers benefits to either A) the nations which were historically successful at that bookmark or B) random nations. Presumably benefits would take the form of an invisible character modifier perpetually attached to the ruler and offering boosts to money, troop performance, and other relevant attributes. Player controlled nations would be exempt.

[DynamicLevies] codegen for on_new_holder handler for immediate levy law application upon title creation

Goal is to catch case of a new title being created out of thin air and immediately applying the appropriate levy law to it if its tier >= the primary title of the holder at that moment.

  • New codegen variant of dynlevy.0 that only sets the law for the title in question, avoiding the many loops over all demesne titles tier >= primary title (OPTIONAL)
  • Otherwise, just call the dynlevy.0 event immediately. The difference should be minimal.
  • Trigger filters only cases where FROMFROM is undefined (how to catch title creation without the ambiguous on_create_title, I reckon).
  • Triggers title tier > count (though should theoretically be covered by above)
  • Triggers realm_size = $OFFSET+1

Travel to treat with your liege

Again, more interactive-immediate character interaction style.

You've got a decision to travel to your liege's court and treat with him (about "something"). The interaction, I imagine, would have many possible twists and random dialogue turns, sometimes leaving you with a glad, loyal heart, others with a spurned, underappreciated one.

[Variable support opens up a lot more opportunities here for vassal-liege relationship building over time. I imagine the "treat with liege" event chain could become very, very complex w/ relationship-building.]

This gives you a chance to air grievances directly, pledge definite troops to your liege's defensive or offensive campaigns (effectively taking one from the, IMHO, very under-executed Pledge Mod) in the form of a retinue that expires after a certain period of time (compensated by a special building in your capital that extracts roughly equivalent levy capabilities from you but allows your liege to gather pledges from loyalists and take action with them)-- in exchange for a promise, simply share dinner and stories of common battles, be ridiculed for wasting his time, the liege may bring up a wedding to his daughter, etc.

While lieges can't easily treat with their vassals except in group settings (e.g., AF2), vassals can certainly treat with their lieges.

[DynamicLevies] TODO: complete experiments with huge, hidden demesne law groups

Experiment which fulfills remaining feasibility questions (and some more) regarding current DynamicLeviesDesign plan, on the topic of direct levy law modifiers rather than character modifiers:

  • Create a demesne law group that has potential = { always = no }. Fill it with 64 laws that have observable effects if enacted (use the new demesnse_size law modifier as an easy way to observe the effects and test that new feature at the same time). For each law's effect, call a singular law supplement event on the title holder.
  • Write a support tool that auto-generates that law group, parameterized. This will be extended later to calculate the modifiers for each law (and generate all the corresponding law code) according to the given behavioral parameters. As such, this is actually part of the final implementation.
  • Write the law supplement event to check against the FROM scope, probing to determine if it's the originating title (e.g., check whether FROM = { title = k_england } in the event if testing as William the Conqueror) or simply null. This FROM-checking is a curiosity, while successfully receiving the event for a hidden law being enacted by event is a feasibility experiment.
  • Write a test driver that uses add_law to enact one of the highest-numbered 64 laws on ROOT's primary title. (Don't know whether engine supports so many laws in a single group. Never been done.)
  • Put it all to the test at once with an in-game test run of the driver.
  1. Did the law's modifier take effect despite its false potential? E.g., has your demesne cap been raised accordingly?
  2. Did the law execute its effect clause despite false potential, as evidenced by receiving the law supplement event? Was FROM also the originating title?

If the answer to all of these is yes (except for the curiosity about FROM in the law supplement event), then we know that the fundamental design of DynamicLevies can and will take the planned title-based, direct levy law scaling approach. AFAIK, nothing is blocking the beginning of implementation immediately thereafter.

The only other open question at time of this writing is simply a confirmation experiment for inheritance triggering, which has workarounds if it fails and thus won't affect any of the core implementation.

Nerf available levies with growing realm_size

Somewhat in the tradition of CK2+ but not to the extent nor using the same implementation. Triggered modifiers are not used in favor of event-based character modifier grants, which are both driven on_action (so to speak) when realm_size changes and as maintenance (to account for the building of new holdings).

The appropriate levy law graduations can be finer-grained than CK2+, as there is no performance penalty for increasing numbers of grades of realm_size range => levy law modifier.

In general, more territory being administered by a single, centralized feudal monarchy/empire should lead to lower efficiency in raising levies. This not only makes sense but reduces the snowball effect greatly.

The table of realm_size => levy law modifiers is going to be a bitch to calibrate.

Zealot "factions" in holy wars

Just as vanilla will spawn faction_loyalists and faction_revolters randomly in the middle of major revolts, so can we spawn faction_zealot_defenders and faction_zealot_attackers in holy wars (or wars that otherwise threaten one culture_group at the expense of another, if such a distinction is ever pragmatically relevant).

Maybe all those Sunnis don't like the prospect of you pillaging their cities, tossing out all their lords, replacing them with your own Catholic lords, and calling them infidels for the rest of their days. Maybe they might just take up arms to keep you out.

Would require a fair bit of CB integration into event supplements but not much. Concept is extensible to a number of types of "oppression" or "loyalty."

General arbitrary ruler/province targeting & dynamic targeted-action decisions

[ Corresponds to the new ASSIGN_ACTION_DAYS = 0 in EMF defines.lua ]

Ability to actually target specific characters or provinces as an essential parameter to custom "character action decisions" by using your chancellor's meta-positioning on the map using an expanded-trigger version of the "Improve Relations" job_action (which may be renamed to the more generic but compatible "Send Envoy" or the like) which allows any province to be selected but those in your demesne.

After targeting a ruler/province on the map with instant placement (and re-placement), a number of custom action decisions would appear as valid decisions in the intrigue menu with localisation specific to the targeted ruler or province which integrates their name into the decision title and info tooltip directly. When the councillor is recalled or used for a different job_action, those decisions all disappear.

All such decisions would be grouped together and contain a custom icon shape to indicate their special status (likely a non-uniform but symmetric hexagon in both X and Y dimensions).

Their background color could reflect the type of decision:

  • Blue for diplomatic actions (e.g., summon a vassal to your court for interaction, travel to treat with / invite another lord to treat with you, travel there to try to win the support of another AF2 member for the next AF2 election, a ton of shit for AF2 leaders, go on an adventure, etc.)
  • Red for military/enforcement-related actions (e.g., hire, commit, and deploy a small contingent of standing troops for 10-years to suppress religious violence and enforce your policy, costing your demesne some levies-- ala how the great Saladin ensured that Christian pilgrims to Jerusalem were actively protected from religious violence/threats by local Muslims after the conclusion of the Third Crusade in 1187)
  • Green for stewardship actions (e.g., start a 20-year economic investment project to build and maintain high-quality roads, levees, canals, expand well water sources, clear forests for agricultural expansion, etc. throughout a province)
  • Purple for intrigue actions (e.g., send an envoy with a mission to convince a rebelling vassal to turncoat and rejoin his liege, send your spymaster on a mission to attempt to kidnap a dynasty member or child of a ruler)
  • Silver for spiritual/religious actions (e.g., choose where/how to construct/paint a holy icon/monument that will last, have your court chaplain interview local, outspoken commoners, priests, and monks to identify those with heretic leanings, allowing you to selectively cut down on any dangerously-high heresy "interest points" in a province, as alerted by other events or a visible, graded province modifier, OR send your chaplain to actively encourage "alternative interpretations" of religion and thus heresy in a province, actively increasing heresy interest points).

One neat possibility (can be skipped if scanning, as the conclusion is that while really neat/cool from a modding perspective, it might not actually lead to a more straightforward, user-friendly experience):

For some ideas I've got for realm stewardship actions, using an overloaded job action for your Steward might also be appropriate, which would likely allow you to target even within your own demesne. Likewise, there are cases for martial ruler/province selection decisions, so an overloaded case for your Marshal could also be supplied. Argument also applies to spymaster and court chaplain.

Thus, in a world with lots of such decisions that are possible to execute covering most of the spectrum, we could, in the UI style of the Elder Kings, mod the interface and add a fourth job_action for every councillor that is simply a councillor-specific title akin to the generic "Send Envoy" or, semantically speaking, "Go Here and Complete Job," for which the allowed province placement triggers are all extremely flexible.

However, it really may be better to just use the Chancellor only w/ this other otherwise pretty useless and harmless job_action, because then it would never be hard to know what target-specific action decisions were available/applicable for your selection (no matter what type they were).

Improve CB restrictions

(There's been some discussion about this before, but I figured it would be nice to have it here for reference in case anyone decides to use it.)

In short, the current PB CB restrictions are too deterministic. Instead of blocking rulers from ever using certain wars based on traits, I suggest a system which works, more or less, as follows:

  1. Every ruler is assigned a value based on their traits and other relevant factors (culture? other invisible meta modifiers?); this value is recalculated periodically
  2. The value in turn governs the production of points which are required to engage in wars which were previously restricted by traits (the production probably happens along with the periodic recalculation)
  3. Prosecuting those "special" wars spends the points, which must be regenerated before any other "special" wars can happen
  4. Rulers with qualities conducive to such wars generate points more quickly than rulers without such qualities

Note that this issue doesn't necessarily suggest the exact mechanisms by which such a system would be accomplished but is instead a more general outline of how it might work.

There are also some downsides to this approach, including the difficulty of integrating it into the game without breaking immersion too much (something which might be ameliorated by clever localization), introducing what would be a minor performance hit through both increasing the number of wars and having to do the periodic recalculation for every ruler higher tier than baron, and forcing all such restricted wars into using the same system regardless of whether the specific elements of the system make sense for that specific kind of war.

On the bright side, it would open up room for situations like granting extra points to otherwise timid rulers through events, interaction with the Vassal Faction, and so forth. In fact, the focus on the ruler's qualities could even be minimized in the case of kingdoms which have become more centralized. Earning points could be just as dependent on the state of your country as anything else. Country full of heretics? Extra points for "special" wars!

Training heirs in foreign courts

Something that came up in discussion a while back: could you send your heir to a foreign court, and have them learn a foreign cultural tactic to help with your military? Learn new tactics to use, have better defense against them, things like that.

Rewrite dynlevy to use character modifiers rather than direct title laws

Rather unfortunately, testing has proven that "hidden laws" (false potential) are not restored upon savegame load. In short, this means that dynlevy should effect its levy law changes via character law modifiers rather than actual laws.

Since hidden, inherited character modifiers theoretically have much the same semantics as demesne laws, most of the existing triggered-only design should translate.

I'm concerned about cases that won't. In particular, making all count titles carry dynlevy_0 and barony titles no dynlevy law made things like "knocking a character down to size" automatically work, and it may not (?) now. OTOH, some cases are taken care of automatically by using character modifiers (e.g., primary title switching & title creation).

  • Overhaul dynlevy code generator
    • Toss law generation in favor of event_modifier generation
    • Remove title creation handler
    • Rewrite "levy law set" event to set a character modifier rather than title laws
      • Set a character variable to the law index (a translated linear function of realm_size) when setting modifier
      • Before setting the law modifier, do a binary search tree expansion on the character variable rsz_idx (if set) to logarithmically find the correct, prior event_modifier to remove. Yes, this will be 2 6-tiers deep binary tree expansions and will involve a lot of tabs. [Alternately, this step could be moved to another event, since it only executes some of the time.]
      • If the character variable rsz_idx is not set, linearly attempt to remove all 64 possible character modifiers just to be sure. To reduce redundancy, this part doesn't need to be nested. [It can generally be assumed that if the character has no such variable, we will at least be setting one and therefore a modifier in the search tree code to follow.]
    • Keep the debug event (though we can display the active law modifier by simply not applying them as hidden=yes), as it gives more information, but make it check against character modifiers instead of laws.
  • Rewrite all traditional events to use character modifiers
    • Modify scenario initialization event (remove title stuff, and rest is fine)
    • Verify that all title transfer / creation on_actions still work (none of their code assumes anything about a law-based implementation)
  • Inherit the character variable rsz_idx on_death [Although it will probably not be correct in terms of the new character's realm size, it will be in terms of the inherited character modifier that needs to be removed via the on_new_holder_inheritance inheritance handler, if present.]
    • Also inherit the character flag dynlevy_dirty in the same event (different use)

Note that rsz_idx has other direct applications in variable form. E.g., the VF/AF can immediately use it in leadership nomination and possibly vote-weighting to assess a character's power without essentially duplicating the same functionality.

It is most unfortunate that such a major rewrite has to be done. The issue of whether save/restore would work for a hidden law never occurred to me for feasibility testing.

Note that this doesn't make [all] hidden laws useless for strategic effects.

It just means that a form of "on_game_restart" virtual on_action needs to be implemented by e_hip (design similar to a one-off maintenance pulse) to recognize that a save/restore has happened (by exploiting the fact that hidden laws aren't restored) and then fire appropriate events to reset hidden laws according to other state such as character flags.

Why can't that be done here? Because there is going to be some delay between the on_game_restart and the actual game restart and players shouldn't have to wait a few days after unpausing to see that they have levies. Likewise, hidden laws for demesne_size may confuse the player (such as is being considered for higher-tier Muslims), because they may see that they're over their demesne cap before unpausing when actually they'll be just fine in a few game days.

Minimal set of flavor/mechanic buildings, only applicable under certain conditions and often realm-unique

  • Royal Palace/Capitol - (king-tier or above, only in capital province). Obscenely expensive. Affords a small realm-wide feudal vassal opinion bonus (the extravagant royal palace in Marseilles, e.g., was built essentially as a token to honor the French feudal aristocracy to mitigate some of the conflict over centralization. Affords liege_prestige. Could have 2-3 tiers of extravagance. Could be an AF2-bureaucracy-directed realm construction initiative. Random siege_lost events should have a pretty good chance at destroying it or knocking it down a tier. Protect the capital. Other than AF2-directed stuff, the AI won't choose to build this on its own.
  • Monument/Statue - (duke-tier or above, realm_size >= 25, any_demesne_province without another monument, ruled_years >= 20). Built by event only. Choice to dedicate the monument to the ruler, the ruler's predecessor/father, a recent mega-war victory, to an AF2 leader, to a concept like military tradition / autonomy / cultural diversity / zeal_ / progressive republicanism / the ruling dynasty / justice / mythology of realm's origin / humor. Affords liege_prestige.

Dedication types are remembered over the lifetime of a campaign and can never be repeated (but dedication to a new ruler/father, AF2 leader, or a mega-war victory may be repeated in the next lifetime). The province is flagged with the dedication type, so if such a monument no longer exists within the realm, the concept may be reused. Conceptual dedication memory may come up in "Survey Realm" style event chains. AF2 may direct monuments to be built as well. Monuments can be destroyed in conquered lands, particularly if they are of, say, zeal. This may come up as a random event following conquest.

Mostly for flavor if built by player & as an actual AF2 mechanic which affords temporary selective opinion bonuses and maluses, depending upon the character and the concepts. Most likely, the AF2 will choose to build it based upon values/concepts voted on by the AF2 members. The AF2 can choose to build them anywhere within the realm but will probably pick either the liege's demesne or the AF2 leader's. As always, the liege can usually ignore the AF2, but he will miss out on the monument (the AF2 leader would surely be happy to house it); besides, it would probably to honor their liege if quite happy or to honor a concept if neutral or happy.

AI never builds directly. Leave it to the AF2.

  • Military Headquarters - (unique to realm, only in capital) Use your imagination. Similar to above types of mechanics, except that the liege (and AI lieges) actually may want to strategically build these once they become available, as a function of military organization technology, laws (e.g., the higher 2 Bureaucracy slider settings would likely be required), and possibly a concept of "military tradition" (a measured value from on_combat_pulse for the realm, inherited, which quantifies how much military action the realm's soldiers have seen but decays over time). Would slow down military tradition decay. Would afford small land_morale, land_organization bonuses realm-wide, as well as provide a nice chunk of retinue cap. Probably has 2-3 tiers. Probably fairly expensive. High chance of on_siege_lost random event burning it down / knocking it down a tier upon occupation of the capital. Has a flat tax_income malus which represents the ongoing salaries of the paid military bureaucracy.

Note that I've had a quite a few ideas regarding the concept of tracking "military tradition" and using it as a mechanic.

That's all for now. Plenty of other things, especially to reflect different ruler tastes for RP & strategy/mechanics (great libraries, granary systems, cathedrals, dams for provinces with major river crossings-- new modding trigger for that, etc.). They will give a lot of options to the AF2 in addition to special building flavor & serving mechanics roles & making it more important to protect the capital or wherever these things are strategically built.

Ultimately, the total amount of buildings added to a game or actively being considered at all by the AI for being built in any particular holding will be an essentially negligible amount. This is in contrast to other past, popular mods with quite fleshed-out buildings sets which were horrendously slow and overloaded with selections.

Historical ruler traits

Could be a startup event or a scenario customization decision, but either way the idea is the same: Utilize the additional congenital traits added by PB and/or VIET by adding them to rulers where historically appropriate. The mechanism would be an event rather than mucking about with history files.

A real difficulty slider

Allow difficulty to be changed in-game (two possible interfaces come to mind, depending upon granularity).

Real difficulty. Not just a few static modifiers. Evil stuff on the hard end and a real reduction of difficulty on the easy end (particularly since I propose taking difficulty up several notches, notably for player warfare). In general, no special mechanics are devoted to easy/normal/hard. Instead, they're simply used as probability modifiers in as many places as possible where "nasty" or "yeehaw!" events occur.

Allow the difficulty level to be switchable mid-game, not a scenario start decision.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.