Thread: Bugs Reports & Technical Help

  1. #3821
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,603

    Default Re: Bugs Reports & Technical Help

    Quote Originally Posted by kaiser29 View Post
    i did some testing today. i wanted to do something "extreme"... since i think the error that causes the CTDs are in the campaign script, i cancelled these scripts from the file and run some campaigns:

    - Difficulty set-up (since i play on medium i suppose it doesn't matter if i delete it, right?)
    - Additional Armies at the Beginnning
    - Additional Fleets at the Beginnning
    - Scripted Early Sieges with Additional Armies
    - Additional Fleets Throughout The Game
    - Additional General if there're Too Few
    - Noble Lady Spawn Script (this one is really heavy)

    and another thing: i removed from the map all the agents from all the factions (except for priests).

    before these drastic measures i even had CTDs during the second turn. after all the deleting, in 3 campaigns i didn't have any problems to get to turn 40 without CTDs. i will update you
    Actually, Noble Lady Spawn is not so heavy, it's a monitor with 35 ifs. It fires after turn 50, when many other scripts were terminated.

    Deletion of the Difficulty set-up section disables a lot of scripts down the road. Obviously, if you disable scripts then there'll be no crashes. Furthermore, the turn times would be shorter. Just make a search in the script with "is_the_ai "

    Some script would be come unbearable. Eg. this script would would fire in both ifs, making the turmoil 12.

    monitor_event SettlementTurnStart SettlementName Paris and not FactionType france


    if I_CompareCounter paris_occupied = 1
    and I_EventCounter is_the_ai < 1
    add_settlement_turmoil Paris 8
    set_counter paris_occupied 0
    end_if


    if I_EventCounter is_the_ai > 0
    add_settlement_turmoil Paris 4
    end_if
    end_monitor
    It will also disable many traits, from the AI boosters
    Code:
    ;------------------------------------------ AI difficulty levels boostTrigger AI_Boost_Difficulty_MarriedBribed_Remove
     WhenToTest CharacterTurnStart
    
    
     Condition CharacterIsLocal
           and Trait AI_Boost_Difficulty > 0
    
    
     Affects AI_Boost_Difficulty -3 Chance 100
     
    ;------------------------------------------ 
    Trigger Ai_Boost_Diff_Normal
     WhenToTest CharacterTurnStart
    
    
     Condition Trait AI_Boost_Difficulty < 1
           and IsGeneral
           and not FactionIsLocal
           and I_EventCounter DifficultyLevel = 2
    
    
     Affects AI_Boost_Difficulty 1 Chance 100 
    
    
    ;------------------------------------------
    Trigger Ai_Boost_Diff_Hard
     WhenToTest CharacterTurnStart
    
    
     Condition Trait AI_Boost_Difficulty < 1
           and IsGeneral
           and not FactionIsLocal
           and I_EventCounter DifficultyLevel = 3
           
     Affects AI_Boost_Difficulty 2 Chance 100 
    
    
    ;------------------------------------------
    Trigger Ai_Boost_Diff_VeryHard
     WhenToTest CharacterTurnStart
    
    
     Condition Trait AI_Boost_Difficulty < 1
           and IsGeneral
           and not FactionIsLocal
           and I_EventCounter DifficultyLevel = 4
           
     Affects AI_Boost_Difficulty 3 Chance 100
    to the personality traits

    Code:
    ;------------------------------------------ CoA STARTERSTrigger CoA_starter_VeryHard
     WhenToTest CharacterComesOfAge
     
     Condition I_EventCounter DifficultyLevel = 4
            and IsGeneral
        
      Affects LoyaltyStarter 1 Chance 100 
      Affects ReligionStarter 1 Chance 100 
      Affects Intelligent 20 Chance 100
      Affects Wantschool 13 Chance 100 
      Affects FitForOffice 2 Chance 100
      Affects ArmyCampaignMorale 9 Chance 100
      Affects Handsome 5 Chance 100
      
    ;------------------------------------------
    Trigger CoA_starter_Hard
     WhenToTest CharacterComesOfAge
     
     Condition I_EventCounter DifficultyLevel = 3
            and IsGeneral
           
      Affects LoyaltyStarter 2 Chance 100 
      Affects ReligionStarter 2 Chance 100 
      Affects Wantschool 13 Chance 100 
      Affects Intelligent 20 Chance 100
      Affects FitForOffice 2 Chance 100
      Affects ArmyCampaignMorale 9 Chance 100  
      Affects Handsome 5 Chance 100
      
    ;------------------------------------------
    Trigger CoA_starter_Medium
     WhenToTest CharacterComesOfAge
     
     Condition I_EventCounter DifficultyLevel = 2
            and IsGeneral
           
      Affects LoyaltyStarter 3 Chance 100 
      Affects ReligionStarter 3 Chance 100 
      Affects Wantschool 13 Chance 100 
      Affects Intelligent 20 Chance 100
      Affects FitForOffice 2 Chance 100
      Affects Handsome 6 Chance 100
    
    
    ;------------------------------------------
    Trigger CoA_starter_Easy
     WhenToTest CharacterComesOfAge
     
     Condition I_EventCounter DifficultyLevel = 1
            and IsGeneral
           
      Affects LoyaltyStarter 3 Chance 100 
      Affects ReligionStarter 3 Chance 100 
      Affects Wantschool 13 Chance 100 
      Affects Intelligent 20 Chance 100
      Affects FitForOffice 2 Chance 100
      Affects Handsome 6 Chance 100
    Last edited by Jurand of Cracow; December 01, 2020 at 03:24 AM.

  2. #3822
    kostic's Avatar Centenarius
    Join Date
    Jan 2007
    Location
    Near Lyon in France
    Posts
    838

    Default Re: Bugs Reports & Technical Help

    Tour 17 with Sicily. I arrived in 1140 and had only one CTD on turn 8 when the rebels passed, but after restarting the game with autosave the turn went smoothly.

    I am still in SSHIP 0.9.7 + patch E + KCC 0.9.5 + battle_models.modeldb from Gigantus.
    I think I haven't installed the F patch.

  3. #3823
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,603

    Default Re: Bugs Reports & Technical Help

    Quote Originally Posted by Gigantus View Post
    That's where my 'faction turn' monitor suggestion would come handy...
    The SSHIP does have your solution, Gigantus.

    ; --- pisa --- monitor_event PreFactionTurnStart FactionType pisa
    set_event_counter faction_turn_pisa 1
    log always Turn Start pisa
    end_monitor
    monitor_event FactionTurnEnd FactionType pisa
    set_event_counter faction_turn_pisa 0
    log always Turn End pisa
    end_monitor
    ----------------------------------------------------

    Quote Originally Posted by Gigantus View Post
    I did a lot of late editing in my response to the issue, see post. Basically it's a format issue but not fatal.
    So for this code
    ;---------------------- player --------------------------- monitor_event BuildingCompleted TrueCondition
    and NumBuildingsCompletedFaction p_large_town > 2
    and I_NumberOfSettlements zengid > 3
    and I_TurnNumber > 50
    and FactionType zengid
    and not IsFactionAIControlled
    and not I_EventCounter zengids_rise > 0


    historic_event zengids true
    terminate_monitor
    end_monitor
    NumBuildingsCompletedFaction and I_NumberOfSettlements do work, but in this one they do not?
    ;-------------------------------------------------------------------- GEORGIAN 5 6 REVIVAL ; historically should take place around turn 380


    monitor_event SettlementTurnStart SettlementName Tbilisi
    and I_EventCounter GEORGIAN3_SHOTA_RUSTAVELI > 0 ; only after the peak had happened (but no turn condition)
    and not FactionType georgia ; Gergia lost capital to another faction
    and not FactionType slave ; but not to a rebellion


    historic_event GEORGIAN5_REVIVAL_ALLOWED ; next part of script may fire
    terminate_monitor
    end_monitor

    monitor_event PreFactionTurnStart FactionType georgia

    if I_TurnNumber > 270 ; just in case the player rushes the map
    and I_EventCounter GEORGIAN5_REVIVAL_ALLOWED > 0 ; Gergia had lost capital to another faction
    and I_SettlementOwner Tbilisi = georgia
    and NumBuildingsCompletedFaction p_city > 3 ; Gergia has built 4 Local Councils (Minor City level)
    and FactionBuildingExists = citadel ; at least 1 Citadel (Large Castle) exists

    historic_event GEORGIAN6_REVIVAL
    if not I_IsFactionAIControlled georgia
    inc_event_counter georgian6_revival_player 1
    end_if
    terminate_monitor
    end_if


    if I_TurnNumber > 350 ; FALL BACK - in case of failure or a bug
    and I_SettlementOwner Tbilisi = georgia ; at least the capital is in the Georgian hands
    and RandomPercent > 90 ; to add some randomness against the bugs

    historic_event GEORGIAN6_REVIVAL factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
    if not I_IsFactionAIControlled georgia
    inc_event_counter georgian6_revival_player 1
    end_if
    terminate_monitor
    end_if

    end_monitor

  4. #3824
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,451
    Blog Entries
    26

    Default Re: Bugs Reports & Technical Help

    Rule of thumb: every condition within an IF sequence requires an I_ prefix. Obviously there have to be exceptions and 'RandomPercent' is one such exception. This requirement is why you come across scripts with monitors that are only there to generate\set an event counter - solely for the use in IF sequences, like the faction turn counters.

    Tip: if not sure (pun intended) simply look up the condition in the docudemons and see what 'trigger requirements' they have. 'Nothing' means they are suitable for use in an IF sequence.
    Last edited by Gigantus; December 01, 2020 at 07:09 AM.




  5. #3825
    Laetus
    Join Date
    Oct 2016
    Location
    Melbourne, Australia
    Posts
    9

    Default Re: Bugs Reports & Technical Help

    Playing as Crusaders and after upgrading Heskif I got offered the Hanseatic League Quarters for 5K which I declined as it seemed a little out of the Baltic for my tastes being in Kurdistan.
    I'm playing 0.9.7 with Patch E, I didn't see a mention of it being fixed in Patch F so assume its still a problem. In general haven't had any manpower issues as crusaders although some of the unit stats and costs need tweaking but i see that's on the long list of things to do. Still has been an enjoying game so far so than you to the development team.

  6. #3826
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,603

    Default Re: Bugs Reports & Technical Help

    Quote Originally Posted by FragBait View Post
    Playing as Crusaders and after upgrading Heskif I got offered the Hanseatic League Quarters for 5K which I declined as it seemed a little out of the Baltic for my tastes being in Kurdistan.
    I'm playing 0.9.7 with Patch E, I didn't see a mention of it being fixed in Patch F so assume its still a problem. In general haven't had any manpower issues as crusaders although some of the unit stats and costs need tweaking but i see that's on the long list of things to do. Still has been an enjoying game so far so than you to the development team.
    Do you happen to have the save before this had happened? It'd be very interesting to see it. And yes, this should not has happened.

  7. #3827

    Default Re: Bugs Reports & Technical Help

    Not sure if it's a bug or what, but town of Azaq is not upgrading to a large town. When it reached required 7k population, it didn't give me an option to build new walls. All the available buildings already constructed, not sure what's going on..

  8. #3828
    Laetus
    Join Date
    Oct 2016
    Location
    Melbourne, Australia
    Posts
    9

    Default Re: Bugs Reports & Technical Help

    Quote Originally Posted by Jurand of Cracow View Post
    Do you happen to have the save before this had happened? It'd be very interesting to see it. And yes, this should not has happened.
    I only have an auto-save of the turn I got the offer (77) not the turn before (76) sorry. I did have basic errors logging enabled, and this was in the log at the same time the turn started.

    23:30:13.265 [game.script] [always] Turn Start slave
    23:30:13.374 [game.script] [error] Script execution error for <inc_counter>, at line 48801, in mods/ss6.3/data/world/maps/campaign/imperial_campaign/campaign_script.txt:
    Counter hanseatic_guild_allowed doesn't exist

    23:30:14.829 [game.script] [always] Turn End slave
    23:30:15.617 [game.script] [always] Turn Start jerusalem <- start turn 77

    That was also the only one eligible region that did not already have a guild either built by me or by the regions former owner as it had only just been upgraded. As a general comment perhaps this indicates that the chances of getting a guild are a little too high and could perhaps be toned down a little on higher difficulty levels for player and PC?

  9. #3829
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,451
    Blog Entries
    26

    Default Re: Bugs Reports & Technical Help

    Code:
    23:30:13.374  [game.script] [error] Script execution error for  <inc_counter>,  at line 48801, in   mods/ss6.3/data/world/maps/campaign/imperial_campaign/campaign_script.txt:   
    Counter hanseatic_guild_allowed doesn't exist
    That's the non fatal error I mentioned a short while ago (counter checked instead of event counter I think)




  10. #3830
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,603

    Default Re: Bugs Reports & Technical Help

    Quote Originally Posted by Gigantus View Post
    Code:
    23:30:13.374  [game.script] [error] Script execution error for  <inc_counter>,  at line 48801, in   mods/ss6.3/data/world/maps/campaign/imperial_campaign/campaign_script.txt:   
    Counter hanseatic_guild_allowed doesn't exist
    That's the non fatal error I mentioned a short while ago (counter checked instead of event counter I think)
    I may still not understand.. but isn't this ok?
    ;====================================================================================================== ;------- Hanseatic System
    ;======================================================================================================


    ;----------------- (I) Prevent non-eligible provices from getting it ----------------------
    ; counter is used in EDG

    set_event_counter hanseatic_guild_allowed 0

    monitor_event FactionTurnStart FactionType slave


    inc_event_counter hanseatic_guild_allowed 1

    if I_EventCounter hanseatic_guild_allowed > 20
    set_event_counter hanseatic_guild_allowed 0
    end_if

    end_monitor




    ;----------------- (II) Allow giving points in EDG ----------------------

    monitor_event PreFactionTurnStart TrueCondition
    set_event_counter hanseatic_count -1
    end_monitor


    monitor_event CharacterTurnStart GovernorPlugInExists = hansa
    and I_EventCounter hanseatic_league = 1


    inc_event_counter hanseatic_count 1
    end_monitor


    monitor_event CharacterTurnStart GovernorPlugInExists = c_hansa
    and I_EventCounter hanseatic_league = 1


    inc_event_counter hanseatic_count 1
    end_monitor




    set_event_counter hanseatic_constructed 0


    monitor_event GuildUpgraded BuildingName = hanseatic_guild
    set_event_counter hanseatic_constructed 1
    reset_guild_standing hanseatic_guild
    end_monitor


    monitor_event BuildingDestroyed BuildingName = hanseatic_guild
    set_event_counter hanseatic_constructed 0
    reset_guild_standing hanseatic_guild
    end_monitor




    ;----------------- (III) Replace Merchant guilds with Hanse
    ;
    ; The problem: Hanse comes very late into the play and the relevant settlements can already have other guilds built
    ; A script is needed when certain nations (hre, lithuania, poland, denmark) would be offered replacement of merchants' guild with hanseatic
    ; This script could also be used for similar action with the Explorers' guild
    ;
    ; monitor_event FactionTurnStart FactionType hre
    ; destroy_buildings hre hanseatic_guild true


  11. #3831
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,603

    Default Re: Bugs Reports & Technical Help

    Quote Originally Posted by dfz View Post
    Not sure if it's a bug or what, but town of Azaq is not upgrading to a large town. When it reached required 7k population, it didn't give me an option to build new walls. All the available buildings already constructed, not sure what's going on..
    Yes, well spotted. One cannot build logging camp in the steppes, and as result no wooden wall. I need to think it over and change it.

    building logging_camp{
    convert_to logging_camp
    levels logging_camp carpenter
    {
    logging_camp requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter dummy 1 or not hidden_resource cumans
    {
    convert_to 0
    capability
    {
    construction_cost_bonus_wooden bonus 5 requires not event_counter is_the_ai 3
    construction_cost_bonus_wooden bonus 10 requires event_counter is_the_ai 3
    construction_cost_bonus_wooden bonus 15 requires event_counter is_the_ai 4
    population_loyalty_bonus bonus 1
    trade_base_income_bonus bonus 1 requires factions { cumans, lithuania, }
    }
    material wooden
    construction 6
    cost 850
    settlement_min town
    upgrades
    {
    carpenter
    }
    wooden_wall city requires factions { northern_european, southern_european, eastern_european, greek, middle_eastern, } and building_present_min_level logging_camp logging_camp
    {

  12. #3832

    Default Re: Bugs Reports & Technical Help

    Quote Originally Posted by Jurand of Cracow View Post
    Yes, well spotted. One cannot build logging camp in the steppes, and as result no wooden wall. I need to think it over and change it.
    Maybe on wooden_wall entry, by breaking the eastern_european into a faction list, and setting special require line for cumans? (I'm guessing that's the faction we're talking about? I don't remenber wich ones are steppe faction exactly, or the in-engine exact names). Like below?

    Code:
    wooden_wall city requires factions { northern_european,  southern_european, rus, kievan_rus, etc... , greek, middle_eastern, } and  building_present_min_level logging_camp logging_camp
    wooden_wall city requires factions { cumans, }
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  13. #3833
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,451
    Blog Entries
    26

    Default Re: Bugs Reports & Technical Help

    Quote Originally Posted by Jurand of Cracow View Post
    I may still not understand.. but isn't this ok?
    The script section you posted is fine. It does not contain an incorrect 'inc_counter' line as listed in the log message (Script execution error for <inc_counter>), only the correct(ed) 'inc_event_counter' lines. I can only assume the script related to the error message must be a prior version of the script.
    Last edited by Gigantus; December 02, 2020 at 01:01 PM.




  14. #3834

    Default Re: Bugs Reports & Technical Help

    Quote Originally Posted by Belovèse View Post
    Maybe on wooden_wall entry, by breaking the eastern_european into a faction list, and setting special require line for cumans? (I'm guessing that's the faction we're talking about? I don't remenber wich ones are steppe faction exactly, or the in-engine exact names). Like below?

    Code:
    wooden_wall city requires factions { northern_european,  southern_european, rus, kievan_rus, etc... , greek, middle_eastern, } and  building_present_min_level logging_camp logging_camp
    wooden_wall city requires factions { cumans, }
    I'm actually playing as Byzantines, and I captured it from cumans. Sorry i'm complete noob in modding, which text file is this in? and if I edit it, is it savegame compatible?

  15. #3835
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,603

    Default Re: Bugs Reports & Technical Help

    this requirement is valid also for the Byzantines. The Bellovese code won't work in your case.
    open export_descr_building.txt with Notepad++ (WordPad will do as well, but not Note), search "and event_counter dummy 1 or not hidden_resource cumans" and replace with nothing.
    iirc, this is save compatible

  16. #3836

    Default Re: Bugs Reports & Technical Help

    thank you so much!!!

  17. #3837
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,603

    Default Re: Bugs Reports & Technical Help

    Quote Originally Posted by Gigantus View Post
    It's a formatting thingy:
    1. because it's a IF sequence it needs to be I_EventCounter, EvenCounter is not suitable to start with as it requires as export the EventCounter event
    2. because it's a IF sequence FactionType and NumBuildingsCompletedFaction will not work
    Code:
    if I_EventCounter BYZANTINE_RENAISSANCE_ALLOWED = 1                ; Constantinople has been lost before
        and FactionType byzantium                                        ; Constantinople has been recaptured
        and NumBuildingsCompletedFaction ikoner_studio > 4                ; art was supported in the meanwhile
        and I_EventCounter FL_is_crowned_ruler = 1                        ; emperor is crowned
            
        historic_event BYZANTINE_RENAISSANCE_STARTED                ; benefits of Ikoner Studios will be higher (defined in EDB)
        terminate_monitor
    end_if
    
    if I_TurnNumber > 250                                            ; fall-back in case Constantinople was not lost
         and FactionType byzantium        
    
         historic_event BYZANTINE_RENAISSANCE_STARTED factions { byzantium, }
         terminate_monitor
    end_if
    For cases like this you usually have a 'faction turn' monitor at the start of your script that sets an event counter which then can be used in a IF sequence, see example for byzantium, the log line adds an entry in the log to indicate when a faction's turn starts and ends which comes handy during bug hunting:
    Code:
        monitor_event PreFactionTurnStart FactionType byzantium
            set_event_counter faction_turn_byzantium 1
            log always Turn Start byzantium
        end_monitor
        monitor_event FactionTurnEnd FactionType byzantium
            set_event_counter faction_turn_byzantium 0
            log always Turn End byzantium
        end_monitor
    The FactionType lines will then simply look like this: and I_EventCounter faction_turn_byzantium = 1
    For the NumBuildings condition you will need to use another monitor that sets (and resets at the faction's turn end) another event counter for use in the IF sequence.

    Edit: on second thought the common FactionType condition could be put before the IF sequences. The NumBuilding remains an issue as it is only applicable to one IF sequence.

    Having rambled extensively about the cause for the error I don't think that this script failure is fatal. It simply won't execute.
    Gigantus,
    this solution will work, won't it?
    Code:
    	declare_counter number_tourney_fields_built					; TOURNEY FIELDS	
        monitor_event BuildingCompleted TrueCondition
            and SettlementBuildingFinished >= tourney_fields 
    		and not IsFactionAIControlled
    
    
    		inc_counter number_tourney_fields_built 1
    		
        end_monitor
    Code:
    	;-------------------------------------------------------------------- POLAND 3 FIRST TOURNEY	; First Tourney 1243
    	; it impacts on the possibility to build Tourney Fields and on recruitment of some knight
    	
        monitor_event PreFactionTurnStart FactionType poland
    	
    		if I_TurnNumber > 180
            and I_CompareCounter number_tourney_fields_built > 2		; Poland has built 3 Tourney Fields (Minor City level)
    		and I_SettlementOwner Krakow = poland						; at least the capital is in the Polish hands
    		and I_SettlementOwner Wroclaw = poland						; first tourney was held in Silesia
    		
    			historic_event POLAND3_FIRST_TOURNEY factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
    			
    			if not I_IsFactionAIControlled poland
    				inc_event_counter poland3_first_tourney_player 1
    			end_if
    				
    			terminate_monitor
    		end_if
    
    
    		if I_TurnNumber > 240										; FALL BACK - in case of failure or a bug
    		and I_SettlementOwner Krakow = poland						; at least the capital is in the Polish hands
    		and RandomPercent > 90										; to add some randomness against the bugs
    		
    			historic_event POLAND3_FIRST_TOURNEY factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
    			
    			if not I_IsFactionAIControlled poland
    				inc_event_counter poland3_first_tourney_player 1
    			end_if	
    			
    			terminate_monitor
    		end_if
    
    
    	end_monitor

  18. #3838
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,451
    Blog Entries
    26

    Default Re: Bugs Reports & Technical Help

    Both monitors will work - there is however a logical issue:
    1. the 'number_tourney_fields_built' counter in the first monitor will increase whenever the player constructs one of that building (even if he is not Poland)
    2. The second monitor's IF sequence will fire if the counter reaches 3 even if Poland is not controlled by the player

    Example: england is controlled by the player and builds the three tourney fields at which time the historic_event will show for the factions listed. Judging by the title of the historic_event (POLAND3_FIRST_TOURNEY) I would think that is not what was planned.

    Solution: add a FactionType poland condition to the first monitor (replace TrueCondition) and remove the IsFactionAIControlled condition. Now the monitor will fire only for Poland, both for AI and player.

    Suggestion: add a IF sequence to the first monitor that terminates the monitor when the counter reaches 3, fro good house keeping.
    Last edited by Gigantus; December 04, 2020 at 06:56 AM.




  19. #3839

    Default Re: Bugs Reports & Technical Help

    I am playing a Norway campaign (0.97 patch F) and noticed some things:

    1. Visby offers way too many merchants, maybe the infinite merchants bug is there..

    2. Its not a bug, but the Papal State is too aggressive IMO, they attacked HRE and its basically game over for them, since they are excommunicated and fighting many fronts at the same time, if the crusade follows, everybody will be against them..
    Just to share - I changed the number of turns in the descr_campaign_db file (in the Pope section) to 50 (it was 5):

    <!-- RULES WHEN NOT TO INVADE, OVERRIDES ABOVE -->
    <decision_entry>
    <!--
    IF EARLY GAME, INVADE NONE
    -->
    <min_entry stance="Neutral" />
    <max_entry stance="Neutral" turn_number="50"/>
    <faction_attitude invade="invade_none" continue="false"/>
    </decision_entry>

    And it worked: in three campaigns that I started there was some time of peace but right after the 50 turns the Papal state attacked. Even before, the Papal State was still able to take over some rebel cities because of starting the game in a state of war with them. It created kind of realistic situation when the Papal State has only two, three cities in Italy, good reputation and not attacking any surrounding catholic faction.
    Thank you for your work guys, I attached the save (to see Visby producing many merchants).
    Attached Files Attached Files

  20. #3840
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,603

    Default Re: Bugs Reports & Technical Help

    Quote Originally Posted by Gigantus View Post
    Both monitors will work - there is however a logical issue:
    1. the 'number_tourney_fields_built' counter in the first monitor will increase whenever the player constructs one of that building (even if he is not Poland)
    2. The second monitor's IF sequence will fire if the counter reaches 3 even if Poland is not controlled by the player

    Example: england is controlled by the player and builds the three tourney fields at which time the historic_event will show for the factions listed. Judging by the title of the historic_event (POLAND3_FIRST_TOURNEY) I would think that is not what was planned.

    Solution: add a FactionType poland condition to the first monitor (replace TrueCondition) and remove the IsFactionAIControlled condition. Now the monitor will fire only for Poland, both for AI and player.

    Suggestion: add a IF sequence to the first monitor that terminates the monitor when the counter reaches 3, fro good house keeping.
    Thanks, Gig!
    I've included the terminate monitor, it's good indeed.
    I want the counters to be useful in the other scripts, also for the other factions. I don't want to multiply the monitors by 30. So I won't implement your advice from the point 1: the same counters for all factions.
    Point 2 - it will not fire for the AI precisely because of the criterium of being the player in point 1.
    Finally, enabling reforms for Poland playing as England is not such a big problem. It may actually add to the variety of the game. So I would leave it.

    I've got another question:
    declare_counter number_tourney_fields_built ; TOURNEY FIELDS
    monitor_event BuildingCompleted TrueCondition
    and SettlementBuildingFinished >= tourney_fields
    and not IsFactionAIControlled


    inc_counter number_tourney_fields_built 1


    if I_CompareCounter number_tourney_fields_built > 5
    terminate_monitor
    end_if

    end_monitor
    The script means "Tourney Field built by the player". Which condition should I make for ""Tourney Field owned by the player"?
    Last edited by Jurand of Cracow; December 04, 2020 at 04:03 PM.

Tags for this Thread

Posting Permissions

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