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

Tech Diffusion

Discussion in 'Civ5 - Mod Components' started by Afforess, Oct 9, 2010.

  1. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Tech Diffusion​


    Tech Diffusion causes civilizations that fall behind technologically to slowly recieve free research towards technologies that other civilizations already posess. The more civilizations posess a technology, the faster other civilizations will recieve free research towards it.

    Incompatible with the following mods (at least without manually merging InGame.xml):

    • Active City Defense
    • Tree Growth
    • Any other mod that modifies "InGame.xml"

    Download via the modbrowser. ;)
     
  2. Shiggs713

    Shiggs713 Immortal

    Joined:
    Mar 11, 2007
    Messages:
    2,361
    Location:
    Indianapolis
    Excellent :thumbsup:

    so just to be clear, we can merge these as long as we edit the InGame.xml?
     
  3. jooyo

    jooyo Warlord

    Joined:
    Jan 9, 2009
    Messages:
    240
    Location:
    Poland
    Wow, this is one of this mod what I have waited for :D
     
  4. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Yep. The one commented line in InGame.xml needs to be merged in between any mods that use it. It's a relatively simple merge, but a lot of Lua mods are going to start to use it.

    Glad you like it. ;)

    The design is very heavily influenced off of tech diffusion in Civ4.
     
  5. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    :goodjob: your modding productivity is amazing!
     
  6. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Not really. I got nothing done last weekend, or most of the week. I just have a few open days and am making the most of it. Plus, most of the design for this mod was already built, I just adapted it for Civ5.
     
  7. hgthechinese

    hgthechinese Warlord

    Joined:
    Jul 2, 2007
    Messages:
    207
    Bear with me if it is a dumb suggestion:

    Can't you use the something akin to (a few lines from balanced mod borrowed below)

    - <Update>
    <Where ImprovementType="IMPROVEMENT_PLANTATION" ResourceType="RESOURCE_BANANA" YieldType="YIELD_FOOD" />
    <Set Yield="3" />
    </Update>

    to "update" ingame.xml, rather than having the entire file? Would that make it compatible with other mods? I'd certainly love to be able to play active defense alongside tech diffusion.

    And if it doesn't work, maybe you should start a minimod pack that include all of your tiny awesome mods correctly merged?
     
  8. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    btw, Emigration does not use InGame.xml
     
  9. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,707
    Location:
    France
    very good one, that's a mod I was looking for :goodjob:

    do you plan (or do you think it's possible) to add distance and pact of cooperation between civs into the equation ?
     
  10. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    You're right, you overwrote an existing file... My bad.

    Yes, I do plan on it. Open Borders too.

    Doesn't work with this type of XML. (I believe anyway, but I'm going to test it at any rate)
     
  11. hgthechinese

    hgthechinese Warlord

    Joined:
    Jul 2, 2007
    Messages:
    207
    bug report:

    small map, standard speed, 9 AIs, 17 city states (overstuffed map, in other words) and I do have a few other mods like extra civ pack enabled

    In the first 6 turns of the game, before I researched anything on my own, I received 2 techs for free; before I finished my 2nd research, I got 4 more...(writing, archer etc) the speed at which I'm receiving techs seem really really fast.
     
  12. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Working on it. ;)
     
  13. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Hmm... Do you think this mod could be enabled/disabled (Say, with a checkbox similar to how Kael handled the 'No Unit Icon' part of his Iceni mod)?

    I ask because if this mod is not compatible with Queen of the Iceni (Mod List screen) or my own Economy Mod (same reason), or other mods that alter InGame.xml, then it would be easiest to just merge it. Having it toggleable would allow that without people being forced to use it.
     
  14. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    IDK. I'm not a UI person. How would one go about adding a button or toggle to enable/disable anything?
     
  15. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Fixed and version 2 is in the Mod Browser. I forgot to divide by 100 at one point the calculation, so players were getting 100 times as many beakers as they should have.
     
  16. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Neither am I, really, though it's a bit easier with civ5 than it was for 4. From looking at Kael's method, there only seem to be two important parts to disable the icons.

    In MiniMapPanel:
    Code:
    function OnHideUnitIconChecked( bIsChecked )
    	LuaEvents.ToggleHideUnitIcon();
    	Events.StrategicViewStateChanged();
    end
    Controls.HideUnitIcon:RegisterCheckHandler( OnHideUnitIconChecked );
    And in UnitFlagManager:
    Code:
    local bHideUnitIcon = true;
    
    LuaEvents.ToggleHideUnitIcon.Add(
    function()
    	if (bHideUnitIcon) then
    		bHideUnitIcon = false;
    	else
    		bHideUnitIcon = true;
    	end
    end);
    Then he just passed bHideUnitIcon into the function for displaying it.

    Looks like you'd have to modify the minimappanel files, and then add a new function to your file which toggles a variable that controls whether your code runs or not. Doesn't seem hard at all, actually, but I haven't checked your code yet. :lol:
     
  17. Herex

    Herex Chieftain

    Joined:
    Aug 24, 2007
    Messages:
    68
    This may be a very stupid question, but how does one go about doing that?
    I'm using Active City Defense (Oh yea!), and I'd love to give this mod a try.
    How do I merge that file, and with what? O_o
     
  18. Mongolia Jones

    Mongolia Jones Chieftain

    Joined:
    Oct 6, 2010
    Messages:
    60
    Out of curiosity can you place the formula you used for the tech increase for this mod?

    Thanks in advance :)
     
  19. TheeLord

    TheeLord Warlord

    Joined:
    Apr 16, 2005
    Messages:
    140
    Location:
    Chicago
    Nice mod. But yes, I used version 1 and it was insanely fast teching. I will try out Version 2. What would make this perfect:

    -Distance of other civilizations with the techs
    -Open borders
    -Maybe if your're at war with that civilization you will get an increase as well?

    I see you are planning on adding this already though, cool!
    Keep up the great work!
     
  20. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    The mathematical formula? Well, it's all pretty much in the mod... I can tell you the factors that affect it if you want.

    Distance is a hard one to do, but Open Borders and War already are factors. ;)
     

Share This Page