Results 1 to 10 of 10

Thread: how to spawn heretic priests by script?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default how to spawn heretic priests by script?

    As in topic. I want to make a script spawning heretics piriests if the level ov heretics in province will be bigger then 20%. I made this script, but i cannot handle with spawning heretic priests.

  2. #2
    gracul's Avatar 404 Not Found
    Artifex

    Join Date
    Dec 2007
    Location
    Poland
    Posts
    2,009

    Default Re: how to spawn heretic priests by script?

    a heretic is any priest owned by the rebel faction.

  3. #3

    Default Re: how to spawn heretic priests by script?

    so i must to spawn heretic priests as rebel?

    May be accetable something like this:?
    spawn_character rebel, random_name , priest, age 16, x...., y......

  4. #4
    gracul's Avatar 404 Not Found
    Artifex

    Join Date
    Dec 2007
    Location
    Poland
    Posts
    2,009

    Default Re: how to spawn heretic priests by script?

    pretty much.
    rebel actually goes as 'slave' inside game files.

  5. #5

    Default Re: how to spawn heretic priests by script?

    One more question:
    how to check the heretic level in specific settlement? I can check characters religion or characters religion level but i cannot find the condition checking religion level in settlement.

  6. #6

    Default Re: how to spawn heretic priests by script?

    OK i can use PopulationHeretic and TimeSinceHeresy in my script. Unfortanately if i'm right, this conditions checking the current region only. So the question is how to relate this conditions to all of regions? Is there any tip to select each of regions one by one?

  7. #7

    Default Re: how to spawn heretic priests by script?

    may i use point_at_settlement or select_settlement command for my purposes?
    Last edited by attyla; May 22, 2011 at 03:28 PM.

  8. #8

    Default Re: how to spawn heretic priests by script?

    OK i wrote this script:
    monitor_event FactionTurnStart FactionIsLocal
    and I_TurnNumber = 2
    select_settlement Gniezno
    if PopulationHeretic >= 10
    spawn_character slave, random_name, priest, age 18, x 289, y 264
    spawn_character slave, random_name, priest, age 17, x 288, y 262
    spawn_character slave, random_name, priest, age 16, x 292, y 258
    end_if
    terminate_monitor
    end_monitor
    Unfortunately, the game don't wont to recognise faction named slave. Log says: faction type not recognised.
    So i suppose i cannot spawn priests using slave faction.
    Another idea?

  9. #9

    Icon1 Re: how to spawn heretic priests by script?

    attyla, for the script to work you need to change the event you're using to something that works with the ‘PopulationHeretic’ condition, something like ‘CharacterTurnStart’ or any event that exports a ‘character_record’.
    Spoiler Alert, click show to read: 
    Code:
    Identifier:         CharacterTurnStart
    Event:              A Character has started its turn
    Exports:            nc_character_record, character_record, faction, region_id, character_type
    Class:              ET_CHARACTER_TURN_START
    Author:             Guy
    Code:
    Identifier:              PopulationHeretic
    Trigger requirements:    character_record
    Parameters:              logic token, percent
    Sample use:              PopulationHeretic >= 10
    Description:             Test the heresy level in characters current region
    Battle or Strat:         Strat
    Class:                   POPULATION_HERETIC
    Implemented:             Yes
    Author:                  Scott

    Now in that ‘spawn_character’ command, try removing the comma after the faction's name. It's not needed there, and may be causing a problem. Also, I seem to remember that priests and heretics are not the same agent type.
    Spoiler Alert, click show to read: 
    Code:
    spawn_character slave random_name, heretic, age 18, x 289, y 264

  10. #10

    Default Re: how to spawn heretic priests by script?

    i've changed command to point_at_settlement. I hope it's enough. I've also erased word slave from lines spawning priests. exept good looking effect of pointing the settlement nothing new...

    This is info from log:

    21:12:28.890 [system.io] [info] open: found mods/Deus_Vult/data/world/maps/campaign/imperial_campaign/campaign_script.txt (from: E:\Gry\MTW2)
    21:12:29.062 [game.script] [error] Script parsing error at line 11, column 59 in mods/Deus_Vult/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Character 'priest' is too young to be a character at age 0.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •