Page 59 of 78 FirstFirst ... 934495051525354555657585960616263646566676869 ... LastLast
Results 1,161 to 1,180 of 1545

Thread: Modding Questions and Help Thread

  1. #1161
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Modding Questions and Help Thread

    You're welcome. One monitor_conditions won't be noticeable (depending on what its conditions are) but the more of them there are the worse it gets, so best to not get into the habit of using it at all. There are occasions where there's no alternative but in my experience that's very rare.

    If you need different pictures for different cultures then you can put them in the relevant cultures' eventpics folders, instead of southern_european's. Basically, every faction (culture) will see the pic from the southern_european folder, unless they have their own in their own culture folder in which case they'll see that instead.
    Last edited by Withwnar; November 15, 2015 at 09:15 PM.

  2. #1162

    Default Re: Modding Questions and Help Thread

    Yes, I see, I'll do as you say. Hey that's very interesting, I'll do it for varios factions!

  3. #1163
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by aetiusaetius View Post
    ...I'll do it for varios factions!
    Just to be clear: pics belong to cultures, not factions. Factions of the same culture can't have different pics for the same event message.

  4. #1164
    ♔atthias♔'s Avatar dutch speaking
    Citizen

    Join Date
    Mar 2013
    Location
    France
    Posts
    4,059

    Default Re: Modding Questions and Help Thread

    hello everybody I am trying to do a kalmar thing sort script for personal use but it does not work what is wrong there
    Code:
    monitor_event FactionTurnStart FactionType Scilly        and I_TurnNumber = 1
    
    
            
            give_everything_to_faction Byzantium Scilly true
    
    end_monitor
    greetings atthias
    Last edited by ♔atthias♔; December 02, 2015 at 09:25 AM.
    Rise of Mordor 3D Modelers Wanted
    Total War - Rise of Mordor
    Are you a 3D Environment and Character artist, or a Character Animator?

    If yes, then the Rise of Mordor team linked above is looking for you!
    Massive Overhaul Submod Units!
    D you want some units back in MOS 1.7? Install this mod http://www.twcenter.net/forums/showt...n-1-1-RELEASED
    It adds back units who were deleted from the campaign in MOS 1.7, namely the Winged Swordsmen, the Citadel Guard Archers and the Gondor Dismounted Bodyguard.

    Under the proud patronage of
    Frunk of the house of Siblesz

  5. #1165
    Ngugi's Avatar TATW & Albion Local Mod
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    10,687

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by atthias View Post
    hello everybody I am trying to do a kalmar thing sort script for personal use but it does not work what is wrong there
    Code:
    monitor_event FactionTurnStart Faction
    Type Scilly        and I_TurnNumber = 1
    
    
            
            give_everything_to_faction Byzantium Scilly true
    
    end_monitor
    greetings atthias
    I don't know about the script itself, not my department, but sicily is misspelled Scilly
    Don't know if it cares for large an small letters, but stick to small to be sure

    Kingdom of Lindon preview video out





    DCI: Last Alliance
    - WIP Second Age mod | DCI: Tôl Acharn - mighty Dúnedain Counter Invasions |
    Additional Mercenary Minimod - more mercs; for TATW and DCI | Family Tree minimods - lore improvements | Remade Event Pictures - enhance cultures trough images |
    Favorite TATW compilation: Withwnars Submod Collection
    Patron of Mank, Kiliç Alì, FireFreak111, MIKEGOLF & Arachir Galudirithon, Earl of Memory

  6. #1166
    ♔atthias♔'s Avatar dutch speaking
    Citizen

    Join Date
    Mar 2013
    Location
    France
    Posts
    4,059

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by Ngugi View Post
    I don't know about the script itself, not my department, but sicily is misspelled Scilly
    Don't know if it cares for large an small letters, but stick to small to be sure
    THX still nothing
    Rise of Mordor 3D Modelers Wanted
    Total War - Rise of Mordor
    Are you a 3D Environment and Character artist, or a Character Animator?

    If yes, then the Rise of Mordor team linked above is looking for you!
    Massive Overhaul Submod Units!
    D you want some units back in MOS 1.7? Install this mod http://www.twcenter.net/forums/showt...n-1-1-RELEASED
    It adds back units who were deleted from the campaign in MOS 1.7, namely the Winged Swordsmen, the Citadel Guard Archers and the Gondor Dismounted Bodyguard.

    Under the proud patronage of
    Frunk of the house of Siblesz

  7. #1167
    Mhaedros's Avatar Brave Heart Tegan
    Content Emeritus

    Join Date
    Feb 2011
    Location
    Finland
    Posts
    8,764
    Blog Entries
    2

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by atthias View Post
    hello everybody I am trying to do a kalmar thing sort script for personal use but it does not work what is wrong there
    Code:
    monitor_event FactionTurnStart FactionType Scilly        and I_TurnNumber = 1
    
    
            
            give_everything_to_faction Byzantium Scilly true
    
    end_monitor
    greetings atthias
    It may be a silly question, but I can't think of anything else; you know that I_TurnNumber = 1 effectively means turn 2 right? The game starts at "turn 0".

    I tried to make the script did it in another mod, and it worked. Only difference I notice is faction names, and that shouldn't matter. Can you make a simple popup on turn 1 if the problem persists, so as to check whether the script works at all (maybe you've forgotten to add the lines in descr_strat?)

    Code:
    monitor_event FactionTurnStart FactionType england    and I_TurnNumber = 1
            give_everything_to_faction denmark england true
        terminate_monitor
    end_monitor
    
    descr_strat lines:
    script
    campaign_script.txt
    Last edited by Mhaedros; December 02, 2015 at 11:43 AM.
    Under the patronage of Finlander. Once patron to someone, no longer.
    Content's well good, innit.


  8. #1168
    ♔atthias♔'s Avatar dutch speaking
    Citizen

    Join Date
    Mar 2013
    Location
    France
    Posts
    4,059

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by Mhaedros View Post
    It may be a silly question, but I can't think of anything else; you know that I_TurnNumber = 1 effectively means turn 2 right? The game starts at "turn 0".

    I tried to make the script did it in another mod, and it worked. Only difference I notice is faction names, and that shouldn't matter. Can you make a simple popup on turn 1 if the problem persists, so as to check whether the script works at all (maybe you've forgotten to add the lines in descr_strat?)

    Code:
    monitor_event FactionTurnStart FactionType england    and I_TurnNumber = 1
            give_everything_to_faction denmark england true
        terminate_monitor
    end_monitor
    
    descr_strat lines:
    script
    campaign_script.txt
    I know that about turn numbers I have added the script to the descr strat this is how it look
    Code:
    script    monitor_event FactionTurnStart FactionType scilly
            and I_TurnNumber = 1
    
    
            
            give_everything_to_faction byzantium scilly false
    
    
            
            terminate_monitor
            
        end_monitor
    end_script
    campaign_script.txt
    greetings atthias
    Last edited by ♔atthias♔; December 02, 2015 at 11:58 AM.
    Rise of Mordor 3D Modelers Wanted
    Total War - Rise of Mordor
    Are you a 3D Environment and Character artist, or a Character Animator?

    If yes, then the Rise of Mordor team linked above is looking for you!
    Massive Overhaul Submod Units!
    D you want some units back in MOS 1.7? Install this mod http://www.twcenter.net/forums/showt...n-1-1-RELEASED
    It adds back units who were deleted from the campaign in MOS 1.7, namely the Winged Swordsmen, the Citadel Guard Archers and the Gondor Dismounted Bodyguard.

    Under the proud patronage of
    Frunk of the house of Siblesz

  9. #1169

    Default Re: Modding Questions and Help Thread

    Hello, I am again working on my resource mod...was just checking on the efficiency of some scripts...first of all here is the goal of script 1:

    1. The script will check when a building is built
    2. The building must be built by the faction turks
    3. When the building is built it will lower the 3 resources(counters) just for turks
    4. I want this to work somewhat for the AI at somepoint
    5. I will have to do this for every building that the faction turks uses


    Key Question: Is there a way to cut down on the monitors...right now I think I have 60 monitors just for the faction turks.

    Code:
    monitor_event BuildingCompleted SettlementBuildingFinished = town_watch
                and FactionType turks
                inc_counter turks_iron_available -200
                inc_counter turks_wood_available -1500
                inc_counter turks_leather_available -200
                end_monitor
    Script #2:

    1. This script will run after each turn to check what buildings exist for turks
    2. If the building exists it will add or subtract resource counters based on logic...ie..ports need upkeep wood but give fish(food).
    3. I want this to eventually work in some capacity for the AI..
    4. This will have to be done for every building

    Is there a way to cut down on monitors? Maybe if, end if with settlementbuildingexists....list each building with counters under one monitor? Thanks

    Code:
    monitor_event SettlementTurnEnd SettlementBuildingExists = port    
                   and FactionType turks
                inc_counter turks_wood_available -50
                inc_counter turks_food_available 300
    end_monitor

  10. #1170
    Mhaedros's Avatar Brave Heart Tegan
    Content Emeritus

    Join Date
    Feb 2011
    Location
    Finland
    Posts
    8,764
    Blog Entries
    2

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by atthias View Post
    I know that about turn numbers I have added the script to the descr strat this is how it look
    Code:
    script    monitor_event FactionTurnStart FactionType scilly
            and I_TurnNumber = 1
    
    
            
            give_everything_to_faction byzantium scilly false
    
    
            
            terminate_monitor
            
        end_monitor
    end_script
    campaign_script.txt
    greetings atthias
    As Ngugi said, you still need to change it from "scilly" to "sicily".
    Under the patronage of Finlander. Once patron to someone, no longer.
    Content's well good, innit.


  11. #1171
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Modding Questions and Help Thread

    Check the log atthias. Always, even when things seem to be working. No doubt it is telling you that "scilly" is not a faction.

  12. #1172
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Modding Questions and Help Thread

    @orclover
    The only conditions that may be used with IFs are ones that have no trigger requirements. i.e. I_xxx ones, RandomPercent, and maybe one or two others. Everything else must be a monitor's condition. SettlementBuildingExists requires "settlement" so cannot be used with an IF.

    There's no way to reduce your monitor counts as far as I can see, though I don't remember the context of what this script is all about.

    Except possibly this...

    Code:
    declare_counter factions_turn ;whose turn is it? 1 = turks, 2 = sicily, etc.
    
    monitor_event FactionTurnStart FactionType turks
      set_counter factions_turn 1
    end_monitor
    
    monitor_event FactionTurnStart FactionType sicily
      set_counter factions_turn 2
    end_monitor
    
    ;and so on for other factions...
    
    monitor_event BuildingCompleted SettlementBuildingFinished = town_watch
    
      if I_CompareCounter factions_turn = 1 ;turks
        inc_counter turks_iron_available -200
        inc_counter turks_wood_available -1500
        inc_counter turks_leather_available -200
      end_if
      
      if I_CompareCounter factions_turn = 2 ;sicily
        inc_counter sicily_iron_available -200
        inc_counter sicily_wood_available -1500
        inc_counter sicily_leather_available -200
      end_if
      
      ;and so on for other factions...
      
    end_monitor
    There's no getting around one monitor per building type but this way at least it is no longer one monitor per building type and faction type.

  13. #1173
    ♔atthias♔'s Avatar dutch speaking
    Citizen

    Join Date
    Mar 2013
    Location
    France
    Posts
    4,059

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by Withwnar View Post
    Check the log atthias. Always, even when things seem to be working. No doubt it is telling you that "scilly" is not a faction.
    thanks for helping a noob but it does not work
    this is the script
    Code:
    script
    	monitor_event FactionTurnStart FactionType sicily
    		and I_TurnNumber = 1
    
    
    		
    		give_everything_to_faction byzantium sicily false
    
    
    		
    		terminate_monitor
    		
    	end_monitor
    end_script
    campaign_script.txt
    and this is the log
    Spoiler Alert, click show to read: 
    17:11:08.925 [system.rpt] [always] CPU: SSE2
    17:11:08.925 [system.rpt] [always] ==== system log start, build date: Sep 5 2014 version development ===
    17:11:08.925 [system.io] [always] mounted pack packs/data_0.pack
    17:11:08.925 [system.io] [always] mounted pack packs/data_1.pack
    17:11:08.925 [system.io] [always] mounted pack packs/data_2.pack
    17:11:08.925 [system.io] [always] mounted pack packs/data_3.pack
    17:11:08.925 [system.io] [always] mounted pack packs/data_4.pack
    17:11:08.925 [system.io] [always] mounted pack packs/localized.pack
    17:11:44.186 [script.err] [error] Script Error in mods/Third_Age_3/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 6093, column 5
    Couldn't open the script file mods/Third_Age_3/data/world/maps/campaign/imperial_campaign/monitor_event

    greetings atthias
    Rise of Mordor 3D Modelers Wanted
    Total War - Rise of Mordor
    Are you a 3D Environment and Character artist, or a Character Animator?

    If yes, then the Rise of Mordor team linked above is looking for you!
    Massive Overhaul Submod Units!
    D you want some units back in MOS 1.7? Install this mod http://www.twcenter.net/forums/showt...n-1-1-RELEASED
    It adds back units who were deleted from the campaign in MOS 1.7, namely the Winged Swordsmen, the Citadel Guard Archers and the Gondor Dismounted Bodyguard.

    Under the proud patronage of
    Frunk of the house of Siblesz

  14. #1174

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by Withwnar View Post
    @orclover
    The only conditions that may be used with IFs are ones that have no trigger requirements. i.e. I_xxx ones, RandomPercent, and maybe one or two others. Everything else must be a monitor's condition. SettlementBuildingExists requires "settlement" so cannot be used with an IF.

    There's no way to reduce your monitor counts as far as I can see, though I don't remember the context of what this script is all about.

    Except possibly this...

    Code:
    declare_counter factions_turn ;whose turn is it? 1 = turks, 2 = sicily, etc.
    
    monitor_event FactionTurnStart FactionType turks
      set_counter factions_turn 1
    end_monitor
    
    monitor_event FactionTurnStart FactionType sicily
      set_counter factions_turn 2
    end_monitor
    
    ;and so on for other factions...
    
    monitor_event BuildingCompleted SettlementBuildingFinished = town_watch
    
      if I_CompareCounter factions_turn = 1 ;turks
        inc_counter turks_iron_available -200
        inc_counter turks_wood_available -1500
        inc_counter turks_leather_available -200
      end_if
      
      if I_CompareCounter factions_turn = 2 ;sicily
        inc_counter sicily_iron_available -200
        inc_counter sicily_wood_available -1500
        inc_counter sicily_leather_available -200
      end_if
      
      ;and so on for other factions...
      
    end_monitor
    There's no getting around one monitor per building type but this way at least it is no longer one monitor per building type and faction type.

    Thanks, that will help quite a bit if I expand this to other factions...would this also work with the unit trained monitor for units trained across multiple factions...

  15. #1175
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by atthias View Post
    17:11:44.186 [script.err] [error] Script Error in mods/Third_Age_3/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 6093, column 5
    Couldn't open the script file mods/Third_Age_3/data/world/maps/campaign/imperial_campaign/monitor_event
    descr_strat.txt is the problem.

    Your script is also missing the wait_monitors line and says "campaign_script.txt" at the end for some reason. Those things will need fixing too. See the original script file to see how it should look.

    Quote Originally Posted by orclover5 View Post
    would this also work with the unit trained monitor for units trained across multiple factions
    I don't see why not.

  16. #1176

    Default Re: Modding Questions and Help Thread

    Hi! I'm trying to mod the invasions in MOS so that they have a turn limit, so if the invasion has not succeded it will automatically end instead of going forever. So where is the script for the invasions???? I've looked thoroughly in the campaign_script.txt, found Proximus Counter Invasions and Dunedain Jihads but not the invasion script itself; where is it? And which is the best way to count the turns with a counter in order it is increased (or decreased) every turn? I believe vanilla Third Age 3.2 had some similar invasion turn limit, but I was also unable to find it...

    Thanks!

  17. #1177

    Default Re: Modding Questions and Help Thread

    Hey withwnar, would have any idea why this monitor would decrease my wood, iron, every turn, when in theory it should drop it only when this building is completed by the faction turks. Once it is removed my wood resource stops dropping, as I can tell using the character traits on a merchant.

    Code:
    monitor_event BuildingCompleted SettlementBuildingFinished = town_watch
    
      if I_CompareCounter factions_turn = 1 ;turks
        inc_counter turks_iron_available -200
        inc_counter turks_wood_available -1500
        inc_counter turks_leather_available -200
      end_if
    end_monitor

  18. #1178
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Modding Questions and Help Thread

    Looks okay. Any log errors?

  19. #1179
    Ngugi's Avatar TATW & Albion Local Mod
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    10,687

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by aetiusaetius View Post
    Hi! I'm trying to mod the invasions in MOS so that they have a turn limit, so if the invasion has not succeded it will automatically end instead of going forever. So where is the script for the invasions???? I've looked thoroughly in the campaign_script.txt, found Proximus Counter Invasions and Dunedain Jihads but not the invasion script itself; where is it? And which is the best way to count the turns with a counter in order it is increased (or decreased) every turn? I believe vanilla Third Age 3.2 had some similar invasion turn limit, but I was also unable to find it...

    Thanks!
    Haven't found anything about that. There is some mechanic that allow the pope [Sauron] to call the crusade [Invasion] a failiure and stop it, instead of it ending with success or defeat of all participating generals, yet what the requirments are or where it is coded seems unknown. May be hardcoded.


    EDIT: test and ask in the mod workshop, may be someone there who might knwo? http://www.twcenter.net/forums/forum...-and-Scripting
    Last edited by Ngugi; December 06, 2015 at 08:51 AM.

    Kingdom of Lindon preview video out





    DCI: Last Alliance
    - WIP Second Age mod | DCI: Tôl Acharn - mighty Dúnedain Counter Invasions |
    Additional Mercenary Minimod - more mercs; for TATW and DCI | Family Tree minimods - lore improvements | Remade Event Pictures - enhance cultures trough images |
    Favorite TATW compilation: Withwnars Submod Collection
    Patron of Mank, Kiliç Alì, FireFreak111, MIKEGOLF & Arachir Galudirithon, Earl of Memory

  20. #1180

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by Ngugi View Post
    May be hardcoded.


    EDIT: test and ask in the mod workshop, may be someone there who might knwo? http://www.twcenter.net/forums/forum...-and-Scripting
    Yes, I have no idea where it is... I'll ask them, thanks Ngugi!!

Posting Permissions

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