Results 1 to 2 of 2

Thread: Those pesky pagan magicians

  1. #1

    Default Those pesky pagan magicians

    Looking through the docudemon files I notice the "NeighborReligion" condition. Anyone tried this to see whether it could be used to make the Pagan Magician only show up when there are actually pagans around?

    Code:
    Identifier:              NeighbourReligion
    Trigger requirements:    settlement
    Parameters:              settlement religion, logic token, level
    Sample use:              NeighbourReligion pagan > 50.0
    Description:             Test the sum of settlements neighbours religion
    Battle or Strat:         Strat
    Class:                   NEIGHBOUR_RELIGION_CHECK
    Implemented:             Yes
    Author:                  ScottL
    I really don't know much about the triggers system, but I thought I'd ask. Even if this doesn't work, finding out why would educate me.

  2. #2
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: Those pesky pagan magicians

    Well, let's see. In matters like this, the best research to figure out if something will work comes from the docudemon files. First we'll see what is required to use NeighbourReligion as a condition. As the entry you quoted demonstrates, the Trigger requirement for this condition is only that the settlement in question be known. Now how do we know if the game currently can tell what settlement we're dealing with? Well, let's consult export_descr_ancillaries.txt and find the entry responsible for pagan magicians:

    Code:
    ;------------------------------------------
    Trigger magician_pagan_vnv_trigger
        WhenToTest CharacterTurnEnd
        Condition not AtSea
              and IsGeneral
              and PopulationOwnReligion < 90
              and not Trait Superstitious > 0
    
        AcquireAncillary magician_pagan chance  2
    The important thing to know here is that the WhenToTest event is responsible for exporting all the information that the conditions below it in the trigger will use. That is to say, if we want to use a condition that requires the settlement (like NeighbourReligion), then CharacterTurnEnd must supply it. So, does it? We find out in the docudemon events file:

    Code:
    ---------------------------------------------------
    Identifier:         CharacterTurnEnd
    Event:              A Character has finished its turn
    Exports:            nc_character_record, character_record, faction, region_id, character_type, settlement
    Class:              ET_CHARACTER_TURN_END
    Author:             Guy
    ---------------------------------------------------
    Here the Exports line is the important one: it tells us what data the event makes available for use by conditions. In this case we find settlement is among the things exported by CharacterTurnEnd, so we in fact CAN use NeighbourReligion as a condition inside of this particular trigger (and any that use CharacterTurnEnd as the event, actually).

    So, knowing that, we can edit the trigger to something like this:

    Code:
    ;------------------------------------------
    Trigger magician_pagan_vnv_trigger
        WhenToTest CharacterTurnEnd
        Condition not AtSea
              and IsGeneral
              and PopulationOwnReligion < 90
              and not Trait Superstitious > 0
              and NeighbourReligion pagan > 5.0
    
        AcquireAncillary magician_pagan chance  2
    I've bolded the change, which adds the desired effect.

    Note however that the description of the NeighbourReligion condition says "Test the sum of settlements neighbours religion" as its description. The way I've used it, this says it will sum the neighbouring regions' pagan religion amount. It doesn't say, though, whether it sums the percent of each neighboring region that is pagan, or whether it sums the number of pagans and then determines the percent of the total surrounding population that they constitute. This is a rather large difference, as the first could give very high summed percentages of paganism, while the latter would typically remain very small due to counting large populations of your own religion in the total. My gut says it's probably the first one though, since the example uses 50.0 which would be a very high amount of overall paganism in the surrounding areas, and would be much more commonly arrived at from the first method.

    So I'd assume it sums the percentage from each region, meaning 4 surrounding regions with 5%, 0%, 10%, 10% would simply give an amount of 25. With that in mind, you'll have to tweak the number in the trigger to give the appropriate effect, though 5.0 is probably pretty reasonable: You only have a 2% chance of getting the pagan magician each turn, so the threshold of paganism should be pretty low to keep it showing up once in a while still. One could instead use 10.0 as the threshold of paganism, but I fear much higher would make the trigger fire so infrequently as to essentially remove the ancillary entirely.

    An alternative approach to this would be to set a turn limit, before which the pagan magician ancillary trigger does not apply. This would effectively give an amnesty period, during which you would not have to worry about the pagan magician. This could go a long way toward alleviating this problem, as it seems to me that the very early turns are always the ones where the pagan magicians show up in force b/c no one has achieved reasonable levels of their own religion yet. Even a 5 turn pagan magician free period could be enough to significantly reduce how often they show up: a few turns of churches and priests at work can cause some substantial religious changes. Most people upset with this want a fairly sizeable cutback though, so 10 magician-free turns is probably more what the doctor ordered. You'd have to check exactly what it's called, but the condition for the current turn should not be difficult to find in the appropriate docudemon file.

    If you want more info or have any questions, feel free to ask.


    See my Sig+ below! (Don't see it? Get info here)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO