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

Mod Component Request Thread

Discussion in 'Civ5 - Mod Components' started by TheLopez, Sep 20, 2010.

  1. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,544
    Location:
    Near Portsmouth, UK
  2. trystero49

    trystero49 Prince

    Joined:
    Apr 30, 2012
    Messages:
    515
    I'd like to see two mods:

    1) Civs choose random religions. Removing religion preference for each leader is not good enough, apparently it just makes civs choose in alpha order...

    2) A script to take from a large pool of wonders (e.g. >50) and randomly choose 6/7 (or whatever) from each era to be included in the game. This would include base game + modded wonders.
     
  3. Buridan

    Buridan Chieftain

    Joined:
    Aug 9, 2011
    Messages:
    48
    Location:
    Germany
    I'd like to see a diplo mod that allowes civs to trade single influence tiles of thier cities
    of course the city from which you can trade must have at least one tile next to a tile that is owned by the other civ in order to make the other city the controller of that tile
    also the tile is chosen randomly from all possible tiles that fit the requirements, you only can chose the city which will give up one of its tiles

    and I don't even know what worth to give a single tile (depending on the city - maybe 1/x of the worth of that city with x being the number of tiles controlled by the city)
     
  4. Harald B

    Harald B Warlord

    Joined:
    Oct 20, 2010
    Messages:
    135
    I've been trying to make a simple mod that make civs lose 1 point of Happiness for each tile of Fallout in their territory. This would make nukes slightly scarier, both to be hit by and to use on a wide scale. If nothing else, it would at least be a reason to actually clean up fallout in a timely manner even on less important cities.
    Since Fallout is considered a Feature, I tried to go about this by setting InBorderHappiness to -1 in the Features table. But that doesn't seem to do anything. You can see in the Civilopedia that the value is changed to -1, but the Happiness is not actually reduced. Tried out -2 (just in case -1 was a special value) and that didn't do anything either.
    So I suspect lua coding will be needed, but that stuff's beyond me. Can anyone help?
     
  5. trystero49

    trystero49 Prince

    Joined:
    Apr 30, 2012
    Messages:
    515
    a) Loop through all tiles.
    b) Check ownership.
    c) Check feature.
    d) if Owner = someplayer and Feature = Fallout then set OwnerHappiness = OwnerHappiness - 1
    e) repeat each turn
     
  6. Harald B

    Harald B Warlord

    Joined:
    Oct 20, 2010
    Messages:
    135
    edit: Actually, forget what I said earlier. After finding a nice tutorial and using the magic of the Live Tuner, insight dawned and I've figured out what to do. The following should do the trick:
    Spoiler :
    Code:
    function adjustForFallout()
    for i = 0, Map.GetNumPlots()-1, 1 do
    	local pLoopPlot = Map.GetPlotByIndex(i)
    	if pLoopPlot:GetFeatureType()==FeatureTypes["FEATURE_FALLOUT"] then
    		local OwnerID = pLoopPlot:GetOwner()
    		if OwnerID ~= -1 then
    			local Owner = Players[OwnerID]
    			if Owner:IsEverAlive() then
    				Owner:SetHappiness(Owner:GetHappiness()-1)
    			end
    		end
    	end
    end
    end
    
    Events.ActivePlayerTurnStart.Add(adjustForFallout)

    Sadly I can't seem to find an efficient way to cycle only tiles with an owner, nor a way to adjust listed Unhappiness. But this will do nicely. Thanks for the help.

    That sounds decent enough, except that I don't know a thing about lua coding. Looking through other people's code usually helps me a lot, but not so much with lua. How do I get the code to run at the correct time? Why is it all functions? What exactly do I loop through and which things exactly do I check? (To the uninitiated like me the Lua reference at the Modiki is scant little help.)
     
  7. Asderfut

    Asderfut Chieftain

    Joined:
    Jul 28, 2011
    Messages:
    26
    I don't know if these have been suggested, because there are 17 pages of suggestions, but these are some that have occurred to me.

    - Yields for clearing jungle, like 20:c5gold: or something
    - Production to food for all plantations, e.g. a banana plantation on a hill would get 4:c5food: instead of 3:c5food: 1:c5production:
     
  8. Sobuor

    Sobuor Chieftain

    Joined:
    Jan 20, 2013
    Messages:
    1
    Location:
    BC
    yeah alot to look at there

    i just want a mod that will let me walk on the ice and work with gobel warming mod so that if the ice melts when you walk on it your unit dies not not some crazy error...
    i will to try and do it my self and have and seems i have no clue what i'm doing have not modded any civ but civ3 and that a long time ago.. any help would be great...

    thanks
     
  9. Jorlem

    Jorlem Chieftain

    Joined:
    Jun 16, 2011
    Messages:
    91
    Does anyone know if it is possible to change the way city names are drawn from the civ's list when a new city is built? For example, if I build New York City, and rename it to, say, Metropolis, the next city I build will be named New York City again. If anyone knows of a way to avoid getting repeated names after renaming a city, that would be most appreciated.
     
  10. HaloCapella

    HaloCapella Chieftain

    Joined:
    Jun 24, 2012
    Messages:
    54
    Gender:
    Female
    Defence Value for AI:

    not sure if you've come up with this before but...

    maybe I can call it a defense resource, though its not technically a resource.

    An in-game invisible number accumulated by forts or terrain that can be measured and calculated by the AI so it may build forts on the land as if its going to get more resource. No effect on players since we can use forts and citadels.

    maybe default 1 defense value on a tile, +1 point for each defense bonus (per 25%), im sure workers may build a fort on a 1 food, hammer and gold tile if the tile has 2 defense value.

    the way how the numbers be placed:
    ~ 1 def value default at all tiles.
    ~ +1 if it has hills or forest
    ~ +1 if its adjacent to city (AI tends to group units together)
    ~ +1 if its adjacent to 2 or more mountains

    this defense value can also be used for...

    - marking suggestions to put where a fort be. Now you can see the fort icon on the screen.

    - if you want to make forts effecting more for players. maybe giving a defense bonus for cities. it may make tall empires more powerful, but forts do give a drawback of the production of the land. maybe like, +0.5 city strength per fort, or less. or an effect from defensive buildings.

    - if you really want an accumulating value that builds up till later, maybe we can have an event that gives reinforcements to your units, more generals or healing them like a promotion. It should be something interesting.

    - and if the AI starts to build forts, maybe we can have Civ abilities or other bonuses you can get that deals with forts and citadels. Maybe each existing civ can be more defensive than others.

    its only an untried idea to get the AI to make forts, i dont really have the exact details now, thanks.
     
  11. agoodfella

    agoodfella Prince

    Joined:
    Nov 12, 2001
    Messages:
    591
    Location:
    USA
    Not sure if this has been requested, but would love to see a Mod allowing Turtle Ships to enter Ocean tiles.

    Many thanks in advance!
     
  12. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,544
    Location:
    Near Portsmouth, UK
    A nice simple one to learn how to create a mod :)

    Required XML would be

    Code:
    <GameData>
      <Unit_FreePromotions>
        <Delete UnitType="UNIT_KOREAN_TURTLE_SHIP" PromotionType="PROMOTION_OCEAN_IMPASSABLE"/>
      <Unit_FreePromotions>
    </GameData>
    
    or SQL

    Code:
    DELETE FROM Unit_FreePromotions
      WHERE UnitType='UNIT_KOREAN_TURTLE_SHIP'
      AND PromotionType='PROMOTION_OCEAN_IMPASSABLE';
    
     
  13. agoodfella

    agoodfella Prince

    Joined:
    Nov 12, 2001
    Messages:
    591
    Location:
    USA
    First of all, many thanks for your reply and help. I am a hopeless tech-idiot. Is there a file I would actually open up and edit? Would I have to create a new one?

    Sorry, I'm truly that illiterate. Any dummy-type step by step guidance would be greatly appreciated!

    Many thanks in advance.
     
  14. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,544
    Location:
    Near Portsmouth, UK
  15. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    city screen specialist buildings sorted by specialist type and slot number:

    factory
    windmill
    workshop
    university
    laboratory
    public school
    ...


    or even better (but quite hard to implement i assume):

    dont show any slots for buildings
    but a specialist section
    with available number of slot controls per each specialist type shown

    === specialists ===
    :c5science: scientists :c5citizen: :c5rangedstrength: :c5rangedstrength:
    :c5production: engineers :c5citizen: :c5citizen:
    ...
    ==============

    *:c5rangedstrength: means empty slot
    great people images can be used to identify specialist types

    ps:
    this section could be merged with the great people progress section btw

    === specialists ===
    :c5science: scientists :c5citizen: :c5rangedstrength: :c5rangedstrength:
    ||||||||||||||||_____________ (+3/15)
    :c5production: engineers :c5citizen: :c5citizen:
    |||||||||||||||||||||||||||||||__ (+6/3)
    :c5gold: mrchants :c5rangedstrength:
    |||______________________ (+0/-)
    ...
    ==============
     
  16. Craig_Sutter

    Craig_Sutter Deity

    Joined:
    Aug 13, 2002
    Messages:
    2,753
    Gender:
    Male
    Location:
    Calgary, Canada
    When a holy city is conquered, its religion no longer shows up in the religion info panels.

    Can this be fixed by mod components?
     
  17. Ekmek

    Ekmek on steam: ekmek_e

    Joined:
    Aug 7, 2002
    Messages:
    6,060
    Location:
    San Diego, California
    Ton of posts here -

    Is there a mod (preferably LUA) that lets a unit spawn barbarians?

    I'd like to have a privateer spawn pirate ships (the act itself kills your own). So i can harass other players.

    Likewise something similar for a ground unit (SpecOps) that can train guerrillas in enemy territory.

    And I need the AI to know how to use it too.

    Thanks.
     
  18. iyyillius

    iyyillius Warlord

    Joined:
    Feb 18, 2007
    Messages:
    106
    here is a good idea that seems doable..... upon completion of future techs have a window that lets you select it's benefit like in religions.
     
  19. daviiadams

    daviiadams Prince

    Joined:
    Jul 7, 2011
    Messages:
    369
    Location:
    London
    I've not seen this effect the stats for religion in BPI, although that's only reporting back a percentage of followers, so I'd guess the info is still there to pluck out :confused:
     
  20. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,544
    Location:
    Near Portsmouth, UK
    The fix is so simple it's easier to hack the core files directly.

    In the ReligionOverview.lua file, locate the functions RefreshWorldReligions() and RefreshBeliefs() and change the line "if (pPlayer:IsAlive()) then" to "if (pPlayer:IsEverAlive()) then" in each of them (about the 10th line after the function declaration)
     

Share This Page