1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[Vanilla] Tech tree modifications

Discussion in 'Mod Creation Help' started by Lonecat Nekophrodite, Jan 22, 2020.

  1. Lonecat Nekophrodite

    Lonecat Nekophrodite Prince

    Joined:
    Jan 10, 2019
    Messages:
    522
    Gender:
    Male
    Finally i've lauched my first version of my mod yesterday! the next version will deal with tech tree. which AFAIK right now it progressed TOOOOO fast and not really reasonable (Actually I like Civ5 tech tree more). Also there's a mod that deals with tech tree. But i want to include tech (and civics) reorganizations in the next version instead.
    1. What are XML files needed to add
    2. Codes needed to modify or reorganize tech tree? like if I want The Wheel to require Archery, and Horseback Riding to require The Wheel. What are the differences between syntax 'update', 'replace', and 'delete'?
    3. Will it takes effects on tech tree layouts too?
     
  2. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,181
    Location:
    Portugal
  3. Lonecat Nekophrodite

    Lonecat Nekophrodite Prince

    Joined:
    Jan 10, 2019
    Messages:
    522
    Gender:
    Male
    1. how to write syntax 'delete' ? before i write row
    2. So messing wtih either UITreerow or Pre reqs this way might incur startup errors? or do I have to check the original techtree pathways first so no error incurs? What happens if prereq tree paths are crossed without relationships??
    3. How to create a new tech and civic icons? stock picture files needed to upload and should I upload into UITexture.XLP just like unit icons?
     
    Last edited: Jan 22, 2020
  4. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,181
    Location:
    Portugal
    1. Yes, Delete then Row like in mod I sent above.
    2. You can incur at errors, tech tree will not open in game, or if props are really wrong you get startup errors. Look at logs.
    3. I did not create icon, but works like all icons yes.
     
  5. Lonecat Nekophrodite

    Lonecat Nekophrodite Prince

    Joined:
    Jan 10, 2019
    Messages:
    522
    Gender:
    Male
    Tell me about this syntax please
    Code:
    <Where TechnologyType="TECH_SHIPBUILDING"/>
          <Set BarbarianFree="false"/>
    And what is UITreeRow thing? what do -1 -3 or 3 means?
     
  6. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,181
    Location:
    Portugal
    That´s an update, where TECH change a prop of the TECH

    UItreerow, as the name implies, are de rows of the tree, you cant have more rows then the defined ones if I remember.
     
  7. Lonecat Nekophrodite

    Lonecat Nekophrodite Prince

    Joined:
    Jan 10, 2019
    Messages:
    522
    Gender:
    Male
    And the row number 'plus' 'minus' thing. Does 'Minus' means 'up' or 'down' ? and with this do I have to swich the other tech/civic element that previously occupied that position with the same command but set in the opposite direction too?
     
  8. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,181
    Location:
    Portugal
  9. Lonecat Nekophrodite

    Lonecat Nekophrodite Prince

    Joined:
    Jan 10, 2019
    Messages:
    522
    Gender:
    Male
    ^ How?

    In Tech and Civic UI There are eight rows.
     
  10. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,536
    Location:
    Illinois, USA
    UITreeRow specifies vertical placement of the technology on the tech tree. Pottery has '0', Sailing has '-3, and The wheel has '4'

    Examining the unmodded tech tree it is pretty straightforward then to see that values of the rows from top down are as
    Code:
    -3
    -2
    -1
    0
    1
    2
    3
    4
    Pottery is in the middle. Animal Husbandry (1) is one place below Pottery. Sailing (-3) is in the top row, and The Wheel (4) is in the bottom row.

    Left to right placement of techs is entirely dependant on Era, Cost, and prerequisite technologies. There is no direct setting for left-to-right placement as there is for vertical placement.
     
  11. Lonecat Nekophrodite

    Lonecat Nekophrodite Prince

    Joined:
    Jan 10, 2019
    Messages:
    522
    Gender:
    Male
    According to standard Vanilla Tech Tree UI. To define that Horseback Riding requires Wheel, and Wheel requires both Archery and Mining (Similar to Civ5), moving Wheeel to Row 1 while leaving the other tech that requires Wheel unchanged can still incur errors or is it safe to do so??
     
  12. TTSev

    TTSev Chieftain

    Joined:
    Oct 25, 2019
    Messages:
    28
    Techs requirements are not dependant on where the tech is. If you want to change which techs are required to unlock a tech it is done using the table TechnologyPrereqs. The UITreeRow prop of the Technologies table is just for the looks.
     
  13. Lonecat Nekophrodite

    Lonecat Nekophrodite Prince

    Joined:
    Jan 10, 2019
    Messages:
    522
    Gender:
    Male
    So here's a Mod_Tech.XML code i've just completed, a short and rather simple code (maybe?_)
    Code:
    <GameInfo>
       <Technologies>
           <Update>
               <Where TechnologyType="TECH_THE_WHEEL" />
               <Set UITreeRow="1" />
           </Update>
       </Technologies>
       <TechnologyPrereqs>
           <Delete Technology="TECH_THE_WHEEL" />
           <Delete Technology="TECH_HORSEBACK_RIDING" />
           <Row Technology="TECH_THE_WHEEL" PrereqTech="TECH_MINING" />
           <Row Technology="TECH_THE_WHEEL" PrereqTech="TECH_ARCHERY" />
           <Row Technology="TECH_HORSEBACK_RIDING" PrereqTech="TECH_THE_WHEEL" />
           <Row Technology="TECH_HORSEBACK_RIDING" PrereqTech="TECH_BRONZE_WORKING" />
       </TechnologyPrereqs>
    </GameInfo>
    
    This one will sure to have croosing tech tree lines. But is this code correct and will not incur any erros when viewing tech tree?
     
  14. Lonecat Nekophrodite

    Lonecat Nekophrodite Prince

    Joined:
    Jan 10, 2019
    Messages:
    522
    Gender:
    Male
    Also
    1. How to add a new tech? and declare tech boost and quote
    2. Which syntax should be used in order to edit tech boost? is it possible to use mathematical and logical options to the boosting conditions (like Tactics can now be boosted by killing enemy units with Spearman OR Swordsman OR Heavy Spearman (Mod unit i've created, a classical era anti cavalry unit upgradeable from Spearman and can be upgraded to pikeman later on, and the other case where Machinery can be boosed by owning either archer, marksman (also mod unit i've created for classical era) with a total number of 3, i.e. Either three archers (as before), three marksmen (new), or archers+marksmen=3 (any numbers, like two archers and one marksman or one archer and two marksmen))
     
  15. Lonecat Nekophrodite

    Lonecat Nekophrodite Prince

    Joined:
    Jan 10, 2019
    Messages:
    522
    Gender:
    Male
    This is what I've got now,
    upload_2020-2-8_2-23-54.png

    maybe FOW versions of tech protraits had to be made but lemme figure out how or which colour masking layer (and codes) has to be made first.
    But i'm not sure whether did my codes for text sections are correct or if there's anything wrong there.

    I bet there's something wrong on TechnologyText and TechnologyGameplay.xml, can anyone chenk it out for me?

    EDIT: Link removed due to the files hosted has been deleted and the most recent version uploaded in successive order.
     
    Last edited: Feb 9, 2020
  16. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,536
    Location:
    Illinois, USA
  17. Lonecat Nekophrodite

    Lonecat Nekophrodite Prince

    Joined:
    Jan 10, 2019
    Messages:
    522
    Gender:
    Male
    Of course I did but for different error (startup can't load mod) , but it has been fixed.

    It says
    but no real error messages found in this log AT ALL. but there's coding error that no descriptions of new tech appears in civilopedia entry.
    Also to make FOW portraits (or the _2) (I currectly have the default versions of the tech icons, but i don't know how or which colour masking layers should be used for FOW tech icon variants because, i didn't understand what it is so it ended up showing greek pots instead). Using previously available tech icons doesn't fit me well.
     

    Attached Files:

  18. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,536
    Location:
    Illinois, USA
    These files have no extensions, therefore the game cannot use them
    Code:
    <File>ZaabSpicey_TechnologyText</File>
     <File>ZaabSpicey_TechIcons</File>
    I suspect this is half the problem with your other files since many have no extension names such as ".tex", or ".dds"
     
  19. Lonecat Nekophrodite

    Lonecat Nekophrodite Prince

    Joined:
    Jan 10, 2019
    Messages:
    522
    Gender:
    Male
    o i see. to get .xml extentions for text files do I need to create a new file with Modbuddy only? i've tried with Notepad++ using 'New file' command and save as XML but no extensions shown up.
    About Tech Portraits do I have to make ones with "_2" or "_FOW" suffix variants as well?
     
  20. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,536
    Location:
    Illinois, USA
    if you are referring to the "_2" shown here
    Code:
      <IconTextureAtlases>
        <Row Name="ICON_ATLAS_TECH" IconSize="160" IconsPerRow="8" IconsPerColumn="8" Filename="Tech160.dds"/>
        <Row Name="ICON_ATLAS_TECH_2" IconSize="160" IconsPerRow="8" IconsPerColumn="8" Filename="Tech160_2.dds"/>
    The "_2" is not significant of anything except that Firaxis needed more Icons than could fit into one file. So a second file with a slightly different designation was needed. They could just as well have named the new atlas and its dds files "ICON_ATLAS_TECH_CHEESEBURGER" and the filenames such things as "Tech160_CHEESEBURGER.dds" so they would have had this in the <IconDefinitions> table
    Code:
    …………...
    
        <!-- first row SECOND ATLAS-->
        <Row Name="ICON_TECH_STEALTH_TECHNOLOGY" Index="0" Atlas="ICON_ATLAS_TECH_CHEESEBURGER"/>
        <Row Name="ICON_TECH_STEALTH_TECHNOLOGY_FOW" Index="0" Atlas="ICON_ATLAS_TECH_FOW_CHEESEBURGER"/>
    
    ………...
    
    --------------------------------------------------------------------------------------------------------------------

    An examination of the game's Vanilla Icons_Tech.xml file reveals that only size 42 is needed for the "FOW" state. FOW is a gaming term meaning Fof Of War. Firaxis uses the term somewhat loosely with regard to techs and the like, but what it means in terms of techs is pretty much "currently unavailable". Each tech needs a matching "_FOW" designation:
    Code:
      <IconDefinitions>
        <Row Name="ICON_TECH_POTTERY" Index="0" Atlas="ICON_ATLAS_TECH"/>
        <Row Name="ICON_TECH_POTTERY_FOW" Index="0" Atlas="ICON_ATLAS_TECH_FOW"/>
    ------------------------------------------------------------------------------------------------------------------------------------

    I've never had problems getting plain Notepad to accept, create, and properly use extensions of .XML, .SQl, and .LUA But in Notepad you need to save the file as a Text-only type file even though you are not using the ".txt" extenstion. And in Notepad you have to type in the whole name of the file you want to save as, including the extention you want to use so you have to make sure the "filename" field directly says something like
    Code:
    MyXML_Code.xml
    I suspect your problem is less an issue with Notepad++ than a setting on your computer that makes your computer want to "auto-determine" file extensions based on whatever program they were generated by rather than how the file is actually to be used. There may also be a Notepad++ setting you need to change. I tend to use plain Notepad to create new files and do most of my editing. I only use Notepad++ when troubleshooting because Notepad++ shows code line-numbers and code error issues whereas plain Notepad does not.

    The simplest solution though is to always create your XML, SQL, and LUA files within Modbuddy, and then give the files their needed actions within Modbuddy. At this point you can save your work, exit Modbuddy, and edit the contents of the files you have created using Notepad, Notepad++, etc.

    Another trick is to build your mod in Modbuddy, then find and fix any database error issues but not to edit the files within the Modbuddy project. Edit and correct the XML, SQL, and LUA code in the functioning mod in the Mods folder. Once you have eliminated any database errors, missing references (such as a missing LOC_BLOCK_THING tag) you can copy these corrected and functioning files back into the Modbuddy project and overwrite the error-containing files by simply using your computer's file browser copy/paste functions.
     

Share This Page