Page 46 of 78 FirstFirst ... 2136373839404142434445464748495051525354555671 ... LastLast
Results 901 to 920 of 1545

Thread: Modding Questions and Help Thread

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

    Default Re: Modding Questions and Help Thread

    As it says in the comments:

    ;Usage example: the calling script should do this...
    So your script should look something like this...

    Code:
    monitor_event FactionTurnStart FactionType turks
    and not IsFactionAIControlled
    and I_SettlementOwner Cardolan = turks
    
      ;give North_Minhiriath to normans
      if not I_SettlementOwner North_Minhiriath normans
        and not I_EventCounter ros_crusade_region_id = 1 ;North_Minhiriath (NOTE: this condition may be removed if the switch's target faction - ros_target_faction_id - is NOT catholic.)
    
        set_event_counter ros_region_id 1 ;North_Minhiriath
        set_event_counter ros_target_faction_id 2 ;normans
        set_event_counter ros_switch_now 0
        set_event_counter ros_switch_now 1
        while I_EventCounter ros_switch_now > 0
        end_while
        campaign_wait 0.1
    
        ;optional: do something else if the transfer was successful...
        if I_EventCounter ros_switch_now == -1
        ;show a historic_event, set a counter, etc.
        end_if
      end_if
    
    terminate_monitor
    end_monitor
    However, are you trying to give it to the normans or the turks? I don't know which faction is which in DAC but this script is now saying "if turks own Cardolan then give North_Minhiriath to normans" which doesn't match what you described you are trying to do.

    By the way, please use [code][/code] tags when posting script/code. It keeps the formatting (easier to read) and takes up less room than a spoiler. It is the # button in the Advanced Editor.

  2. #902

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by Withwnar View Post
    As it says in the comments:



    So your script should look something like this...

    Code:
    monitor_event FactionTurnStart FactionType turks
    and not IsFactionAIControlled
    and I_SettlementOwner Cardolan = turks
    
      ;give North_Minhiriath to normans
      if not I_SettlementOwner North_Minhiriath normans
        and not I_EventCounter ros_crusade_region_id = 1 ;North_Minhiriath (NOTE: this condition may be removed if the switch's target faction - ros_target_faction_id - is NOT catholic.)
    
        set_event_counter ros_region_id 1 ;North_Minhiriath
        set_event_counter ros_target_faction_id 2 ;normans
        set_event_counter ros_switch_now 0
        set_event_counter ros_switch_now 1
        while I_EventCounter ros_switch_now > 0
        end_while
        campaign_wait 0.1
    
        ;optional: do something else if the transfer was successful...
        if I_EventCounter ros_switch_now == -1
        ;show a historic_event, set a counter, etc.
        end_if
      end_if
    
    terminate_monitor
    end_monitor
    However, are you trying to give it to the normans or the turks? I don't know which faction is which in DAC but this script is now saying "if turks own Cardolan then give North_Minhiriath to normans" which doesn't match what you described you are trying to do.

    By the way, please use [code][/code] tags when posting script/code. It keeps the formatting (easier to read) and takes up less room than a spoiler. It is the # button in the Advanced Editor.
    Thanks for the help, I want to give the settlement to turks(dunedain) from the breelanders(normans)....once I conquered cardolan...I can't seem to get it to work though...

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

    Default Re: Modding Questions and Help Thread

    Then it looks like you have the factions the wrong way around in the tool. turks should be in the Target Factions list and normans in the Owner Factions list. Hover your mouse over the ? buttons in the tool for explanations.

    The script I posted won't be right now. You'll need to change it so that it's for turks not normans.

  4. #904

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by Withwnar View Post
    Then it looks like you have the factions the wrong way around in the tool. turks should be in the Target Factions list and normans in the Owner Factions list. Hover your mouse over the ? buttons in the tool for explanations.

    The script I posted won't be right now. You'll need to change it so that it's for turks not normans.
    Thanks for the help... I just redid the TW regions switcher, switched the factions.... Do I need to put in the entire script from what the regions switcher gives me or just the portion that you posted? I tried both ways but its doesn't seem to initiate once I conquered cardolan, even after I do the next turn. The script is fine... and there are no errors in terms of the CS short circuiting.

    Code:
    monitor_event FactionTurnStart FactionType turks
    and not IsFactionAIControlled
    and I_SettlementOwner Cardolan = turks
    
     ;  ;give North_Minhiriath to turks
     if not I_SettlementOwner North_Minhiriath turks
     and not I_EventCounter ros_crusade_region_id = 1 ;North_Minhiriath (NOTE: this condition may be removed if the switch's target faction - ros_target_faction_id - is NOT catholic.)
    
    set_event_counter ros_region_id 1 ;North_Minhiriath
      set_event_counter ros_target_faction_id 2 ;turks
      set_event_counter ros_switch_now 0
     set_event_counter ros_switch_now 1
      while I_EventCounter ros_switch_now > 0
      end_while
      campaign_wait 0.1
      ; 
      ;    ;optional: do something else if the transfer was successful...
     if I_EventCounter ros_switch_now == -1
      ;      ;show a historic_event, set a counter, etc.
      end_if
      end_if
     
     
    
    ;ros_target_faction_id = the intended new owner of the region...  
      ; 2 = turks
    
      ;ros_region_id = the region (settlement) to be transferred...
      ; 1 = North_Minhiriath
    
      ;-------- get the current owner ---------
      
      set_event_counter ros_owner 0
      if I_EventCounter ros_region_id == 1
        if I_SettlementOwner North_Minhiriath normans
          set_event_counter ros_owner 1
        end_if
        if I_SettlementOwner North_Minhiriath turks
          set_event_counter ros_owner 2
        end_if
      end_if
    
      ;-------- is a transfer possible? ---------
    
      set_event_counter ros_status 1
      
      ;not if it is under siege...
      if I_EventCounter ros_region_id == 1 
        and I_SettlementUnderSiege North_Minhiriath
        set_event_counter ros_status 0
      end_if
        
      ;not if it is not currently owned by a faction that this script knows about...
      if I_EventCounter ros_owner == 0
        set_event_counter ros_status 0
      end_if
      
      ;-------- do the transfer ---------
      
      if I_EventCounter ros_status == 1
    
      ;give all settlements a public order bonus building
      ;(We only need to give it to the target faction's settlements but to work out which ones they are
      ; would take a lot of script. For simplicity just give it to every settlement on the map.)
        console_command create_building Adorn ros_po_bonus
        console_command create_building Amon-Eithel ros_po_bonus
        console_command create_building Amrun ros_po_bonus
        console_command create_building Andrast ros_po_bonus
        console_command create_building Andrast-Cape ros_po_bonus
        console_command create_building Anduin-Straits ros_po_bonus
        console_command create_building Anduin-Vale ros_po_bonus
        console_command create_building Anfalas ros_po_bonus
        console_command create_building Angle ros_po_bonus
        console_command create_building Angsul ros_po_bonus
        console_command create_building Anorien ros_po_bonus
        console_command create_building Anorien_Fields ros_po_bonus
        console_command create_building Arthedain ros_po_bonus
        console_command create_building Arthedain-Rammas ros_po_bonus
        console_command create_building Arysis ros_po_bonus
        console_command create_building Athilin ros_po_bonus
        console_command create_building Barad-Harn ros_po_bonus
        console_command create_building Belfalas ros_po_bonus
        console_command create_building Border ros_po_bonus
        console_command create_building Bree ros_po_bonus
        console_command create_building Brethil ros_po_bonus
        console_command create_building Buckland ros_po_bonus
        console_command create_building Bywater ros_po_bonus
        console_command create_building Cair-Andros ros_po_bonus
        console_command create_building Cardolan ros_po_bonus
        console_command create_building Carn-Dum ros_po_bonus
        console_command create_building Carnen ros_po_bonus
        console_command create_building Celduin ros_po_bonus
        console_command create_building Celduin-East ros_po_bonus
        console_command create_building Celduin-Far ros_po_bonus
        console_command create_building Celduin-Far-East ros_po_bonus
        console_command create_building Celduin-North ros_po_bonus
        console_command create_building Celebrant ros_po_bonus
        console_command create_building Central-Minhiriath ros_po_bonus
        console_command create_building Central-Mirkwood ros_po_bonus
        console_command create_building Central_Mountains ros_po_bonus
        console_command create_building Centre-Rhovanion ros_po_bonus
        console_command create_building Chelkar ros_po_bonus
        console_command create_building Cirith ros_po_bonus
        console_command create_building Dagorlad ros_po_bonus
        console_command create_building Dale ros_po_bonus
        console_command create_building Deep-Mirkwood ros_po_bonus
        console_command create_building Dorwinion ros_po_bonus
        console_command create_building Druadain ros_po_bonus
        console_command create_building Druwaith-Iaur ros_po_bonus
        console_command create_building Duneard ros_po_bonus
        console_command create_building Dunland ros_po_bonus
        console_command create_building Dunland-Hills ros_po_bonus
        console_command create_building East-Deep-Mirkwood ros_po_bonus
        console_command create_building East-Emnet ros_po_bonus
        console_command create_building East-Mirkwood ros_po_bonus
        console_command create_building East_Cardolan ros_po_bonus
        console_command create_building East_Gorgoroth ros_po_bonus
        console_command create_building Eastfarthing ros_po_bonus
        console_command create_building Eastfold ros_po_bonus
        console_command create_building Eastrhun ros_po_bonus
        console_command create_building Edhellond ros_po_bonus
        console_command create_building Elven-Mirkwood ros_po_bonus
        console_command create_building Emyn-Beraid ros_po_bonus
        console_command create_building Enedwaith ros_po_bonus
        console_command create_building Erebor ros_po_bonus
        console_command create_building Erech ros_po_bonus
        console_command create_building Ered-Luin ros_po_bonus
        console_command create_building Eregion ros_po_bonus
        console_command create_building Erelond ros_po_bonus
        console_command create_building Esgaroth ros_po_bonus
        console_command create_building Ethring ros_po_bonus
        console_command create_building Ettenmoors ros_po_bonus
        console_command create_building Evendim ros_po_bonus
        console_command create_building Faerdor ros_po_bonus
        console_command create_building Fangorn ros_po_bonus
        console_command create_building Fangorn-East ros_po_bonus
        console_command create_building Fanuilond ros_po_bonus
        console_command create_building Far-Arthedain ros_po_bonus
        console_command create_building Far-Harad ros_po_bonus
        console_command create_building Far-Harlindon ros_po_bonus
        console_command create_building Far-Khand ros_po_bonus
        console_command create_building Far-Low-Anduin ros_po_bonus
        console_command create_building Far-Rhovanion ros_po_bonus
        console_command create_building Farest-Rhun ros_po_bonus
        console_command create_building Forlindon ros_po_bonus
        console_command create_building Forochel ros_po_bonus
        console_command create_building Forodwaith ros_po_bonus
        console_command create_building Fortriu ros_po_bonus
        console_command create_building Gap-of-Rohan ros_po_bonus
        console_command create_building Girithlin ros_po_bonus
        console_command create_building Gladden-Fields ros_po_bonus
        console_command create_building Gobel-Ancalimon ros_po_bonus
        console_command create_building Gorgoroth ros_po_bonus
        console_command create_building Gorgoroth-South ros_po_bonus
        console_command create_building Grey-Foothills ros_po_bonus
        console_command create_building Grey-Mountains ros_po_bonus
        console_command create_building Harad ros_po_bonus
        console_command create_building Haradwaith ros_po_bonus
        console_command create_building Harlindon ros_po_bonus
        console_command create_building Harondor ros_po_bonus
        console_command create_building Harrowdale ros_po_bonus
        console_command create_building Helevorn ros_po_bonus
        console_command create_building Helms-Deep ros_po_bonus
        console_command create_building High-Pass ros_po_bonus
        console_command create_building Imladris ros_po_bonus
        console_command create_building Iron-Hills ros_po_bonus
        console_command create_building Isenmouthe ros_po_bonus
        console_command create_building Ithilien ros_po_bonus
        console_command create_building Kelepar ros_po_bonus
        console_command create_building Khand ros_po_bonus
        console_command create_building Kings-Land ros_po_bonus
        console_command create_building Lake_Evendim ros_po_bonus
        console_command create_building Lamedon ros_po_bonus
        console_command create_building Lebennin ros_po_bonus
        console_command create_building Litash ros_po_bonus
        console_command create_building Logathavuld ros_po_bonus
        console_command create_building Lond_Angren ros_po_bonus
        console_command create_building Lone-lands ros_po_bonus
        console_command create_building Lossarnach ros_po_bonus
        console_command create_building Lothlorien ros_po_bonus
        console_command create_building Lower-Anduin-Vale ros_po_bonus
        console_command create_building Lowest-Anduin-Vale ros_po_bonus
        console_command create_building Lune ros_po_bonus
        console_command create_building Lune-land ros_po_bonus
        console_command create_building Lune-North ros_po_bonus
        console_command create_building Methrast ros_po_bonus
        console_command create_building Metraith ros_po_bonus
        console_command create_building Minhiriath ros_po_bonus
        console_command create_building Mistrand ros_po_bonus
        console_command create_building Misty-Mountains ros_po_bonus
        console_command create_building Mitheithel ros_po_bonus
        console_command create_building Mithlond ros_po_bonus
        console_command create_building Morad ros_po_bonus
        console_command create_building Morgai ros_po_bonus
        console_command create_building Morgul-Vale ros_po_bonus
        console_command create_building Mt-Gram ros_po_bonus
        console_command create_building Mt-Gundabad ros_po_bonus
        console_command create_building Nan-Curunir ros_po_bonus
        console_command create_building Nan-i-Naugrim ros_po_bonus
        console_command create_building Near-Harad ros_po_bonus
        console_command create_building Near-Rhun ros_po_bonus
        console_command create_building New_Mirkwood ros_po_bonus
        console_command create_building North-Enedwaith ros_po_bonus
        console_command create_building North-Gladden-Fields ros_po_bonus
        console_command create_building North-Ithilien ros_po_bonus
        console_command create_building North-Khand ros_po_bonus
        console_command create_building North-Rhovanion ros_po_bonus
        console_command create_building North-Rhun ros_po_bonus
        console_command create_building North_Minhiriath ros_po_bonus
        console_command create_building Nurn ros_po_bonus
        console_command create_building Nurunk ros_po_bonus
        console_command create_building Orc ros_po_bonus
        console_command create_building Osgiliath-East ros_po_bonus
        console_command create_building Osgiliath-West ros_po_bonus
        console_command create_building Outpost ros_po_bonus
        console_command create_building Pezarsan ros_po_bonus
        console_command create_building Pinnath-Gelin ros_po_bonus
        console_command create_building Pukel ros_po_bonus
        console_command create_building Pukel-Gap ros_po_bonus
        console_command create_building Rhaglaw ros_po_bonus
        console_command create_building Rhovanion ros_po_bonus
        console_command create_building Rhun ros_po_bonus
        console_command create_building Ruskea ros_po_bonus
        console_command create_building Shafra ros_po_bonus
        console_command create_building Shire ros_po_bonus
        console_command create_building South-Dorwinion ros_po_bonus
        console_command create_building South-Elven-Mirkwood ros_po_bonus
        console_command create_building South-Enedwaith ros_po_bonus
        console_command create_building South-Ered-Luin ros_po_bonus
        console_command create_building South-Ithilien ros_po_bonus
        console_command create_building South-Logathavuld ros_po_bonus
        console_command create_building South-Mithlond ros_po_bonus
        console_command create_building South-Umbar ros_po_bonus
        console_command create_building Southern-Rhun ros_po_bonus
        console_command create_building Southfarthing ros_po_bonus
        console_command create_building Southharondor ros_po_bonus
        console_command create_building Staddle ros_po_bonus
        console_command create_building Suduri ros_po_bonus
        console_command create_building Talsir ros_po_bonus
        console_command create_building Tarnost ros_po_bonus
        console_command create_building Thain ros_po_bonus
        console_command create_building Tharbad ros_po_bonus
        console_command create_building Tirith-Thoron ros_po_bonus
        console_command create_building Tol-Fuin ros_po_bonus
        console_command create_building Tolfalas ros_po_bonus
        console_command create_building Udun ros_po_bonus
        console_command create_building Uldonavan ros_po_bonus
        console_command create_building Umbar ros_po_bonus
        console_command create_building Weather-Hills ros_po_bonus
        console_command create_building West-Anduin ros_po_bonus
        console_command create_building West-Emnet ros_po_bonus
        console_command create_building West-Khand ros_po_bonus
        console_command create_building West-Mirkwood ros_po_bonus
        console_command create_building West_Lebennin ros_po_bonus
        console_command create_building Westfold ros_po_bonus
        console_command create_building Wilderland ros_po_bonus
        console_command create_building Wildlands ros_po_bonus
        console_command create_building Wilishar ros_po_bonus
        console_command create_building Wintirion ros_po_bonus
        console_command create_building Wold ros_po_bonus
        console_command create_building Woodsmen ros_po_bonus
        console_command create_building Wrakyaburg ros_po_bonus
        
        if I_EventCounter ros_region_id == 1
          console_command create_building North_Minhiriath ros_target
          console_command create_unit North_Minhiriath ros_Peasants 1 0 0
        end_if
    
        spawn_army
          faction scripts
          character Temporary, named character, age 18, x 0, y 0
          unit Dunedain Horsearchers    exp 0 armour 0 weapon_lvl 0
        end      
    
        if I_EventCounter ros_owner == 1
          faction_emerge scripts normans 1 400.0 0.0 1.2 town false unused_label1 unused_name 30
        end_if
        if I_EventCounter ros_owner == 2
          faction_emerge scripts turks 1 400.0 0.0 1.2 town false unused_label1 unused_name 30
        end_if
        
        kill_character Temporary
        campaign_wait 0.1
        
        if I_NumberOfSettlements scripts == 0
          set_event_counter ros_status 0
        end_if
    
        if I_NumberOfSettlements scripts > 0
          if I_EventCounter ros_region_id == 1
            and not I_SettlementOwner North_Minhiriath scripts
            set_event_counter ros_status 0
          end_if
        end_if
    
        if I_EventCounter ros_status == 0
          ;transfer failed: give everything back to the original faction (also avoids "faction destroyed" 
          ; message when scripts has no settlements)
          if I_EventCounter ros_owner == 1
            give_everything_to_faction scripts normans false
          end_if
          if I_EventCounter ros_owner == 2
            give_everything_to_faction scripts turks false
          end_if
        end_if
        
        if I_EventCounter ros_status == 1
          ;transfer succeeded: give to target faction
          if I_EventCounter ros_target_faction_id == 2
            give_everything_to_faction scripts turks false
          end_if
        end_if    
        
        ;clean up: destroy the temporary units and buildings in all factions
        ;(the target settlement will have both buildings and destroy_buildings will only destroy 
        ; one of them: do destroy_buildings twice to get both)
        destroy_buildings slave ros_temp_buildings false
        destroy_buildings slave ros_temp_buildings false
        destroy_units slave ros_Peasants
        destroy_buildings normans ros_temp_buildings false
        destroy_buildings normans ros_temp_buildings false
        destroy_units normans ros_Peasants
        destroy_buildings teutonic_order ros_temp_buildings false
        destroy_buildings teutonic_order ros_temp_buildings false
        destroy_units teutonic_order ros_Peasants
        destroy_buildings papal_states ros_temp_buildings false
        destroy_buildings papal_states ros_temp_buildings false
        destroy_units papal_states ros_Peasants
        destroy_buildings france ros_temp_buildings false
        destroy_buildings france ros_temp_buildings false
        destroy_units france ros_Peasants
        destroy_buildings aztecs ros_temp_buildings false
        destroy_buildings aztecs ros_temp_buildings false
        destroy_units aztecs ros_Peasants
        destroy_buildings moors ros_temp_buildings false
        destroy_buildings moors ros_temp_buildings false
        destroy_units moors ros_Peasants
        destroy_buildings hungary ros_temp_buildings false
        destroy_buildings hungary ros_temp_buildings false
        destroy_units hungary ros_Peasants
        destroy_buildings norway ros_temp_buildings false
        destroy_buildings norway ros_temp_buildings false
        destroy_units norway ros_Peasants
        destroy_buildings venice ros_temp_buildings false
        destroy_buildings venice ros_temp_buildings false
        destroy_units venice ros_Peasants
        destroy_buildings ents ros_temp_buildings false
        destroy_buildings ents ros_temp_buildings false
        destroy_units ents ros_Peasants
        destroy_buildings saxons ros_temp_buildings false
        destroy_buildings saxons ros_temp_buildings false
        destroy_units saxons ros_Peasants
        destroy_buildings spain ros_temp_buildings false
        destroy_buildings spain ros_temp_buildings false
        destroy_units spain ros_Peasants
        destroy_buildings russia ros_temp_buildings false
        destroy_buildings russia ros_temp_buildings false
        destroy_units russia ros_Peasants
        destroy_buildings scotland ros_temp_buildings false
        destroy_buildings scotland ros_temp_buildings false
        destroy_units scotland ros_Peasants
        destroy_buildings sicily ros_temp_buildings false
        destroy_buildings sicily ros_temp_buildings false
        destroy_units sicily ros_Peasants
        destroy_buildings milan ros_temp_buildings false
        destroy_buildings milan ros_temp_buildings false
        destroy_units milan ros_Peasants
        destroy_buildings turks ros_temp_buildings false
        destroy_buildings turks ros_temp_buildings false
        destroy_units turks ros_Peasants
        destroy_buildings hre ros_temp_buildings false
        destroy_buildings hre ros_temp_buildings false
        destroy_units hre ros_Peasants
        destroy_buildings denmark ros_temp_buildings false
        destroy_buildings denmark ros_temp_buildings false
        destroy_units denmark ros_Peasants
        destroy_buildings egypt ros_temp_buildings false
        destroy_buildings egypt ros_temp_buildings false
        destroy_units egypt ros_Peasants
        destroy_buildings ireland ros_temp_buildings false
        destroy_buildings ireland ros_temp_buildings false
        destroy_units ireland ros_Peasants
        destroy_buildings portugal ros_temp_buildings false
        destroy_buildings portugal ros_temp_buildings false
        destroy_units portugal ros_Peasants
        destroy_buildings united ros_temp_buildings false
        destroy_buildings united ros_temp_buildings false
        destroy_units united ros_Peasants
        destroy_buildings poland ros_temp_buildings false
        destroy_buildings poland ros_temp_buildings false
        destroy_units poland ros_Peasants
        destroy_buildings england ros_temp_buildings false
        destroy_buildings england ros_temp_buildings false
        destroy_units england ros_Peasants
        destroy_buildings scripts ros_temp_buildings false
        destroy_buildings scripts ros_temp_buildings false
        destroy_units scripts ros_Peasants
        destroy_buildings mongols ros_temp_buildings false
        destroy_buildings mongols ros_temp_buildings false
        destroy_units mongols ros_Peasants
        destroy_buildings timurids ros_temp_buildings false
        destroy_buildings timurids ros_temp_buildings false
        destroy_units timurids ros_Peasants
        destroy_buildings byzantium ros_temp_buildings false
        destroy_buildings byzantium ros_temp_buildings false
        destroy_units byzantium ros_Peasants
        destroy_buildings khand ros_temp_buildings false
        destroy_buildings khand ros_temp_buildings false
        destroy_units khand ros_Peasants
    
      end_if
      
      if I_EventCounter ros_status == 0
        set_event_counter ros_switch_now 0
      end_if
      if I_EventCounter ros_status == 1
        set_event_counter ros_switch_now -1
      end_if
      
    end_monitor
    
    ;Crusade regions...
    
    monitor_event CrusadeEnds IsCrusade
      set_event_counter ros_crusade_region_id 0
    end_monitor
    
    monitor_event CrusadeCalled IsCrusade
      and TargetSettlementName North_Minhiriath
      set_event_counter ros_crusade_region_id 1
    end_monitor
    
    ;[TWCG_END_ROS]
    ALSO: I had another question? Is there a way to tell how big a character(generals) current army is? I am attempting to tie a food resource to a supply mod... I have it working where removing -10000 food units gives a supply ancilliary and farms and storage buildings add to the food units, but... each general pulls the same amount of resource, independent of the size of the army... not game breaking but just curious... I looked through the docudemons and only saw a counter for ally armies...

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

    Default Re: Modding Questions and Help Thread

    I think you're missing the point of what the tool is for. See the second post of the tutorial.

    The tool generates script to perform the switch. That script goes into your campaign_script (CS) somewhere, on its own, only one copy of it, not modified by you in any way. The tool can auto-insert it into your CS by using the "Merged Result" or "Merge Into Source" options in the Generate tab.

    Then all you need to do is add some of your own script to trigger it. Just like the example I gave: your own monitor with your conditions and inside is just a short script that sets the ros_xxx counters to what you need. You don't put the entire tool-generated script into your monitor.

    The point of it all is that later you might have a second region that you need to switch. You don't add another copy of the tool-generated script, just a second monitor of your own, similar to your first one but using values for the ros_xxx counters that are relevant to what you're trying to switch this time (i.e. the region and/or faction counter numbers are probably different this time). Both of your monitors - and any others that you might add later - will all be triggering that same, one, block of generated script; they just feed it different instructions (counter values).

    Whenever you make any changes in the tool (e.g. add a new faction or region) you must re-generate. That generated script must replace the old one in CS: using the "Merged Result" or "Merge Into Source" options will do that for you - it will replace everything between the ;[TWCG_START_ROS] and ;[TWCG_END_ROS] comments with the new script.

    Comments near the top of the generated script tell you what values to use for the counters in your trigger monitor(s):

    Code:
    ;ros_target_faction_id = the intended new owner of the region...
    ; 2 = normans
    
    ;ros_region_id = the region (settlement) to be transferred...
    ; 1 = North_Minhiriath
    When you add more factions or regions to the tool and regenerate you'll see them in those comments.

    Is there a way to tell how big a character(generals) current army is?
    No.
    Last edited by Withwnar; October 18, 2014 at 02:16 AM.

  6. #906

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by Withwnar View Post
    I think you're missing the point of what the tool is for. See the second post of the tutorial.

    The tool generates script to perform the switch. That script goes into your campaign_script (CS) somewhere, on its own, only one copy of it, not modified by you in any way. The tool can auto-insert it into your CS by using the "Merged Result" or "Merge Into Source" options in the Generate tab.

    Then all you need to do is add some of your own script to trigger it. Just like the example I gave: your own monitor with your conditions and inside is just a short script that sets the ros_xxx counters to what you need. You don't put the entire tool-generated script into your monitor.

    The point of it all is that later you might have a second region that you need to switch. You don't add another copy of the tool-generated script, just a second monitor of your own, similar to your first one but using values for the ros_xxx counters that are relevant to what you're trying to switch this time (i.e. the region and/or faction counter numbers are probably different this time). Both of your monitors - and any others that you might add later - will all be triggering that same, one, block of generated script; they just feed it different instructions (counter values).

    Whenever you make any changes in the tool (e.g. add a new faction or region) you must re-generate. That generated script must replace the old one in CS: using the "Merged Result" or "Merge Into Source" options will do that for you - it will replace everything between the ;[TWCG_START_ROS] and ;[TWCG_END_ROS] comments with the new script.

    Comments near the top of the generated script tell you what values to use for the counters in your trigger monitor(s):

    Code:
    ;ros_target_faction_id = the intended new owner of the region...
    ; 2 = normans
    
    ;ros_region_id = the region (settlement) to be transferred...
    ; 1 = North_Minhiriath
    When you add more factions or regions to the tool and regenerate you'll see them in those comments.



    No.

    THANKS, I'LL KEEP TRYING IT.

  7. #907

    Default Re: Modding Questions and Help Thread

    I have been working on a more realistic supply mod, and have decided to use agents to move to an army and supply them in the field... the agents would be trained from a supply building and would cost food resources which is another addition I have made...they would then move close to the named character that is low on resources to resupply them. I would then destroy the agent...(Everything works except the destroying) still working though this...

    The question I have is... is there a modding resource that could provide a decent looking replacement(strat_model) for the assassin, in terms of a supply unit... I don't expect a wagon...I was thinking maybe a dwarf model from DAC... just checking if anyone had resource ideas.

  8. #908

    Default Re: Modding Questions and Help Thread

    Hey guys,


    I used the MOS mod and - ofcourse - Third Age, and was wondering.. Is there any way to play Harad or Rhûn to be allied to the West? Like.. convert? I know I'l still have the Melkor religion/culture, but is there a way to just have any scripts consider you an ally, or is it just pure diplomacy at that point? I'm guessing I should turn off total diplomacy then?

    Edit: And is it possible to play the Fellowship Campaign with MOS? I've never quite played it.
    Could always use some views, so dunno if I can advertise or not. *Shrug*
    http://www.youtube.com/user/Kennyboy0077 I do Let's Plays mostly at current, could use some views. ^^'

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

    Default Re: Modding Questions and Help Thread

    This may be the solution: http://www.twcenter.net/forums/showt...-change-script

    Edit: No, that is, MOS never supported it so do not expect it to work, many reported it do not
    Last edited by Ngugi; October 23, 2014 at 06:46 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

  10. #910

    Default Re: Modding Questions and Help Thread

    Quote Originally Posted by Ngugi View Post
    This may be the solution: http://www.twcenter.net/forums/showt...-change-script

    Edit: No, that is, MOS never supported it so do not expect it to work, many reported it do not

    Oh no no, I don't mean change the actual script, but is there any way to play normally as Rhûn while trying to ally with the West using diplomats? :-)
    Could always use some views, so dunno if I can advertise or not. *Shrug*
    http://www.youtube.com/user/Kennyboy0077 I do Let's Plays mostly at current, could use some views. ^^'

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

    Default Re: Modding Questions and Help Thread

    Oh, ok, no it's just to ally with them trough a diplomat, as normal.
    Don't ignore Total Diplomacy though, it do not hinder alliances between good & evil in any way and only affect the game if you activly use it. TD it allow you to force the (far to often stupid) AI to accept reasonable deals (or simply deals that help you, if you want to cheat, but that's not the intent, hehe). Such as accept you as an ally, which ought ti be the logical choice, if they are stubborn.

    Otherwise it's just to go the usual way; fight their enemies, bribe them and trade with them and sooner or later they like you enough to ally with them.
    Naturally you can count on getting ex-communicated and the target of invasions, but anyway ^^

    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

  12. #912

    Default Re: Modding Questions and Help Thread

    Alright, thanks a lot! I just wasn't sure if it was possible due to me becoming their enemy when their attack Mordor or so, with Gondor for example.. Guess I'll have to break my alliance with Mordor first. >
    Could always use some views, so dunno if I can advertise or not. *Shrug*
    http://www.youtube.com/user/Kennyboy0077 I do Let's Plays mostly at current, could use some views. ^^'

  13. #913

    Default Re: Modding Questions and Help Thread

    I want to change the strat models for castles, for the Dwarf faction, from the NE models (odd choice) to the dwarf settlements TATW 3.2 has (huge city model for fortresses, large city model for large castle, etc.)

    But I can't seem to manage.
    It's easy to do for the other factions, but I can't seem to find the models for the dwarven settlements.

    I even tried to to edit the descr_cultures file, but I can't figure out the culture (is it Aztec)?

  14. #914

    Default Re: Modding Questions and Help Thread

    Quick question, are the models in the timurids faction variant models?

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

    Default Re: Modding Questions and Help Thread

    That's not a field many work in, and was so long ago since I poked anything concerning that, that I can't recall how to do it.
    Suggest you start a thread here and explain that you want to change: http://www.twcenter.net/forums/forum...-and-Scripting
    Hopefully you get tips or links to tutorials soon enough

    You can also look around for tutorials here: http://www.twcenter.net/forums/forum...-amp-Scripting

    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

  16. #916

    Default Re: Modding Questions and Help Thread

    Don't the developers of the mod frequent these threads anymore? If anyone could help me its them, since they are the ones who made the models.

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

    Default Re: Modding Questions and Help Thread

    Nope, they're no longer active

    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

  18. #918

    Default Re: Modding Questions and Help Thread

    :/

  19. #919

    Default Re: Modding Questions and Help Thread

    Good news everyone. I figured it out.
    The dwarf strat models are in the faction variants, moors, file. Replace wooden castle with town, stone keep with large town, castle with city, large castle with large city, fortress with huge city, and boom, you have actual dwarf settlements, not human placeholders.

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

    Default Re: Modding Questions and Help Thread

    Good to hear

    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

Posting Permissions

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