Page 5 of 18 FirstFirst 123456789101112131415 ... LastLast
Results 81 to 100 of 351

Thread: A Guide to Export_Descr_Buildings.txt

  1. #81
    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,129
    Blog Entries
    35

    Default Re: A Guide to Export_Descr_Buildings.txt

    Unknown agent type specified: witch
    Seems the witch, heretic and inquisitor (?) cannot be recruited through the agent ability in the EDB.
    They can be spawned through the script.
    Last edited by Gigantus; September 19, 2010 at 10:17 AM.










  2. #82
    Finlander's Avatar ★Absolutely Fin-bulous★
    Content Emeritus

    Join Date
    Jun 2009
    Location
    In the North
    Posts
    4,920

    Default Re: A Guide to Export_Descr_Buildings.txt

    Is there any way to make a building that only a player, not computer, can build?


    • Son of MasterBigAb; • Father of St. PolycarpeKahvipannuRadboudMhaedrosGeMiNi][SaNDy
    FlinnUndyingNephalimKAM 2150
    Charerg








  3. #83

    Default Re: A Guide to Export_Descr_Buildings.txt

    Quote Originally Posted by Finlander View Post
    Is there any way to make a building that only a player, not computer, can build?
    Yes there is i think.
    Put it in the Campaign_script.txt
    Code:
    monitor_event PreFactionTurnStart FactionIsLocal
    	set_event_counter X_Y 1
    end_monitor
    
    monitor_event FactionTurnEnd FactionIsLocal
    	set_event_counter X_Y 0
    end_monitor
    And put this in the EDB for a particular building:-
    Code:
    and event_counter X_Y 1
    So this will do the job i think coz when u click next end it will be disabled for a time being so that no AI faction gets the hold of it.
    But i'm not confident about it.

  4. #84
    Finlander's Avatar ★Absolutely Fin-bulous★
    Content Emeritus

    Join Date
    Jun 2009
    Location
    In the North
    Posts
    4,920

    Default Re: A Guide to Export_Descr_Buildings.txt

    Many thanks! I will try it. +rep

    Oh, since I have also one another question about buildings, may I ask it here?
    so, is there a way to destroy the building after a one turn I've built it? (means that the building stay only a one turn.) I tried to search it but I did not find.


    • Son of MasterBigAb; • Father of St. PolycarpeKahvipannuRadboudMhaedrosGeMiNi][SaNDy
    FlinnUndyingNephalimKAM 2150
    Charerg








  5. #85

    Default Re: A Guide to Export_Descr_Buildings.txt

    Quote Originally Posted by Finlander View Post
    Many thanks! I will try it. +rep

    Oh, since I have also one another question about buildings, may I ask it here?
    so, is there a way to destroy the building after a one turn I've built it? (means that the building stay only a one turn.) I tried to search it but I did not find.
    I think we can do it.
    The script is Faction dependent coz the destroy command can be applied only on a faction not globally.

    Code:
    declare_counter X_Y
    
    monitor_event FactionTurnStart FactionType england
    and FactionBuildingExists >= brothel
    set_counter X_Y  1
    end_monitor
    
    monitor_event FactionTurnEnd FactionType england
    and I_CompareCounter X_Y > 0
    inc_counter X_Y 1
    end_monitor
    
    monitor_event FactionTurnEnd FactionType england
    and I_CompareCounter X_Y = 2
    destroy_buildings england taverns true
    set_counter X_Y  0
    end_monitor
    So with this script if u construct a brothel in game and it will be destroyed on the next turn that is the player or the AI has the access of it for 1 turn.
    I have checked it and it works.
    I'm not a good scripter so i'm sure someone else can refine it or simplify it further.
    Last edited by Ishan; September 20, 2010 at 08:43 AM.

  6. #86
    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,129
    Blog Entries
    35

    Default Re: A Guide to Export_Descr_Buildings.txt

    If you declare a counter, then it is automatically set on zero. So you basically only need the first (slightly modified) and the last monitor:

    declare_counter X_Y

    monitor_event FactionTurnStart FactionType england
    and FactionBuildingExists >= brothel
    inc_counter X_Y 1
    end_monitor

    monitor_event FactionTurnEnd FactionType england
    and I_CompareCounter X_Y = 2
    destroy_buildings england taverns true
    set_counter X_Y 0
    end_monitor










  7. #87

    Default Re: A Guide to Export_Descr_Buildings.txt

    Yes more elegant.
    My scripting skills are rusty.

  8. #88
    Finlander's Avatar ★Absolutely Fin-bulous★
    Content Emeritus

    Join Date
    Jun 2009
    Location
    In the North
    Posts
    4,920

    Default Re: A Guide to Export_Descr_Buildings.txt

    Thank you Ishan and Gigantus!
    I am just making my first steps into a world of coding so...
    +rep.


    • Son of MasterBigAb; • Father of St. PolycarpeKahvipannuRadboudMhaedrosGeMiNi][SaNDy
    FlinnUndyingNephalimKAM 2150
    Charerg








  9. #89
    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,129
    Blog Entries
    35

    Default Re: A Guide to Export_Descr_Buildings.txt

    even better:

    Code:
    declare_counter X_Y
    
    monitor_event FactionTurnStart FactionType england 
            and FactionBuildingExists >= brothel
            inc_counter X_Y  1
    
               if I_CompareCounter X_Y = 2 
    destroy_buildings england taverns true 
    set_counter X_Y  0
               end_if
    end_monitor










  10. #90
    Finlander's Avatar ★Absolutely Fin-bulous★
    Content Emeritus

    Join Date
    Jun 2009
    Location
    In the North
    Posts
    4,920

    Default Re: A Guide to Export_Descr_Buildings.txt

    wow really thank you!
    But is it necessary to have 'FactionType england'? Would just 'FactionIsLocal' work?


    • Son of MasterBigAb; • Father of St. PolycarpeKahvipannuRadboudMhaedrosGeMiNi][SaNDy
    FlinnUndyingNephalimKAM 2150
    Charerg








  11. #91
    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,129
    Blog Entries
    35

    Default Re: A Guide to Export_Descr_Buildings.txt

    This is faction specific: if England has that building, then after two turns that building will be destroyed in English towns. I don't think "all" will work with destroy_buildings. Otherwise that idea would be fine.

    To be on the safe side (just in case a second brothel got build) the condition should be

    if I_CompareCounter X_Y >= 2










  12. #92

    Default Re: A Guide to Export_Descr_Buildings.txt

    Hey Gigantus, why is it that certain parameters work together, whereas some others don't?

    For example, this
    recruit_pool "Lithuanian Cavalry" 1 0.3 1 0 requires factions { poland, } and region_religion catholic 70 and building_present_min_level poland_enclave

    does not cause a crash upon starting up a campaign, but this

    recruit_pool "Akinjis" 1 0.34 3 0 requires factions { turks, } and region_religion islam 70 and building_present_min_level turks_enclave

    does, even though they are supposedly the same things with different faction/religion labels is all?

  13. #93
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: A Guide to Export_Descr_Buildings.txt

    Because you can't use parameters that don't work. Check out what the log says. It might help determine what you did wrong.
    Last edited by Taiji; September 29, 2010 at 08:08 AM.

  14. #94

    Default Re: A Guide to Export_Descr_Buildings.txt

    It gives me a loop of entries similar to this
    02:12:11.968 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
    02:12:11.968 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
    02:12:11.969 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
    02:12:11.969 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
    02:12:11.969 [game.script.trigger] [trace] Trigger <Usurper1> fired
    02:12:11.969 [game.script.trigger] [trace] Trigger <factionleader> fired
    02:12:11.971 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
    02:12:11.971 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
    02:12:11.972 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
    02:12:11.972 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
    02:12:11.972 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/001.tga, using the default culture path if it exists
    02:12:11.972 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/001.tga, using the default culture path if it exists
    02:12:11.973 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/001.tga, using the default culture path if it exists
    02:12:11.973 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/001.tga, using the default culture path if it exists
    02:12:11.973 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/036.tga, using the default culture path if it exists
    02:12:11.973 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/036.tga, using the default culture path if it exists
    02:12:11.974 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/036.tga, using the default culture path if it exists
    02:12:11.974 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/036.tga, using the default culture path if it exists
    02:12:11.975 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/merchants/000.tga, using the default culture path if it exists
    02:12:11.975 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/merchants/000.tga, using the default culture path if it exists
    02:12:11.975 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/merchants/000.tga, using the default culture path if it exists
    02:12:11.975 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/merchants/000.tga, using the default culture path if it exists
    02:12:11.976 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/civilians/000.tga, using the default culture path if it exists
    02:12:11.976 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/civilians/000.tga, using the default culture path if it exists
    02:12:11.976 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/civilians/000.tga, using the default culture path if it exists
    02:12:11.976 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/civilians/000.tga, using the default culture path if it exists
    02:12:11.976 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/priests/000.tga, using the default culture path if it exists
    02:12:11.976 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/priests/000.tga, using the default culture path if it exists
    02:12:11.977 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/priests/000.tga, using the default culture path if it exists
    02:12:11.977 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/priests/000.tga, using the default culture path if it exists

    ending in

    02:12:12.078 [game.script.trigger] [trace] Trigger <Usurper1> fired
    02:12:12.078 [game.script.trigger] [trace] Trigger <factionleader> fired
    02:12:12.081 [game.script.trigger] [trace] Trigger <Usurper1> fired
    02:12:12.081 [game.script.trigger] [trace] Trigger <factionleader> fired
    02:12:12.084 [game.script.trigger] [trace] Trigger <Usurper1> fired
    02:12:12.084 [game.script.trigger] [trace] Trigger <factionleader> fired
    02:12:12.445 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.

    ....But the only thing modified was export_descr_unit

  15. #95
    irishron's Avatar Cura Palatii
    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: A Guide to Export_Descr_Buildings.txt

    Does it happen when you put back in your backed up EDU?

    Were you playing with the bodyguard units?

  16. #96

    Default Re: A Guide to Export_Descr_Buildings.txt

    No, if I use my backup EDU, it works perfectly. However using the line recruit_pool "Lithuanian Cavalry" 1 0.3 1 0 requires factions { poland, } and region_religion catholic 70 and building_present_min_level poland_enclave does not cause it to crash in any way, but using the same sort of line on the Turkish Akinji causes a crash.

    And no, I wasn't trying to fiddle around with the bodyguard units....I was...Err...Trying to do something a little more ambitious, by adding a whole lot of faction-specific buildings to simulate colonization, along with the region_religion parameter.

  17. #97
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: A Guide to Export_Descr_Buildings.txt

    You checked the log for the word 'error' and found nothing? ... Checked twice???

    My guess is that it says 'Akinji does not match the ownership for turkey...', or something like that.
    Last edited by Taiji; September 29, 2010 at 11:42 AM.

  18. #98
    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,129
    Blog Entries
    35

    Default Re: A Guide to Export_Descr_Buildings.txt

    Quote Originally Posted by Taiji View Post
    You checked the log for the word 'error' and found nothing? ... Checked twice???

    My guess is that it says 'Akinji does not match the ownership for turkey...', or something like that.
    I second that, or the building description is missing. I don't think the error is in the recruitment line, it will be in the referenced parts (unit, building)
    Ownership error isn't fatal. Must be something else. Missing building description I think causes a crash.










  19. #99

    Default Re: A Guide to Export_Descr_Buildings.txt

    Is it possible to make several construction queue or build several buildings in the construction queue simultaneously?

  20. #100
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: A Guide to Export_Descr_Buildings.txt

    Not without scripts.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

Posting Permissions

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