Page 10 of 18 FirstFirst 123456789101112131415161718 LastLast
Results 181 to 200 of 351

Thread: A Guide to Export_Descr_Buildings.txt

  1. #181
    UndyingNephalim's Avatar Primicerius
    Patrician Artifex

    Join Date
    Jan 2011
    Posts
    3,967

    Default Re: A Guide to Export_Descr_Buildings.txt

    Buildings:
    *Maximum number of buildings per tree is 9
    *Maximum number of building trees is 128.
    Thank you, that answers that I suppose. Time to rethink my buildings.

  2. #182
    Caudillo87's Avatar Semisalis
    Join Date
    Mar 2008
    Location
    Fontana, Ca (Alta California)
    Posts
    451

    Default Re: A Guide to the Export_Descr_Buildings.txt File

    Quote Originally Posted by Awellesley View Post
    How would you make a player have to choose between buildings? Similar to guilds, I would like the player (not the AI) to have to choose between two different buildings. Is it as simple as...

    building B resuires faction (XYZ) and not min_building present A?
    (plus stipulation for AI exclusion)
    Can someone explain this better please, Would you do the opposite afterwards?

  3. #183

    Default Re: A Guide to Export_Descr_Buildings.txt

    can someone tell me, if there's a way to make it that a certain building appears in the second row of buildings in the strat-UI panel ?

    what i'm asking is : what does the order of appearance in the strat-UI depends from ?

    edit :found it! it's defined by the order in which buildings are coded in the descr_strat
    Last edited by Noobio; May 03, 2012 at 07:34 AM.


  4. #184
    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: A Guide to the Export_Descr_Buildings.txt File

    Quote Originally Posted by Caudillo87 View Post
    Can someone explain this better please, Would you do the opposite afterwards?
    It is rather simple actually. In the beginning you have two buildings (in two different building trees) you can choose from. Whenever you build one it automatically negates the building conditions of the other in the same settlement.

    building market requires faction ( XYZ, ) and not building_present_min_level brothel
    building brothel requires faction ( XYZ, ) and not building_present_min_levelmarket










  5. #185

    Default Re: A Guide to Export_Descr_Buildings.txt

    Can someone show me how to recruit Qapakulu's in towns for Turks?

  6. #186

    Default Re: A Guide to Export_Descr_Buildings.txt

    I have read through this forum and found a few answers but I still have a few questions. I am trying to make an "allied" unit from faction a recruitable by faction b but only if the two factions are allies... here is my example:

    recruit_pool "rohan rider" 1 0.05 2 2 requires factions { sicily, }
    and region_religion numenorian 80 and hidden_resource minas_tirith and DiplomaticStanceFromFaction milan = Allied

    when I leave off the text in red the unit is recruitable. How can I write this so that the unit can be recruited only when the two factions are allies? My next question is more a verification where it says 1 0.05 2 2 the second set of numbers is how fast that unit can be replenished, the third number (2) is the max units recruitable the last number is the experience level of the recruited unit. Just trying to get that sunk in my head. Last question is since this unit can only be recruited by this faction in only one city (minas_tirith) then Gondor should only be to have only two rohan riders at any given time, and if not how do I limit the number allowed for this faction and will the ai follow this as well? Thank you in advance.


    I know this last thing may be next to impossible to script, but lets say the allied faction your recruiting a unit from dies off, how could it be scripted to still recruit that unit. My thinking is that remnants from the fallen faction will migrate to their allies and in exchange for asylum they provide military service for the rest of the game.
    Last edited by MIKE GOLF; July 11, 2012 at 12:18 AM. Reason: addtional question

  7. #187

    Default Re: A Guide to Export_Descr_Buildings.txt

    that is quite easy to achieve. You will need to add a script in the campaign_script.txt. something along the lines of this:

    Code:
    monitor_event FactionturnStart FactionType sicily
    	and TargetFactionType milan
    	and DiplomaticStanceFactions = Allied
    		set_event_counter allowUnit 1
    end_monitor
    monitor_event FactionturnStart FactionType sicily
    	and TargetFactionType milan
    	and not DiplomaticStanceFactions = Allied
    		set_event_counter allowUnit 0
    end_monitor
    This is just an example and i am using sicily and milan as the two factions you want to be allied.
    the first monitor sets an event counter to 1 when the two factions are allied. the second monitor sets it to 0 when they are not allied (they can still have trade agreements and be on good terms though and the unit will only be available IF they are allied).

    this event counter can than be added to the EDB unit line you wish to make available, as such:
    Code:
    recruit_pool "rohan rider" 1 0.05 2 2 requires factions { sicily, }
    and region_religion numenorian 80 and hidden_resource minas_tirith and event_counter allowUnit 1
    This will make the said unit available to sicily when sicily is allied with milan.

    your last question will require a little more scripting...and you can only do it for one or all of the said unit. Allow me to show you...
    Code:
    monitor_event FactionturnStart FactionType sicily
    	if I_UnitExists milan rohan rider
    		set_event_counter allowUnit 0
    	end_if
    	if not I_UnitExists milan rohan rider
    		set_event_counter allowUnit 1
    	end_if
    end_monitor
    This will only allow 1 unit of the unit type in question faction wide.

    another option is the folowing:
    Code:
    declare_counter unitCount
    
    monitor_event UnitTrained UnitType rohan rider
    	and FactionType sicily
    	if I_eventCounter allowUnit = 1
    		if I_CompareCounter unitCount <= 2
    			inc_counter unitCount 1
    		end_if
    		if I_CompareCounter unitCount >= 2
    			set_event_counter allowUnit 0
    		end_if
    	end_if 
    end_monitor
    with this, the unitCount counter is not reduced so once you get to 2 thats it. you will need another script to decrease the unitCount to once again allow the unit to be trained. Somthing like:
    Code:
    monitor_event UnitDisbanded UnitType rohan rider
    	and FactionType sicily
    		inc_counter unitCount -1
    end_monitor
    But that still doesnt take into account if the unit is lost in battle or rebels against you. You might want to reduce the counter every 50 turns or something... or just allow the unit to be recruited once.

    I am already using this script in mod i am working on and it works fine. the only difference is i am ensuring the two factions in question have trade agreements.
    ...longbows, in skilled hands, could reach further than trebuchets...

  8. #188

    Default Re: A Guide to Export_Descr_Buildings.txt

    Thank you for your help Tsarsies, I had more questions which I'll ask later, something about expired tokens.

  9. #189

    Default Re: A Guide to Export_Descr_Buildings.txt

    I have a few more questions I hope to get answered after rereading this thread and a few others. Since not every province has its own unique hidden resource, how can I make the allied unit recruitable only in a factions capitol? My examples are below.

    recruit_pool "rohan rider" 1 0.05 2 2 requires factions { sicily, }
    and region_religion numenorian 80 and hidden_resource minas_tirith and event_counter allowUnit 1

    recruit_pool "rohan rider" 1 0.05 2 2 requires factions { saxons, }
    and region_religion orthodox 80 and Celebrant_Province and event_counter allowUnit 1

    Since Minas Tirith for example has its own unique hidden resource and Caras Galadhon (Celebrant_Province) does not, how should this look? I have just tested using the second entry which results in a ctd. I know one solution would be to make "allied" or "allies" as a hidden resource. However since they are getting to be at a premium that, I do not think is an option at this time.

  10. #190

    Default Re: A Guide to Export_Descr_Buildings.txt

    You can create a new hidden resource specifically for your script. add it to the top of the EDB with the other hidden resources (the limit i believe is 64 hidden resources), then in the regions.txt (found in data/maps/base folder) add it to the region in question. You can call the hidden resource whatever you like. then add it to the unit line in replace of the minas tirith hidden resource.

    Along with the script already in place, that would make the unit only recruitable by sicily in that province and only when that building is completed and they are allied with milan (or whoever u state in the script).

    If the unit is to be available to other factions in there capitols when allied with milan (or whoever) then all you need is a separate unit line entry for that faction and possibly use a separate unique hidden resource. else if sicily controls denmarks capital then sicily could recruit the unit from denmarks capitol as well. (that's why you would use a separate hidden resource for each faction that can gain the unit once allied)... if that makes sense...
    ...longbows, in skilled hands, could reach further than trebuchets...

  11. #191

    Default Re: A Guide to Export_Descr_Buildings.txt

    I am having an issue, hopefully an easy one to fix, I have added conditions in order to build the building below,

    building northsourthroad
    {
    levels northsouthroad
    {
    northsouthroad city requires factions { byzantium, sicily, turks, } and building_present_min_level hinterland_roads paved_roads city and hidden_resource road and event_counter union_accepted 1
    {
    convert_to 2
    capability
    {
    trade_base_income_bonus bonus 2
    road_level 2
    }
    material wooden
    construction 8
    cost 5000
    settlement_min large_city
    upgrades
    {
    }
    }
    }
    plugins
    {
    }
    }
    The last two conditions work fine and I can build it, but I can also build it prior to paved roads being completed as they both appear together, so you can build the northsouth road first, which I do not want before complting the paved roads. Also when I pull up the building browser it says <northsouthroad> instead of "The North South Road." Lastly, since I am fairly new to posting anything larger than a sentence, can someone tell me how to use the drop down scroll feature? Thank you.

    All the brackets are in the correct place, it didn't transfer well it seems.
    Last edited by MIKE GOLF; July 14, 2012 at 08:22 PM. Reason: add note

  12. #192

    Default Re: A Guide to Export_Descr_Buildings.txt

    the entry looks fine to me except for this one part...
    Code:
    and building_present_min_level hinterland_roads paved_roads city and hidden_resource road and event_counter union_accepted 1
    You should't have the 'city'. As to why your EDB is still being read and your able to construct the building with this error, it could be that the engine is just ignoring those conditions on that line and therefore the building is available. But i would have thought that your game would not load with such an error...

    As for it appearing in the building browser as <northsouthroad>, check your export_buildings.txt file which is found in data/text/. as for the drop down scroll feature, are you referring to the 'spoiler' tags?
    Spoiler Alert, click show to read: 
    blah

    you can access them in the advanced text editing when posting your message. The colourful exclamation mark 5th from the right. or just type [ spoiler ] [ / spoiler] with no spaces around the text you want... if thats not what your talking about, well, i have no idea

    Just a note, and this is not pointed at anyone in particular, i just feel the information could be useful to some modders... if i ever encounter an error in my modding i always check the log file and search for whatever it is that i was working on. If i am trying to put a new building in then i will search the log for 'export_descr_buildings.txt' and check all entries relating to it. If that file is the culprit, then ill find the error and the log will tell me what was wrong (usually in the way of line number and whether there was a parsing error or whatever the case might be). This works for every file that you edit. simply make your changes, load the game, then check your log (make sure the log is on trace). With experience, you will come to know exactly what to search for ([trace] counter - for example)

    the reason i am stating this is because too often people explain they have a problem when the answer is in thier log file and they only look at the last few lines of the log. the last few lines generally will not tell you anything about an error unless it is a CTD (crash to desktop error). For example, an error in the campaign script where the campaign script is not even parsed will result in the game working just fine, but your scripts are not firing. Looking in the log and searching for campaign_script you will notice one or just 2 entries, stating that the file WAS found, but couldnt load due to an error with monitor_event on such and such a line. But you would never know this unless you searched for it. my point is, the last few lines of a log mean nothing.

    With that said, not all errors in the log are fatal, and some files simply skip over that error and read the rest of the file. Such as the traits, ancillary, campaign script. some errors in those files will result in just that monitor, or trigger being skipped and the rest of that file is read and executed. So it could be very well likely that when you search for the file in question that you find hundreds of instances of that file being parsed. so it CAN take some time to track down the particular error in question...
    Last edited by Tsarsies; July 15, 2012 at 05:20 AM.
    ...longbows, in skilled hands, could reach further than trebuchets...

  13. #193
    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: A Guide to Export_Descr_Buildings.txt

    You require the {northsourthroad_name} entry in export_buildings for the building tree name and then the three lines again for the building:

    {northsouthroad}
    {northsouthroad_desc}
    {northsouthroad_desc_short}

    Did you notice that the spelling of the name is inconsistent? Maybe that's your problem?










  14. #194

    Default Re: A Guide to Export_Descr_Buildings.txt

    I want to thank both Tsarsies and Gigantus for your assistance with these issues. I will make the noted changes. It also seems that when working on something so exacting and detailed, where one misplaced comma or one misspelled word can lead to a ctd or something not working as intended, that it is good to take an occasional break now and then. I think most things become easier with time and experience, when I first started using the Geomod program that it was an exercise in trial and error but eventually I learned it enough to be able to make an expanded map mod with it. To all who are the tutors on this site I want to thank, especially when seeing so many very related questions. After I make some corrections I will post the results (using spoilers LOL).

    I have got the roads buildable, they do not appear till after Arnor is reformed. The roads only appear in the building que when either a fortress or large city are present AND only after paved roads are constructed and they apply the movement and trade bonuses. The sense of accomplishment I feel seeing everything work as planned is high. The only issue still left (minor as far as I am concerned) are those brackets in the building browser. I have read every page of this thread and several others many times and applied every correction I found, added edb_enums, checked spelling etc. Perhaps I am missing an entry at the bottom of the export_buildings or perhaps it is not tied in to a building tree. At this point though I am pleased that they function as desired. I even changed the road texture tga and tga.dds (GIMP 2.8 does both). I really wanted to post a few screen shots but I may do that after I learn how. Gigantus and Tsarsies, thank you both for your assistance. I may call once again upon your infinite wisdom as I turn back to my initial project of recruitable allies. Good day gentlemen.

    Spoiler Alert, click show to read: 
    THIS IS A TEST
    Spoiler Alert, click show to read: 
    THE TEST WAS SUCCESSFUL! Thank you Tsarsies
    Last edited by MIKE GOLF; July 16, 2012 at 06:34 PM. Reason: additional info

  15. #195

    Default Re: A Guide to Export_Descr_Buildings.txt

    It took me awhile to realize what you were talking about but I finally figured it out.

    Quote Originally Posted by Gigantus View Post
    You require the {northsourthroad_name} entry in export_buildings for the building tree name and then the three lines again for the building:

    {northsouthroad}
    {northsouthroad_desc}
    {northsouthroad_desc_short}

    Did you notice that the spelling of the name is inconsistent? Maybe that's your problem?
    In the MOS submod for TATW the name lines for unique structures are located at the bottom of the export_buildings file. After adding the following lines the buildings now show up properly in the Building Browser:

    {northsouthroad_name}
    The North-South Road
    {castle_northsouthroad_name}
    The North-South Road
    {westroad_name}
    The Great West Road
    {castle_westroad_name}
    The Great West Road

    Once again thank you both Tsarsies and Gigantus

  16. #196
    Lifthrasir's Avatar "Capre" Dunkerquois
    Patrician took an arrow to the knee

    Join Date
    Jan 2010
    Location
    City of Jan Baert
    Posts
    13,950
    Blog Entries
    4

    Default Re: A Guide to Export_Descr_Buildings.txt

    Is there any list of requirements for the buidings with their meaning.
    For instance, as a newbe, I don't know what "event_counter first_watch 1" or "event_counter ADV_MATCHLOCK 1" mean.
    Many thanks in advance.
    Under the patronage of Flinn, proud patron of Jadli, from the Heresy Vault of the Imperial House of Hader

  17. #197
    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: A Guide to Export_Descr_Buildings.txt

    Check the first page thoroughly, it's all there:

    Events – requires event_counter first_piano 1
    You can tie it in to any of the events in the game. If you put a 1 after event_counter, then the building may only be built after the event. If you put a 0, it can only be built before. Events are listed in the descr_events.txt in the campaign folder and include:
    requires event_counter [event_name] 1










  18. #198
    Lifthrasir's Avatar "Capre" Dunkerquois
    Patrician took an arrow to the knee

    Join Date
    Jan 2010
    Location
    City of Jan Baert
    Posts
    13,950
    Blog Entries
    4

    Default Re: A Guide to Export_Descr_Buildings.txt

    Many thanks Gigantus. I've read all pages of this thread and I've even looked at the descr_events.txt file. I guess I need glasses or a "cafein boost"
    Under the patronage of Flinn, proud patron of Jadli, from the Heresy Vault of the Imperial House of Hader

  19. #199
    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: A Guide to Export_Descr_Buildings.txt

    One is glad to be of service










  20. #200
    Lifthrasir's Avatar "Capre" Dunkerquois
    Patrician took an arrow to the knee

    Join Date
    Jan 2010
    Location
    City of Jan Baert
    Posts
    13,950
    Blog Entries
    4

    Default Re: A Guide to Export_Descr_Buildings.txt

    I'm coming back here for another question. I hope it's the right thread.
    I've created a new unit called Thanes to reflect the new Scottish Nobility from Lowlands and created by the Davidian Revolution.
    That unit will be superior and recruitable in cities. The Scots will start with 2 of these units in Edinburgh but won't be able to recruit them until the settlement reaches the Minor City level and that a City Watch is built (with very low replenish rate at the start). Meanwhile, I would like to make them at least "retrainable" from the start.
    So basically, that unit will only be "retrainable" and not recruitable, until a city watch is built.
    I'm not sure how to do it. Do I just need to set the first number at 0 on the recruit_pool line?
    Example: recruit_pool "Thanes" 0 0.1 1 0 requires factions { scotland, }
    Many thanks in advance.
    Last edited by Lifthrasir; October 30, 2012 at 10:08 AM.
    Under the patronage of Flinn, proud patron of Jadli, from the Heresy Vault of the Imperial House of Hader

Posting Permissions

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