Results 1 to 2 of 2

Thread: Expanded Tyronia campaign map [WIP]

Hybrid View

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

    Default Expanded Tyronia campaign map [WIP]

    I've been working on a private mod for the Tyronia map Unspoken Knight made for Retrofit. This is a one man project, so I "borrowed" whatever I could use from DLV et al. My goal is to create a fantasy campaign with a decent story and open-ended gameplay, so it will be heavily scripted for an RPG type experience. For instance, most factions allow slavery at the start of the game, but they all get a chance to outlaw it as the game progresses, with varying results. One faction even has a civil war on the issue, with a BA type faction spawning either way, and rebels spawn when the other factions decide to outlaw/abolish slavery.

    I am asking three things:
    1) permission from the original author(s) to use their work in a released mod, if and when it is done. As I've used a lot of stuff from DLV and SS, as well as basing the map on Unspoken Knight's Tyronia map. I don't know what the original modders' policies are on this, but I know enough about mods to ask for an official OK.

    2) help. I am a complete N00B, so I'm going to need all the help I can get, in particular with modeling and texturing units. I also have several questions about scripting that I will post here, along with any other problems that arise as the mod progresses and the overall progress of the mod.

    and 3)
    feedback. this is still a WIP, so I'm curious as to waht others think about all of this.
    Anyway, here's the campaign height map so far:
    http://img828.imageshack.us/i/mapheights.jpg/
    I've also worked extensively with export_descr_buildings and the campaign script, as well as editing the ancillaries and character traits.
    Last edited by Carle; February 01, 2011 at 03:17 PM. Reason: Can't get the image to appear...
    A well informed opinion is a well formed opinion.

  2. #2

    Default Re: Expanded Tyronia campaign map [WIP]

    The portion of script pertaining to the Baron's Alliance, which, like everything else, probably contains a lot of errors...
    Spoiler Alert, click show to read: 
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;BARONS ALLIANCE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    ;setup related event counters
    monitor_event FactionTurnStart FactionType arunica

    add_events
    event counter ba_last_spawn_timer
    date 0
    end_add_events

    terminate_monitor

    end_monitor

    ;inc time since the barons alliance last spawned timer and keep track of blackmail attempts
    monitor_event FactionTurnStart FactionType arunica

    inc_event_counter ba_last_spawn_timer 1
    inc_event_counter arunican_ambition_timer 1

    end_monitor

    ;size of Arunica affects chance of blackmail attempt
    monitor_event FactionTurnStart arunica
    and I_EventCounter arunican_ambition_timer > 8
    generate_random_counter ba_blackmail 1 50

    if I_NumberOfSettlements arunica > 5
    and I_EventCounter ba_blackmail < 10
    inc_event_counter arunican_ambition 1 ; increases chance of blackmail attempt
    endif

    if I_NumberOfSettlements arunica > 8
    if I_EventCounter ba_blackmail < 5
    inc_event_counter arunican_ambition 1 ; increases chance of blackmail attempt
    endif
    endif

    if I_NumberOfSettlements arunica > 10
    if I_EventCounter ba_blackmail < 5
    inc_event_counter arunican_ambition 1 ; increases chance of blackmail attempt
    endif
    endif

    if I_NumberOfSettlements arunica > 12
    if I_EventCounter ba_blackmail < 5
    inc_event_counter arunican_ambition 1 ; increases chance of blackmail attempt
    endif
    endif

    if I_NumberOfSettlements arunica > 15
    if I_EventCounter ba_blackmail < 5
    inc_event_counter arunican_ambition 1 ; increases chance of blackmail attempt
    endif
    endif

    monitor_event CeasesFactionLeader FactionType arunica
    and FactionIsLocal
    inc_event_counter arunican_ambition 2

    monitor_event CeasesFactionLeader FactionType arunica
    and not actionIsLocal
    inc_event_counter arunican_ambition 1

    monitor_event PreFactionTurnStart FactionType arunica
    and I_EventCounter arunican_ambition_timer > 8
    and FactionIsLocal ; AI gets a break, as always

    if FactionLeaderAttribute arunica Authority > 5
    and I_EventCounter arunican_ambition > 1 ; only lowers chance of blackmail, doesn't prevent it entirely
    inc_event_counter arunican_ambition -1
    endif

    if FactionLeaderAttribute arunica Authority < 5
    inc_event_counter arunican_ambition 1
    endif

    if FactionLeaderAttribute arunica Command > 5 ; the nobles don't want their heads on spikes
    and I_EventCounter arunican_ambition > 1
    inc_event_counter arunican_ambition -1
    endif

    if FactionLeaderAttribute arunica Command < 5 ; the nobles are confident he isn't capable of retaliating
    inc_event_counter arunican_ambition 1
    endif

    monitor_event PreFactionTurnStart FactionType arunica
    and I_EventCounter arunican_ambition >= 2
    and not FactionIsLocal ; AI gets a break, as always

    if FactionLeaderAttribute arunica Authority > 8
    and I_EventCounter arunican_ambition > 1 ; AI can get rid of threat entirely
    inc_event_counter arunican_ambition -1
    endif

    if FactionLeaderAttribute arunica Authority > 5
    and I_EventCounter arunican_ambition > 0 ; AI can get rid of threat entirely
    inc_event_counter arunican_ambition -1
    endif

    if FactionLeaderAttribute arunica Authority < 5 ; same as player, as AI bonuses help alleviate this somewhat
    inc_event_counter arunican_ambition 1
    endif

    if FactionLeaderAttribute arunica Command > 5 ; the nobles don't want their heads on spikes
    and I_EventCounter arunican_ambition > 0
    inc_event_counter arunican_ambition -1
    endif

    if FactionLeaderAttribute arunica Command < 5 ; the nobles are confident he isn't capable of retaliating
    inc_event_counter arunican_ambition 1
    endif
    monitor_event FactionTurnStart
    and I_EventCounter arunican_ambition >= 1
    generate_random_counter arunica_blackmail_spawn 1 20

    if I_EventCounter arunican_ambition = 1
    and I_EventCounter blackmail_spawn < 4
    set_event_counter arunica_blackmail 1
    endif

    if I_EventCounter arunican_ambition = 2
    and I_EventCounter blackmail_spawn < 8
    set_event_counter arunica_blackmail 1
    endif

    if I_EventCounter arunican_ambition = 3
    and I_EventCounter blackmail_spawn < 12
    set_event_counter arunica_blackmail 1
    endif

    if I_EventCounter arunican_ambition = 4
    and I_EventCounter blackmail_spawn < 16
    set_event_counter arunica_blackmail 1
    endif

    if I_EventCounter arunican_ambition = 5
    and I_EventCounter blackmail_spawn < 20
    set_event_counter arunica_blackmail 1
    endif

    if I_EventCounter arunican_ambition > 5
    set_event_counter arunica_blackmail 1
    endif
    if I_EventCounter arunica_blackmail = 1
    set_event_counter arunican_ambition_timer 0
    set_event_counter arunican_ambition 0
    set_event_counter arunica_blackmail 0
    historic_event ba_blackmail true
    endif

    end_monitor
    ; accept demands
    monitor_event EventCounter EventCounterType ba_blackmail_accepted
    and I_EventCounter ba_blackmail_accepted == 1
    set_event_counter price_of_ambition -1 ; chivalry and authority determine chance of revolt
    set_event_counter ba_blackmail_accepted 0
    end_monitor
    ; the player blows off the nobles

    ; refuse demands
    monitor_event EventCounter EventCounterType ba_blackmail_declined
    and I_EventCounter ba_blackmail_declined == 1
    set_event_counter price_of_ambition 1 ; dread and command determine chance of revolt
    set_event_counter ba_blackmail_declined 0
    end_monitor
    monitor_event FactionTurnStart FactionType arunica
    and I_EventCounter price_of_ambition = 1
    and FactionIsLocal ; AI has the life of a king (or it would, were it alive)
    generate_random_counter noble_pride 0 2
    set_event_counter noble_ambition 1 ; makes it a little harder to escape

    if FactionLeaderAttribute arunica Command > 7
    and I_EventCounter noble_pride >= 1
    inc_event_counter noble_ambition -1
    endif
    if FactionLeaderAttribute arunica Command > 5
    and I_EventCounter noble_pride = 2
    inc_event_counter noble_ambition -1
    endif

    if FactionLeaderAttribute arunica Command < 5
    and I_EventCounter noble_pride = 0
    inc_event_counter noble_ambition 1
    endif

    if FactionLeaderAttribute arunica Command < 4
    and I_EventCounter noble_pride = 0
    inc_event_counter noble_ambition 1
    endif

    if FactionLeaderAttribute arunica Command < 3
    and I_EventCounter noble_pride <= 1
    inc_event_counter noble_ambition 1
    endif
    if FactionLeaderAttribute arunica Command < 2
    and I_EventCounter noble_pride <= 1
    inc_event_counter noble_ambition 1
    endif
    if FactionLeaderAttribute arunica Chivalry <= -9 ; so a low authority king can still escape rebellion if he's a dread lord
    inc_event_counter noble_ambition -1
    endif

    if FactionLeaderAttribute arunica Chivalry < -8
    and I_EventCounter noble_pride >= 1
    inc_event_counter noble_ambition -1
    endif

    if FactionLeaderAttribute arunica Chivalry < 6
    and I_EventCounter noble_pride >= 1
    inc_event_counter noble_ambition -1
    endif
    if FactionLeaderAttribute arunica Chivalry < -4
    and I_EventCounter noble_pride = 2
    inc_event_counter noble_ambition -1
    endif

    if I_EventCounter noble_ambition >= 2
    set_event_counter blackhearted 1
    historic_event blackhearted false
    endif
    set_event_counter price_of_ambition 0
    set_event_counter noble_ambiton 0 ; cleaning up
    ; the player pays off the nobles
    monitor_event FactionTurnStart FactionType arunica
    and I_EventCounter price_of_ambition = -1
    and FactionIsLocal ; AI has the life of a king (or it would, were it alive)
    generate_random_counter noble_honour 0 2
    set_event_counter noble_ambition 1 ; makes it a little harder to escape
    if FactionLeaderAttribute arunica Authority > 7
    and I_EventCounter noble_honour >= 1
    inc_event_counter noble_ambition -1
    endif
    if FactionLeaderAttribute arunica Authority > 5
    and I_EventCounter noble_honour = 2
    inc_event_counter noble_ambition -1
    endif

    if FactionLeaderAttribute arunica Authority < 5
    and I_EventCounter noble_honour = 0
    inc_event_counter noble_ambition 1
    endif

    if FactionLeaderAttribute arunica Authority < 4
    and I_EventCounter noble_honour = 0
    inc_event_counter noble_ambition 1
    endif

    if FactionLeaderAttribute arunica Authority < 3
    and I_EventCounter noble_honour <= 1
    inc_event_counter noble_ambition 1
    endif
    if FactionLeaderAttribute arunica Authority < 2
    and I_EventCounter noble_honour <= 1
    inc_event_counter noble_ambition 1
    endif
    if FactionLeaderAttribute arunica Chivalry >= 9 ; so a low authority king can still escape rebellion if he's a living saint
    inc_event_counter noble_ambition -1
    endif

    if FactionLeaderAttribute arunica Chivalry > 8
    and I_EventCounter noble_honour >= 1
    inc_event_counter noble_ambition -1
    endif

    if FactionLeaderAttribute arunica Chivalry > 6
    and I_EventCounter noble_honour >= 1
    inc_event_counter noble_ambition -1
    endif
    if FactionLeaderAttribute arunica Chivalry > 4
    and I_EventCounter noble_honour = 2
    inc_event_counter noble_ambition -1
    endif

    if I_EventCounter noble_ambition >= 2
    set_event_counter blackhearted 1
    historic_event blackhearted false
    endif
    set_event_counter price_of_ambition 0
    set_event_counter noble_ambiton 0 ; cleaning up

    ;initial spawning

    ;first first spawn opportunity
    monitor_event FactionTurnEnd FactionType arunica
    and I_CompareCounter ba_first_emergence = 0
    and I_EventCounter blackhearted 1

    ;randomise to determine if this check should be made this turn

    faction_emerge barons_alliance arunica 6 60.0 155.0 0.9 town false vance Vance 42

    if I_NumberOfSettlements barons_alliance > 0
    set_counter ba_first_emergence 1
    set_event_counter ba_last_spawn_timer 0
    historic_event barons_emerge_vance
    end_if

    end_monitor

    ;second first spawn opportunity
    monitor_event FactionTurnEnd FactionType arunica
    and I_CompareCounter ba_first_emergence = 0
    and I_TurnNumber > 30
    and I_TurnNumber < 50

    faction_emerge barons_alliance arunica 6 60.0 140.0 0.9 town false

    if I_NumberOfSettlements barons_alliance > 0
    set_counter ba_first_emergence 1
    set_event_counter ba_last_spawn_timer 0
    historic_event barons_emerge_generic
    end_if

    end_monitor

    ;third first spawn opportunity
    monitor_event FactionTurnEnd FactionType arunica
    and I_CompareCounter ba_first_emergence = 0
    and I_TurnNumber > 65
    and I_TurnNumber < 90

    faction_emerge barons_alliance arunica 6 60.0 140.0 0.9 town false

    if I_NumberOfSettlements barons_alliance > 0
    set_counter ba_first_emergence 1
    set_event_counter ba_last_spawn_timer 0
    historic_event barons_emerge_generic
    end_if

    end_monitor

    ;final first spawn opportunity
    monitor_event FactionTurnEnd I_CompareCounter ba_first_emergence = 0
    and I_TurnNumber > 100
    and I_TurnNumber < 120

    faction_emerge barons_alliance arunica 6 60.0 140.0 0.9 town false

    if I_NumberOfSettlements barons_alliance > 0
    set_counter ba_first_emergence 1
    set_event_counter ba_last_spawn_timer 0
    historic_event barons_emerge_generic
    end_if

    end_monitor

    ;subsequent spawn conditions

    ;check when England gets a new faction leader
    monitor_event BecomesFactionLeader FactionType arunica
    and I_NumberOfSettlements arunica > 15
    and I_CompareCounter ba_first_emergence = 1
    and I_NumberOfSettlements barons_alliance = 0
    and I_EventCounter ba_last_spawn_timer > 10

    faction_emerge barons_alliance arunica 6 70.0 140.0 0.85 town false

    if I_NumberOfSettlements barons_alliance > 0
    set_event_counter ba_last_spawn_timer 0
    historic_event barons_reemerge_new_king
    add_money barons_alliance 10000
    end_if

    end_monitor

    ;check when English leaders authority is low
    monitor_event FactionTurnEnd FactionType arunica
    and I_NumberOfSettlements arunica > 15
    and I_CompareCounter ba_first_emergence = 1
    and I_NumberOfSettlements barons_alliance = 0
    and I_EventCounter ba_last_spawn_timer > 10

    generate_random_counter authority_value 1 100


    ;the lower the faction leaders authority, the greater the chance of the barons_alliance appearing
    if I_FactionLeaderAttribute arunica Authority = 0

    if I_EventCounter authority_value <= 33
    faction_emerge barons_alliance arunica 5 50.0 145.0 0.9 town false
    end_if

    end_if

    if I_FactionLeaderAttribute arunica Authority = 1

    if I_EventCounter authority_value <= 25
    faction_emerge barons_alliance arunica 6 60.0 135.0 0.9 town false
    end_if

    end_if

    if I_FactionLeaderAttribute arunica Authority = 2

    if I_EventCounter authority_value <= 20
    faction_emerge barons_alliance arunica 6 65.0 130.0 0.85 town false
    end_if

    end_if

    if I_FactionLeaderAttribute arunica Authority = 3

    if I_EventCounter authority_value <= 15
    faction_emerge barons_alliance arunica 6 70.0 120.0 0.85 town false
    end_if

    end_if

    if I_FactionLeaderAttribute arunica Authority = 4

    if I_EventCounter authority_value <= 10
    faction_emerge barons_alliance arunica 6 80.0 120.0 0.85 town false
    end_if

    end_if

    if I_FactionLeaderAttribute arunica Authority = 5

    if I_EventCounter authority_value <= 5
    faction_emerge barons_alliance arunica 6 85.0 120.0 0.85 town false
    end_if

    end_if

    if I_NumberOfSettlements barons_alliance > 0
    set_event_counter ba_last_spawn_timer 0
    historic_event barons_reemerge_poor_king
    add_money barons_alliance 10000
    end_if

    end_monitor

    I was wondering how to make a complex religion change script that allows factions to go back and forth between religions (within reason- a timer will prevent the faction from switching for a while, and there will be penalties for switching multiple times in addition to the other effects) based on set criteria, i.e. whether they're getting creamed by crusades.
    A well informed opinion is a well formed opinion.

Posting Permissions

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