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 Requests Thread

Discussion in 'Civ4 - Mod Components' started by Thunderfall, Jun 15, 2006.

  1. The Capo

    The Capo godless Heathen

    Joined:
    Jan 29, 2001
    Messages:
    9,302
    Location:
    Washington, DC
    That's okay, I am going to take a look at the assimilation mod then. Which is basically that when you capture an enemy city you can build their UU and UB in it and see if I notice anything, although that is doubtful because I don't really know code.

    Thanks for all of the effort you have put into it so far though, I really appreciate it. :goodjob:
     
  2. greenyb

    greenyb Chieftain

    Joined:
    Mar 3, 2010
    Messages:
    1
    Hi all, I recently rediscovered my love for Civ III, but have been completely unable to bring myself to play Civ IV because it is ALWAYS ruined for me by leader skins in diplomacy screens. Perhaps I'm a little over touchy about it, but I can't stand meeting the Americans in the classical era and seeing Abe Lincoln standing there in his suit. Does anybody know why they don't change with era as they did in Civ III? Or anyway to change it?
     
  3. cfkane

    cfkane Emperor

    Joined:
    Feb 7, 2006
    Messages:
    1,196
    It's largely an aethetic choice. Personally I always found the CivIII practice of having the costume change from era to era was a bit silly. I'd rather see Lincoln in a suit than Lincoln in furs or a toga.

    And as for anachronism, I know it's out of place to see Lincoln in a suit during the classical age. But then again, isn't it anachronistic to see Lincoln in the classical age, period?
     
  4. DarkTempla

    DarkTempla Chieftain

    Joined:
    Dec 8, 2002
    Messages:
    39
    Location:
    Germany
    Hi all,

    In light of the recent CIV V announcement and various discussions about the new "one unit per tile" rule, I would really like to see someone to put it into a mod to test for fun in CIV IV.

    3 basic options in mind:

    1) one unit per tile

    2) one unit type per tile

    3) 3 units (any type) per tile --> compensating for the archers not being able to actually shoot over other units

    --> basically preventing SODs...


    If this has ever been done or someone knows how its done very simply, please let me know!

    Otherwise I think others would like to try this for a feel as well :D

    THANKS!

    DarkTempla
     
  5. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,229
    Location:
    DE/NL/FR
    I guess, you've never played the BtS included mod "Afterworld".
    It has the one unit/tile rule.
    ATTENTION: Causes an incredible slowdown ingame!

    Basic modification for this is in Assets\Python\CvGameUtils.py
    PHP:
        def unitCannotMoveInto(self,argsList):
            
    ePlayer argsList[0]        
            
    iUnitId argsList[1]
            
    iPlotX argsList[2]
            
    iPlotY argsList[3]
            
    ###new code start
            
    if CyMap().plot(iPlotX,iPlotY).isUnit():
                return 
    True
            
    ###new code end
            
    return False
    It needs an additional activation in XML\PythonCallbackDefines.xml
    The code would include ships, cities, etc, so you also can't load units in ships, etc.


    The third option is nearly the same:
    PHP:
        def unitCannotMoveInto(self,argsList):
            
    ePlayer argsList[0]        
            
    iUnitId argsList[1]
            
    iPlotX argsList[2]
            
    iPlotY argsList[3]
            
    ###new code start
            
    if CyMap().plot(iPlotX,iPlotY).getNumUnits ()>3:
                return 
    True
            
    ###new code end
            
    return False
    I'm not in the mood to think about more complicated things atm :D, maybe tomorrow, if anybody reminds me.
     
  6. The Capo

    The Capo godless Heathen

    Joined:
    Jan 29, 2001
    Messages:
    9,302
    Location:
    Washington, DC
    Wait a second, there is only one unit allowed per tile in CivV? That sounds stupid, the original Civilization didn't even have that rule. :confused:
     
  7. NotSoGood

    NotSoGood Emperor

    Joined:
    Jan 25, 2009
    Messages:
    1,077
    Location:
    Finland
    I quess it's one of the first things that gets modded. :D
     
  8. DarkTempla

    DarkTempla Chieftain

    Joined:
    Dec 8, 2002
    Messages:
    39
    Location:
    Germany
    Apparently some guy already modded something alike in here:
    http://forums.civfanatics.com/showthread.php?t=355003&page=1

    But so far no open sharing as far as I can see ;)


    First of all thanks a lot for the information! But... I somehow dont have the
    relevant line in my list....

    def unitCannotMoveInto(self,argsList) :confused:


    EDIT: More confused, as i copied the relevant file into my mods directory i found the respective line, but didnt find it in the standard folder where i first looked (still cannot find it if i look there... no idea why!!)

    But now i know, so thanks again! :)

    If you were able to tell me how to mod it, so that transports still work and unit stacking within and for transprots still works that would be great!
    Also, to know how to define my idea "2" - unit type stacking.
    --> If you find the time of course that is! :) Greatly apprechiated!



    THANX!
     
  9. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,229
    Location:
    DE/NL/FR
    Maybe tomorrow, today it's deep in the night here.

    Let me guess: You haven't read anything about CiV yet, right :D?
     
  10. The Capo

    The Capo godless Heathen

    Joined:
    Jan 29, 2001
    Messages:
    9,302
    Location:
    Washington, DC
    No, I've been too busy to think about it. :crazyeye:
     
  11. The Capo

    The Capo godless Heathen

    Joined:
    Jan 29, 2001
    Messages:
    9,302
    Location:
    Washington, DC
    I was wondering if it is possible to give a unit the ability to cross ocean tiles, but when it does there is an X% chance it will sink/be lost at sea?
     
  12. NotSoGood

    NotSoGood Emperor

    Joined:
    Jan 25, 2009
    Messages:
    1,077
    Location:
    Finland
    Can be done in python with CvUtil canMove, but IIRC many people say it slows down the game a LOT. And mayby use onUnitMove to add the % of sinking.
     
  13. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,229
    Location:
    DE/NL/FR
    :yup: agree with NotSoGood.
    I've already somewhen thought about doing a modcomp for this, but i also think, this just would not be fun.
     
  14. Scrooge

    Scrooge Baa Humbug

    Joined:
    Aug 12, 2001
    Messages:
    81
    Location:
    London
    Disclaimer: I am wondering if this is the right place to post my request, if it's not, my apologies.

    I have a request for a small mod I seem to not be able to build myself: I miss the civ2 galleys and triremes, which in civ4 are constrained to costal squares.
    I'd like to see ancient boats like galleys and triremes be able to venture onto the ocean, but have a substantial probability of sinking until compass/navigation is discovered.

    Can anyone help me please?
     
  15. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,229
    Location:
    DE/NL/FR
    ...er....read the 3 posts above...
     
  16. Scrooge

    Scrooge Baa Humbug

    Joined:
    Aug 12, 2001
    Messages:
    81
    Location:
    London
    Oh, great. I was somewhat put off by the 24 pages in this thread, honestly didn't notice the post above... Well, my bad.

    But this only answers my initial question - so it can be done. And there are others like me. Great. Great. For me it would be fun - as to each one his own.

    The "enter ocean squares" can be enabled in xml but its the % chance of sinking I'm struggling with. IMHO all naval units may have a % chance of sinking on the ocean, it may be 25% for ancient ships, 1% (or less) for modern. Or the % may be defined in xml.

    Now, can anyone help me do it? Or do it for me? Or show me how to do it? Or else? Please? BTW I'd like to combine this function with the Modern Warfare Mod. :crazyeye:
     
  17. The Capo

    The Capo godless Heathen

    Joined:
    Jan 29, 2001
    Messages:
    9,302
    Location:
    Washington, DC
    Something like that would have to be done in SDK, and that takes a lot of doing. If you want it done in python, according to the gurus around here, it would severely slow down the game, which is honestly not a good thing and when weighing the two options you should go with gamespeed over such a small feature.
     
  18. Scrooge

    Scrooge Baa Humbug

    Joined:
    Aug 12, 2001
    Messages:
    81
    Location:
    London
    I don't mind slowing down the game that much. It's my game. On the other hand, IMHO there is a much too big techno gap between early sea exploration/invasion and a caravel/galleon. Allegedly the Vikings reached the Americas way before the caravel was around. And Caravel does not do proper transport.

    I don't think canMove method is necessary - and as it seems - that's what slows the game down. Also it may be enabled in xml. TerrainPassableTechs = TECH_COMPASS or any other should do it, just like the workboat.

    The onUnitMove % of sinking, as suggested above, seems to me a much better, cleaner and more realistic solution. Should be not that difficult. Probably just one or a couple of conditional lines of code but I don't know python and where to insert it. That's where I need help, please. I can determine % of sinking in xml by myself should need be. Alternatively this can also be simply (combat) damage incurred on ocean squares, not necessarily outright sinking (eg. storms, mutinies, sea monsters or whatever imaginable).

    So say, a galley enters the ocean (when tech-able) and gets 0-75% damage. May be lucky, may be not. Does it risk continuing with cargo or turn back? Is there coast to heal ahead? Seems interesting to me. Much more interesting to risk "jumping" short gaps, say invasion? KAMIKAZE (Divine Wind) as with the Mongol invasion of Japan?

    UP FOR A CHALLENGE ANYONE? :eek:
     
  19. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,229
    Location:
    DE/NL/FR
    Can you (in any way) program? If yes, then it should not be that a big problem.

    And you'll get help here, if you really try to do something ;).

    That also depends, on what you want to do ;).
    A small scenario will maybe profit very much from this feature.

    And it's not completly sure, how much it will slow down the game.
     
  20. Fuyu

    Fuyu Emperor

    Joined:
    Nov 5, 2009
    Messages:
    1,225
    Location:
    Austria
    I'd like to hear how you're planning to tell the AI not to go kamikaze into every ocean as soon as it can, suiciding every naval vessel it has (or is that feature human-only?).
     

Share This Page