Event modding question

CaptainLost

Oberleutnant
Joined
Feb 2, 2013
Messages
450
Location
Socially distant
This is concerning the text files for event modding. In there it often has %s1, %s2, etc referring to strings defined in a python/sdk file.. where is that file? I can't find it anywhere!
 
Sure

Right now I am trying to mod in several events for a mod. I've done everything except for the text.In the XML files for event modding, the events point to a text file where all the text descriptions and stuff for events are kept. I went into that file and looked around and found that a lot of the description texts have things like "%s1_civ_adjective". I assumed (correctly) that this was a string variable for something like "Roman". so I wondered how you defined the strings. I found a really old thread talking about this, and it said how to define the strings.however, it did not tell what file that you were to edit in order to define those strings. So I tried to find it myself and spent hours looking around in the cvgamecoredll folder and couldn't find a single file that had anything to do with events or strings. I could not.find for the life of me where I could define the text strings used in the events text XML file. so do you know where that is? hope I explained enough! thank you for your quick reply by the way.
 
I assume without any testing that this piece in CvPlayer.cpp initTriggerData() creates the string:
Spoiler :
Code:
	std::vector<CvWString> aszTexts;
	for (int i = 0; i < kTrigger.getNumTexts(); ++i)
	{
		if (NO_ERA == kTrigger.getTextEra(i) || kTrigger.getTextEra(i) == getCurrentEra())
		{
			aszTexts.push_back(kTrigger.getText(i));
		}
	}

	if (aszTexts.size() > 0)
	{
		int iText = GC.getGameINLINE().getSorenRandNum(aszTexts.size(), "Event Text choice");

		pTriggerData->m_szText = gDLL->getText(aszTexts[iText].GetCString(), 
			eOtherPlayer != NO_PLAYER ? GET_PLAYER(eOtherPlayer).getCivilizationAdjectiveKey() : L"", 
			NULL != pCity ? pCity->getNameKey() : L"", 
			NULL != pUnit ? pUnit->getNameKey() : L"", 
			NO_RELIGION != eReligion ? GC.getReligionInfo(eReligion).getAdjectiveKey() : L"",
			NO_BUILDING != eBuilding ? GC.getBuildingInfo(eBuilding).getTextKeyWide() : L"",
			NULL != pOtherPlayerCity ? pOtherPlayerCity->getNameKey() : L"",
			NULL != pPlot && NO_TERRAIN != pPlot->getTerrainType() ? GC.getTerrainInfo(pPlot->getTerrainType()).getTextKeyWide() : L"",
			NULL != pPlot && NO_IMPROVEMENT != pPlot->getImprovementType() ? GC.getImprovementInfo(pPlot->getImprovementType()).getTextKeyWide() : L"",
			NULL != pPlot && NO_BONUS != pPlot->getBonusType() ? GC.getBonusInfo(pPlot->getBonusType()).getTextKeyWide() : L"",
			NULL != pPlot && NO_ROUTE != pPlot->getRouteType() ? GC.getRouteInfo(pPlot->getRouteType()).getTextKeyWide() : L"",
			NO_CORPORATION != eCorporation ? GC.getCorporationInfo(eCorporation).getTextKeyWide() : L""
			);

	}
These seem to be the information event texts are given.
 
So, if I'm right the strings are, in order:
adjective
city name
unit name
religion
building name
other player's city name
terrain name
bonus (resource) name
route name
corporation

So then, these strings are used for the entire CIV4GameText_Events_BTS file instead of having separate strings defined for each event. This makes much more sense.
Thanks a lot, and thanks for being so fast! :goodjob::clap::clap:
 
Another quick question:
In the event texts file, when it pulls the string for corporation, it uses %s11, however there are only 10 strings defined above... what is it doing?
 
oh. where do they fit in?

and why is corporation sometimes %s6? and civ adjective for other player %s3? I am confused
 
Some event related text strings are used in CvRandomEventInterface.py and do not therefore need to follow the standard order since they are not used by the standard code. Most, but not all, of these are help text.
 
Back
Top Bottom