Results 1 to 20 of 20

Thread: bug?'add_money bavandid --250' in campaign_script.txt

  1. #1

    Icon5 bug?'add_money bavandid --250' in campaign_script.txt

    Hello,I am new here and I looked this.
    Last edited by tw_myhome; January 22, 2023 at 08:08 PM.

  2. #2

    Icon5 Re: bug?'add_money bavandid --250' in campaign_script.txt

    monitor_event CharacterTurnEnd CharFactionType england
    and not EndedInSettlement
    and not IsBesieging
    and not AgentType = admiral
    and not AgentType = spy
    and not AgentType = diplomat
    and not AgentType = assassin
    and not AgentType = priest
    and not AgentType = princess
    and not AgentType = merchant
    and not AgentType = inquisitor
    and InEnemyLands

    add_money england -100

    end_monitor

    monitor_event CharacterTurnEnd CharFactionType england
    and not EndedInSettlement
    and IsBesieging
    and not AgentType = admiral
    and not AgentType = spy
    and not AgentType = diplomat
    and not AgentType = assassin
    and not AgentType = priest
    and not AgentType = princess
    and not AgentType = merchant
    and not AgentType = inquisitor
    and InEnemyLands

    add_money england --250

    end_monitor

  3. #3

    Icon1 Re: bug?'add_money bavandid --250' in campaign_script.txt

    export_descr_unit.txt

    more bug

    PHP Code:
    ;! unitstart elite plate hvyspear mace
    type             rus suz bodyguard
    dictionary       rus_suz_bodyguard_sp
    category         infantry
    class            heavy
    voice_type       Heavy
    accent         East_European
    banner faction   main_infantry
    banner holy      crusade
    soldier          rus_bodyguard_sp_ug0
    420,  1
    attributes       sea_faring
    hide_forestvery_hardycan_withdrawfrighten_foot 
    PHP Code:
    type             georgian heavy archer
    dictionary       georgian_heavy_archer      
    georgian heavy archer
    category         infantry
    class            missile
    voice_type       Heavy
    accent           East_European
    banner faction   main_missile
    banner holy      crusade
    soldier          georgian_heavy_archer
    8000.85
    attributes       sea_faring
    hide_foresthardycan_withdrawstart_not_skirmishing
    Last edited by tw_myhome; January 21, 2023 at 05:54 PM. Reason: more fluent

  4. #4

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    ###duplicate trigger###
    BCBuff\data\export_descr_character_traits.txt (2 hits)
    Line 16337: Trigger loyalty_check5
    Line 29468: Trigger loyalty_check5

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    add_money: remove one of the two minus signs

    export_descr_unit - entries are correct, see below:
    -- category: possible entries are infantry, cavalry, siege, handler, ship or non_combatant
    -- class: possible entries are light, heavy, missile or spearmen

    duplicate trigger: change number of second trigger to 6
    Last edited by Gigantus; January 25, 2023 at 10:58 PM.










  6. #6

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    Hi,Gigantus,happy new year.

    1 OK, I got the idea on add_money.
    But I think the modder is willing to have positive result,
    also it is obviously that they mod this data by progarm ,not manually
    so is there generic Modifiers on M2TW?
    I always mod it by hand ,which is so tired and complex.


    2 I think you haven't get the point.

    sea_faring, hide_forest, very_hardy, can_withdraw. frighten_foot

    sea_faring, hide_forest, hardy, can_withdraw, start_not_skirmishing\

    some character mixed in it.

    3 I know change the trigger name,I wonder wherther it(duplicated trigger) may cause the CTD?
    And the latter duplicated trigger may have some problem ------they may trigger the DiscontentGeneral on FactionLeader,
    I wonder wherther it may also cause the CTD?

    Thank you very much.
    Last edited by tw_myhome; January 26, 2023 at 03:37 AM.

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    Didn't notice the backslash or the full stop - only the green 'class' highlight. Given that I do agree that it appears as if files are generated from external data, maybe a spreadsheet or similar where these symbols might be used for formatting purposes, in which case entering it twice will add one symbol to the output, same with the money thing I guess.

    I don't think a crash will happen because of duplicated trigger names, more likely the trigger will just get ignored and only the first instance will be processed.

    Add money command - if it's supposed to be positive then only the value is needed. A deduction (negative) requires a single minus sign directly in front of the value.
    If memory serves then the trigger is part of a field cost script, given the conditions, eg a named character or captain outside the empire's border. Hence it will be a deduction. The faulty monitor has the very same conditions and only the money varies - my guess would be a faulty copy\paste process from an external source. Maybe the field cost script has severity levels that can be chosen.
    Last edited by Gigantus; January 27, 2023 at 12:58 AM.










  8. #8

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    OK,I got it.
    I coorrect the backslash and the full stop in EDU,and feel the game runs more smoothly.
    But when I use Armenia,neither I get money while I disband unit nor princeness upgrade after seven success mission.
    Did here anyone undergo this?
    I really tired of it.

  9. #9
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    The money for disbanding must be a 'money' script like the one you posted earlier. And I have no idea what the 'princeness' upgrade is - can you explain the latter?

    I am getting an impression that Armenia was added after the script was finalized and faction specific scripts (like 'give money to Armenia for disbanding') were not updated.










  10. #10

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    Thank you for finding these bugs!
    They are a result of typos and my ignorance the only tool I have used is notepad++. The backlash and full stop are caused by my fat fingers hitting the wrong button while the double subtraction originated from a discussion with another forum user that suggested that it was the better format.

    I will address these and update the mod please shoot me a message or post in submod thread if you find anything else.

    Cheers!
    Buff and Shine: Submod for Broken Crescent - New Factions, New Mechanics and more. http://www.twcenter.net/forums/showt...tment-and-more

  11. #11

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    Hi Sir,@
    Gigantus
    I found Armenia worked strangely,for disband unit without getting money.

    Code:
    monitor_event UnitDisbanded TrainedUnitCategory infantry
    and not TrainedUnitClass missile
    and I_SettlementSelected Sis
    and I_UnitsToRetrain Sis = 0
    console_command add_population Sis 80
    console_command add_money 500
    end_monitor
    
    monitor_event UnitDisbanded TrainedUnitCategory infantry
    and TrainedUnitClass missile
    and I_SettlementSelected Sis
    and I_UnitsToRetrain Sis = 0
    console_command add_population Sis 60
    console_command add_money 600
    end_monitor
    
    monitor_event UnitDisbanded TrainedUnitCategory cavalry
    and I_SettlementSelected Sis
    and I_UnitsToRetrain Sis = 0
    console_command add_population Sis 50
    console_command add_money 1200
    end_monitor
    
    
    monitor_event UnitDisbanded TrainedUnitCategory siege
    and I_SettlementSelected Sis
    and I_UnitsToRetrain Sis = 0
    console_command add_population Sis 30
    console_command add_money 2000
    end_monitor
    
    monitor_event UnitDisbanded TrainedUnitCategory ship
    console_command add_money 1500
    end_monitor
    I think code is OK,but it works strangely.....sometimes it's valid,but it's invalid at high possiblity.
    I still think there may be some hidden bugs.

    I said my Armenia princess can't get more charm after a several success missions.
    I really like Armenia,emm,that's all.

  12. #12

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    Hi WeekendGeneral,

    thank you,it's an interesting work and I like it very much.
    It's surprises to me that you make it by notepad++.
    I think we can mod it by some scripts or small program,which makes modify clear and memorable.
    I have modded things by hand,and couldn't recall the modify after several days,so I turn to use program to control my modify.
    I wonder whether some tools may check the txts.

    Now we have deeping learning here,and I think we may use it to train the AI in game

  13. #13
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    The disbanding script works without having to specify a faction, it will simply give the money to the faction whose turn it is when the unit gets disbanded.

    Attributes like 'charm' max out at level 10 and won't reduce below 0. The exception is chivalry\dread where the negative value is dread (down to -10), positive (up to 10) is chivalry.

    I did some simple spreadsheet template for some of the more repetitive stuff.










  14. #14

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    My Armenia 4 charm princess never got more charm after success mission

  15. #15
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    It's not mission dependent - it's traits that give the charm, so you will need to have a look at the triggers of those traits.










  16. #16

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    I see.
    I use Georgian princess worked properly,but fails on Armenian princess while we know the traits set to all factions.
    Then what interrupt the traits set on Armenian princess?
    It make me really puzzled.
    Thank you.

  17. #17
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    The 'charm' your Georgian princess received will not be directly related to the mission itself but rather to the action she performed. In other words it will be the trigger for the trait. There is also the possibility that the trigger has a chance element - the trait may not be given all the time.

    Underneath such an example:
    Code:
    Trigger princess_dad_was_handsome
        WhenToTest CharacterComesOfAge
    
        Condition FatherTrait Handsome >= 1
              and AgentType = princess
    
        Affects PrettyWoman  1  Chance  50 
        Affects PrettyWoman  1  Chance  25










  18. #18

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    Yeah,I mean the mission,which is called action from you.

  19. #19
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    There is a 'marry this person' mission for princesses - hence why I use 'action'.










  20. #20

    Default Re: bug?'add_money bavandid --250' in campaign_script.txt

    update some bugs...

    export_descr_character_traits.txt

    deplicated Name

    such as
    PHP Code:
        Line    50: Trait HaleAndHearty
        Line  8063
    : Trait HaleAndHearty 

    key HaleAndHearty values [50, 8063]
    key ContentGeneral values [304, 11813]
    key DiscontentGeneral values [332, 11847]
    key ExRebel values [559, 11784]

    export_descr_unit.txt
    PHP Code:
    type             cum druz han
    dictionary       cum_druz_han_sp 
    Dismounted Khagan Druzhina
    category         infantry
    class            spearmen
    voice_type       Heavy
    accent         Arabic
    banner faction   main_spear
    banner holy      crusade
    soldier          cum_druz_han_sp_ug0
    3708.0 

    PHP Code:
    ;! unitstart elite plate metal
    type             Hucaryyia
    dictionary       Hucaryyia     

    category         infantry
    class            heavy
    voice_type       Heavy
    accent         Arabic
    banner faction   main_infantry
    banner holy      crusade
    soldier          generic_me_swordsmen
    5001.0 
    attributes       sea_faring
    hide_forestvery_hardycan_withdraw
    move_speed_mod   0.96
    formation        2
    222.53square 
    stat_health      1
    0
    stat_pri         17
    5no00meleemelee_bladepiercingsword251no 
    stat_pri_attr    ap
    stat_sec         0
    2no00nomelee_simplebluntnone251ap 
    stat_sec_attr    no 

    Last edited by tw_myhome; February 23, 2023 at 01:13 AM.

Posting Permissions

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