Quick Modding Questions Thread

I was looking at the world builder manual, in the part about making cities using world builder, but, using the beyond the sword world builder, I'm having trouble figuring out how to settle cities.

Thanks
 
Did you try the city button in the buildings tab of the player menu?
 
Quick question about changing Leaderhead images:

Been messing around adding new leaders. Just using .dds files in the CIV4ArtDefines_Leaderhead XML for their pictures. Is there any way to make the game use more than one of these files for the same leader, even if it is only a random choice?
 
EDIT:Nevermind, I found it. But now I have another problem, I can't add some rows in MapView to the map because I don't know how to select the entire map, then copy it, make a new map and merge them or something like that. I would like to add Greece to the map. Can somebody please help me? Oh and here is the map!
 

Attachments

  • SoI engine2.CivBeyondSwordWBSave
    604.9 KB · Views: 52
Is there a way to set up a dummy tech which is not granted free in later era starts?
Even with the bdisabled tag, it will still be given free in late era start games if the tech era is set as ancient or none.

The only way to avoid this was to set it as future era tech but that would make those players I wanted to grant the tech to become in future era right at beginning.
 
Well, you could go for the Python solution... (How did you not know that?)

At the start of a game loop through all teams and remove access (via the CyTeam's setHasTech function, specifying "false" for bNewValue of course) to all techs marked as disabled unless, perhaps, they are supposed to have it.
 
Well... seeing there are mods with dummy techs like these, I was wondering if there is a XML solution.

Guess had to do the troublesome way, thanks :D
 
Is there a way to set the pedia size to be full sceen, I have a custom image for my background, and although the settings in pediamain are the same as BTS it is not full screen. I was wondering if there was a 'phrase' for the height and width setting that would make it copy the screen resolution. So that it would be full screen and scale with different screen resolutions.

or perhaps I need to change something in the background code, if so here is what I have for it:

Code:
screen.addDDSGFC( self.BACKGROUND_ID, 'Art/Interface/Screens/screen.tga', 0, 0, self.W_SCREEN, self.H_SCREEN, WidgetTypes.WIDGET_GENERAL, -1, -1 )

thanks guys!
 
You can manually start a specific song with Python, but I don't think it gives you enough control or the appropriate event triggers to use that to implement civ specific soundtracks.

I already did what you're going for with a combination of dummy eras to hold playlists and a very minor DLL change. So get back at me if you're willing to go into DLL modding.

Oh, I was also looking for something like that! If it isn't too much work for you could you pleas tell us/me how it is done? I don't have experience with DLL modding or C++.
 
Okay, I can give you a quick explanation of how it's done, but you have to familiarize with compiling the DLL for which there are useful guides in the tutorial section or the modiki.

But the idea is as follows: unfortunately, music playlists in Civ4 are inseparable from eras (unless you want to completely change how music is stored which I didn't want to attempt). But you don't want civs to change eras just to change their music because this also affects many other things. So I've created dummy eras that you never enter because no tech is associated with them, only to hold the playlists. For example, I wanted to add new medieval music for East Asia, South Asia and the Middle East, so I added ERA_EAST_ASIA, ERA_SOUTH_ASIA and ERA_MIDDLE_EAST to XML\GameInfo\CIV4EraInfos.xml.

The DLL change now only consists of making the game use these playlists for the appropriate civs, even if they are not in these eras.

The method to modify for this purpose is CvGameInterface::getNextSoundtrack(). You don't have to understand how it works, only that it uses getCurrentEra() to determine the next soundtrack (in two places in the method). As I said, you don't want that, because you potentially want to use the soundtrack from an era you're not in, so you replace it with a new method which I called getSoundtrackEra(). This method could look something like this:
Code:
EraTypes CvPlayer::getSoundtrackEra()
{
	ReligionTypes eStateReligion = getStateReligion();
	EraTypes eCurrentEra = getCurrentEra();

	if (eStateReligion == CONFUCIANISM || eStateReligion == TAOISM)
	{
		if (eCurrentEra == ERA_CLASSICAL || eCurrentEra == ERA_MEDIEVAL || eCurrentEra == ERA_RENAISSANCE)
		{
			return (EraTypes)ERA_EAST_ASIA;
		}
	}
	else if (eStateReligion == BUDDHISM || eStateReligion == HINDUISM)
	{
		if (eCurrentEra == ERA_CLASSICAL || eCurrentEra == ERA_MEDIEVAL || eCurrentEra == ERA_RENAISSANCE)
		{
			if (getID() == CHINA || getID() == MONGOLIA || getID() == JAPAN || getID() == KOREA)
			{
				return (EraTypes)ERA_EAST_ASIA;
			}
			else
			{
				return (EraTypes)ERA_SOUTH_ASIA;
			}
		}
	}
	else if (eStateReligion == ISLAM)
	{
		if (eCurrentEra == ERA_MEDIEVAL || eCurrentEra == ERA_RENAISSANCE)
		{
			return (EraTypes)ERA_MIDDLE_EAST;
		}
	}

	return eCurrentEra;
}
As you can see, my approach is mostly based on religion, i.e. Confucianism and Taoism give you East Asian music, Islam gives you Middle Eastern music, and Hinduism and Buddhism give you South Asian music (or East Asian music for China, Korea, Japan and Mongolia) in the medieval and Renaissance eras (my main goal was to avoid Christian chants for these civs in the Middle Ages). But it can be any combination of criteria you want. Just make sure to always return the current era at the end so those civs where the special rules don't apply still play the music of the era they're in.

If you're unfamiliar with C++ you might have some problems with getting the coding right at first, I can help you with that if necessary. Just send me a PM in that case, but please make sure you can compile the DLL before.

(Edit: you should probably note that you cannot directly follow my code because the way I use constants only work with the specific scenarios my mod is using, but I can help you with that too.)
 
Where are the files for the opening movie for Civ 4 and how would I go about replacing them with something else? Doesn't sound like it'd be too difficult...
 
Where are do BTS concepts stored in python (like Advanced start and colonies)? I want to remove some of the BTS concepts and replace them with new concepts. I know where the TXT redirections are stored but not the python thing.
 
It's not done with Python, they are defined under the ConceptInfos tag in XML\BasicInfos\CIV4BasicInfos.xml.
 
Oh, that's excellent, thanks!
EDIT:But where are the Beyond the Sword concepts stored, they are not with the vanilla concepts.
I want to remove all the BTS concepts and replace them with INSERT MOD NAME HERE concepts.
 
I've always wondered this: how to you take pieces of models and attach them to other models, for example attach a scope from a fg 42.and put it on a Springfield?
 
Can terrain texture sometimes cause error in game?

As far as I remember, once i am experimenting with some texture, i can't remember what.

When i start game and when my custom game is loaded my PC show me error and my game are close. I am return all on old, and game is working.

I have some error in one my map script, at the beginning, i was thunk that is some codes inside script make problem. I am used script in which i have trust, i am replaced terrain in this trusted script and i am again got error.

What other think?
 
Top Bottom