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

Quick Modding Questions Thread

Discussion in 'Civ4 - Creation & Customization' started by kiwitt, Jan 27, 2010.

  1. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    I think it matters for the selection screens when you launch your games. Well maybe not for Civilizations but for Leaders.

    Buildings and units appear in your lists of stuff to build in the cities as per their order in the class infos files (after the sorting of units, buildings & wonders).
     
  2. Zlatko

    Zlatko CIW

    Joined:
    Apr 1, 2010
    Messages:
    713
    Location:
    Solar System
    Question for Programmers:
    1) In BTS we have one barbarian civilization, i want to put one or two barbarian civilizations like in Rise from Erebus. Which .cpp; .h; and .py; files have relation with barbarian civ?

    2) I don't understand something, programmer write codes in C++ (for example all source .cpp and .h files like in civilization and make game engine). What draw sea, forest, User Interface, buttons (like military advistor, economy advistor, end turn button, command buttons like move, kill, sentry, patrol etc..), civic screen and other screens, progress bar and etc. How is linked that all, which program draw this. Is maybe python do that?
     
  3. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,685
    Gender:
    Male
    Location:
    Las Vegas
    1) Do a search through the code for BARBARIAN_PLAYER (in VS you can search entire solution) and start from where it's defined as the LAST player in the sequence. There, you can define a new one. Then go through everywhere where there is reference to BARBARIAN_PLAYER (and you'll want to review isBarbarian() as well) if you're looking to add another. Not ALL will be applicable places perhaps to duplicate depending on what you have in mind for the new 'non-player AI' but this would be a good start on getting it setup.

    2) There are popup panels that can be called and managed entirely in the dll, like the tech selection or city build popups. Otherwise almost all UI (user interface) is handled in the python. Hover information panels are largely controlled in the dll under the term 'widgets'.
     
  4. Zlatko

    Zlatko CIW

    Joined:
    Apr 1, 2010
    Messages:
    713
    Location:
    Solar System
  5. Sanotra

    Sanotra Wannabe Modder

    Joined:
    May 16, 2007
    Messages:
    668
    Location:
    Wa - USA
    Hi guys, I haven't been able to find any improvements artwork and graphics downloads. Could someone please point me as to where to look? Thanks!
     
  6. Lplate

    Lplate Esus (Allegedly)

    Joined:
    Feb 8, 2011
    Messages:
    578
    Location:
    Ireland
  7. Sanotra

    Sanotra Wannabe Modder

    Joined:
    May 16, 2007
    Messages:
    668
    Location:
    Wa - USA
    Yup, that's the first place I looked. I can't find anything there. I don't know what sub forum it would be on.
     
  8. topsecret

    topsecret Believer

    Joined:
    Feb 11, 2010
    Messages:
    5,554
    Gender:
    Male
    Location:
    At the Foot of the Cross
    Click Civ4 - Terrain Graphics - Download new terrain graphics and tile improvements for Civ4. on that page. You should find lots of things. Just read the descriptions and click the links to see what they have.
     
  9. Sanotra

    Sanotra Wannabe Modder

    Joined:
    May 16, 2007
    Messages:
    668
    Location:
    Wa - USA
    Thanks, I found some stuff there. There's not too many things. Only two pages worth of downloads. Ultimately I'm hoping to find a graphic for an IMPROVEMENT_CITY which would be a step up from _TOWN, and I'm also hoping to find a way to make the buildings on farms smaller in size so they're not noticeable. I wish I knew how to edit these files in general. Other things I'm looking for. Something for IMPROVEMENT_LARGE_MINE, LARGE_FARM, MINING_TOWN, etc.
     
  10. Zlatko

    Zlatko CIW

    Joined:
    Apr 1, 2010
    Messages:
    713
    Location:
    Solar System
  11. dacubz145

    dacubz145 Deity

    Joined:
    Jun 21, 2010
    Messages:
    3,730
    Location:
    Windy City
    Quick question

    How come some buildings, when scaled to match how big it should be in the city, they appear very large in the pedia?Most buildings are fine but there are a couple where the pedia size and the size in the city don't seem to correspond
     
  12. Dragonxander PR

    Dragonxander PR Emperor of the Drakons

    Joined:
    May 25, 2009
    Messages:
    548
    Location:
    Mayagüez, Puerto Rico
    Does anyone know of any mod or mod component that would create a longbow UU? I find it weird that there's so many units with multiple UUs and a few that lack a matching UU, the longbow being the one that stands out the most to me.
     
  13. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    No I don't know, but making a UU is actually a really easy modification, all it requires is a bit of copy paste and word processing, a handful of files.

    I am too sleepy to remember all of them now but.. unit and civilization xml are the main two. Not including art changes (if they were wanted)

    Have I missed any?
     
  14. Monaldinio

    Monaldinio Prince

    Joined:
    Jan 6, 2010
    Messages:
    415
    Location:
    Rostock

    Look at the Civ4ArtDefines.xml

    <fScale>1.5</fScale> <<<< Scale in City
    <fInterfaceScale>0.13</fInterfaceScale> <<<<<<< Scale in Pedia
     
  15. srpt

    srpt Deist

    Joined:
    May 10, 2010
    Messages:
    2,038
    Location:
    Toronto
    can anyone tell me what the purpose of:

    FAssert(isHuman() || isBarbarian() || ((getGold() + iGoldChange) >= 0) || isAnarchy());

    is in CvPlayer::doGold()?

    I am triggering it but its not causing a crash

    here is the whole function:

    Spoiler :
    Code:
    void CvPlayer::doGold()
    {
    	bool bStrike;
    	int iGoldChange;
    	int iDisbandUnit;
    	int iI;
    
    	CyArgsList argsList;
    	argsList.add(getID());
    	long lResult=0;
    	gDLL->getPythonIFace()->callFunction(PYGameModule, "doGold", argsList.makeFunctionArgs(), &lResult);
    	if (lResult == 1)
    	{
    		return;
    	}
    
    	iGoldChange = calculateGoldRate();
    
    	[COLOR="Red"]FAssert(isHuman() || isBarbarian() || ((getGold() + iGoldChange) >= 0) || isAnarchy());[/COLOR]
    
    	changeGold(iGoldChange);
    
    	bStrike = false;
    
    	if (getGold() < 0)
    	{
    		setGold(0);
    
    		if (!isBarbarian() && (getNumCities() > 0))
    		{
    			bStrike = true;
    		}
    	}
    
    	if (bStrike)
    	{
    		setStrike(true);
    		changeStrikeTurns(1);
    
    		if (getStrikeTurns() > 1)
    		{
    			iDisbandUnit = (getStrikeTurns() / 2); // XXX mod?
    
    			for (iI = 0; iI < iDisbandUnit; iI++)
    			{
    				disbandUnit(true);
    
    				if (calculateGoldRate() >= 0)
    				{
    					break;
    				}
    			}
    		}
    	}
    	else
    	{
    		setStrike(false);
    	}
    }
     
  16. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,685
    Gender:
    Male
    Location:
    Las Vegas
    It looks like it might simply be there to let you know that a non-human, non-barb player civ is about to go into anarchy (this is a warning that there may be something wrong in the AI as it probably should've adapted to whatever was causing it to hemorrhage gold by now.)

    There's some other things it could mean that could be pointing to bugs elsewhere. I guess it's just a warning that something may be amiss elsewhere as it looks like the code adapts to it just fine here.
     
  17. TheRealMaestro

    TheRealMaestro Chieftain

    Joined:
    Aug 20, 2013
    Messages:
    42
    Location:
    Earth
    How could I use the Earth map (used in Rhye's and Fall and the 1000 A.D.
    scenarios) while choosing which civilisations and leaders are used? I know
    how to design cities and place units via WorldBuilder, but I can't find a way
    to bring up a downloaded map and then create a scenario while choosing
    which civs and leaders to include.
     
  18. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    one way (although this might be over kill) would be to make a mod with just the civs you want, so copy and modify the civilization info file and delete all the unwanted civs, then load up your mod and map and you will only have those you want on the map and you can deploy them however you wish. (this might cause a problem from civs appearing when released from colony status though...)
     
  19. Merkava120

    Merkava120 Oberleutnant

    Joined:
    Feb 2, 2013
    Messages:
    386
    Gender:
    Male
    Location:
    Socially distant
    You can edit the World Builder Save (.wbs) file with a text editor. The civs in the game are listed somewhere in there, just replace them with other civs. Same with leaders.
     
  20. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    I'll post this here too, because I need a solution ASAP. It's about my Ancient Middle East mod and I'm desperate for help.
    I have a very bad problem...now the game crashes when I go to the next turn, the first turn after 3000 BC!(Civilization IV has stopped working...)
    It crashes in both scenario and game mode...what could it be?
    What would be the possible causes for this?
    This has never happened in any mod before this, this is quite depressing and demotivating.
    Also, this does not happen (or has ever happened) on any other mod I've played/made) and also not in the base game (BtS).
     

Share This Page