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. Spillsandstains

    Spillsandstains Warlord

    Joined:
    Mar 31, 2008
    Messages:
    206
    Hello, is there a "civil war" bit of code around? that assigns an existing city to a new civ? i'm trying to write a BTS event but so far it has only been, in the words of Prof Piehead, another partial success
     
  2. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,399
    Location:
    DE/NL/FR
    I have something like that lying around, but the problem is that this has in most cases to be very specific and can't be made in a generic way :/.
     
  3. Spillsandstains

    Spillsandstains Warlord

    Joined:
    Mar 31, 2008
    Messages:
    206
    dear the_J

    great, i'd be grateful if you would share it with me . . . actaully it's because i have several (three kingdoms) great generals for china. i think, "how can i use these in a new and/over overcomplex way, making another civilization seriously unbalanced?" and this was the first thing i thought of.
     
  4. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,399
    Location:
    DE/NL/FR
    I think the version I have here is already very special, so I'd have to change it a bit -> what exactly do you want? What should trigger the event, what should be the result?
    I mean, parts of the result are clear: New civ, with a city from another civ.
    But else...random civ? Random leader? Tech level the same?
     
  5. Ambassador

    Ambassador Peacemonger

    Joined:
    Jan 26, 2007
    Messages:
    442
    Location:
    World
    Hi Modders!

    Is there already a mod component that let's you (or the AI) ask for (1) free passage right, (2) release of the other's vassal and (3) granting of specific ressources while negotiating a peace agreement after a war? At least option (1) and (3) are negotiable in peace time so would it be hard to include them into the items negotiable in a peace agreement?
     
  6. dacubz145

    dacubz145 Deity

    Joined:
    Jun 21, 2010
    Messages:
    3,730
    Location:
    Windy City
    this mod does number one, but not the others, but it adds a whole bunch of diplomacy things so its worth trying out if thats what your interested in
     
  7. Ambassador

    Ambassador Peacemonger

    Joined:
    Jan 26, 2007
    Messages:
    442
    Location:
    World
    Hi dacubz145,

    thanks for your reply. I know this feature/modcomp from RoM but as far as I remember the right of passage agreement was only negotiable in peace times, wasn't it? I'm especially interested in including these options in peace negotiations.
     
  8. Daryl95

    Daryl95 Templar

    Joined:
    Nov 9, 2008
    Messages:
    271
    Location:
    America
    Could someone restructure the civilopedia as more of a futuristic PDA? Should have PDAish interface, a section for Journal entries, conversations (like e-mail only instead of new files for every reply the reply is put in the same one like on facebook). Don't want the old stuff to be left, Civilizations, Leaders, Features, Buildings, Units, ConceptInfos, etc. Nobody reads it much anyway. Perhaps add a section for planets where the character would write about the planet he has visited. Images for simply storing images of different places. I guess it'd be kind of like a miniature computer of the character that has been recovered that you are currently going thru to figure out what happened to him. Possibly Notes which would only be recent. Recycle bin, for again very recently deleted items, which would contain the older notes. Most of this could be structured a lot like the concept infos. If adding internet explorer, it would be for looks and should say Server not found. This is because at the time the PDA is uncovered, any kind of Interstellar network is destroyed, along with the majority of civilization.
    Synopsis of PDA:
    Journal
    Planets
    Internet Explorer (for looks: returns Server Not Found)
    Recycle Bin
    Notepad
    Messages
    Images
    New Interface (Should be called, Hydra OS)
    Remove Old Entries
    BTW: This is for BtS 3.19

    It will probably be difficult, but I believe this would be a way to get the player more interested in the universe I am crafting and would make a great standalone modcomp for anyone else who'd wish to use this in their mod.

    Thanks :)
     
  9. eggs2121

    eggs2121 Chieftain

    Joined:
    May 8, 2008
    Messages:
    34
    I think it be cool to be able to choose a new leader to run a vassal upon capitulation. For instance Stalin conquers Germany and installs a government that is more likely to be communistic. Anyone know of a mod where the leader can be replaced at the conqueror's choosing or if this is even possible?
     
  10. Cybah

    Cybah Emperor

    Joined:
    Jun 22, 2007
    Messages:
    1,480
    It's possible (not for me), the Better BTS AI Mod has a change player combonent which can replace your existing leader with anyone else.
     
  11. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061
    I'd really like Great Generals to have levels and their own seperate promotions. Basically the Great Commanders Mod plus the ability when attached to have a seperate & parallel promotion line for the Commander. Any thoughts on how to do this?
     
  12. Cruel

    Cruel King

    Joined:
    Jun 22, 2005
    Messages:
    823
    Location:
    São Paulo, Brazil
    I would like a mod where the list of names of units come in the order that is inserted in xml and not randomly it is now. If not ask much, in python, please. =)
     
  13. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    Leoreth showed me how to do that but it's in the dll - it's in CvUnit::init().

    Is a dll change totally out of question for you?
     
  14. Cruel

    Cruel King

    Joined:
    Jun 22, 2005
    Messages:
    823
    Location:
    São Paulo, Brazil
    In fact I made the request in python because I have more familiarity (studied a little of SciPy). In dll I can change but my build is full of errors ... (I'm just an enthusiast of programming and his magic).

    Anyway you can try to teach me. =)
     
  15. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    I'm not a coder myself but I have been pointed in the right direction and it's a really easy change!

    In CvUnit.cpp, look for void CvUnit::init

    or rather directly in that section for

    iUnitName = GC.getGameINLINE().getUnitCreatedCount(getUnitType());

    4 lines below you will find this code to be changed:

    int iOffset = GC.getGameINLINE().getSorenRandNum(iNumNames, "Unit name selection");

    comment it out and replace it by:

    int iOffset = 0;

    and you're done!

    Note that it's not elegant coding but, like this, it is very easy to change it without messing up with the code. A small trick for amateurs like us! ;)
     
  16. Cruel

    Cruel King

    Joined:
    Jun 22, 2005
    Messages:
    823
    Location:
    São Paulo, Brazil
    I believe this will not work in my case:
    Code:
    void CvUnit::init(int iID, UnitTypes eUnit, UnitAITypes eUnitAI, PlayerTypes eOwner, int iX, int iY, DirectionTypes eFacingDirection)
    {
    	CvWString szBuffer;
    	int iUnitName;
    	int iI, iJ;
    
    	FAssert(NO_UNIT != eUnit);
    
    	//--------------------------------
    	// Init saved data
    	reset(iID, eUnit, eOwner);
    
    	if(eFacingDirection == NO_DIRECTION)
    		m_eFacingDirection = DIRECTION_SOUTH;
    	else
    		m_eFacingDirection = eFacingDirection;
    
    	//--------------------------------
    	// Init containers
    
    	//--------------------------------
    	// Init pre-setup() data
    	setXY(iX, iY, false, false);
    
    	//--------------------------------
    	// Init non-saved data
    	setupGraphical();
    
    	//--------------------------------
    	// Init other game data
    	plot()->updateCenterUnit();
    
    	plot()->setFlagDirty(true);
    
    	iUnitName = GC.getGameINLINE().getUnitCreatedCount(getUnitType());
    	int iNumNames = m_pUnitInfo->getNumUnitNames();
    	if (iUnitName < iNumNames)
    	{
    		// MOD - START - Unique Great People (Mexico)
    		//int iOffset = GC.getGameINLINE().getSorenRandNum(iNumNames, "Unit name selection");
    		int iOffset = 0;
    		if (!GC.getDefineINT("GP_IN_ORDER"))
    		{
    			iOffset = GC.getGameINLINE().getSorenRandNum(iNumNames, "Unit name selection");
    		}
    		// MOD - END - Unique Great People (Mexico)
    
    		for (iI = 0; iI < iNumNames; iI++)
    		{
    			int iIndex = (iI + iOffset) % iNumNames;
    			CvWString szName = gDLL->getText(m_pUnitInfo->getUnitNames(iIndex));
    			if (!GC.getGameINLINE().isGreatPersonBorn(szName))
    			{
    				setName(szName);
    				GC.getGameINLINE().addGreatPersonBornName(szName);
    				break;
    			}
    		}
    	}
    
    My "int iOffset = 0;" is already 0. :(
     
  17. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    @Cruel: I see!!!

    This is because you have updated it to a mod "Unique Great People (Mexico)".

    No idea where it comes from but the question is: do you need this specific part of the mod (sorry, I don't understand what it does - obviously it has to do with the same function but in another way)?

    Otherwise, you're good at getting rid of it: just comment out what is in between MOD - START - Unique Great People (Mexico) and MOD - END - Unique Great People (Mexico)...
     
  18. Cruel

    Cruel King

    Joined:
    Jun 22, 2005
    Messages:
    823
    Location:
    São Paulo, Brazil
    Yes, I need this part of code. This a special component devenloped by Mexico but with other funcionality. I can't just get rid of it. I think I need a more elegant solution. Probably a line or a few more below. Beginner is a compliment to me.
     
  19. Cruel

    Cruel King

    Joined:
    Jun 22, 2005
    Messages:
    823
    Location:
    São Paulo, Brazil
    Solved my problem thanks to two lines of embryodead! Thank you!
     
  20. Bearmanjew

    Bearmanjew Chieftain

    Joined:
    Jul 5, 2012
    Messages:
    25
    Gender:
    Male
    Um, I've been looking, and perhaps I'm just blind-wouldn't be the first time I missed something-but is there a mod that makes it so that civilizations can only build wonders that they historically built? Every now and then I like to play something as close to real as possible, except when the Sistine Chapel is in Beijing, it doesn't feel quite right. :twitch:
     

Share This Page