Guide to event modding in BtS

Hi all,

first of all, thanks a lot, Solver, for this great guide.

I wondered if it was possible, and how, to have multiple events per turn, WITHOUT linking them?
For example, one or two forest fires, then one or two plagues, the some building fires, then some good harvest, etc...
 
The only way to do that without changing the DLL itself would be to assign a -1 weight to some of the events, which causes them to automatically trigger whenever they are allowed to, regardless of the normal event for the turn happening or not.
 
Python only.



Yeah, but... Python only ;)



Yeah, with Python again ;) You can then set up multiple cities according to some criteria you want.



No. You can, though, create a second event that will fire 20 turns later and add +1 food, to effectively achieve what you want. I haven't tried if it works with plot events though.

I have some ideas about random events,such as food trade, ammo trade, investment. Can you give me some ideas how to do?

food trade:
if other player has 4 farms (or above), we can buy food from him, just like real world.
1, pay x money to other player. we get x food; the other player lose x food;


ammo trade,
only a few nations can produce nuclear weapon, jet fighter, carrier. if we can produce these units, we can sell these weapon to other civs to get many money;
1, gain x money, AI get jet fighter;
1, gain x money, AI get carrier;

investment;
we can invest some money to AI get more money;
1, pay x money to AI, get x money in 5 turns, add+1 attitude to AI;
2, AI invest to us. Facotry+2 hammer, +2 reserch, pay X money to AI each turn;

Thanks
 
ok thanks, i ask because i made a simple xml event mod that spreads organic resources like horses and such for an earth map game but found that the event didn't come up as often as i wanted it to even tho it was included in 100% of games. I have increased the roll side prob in global defines and now i can try wanging up the iweight.

I would use the <PythonCanDo> tag in combination with <iWeight> -1 and <bRecurring> 1 to trigger it each turn and let the Python return true or false based on a random number. Something like:

Code:
def candoSpreadResources(argsList):

    if gc.getGame().getSorenRandNum(100, "Spread Resources") < 25:
        return true

    return false

for a roughly 1 in 4 turns chance of making the event happen.
 
speaking of plagues.....

I know that RFC models plagues, but its quite a hefty beast of python-ing...

I want to model a basic plague that erupts in a very unhealthy city, and spreads to the next nearest city.

I want to use trade routes to determine if a city is plague-able (sorry), and then the amount of unhealthiness (ie the diff bewteen :health: and :yuck:) in that city to affect the possibility of it being infected, and the actual population loss.

so,
city 1, with -4 :health:, gets plagued.
3 cities (A,B,C,) connected, base 5% chance of infection.
- City A is healthy, never mind how MUCH; chance remains 5%.
- City B is UNhealthy, say -2 :health: ; 5x2 = 10%
- City C is also UNhealthy, say -4 :health: ; 5x4= 20%

for pop loss, amount of unhealthiness+1.
-1 :yuck: = 2 pop loss
-2 :yuck: = 3 pop loss
-3 :yuck: = 4 pop loss
-4 :yuck: = 5 pop loss, etc etc

This avoids the question of carriers, infected units etc. It goes solely by cities healthiness and if they are connected via trade routes. when airports are in use the chance of infection popping up anywhere is increased.

Im gonna tinker with this a bit, but if anyone *cough*Solver*cough* has any ideas on how to do this, then theyd eb much appreciated :)

Regards,
HDK
 
That really looks like a Python script to me. I'm pretty skilled at XML jockeying, and I can't come up with an easy way to do it.

I'm running into some trouble programming events myself. Is there an easy way to force the selection of a capital city? I am specifically writing events that affect the output of the Palace like the Anti-Monarchists event. I have tried to pick a city combined with BUILDINGCLASS_PALACE, I have tried simply ignoring the pick city part like Anti-Monarchists and just wrote the event action to affect the Palace, but I can't even get the event to fire. Setting the weight to -1 doesn't help either.

I can find the event's ID number using the gc.getInfoTypeForString() command, so that works, at least. I know that part works. Are there any more ideas?
 
Heya Antilogic,

I have a great fire event that specifies the building req as Building_Palace,a s you not, and i also have PICK CITY selected.

I think the second part might be where youre missing out, as without that it simply wont..pick a city :)

ie:
<BuildingsRequired>
<BuildingClass>BUILDINGCLASS_PALACE</BuildingClass>
<BuildingClass>BUILDINGCLASS_GRANARY</BuildingClass>
<BuildingClass>BUILDINGCLASS_CHRISTIAN_CATHEDRAL</BuildingClass>
</BuildingsRequired>

and

<bPickCity>1</bPickCity>
It required no python,and those are the main xml tags that apply to city picking..

Post your code here and we'll have a look-see

Regards,
HDK
 
Oddly enough, that was the first thing I tried. However, when I tried to use the Python consol to activate the event, nothing happened. I didn't even get the statement.

Here is the offending code:

Event Trigger Infos
Spoiler :
<EventTriggerInfo>
<Type>EVENTTRIGGER_LOYALTY_TESTS</Type>
<WorldNewsTexts>
<Text>TXT_KEY_EVENTTRIGGER_LOYALTY_TESTS_1</Text>
</WorldNewsTexts>
<TriggerTexts>
<TriggerText>
<Text>TXT_KEY_EVENT_TRIGGER_LOYALTY_TESTS_1</Text>
<Era>NONE</Era>
</TriggerText>
</TriggerTexts>
<bSinglePlayer>0</bSinglePlayer>
<iPercentGamesActive>90</iPercentGamesActive>
<iWeight>150</iWeight>
<bProbabilityUnitMultiply>0</bProbabilityUnitMultiply>
<bProbabilityBuildingMultiply>0</bProbabilityBuildingMultiply>
<Civic>CIVIC_POLICE_STATE</Civic>
<iMinTreasury>0</iMinTreasury>
<iMinPopulation>0</iMinPopulation>
<iMaxPopulation>0</iMaxPopulation>
<iMinMapLandmass>0</iMinMapLandmass>
<iMinOurLandmass>0</iMinOurLandmass>
<iMaxOurLandmass>-1</iMaxOurLandmass>
<MinDifficulty>NONE</MinDifficulty>
<iAngry>0</iAngry>
<iUnhealthy>0</iUnhealthy>
<UnitsRequired/>
<iNumUnits>0</iNumUnits>
<iNumUnitsGlobal>0</iNumUnitsGlobal>
<iUnitDamagedWeight>0</iUnitDamagedWeight>
<iUnitDistanceWeight>0</iUnitDistanceWeight>
<iUnitExperienceWeight>0</iUnitExperienceWeight>
<bUnitsOnPlot>0</bUnitsOnPlot>
<BuildingsRequired>
<BuildingClass>BUILDINGCLASS_PALACE</BuildingClass>
</BuildingsRequired>
<iNumBuildings>1</iNumBuildings>
<iNumBuildingsGlobal>0</iNumBuildingsGlobal>
<iNumPlotsRequired>0</iNumPlotsRequired>
<bOwnPlot>0</bOwnPlot>
<iPlotType>-1</iPlotType>
<FeaturesRequired/>
<TerrainsRequired/>
<ImprovementsRequired/>
<BonusesRequired/>
<RoutesRequired/>
<ReligionsRequired/>
<iNumReligions>0</iNumReligions>
<CorporationsRequired/>
<iNumCorporations>0</iNumCorporations>
<bPickReligion>0</bPickReligion>
<bStateReligion>0</bStateReligion>
<bHolyCity>0</bHolyCity>
<bPickCorporation>0</bPickCorporation>
<bHeadquarters>0</bHeadquarters>
<Events>
<Event>EVENT_LOYALTY_TESTS_1</Event>
</Events>
<PrereqEvents/>
<bPrereqEventPlot>0</bPrereqEventPlot>
<OrPreReqs/>
<AndPreReqs>
<PrereqTech>TECH_FASCISM</PrereqTech>
</AndPreReqs>
<ObsoleteTechs/>
<bRecurring>0</bRecurring>
<bTeam>0</bTeam>
<bGlobal>0</bGlobal>
<bPickPlayer>0</bPickPlayer>
<bOtherPlayerWar>0</bOtherPlayerWar>
<bOtherPlayerHasReligion>0</bOtherPlayerHasReligion>
<bOtherPlayerHasOtherReligion>0</bOtherPlayerHasOtherReligion>
<bOtherPlayerAI>0</bOtherPlayerAI>
<iOtherPlayerShareBorders>0</iOtherPlayerShareBorders>
<OtherPlayerHasTech>NONE</OtherPlayerHasTech>
<bPickCity>1</bPickCity>
<bPickOtherPlayerCity>0</bPickOtherPlayerCity>
<bShowPlot>0</bShowPlot>
<iCityFoodWeight>0</iCityFoodWeight>
<PythonCanDo/>
<PythonCanDoCity/>
<PythonCanDoUnit/>
<PythonCallback/>
</EventTriggerInfo>

<EventTriggerInfo>
<Type>EVENTTRIGGER_EXPENSIVE_HABITS</Type>
<WorldNewsTexts>
<Text>TXT_KEY_EVENTTRIGGER_EXPENSIVE_HABITS_1</Text>
</WorldNewsTexts>
<TriggerTexts>
<TriggerText>
<Text>TXT_KEY_EVENT_TRIGGER_EXPENSIVE_HABITS_1</Text>
<Era>NONE</Era>
</TriggerText>
</TriggerTexts>
<bSinglePlayer>0</bSinglePlayer>
<iPercentGamesActive>80</iPercentGamesActive>
<iWeight>100</iWeight>
<bProbabilityUnitMultiply>0</bProbabilityUnitMultiply>
<bProbabilityBuildingMultiply>0</bProbabilityBuildingMultiply>
<Civic>CIVIC_HEREDITARY_RULE</Civic>
<iMinTreasury>50</iMinTreasury>
<iMinPopulation>0</iMinPopulation>
<iMaxPopulation>0</iMaxPopulation>
<iMinMapLandmass>0</iMinMapLandmass>
<iMinOurLandmass>0</iMinOurLandmass>
<iMaxOurLandmass>-1</iMaxOurLandmass>
<MinDifficulty>NONE</MinDifficulty>
<iAngry>0</iAngry>
<iUnhealthy>0</iUnhealthy>
<UnitsRequired/>
<iNumUnits>0</iNumUnits>
<iNumUnitsGlobal>0</iNumUnitsGlobal>
<iUnitDamagedWeight>0</iUnitDamagedWeight>
<iUnitDistanceWeight>0</iUnitDistanceWeight>
<iUnitExperienceWeight>0</iUnitExperienceWeight>
<bUnitsOnPlot>0</bUnitsOnPlot>
<BuildingsRequired>
<BuildingClass>BUILDINGCLASS_PALACE</BuildingClass>
</BuildingsRequired>
<iNumBuildings>1</iNumBuildings>
<iNumBuildingsGlobal>0</iNumBuildingsGlobal>
<iNumPlotsRequired>0</iNumPlotsRequired>
<bOwnPlot>0</bOwnPlot>
<iPlotType>-1</iPlotType>
<FeaturesRequired/>
<TerrainsRequired/>
<ImprovementsRequired/>
<BonusesRequired/>
<RoutesRequired/>
<ReligionsRequired/>
<iNumReligions>0</iNumReligions>
<CorporationsRequired/>
<iNumCorporations>0</iNumCorporations>
<bPickReligion>0</bPickReligion>
<bStateReligion>0</bStateReligion>
<bHolyCity>0</bHolyCity>
<bPickCorporation>0</bPickCorporation>
<bHeadquarters>0</bHeadquarters>
<Events>
<Event>EVENT_EXPENSIVE_HABITS_1</Event>
</Events>
<PrereqEvents/>
<bPrereqEventPlot>0</bPrereqEventPlot>
<OrPreReqs/>
<AndPreReqs>
<PrereqTech>TECH_AESTHETICS</PrereqTech>
</AndPreReqs>
<ObsoleteTechs/>
<bRecurring>0</bRecurring>
<bTeam>0</bTeam>
<bGlobal>0</bGlobal>
<bPickPlayer>0</bPickPlayer>
<bOtherPlayerWar>0</bOtherPlayerWar>
<bOtherPlayerHasReligion>0</bOtherPlayerHasReligion>
<bOtherPlayerHasOtherReligion>0</bOtherPlayerHasOtherReligion>
<bOtherPlayerAI>0</bOtherPlayerAI>
<iOtherPlayerShareBorders>0</iOtherPlayerShareBorders>
<OtherPlayerHasTech>NONE</OtherPlayerHasTech>
<bPickCity>1</bPickCity>
<bPickOtherPlayerCity>0</bPickOtherPlayerCity>
<bShowPlot>0</bShowPlot>
<iCityFoodWeight>0</iCityFoodWeight>
<PythonCanDo/>
<PythonCanDoCity/>
<PythonCanDoUnit/>
<PythonCallback/>
</EventTriggerInfo>


Event Infos
Spoiler :
<EventInfo>
<Type>EVENT_LOYALTY_TESTS_1</Type>
<Description>TXT_KEY_EVENT_LOYALTY_TESTS_1</Description>
<LocalInfoText/>
<WorldNewsTexts/>
<OtherPlayerPopup/>
<QuestFailText/>
<bQuest>0</bQuest>
<bGlobal>0</bGlobal>
<bTeam>0</bTeam>
<bPickCity>0</bPickCity>
<bPickOtherPlayerCity>0</bPickOtherPlayerCity>
<bDeclareWar>0</bDeclareWar>
<iGold>0</iGold>
<bGoldToPlayer>0</bGoldToPlayer>
<iRandomGold>0</iRandomGold>
<iCulture>0</iCulture>
<iEspionagePoints>0</iEspionagePoints>
<bGoldenAge>0</bGoldenAge>
<iFreeUnitSupport>0</iFreeUnitSupport>
<iInflationMod>0</iInflationMod>
<iSpaceProductionMod>0</iSpaceProductionMod>
<Tech>NONE</Tech>
<TechFlavors/>
<iTechPercent>0</iTechPercent>
<iTechCostPercent>0</iTechCostPercent>
<iTechMinTurnsLeft>0</iTechMinTurnsLeft>
<PrereqTech>NONE</PrereqTech>
<UnitClass>NONE</UnitClass>
<iNumFreeUnits>0</iNumFreeUnits>
<bDisbandUnit>0</bDisbandUnit>
<iUnitExperience>0</iUnitExperience>
<iUnitImmobileTurns>0</iUnitImmobileTurns>
<UnitPromotion/>
<UnitName/>
<UnitCombatPromotions/>
<UnitClassPromotions/>
<BuildingClass>NONE</BuildingClass>
<iBuildingChange>0</iBuildingChange>
<BuildingExtraYields/>
<BuildingExtraCommerces>
<BuildingExtraCommerce>
<BuildingClass>BUILDINGCLASS_PALACE</BuildingClass>
<CommerceType>COMMERCE_ESPIONAGE</CommerceType>
<iExtraCommerce>4</iExtraCommerce>
</BuildingExtraCommerce>
</BuildingExtraCommerces>
<BuildingExtraHappies/>
<BuildingExtraHealths/>
<iHappy>0</iHappy>
<iHealth>0</iHealth>
<iHurryAnger>0</iHurryAnger>
<iHappyTurns>0</iHappyTurns>
<iRevoltTurns>0</iRevoltTurns>
<iMinPillage>0</iMinPillage>
<iMaxPillage>0</iMaxPillage>
<iFood>0</iFood>
<iFoodPercent>0</iFoodPercent>
<FreeSpecialistCounts/>
<FeatureType>NONE</FeatureType>
<iFeatureChange>0</iFeatureChange>
<ImprovementType>NONE</ImprovementType>
<iImprovementChange>0</iImprovementChange>
<BonusType>NONE</BonusType>
<iBonusChange>0</iBonusChange>
<RouteType>NONE</RouteType>
<iRouteChange>0</iRouteChange>
<BonusRevealed>NONE</BonusRevealed>
<BonusGift>NONE</BonusGift>
<PlotExtraYields/>
<iConvertOwnCities>0</iConvertOwnCities>
<iConvertOtherCities>0</iConvertOtherCities>
<iMaxNumReligions>-1</iMaxNumReligions>
<iOurAttitudeModifier>0</iOurAttitudeModifier>
<iAttitudeModifier>-1</iAttitudeModifier>
<iTheirEnemyAttitudeModifier>0</iTheirEnemyAttitudeModifier>
<iPopulationChange>0</iPopulationChange>
<AdditionalEvents/>
<EventTimes/>
<ClearEvents/>
<PythonCallback/>
<PythonExpireCheck/>
<PythonCanDo/>
<PythonHelp/>
<Button>,Art/Interface/Buttons/Process/Blank.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,8,5</Button>
<iAIValue>1000</iAIValue>
</EventInfo>

<EventInfo>
<Type>EVENT_EXPENSIVE_HABITS_1</Type>
<Description>TXT_KEY_EVENT_EXPENSIVE_HABITS_1</Description>
<LocalInfoText/>
<WorldNewsTexts/>
<OtherPlayerPopup/>
<QuestFailText/>
<bQuest>0</bQuest>
<bGlobal>0</bGlobal>
<bTeam>0</bTeam>
<bPickCity>0</bPickCity>
<bPickOtherPlayerCity>0</bPickOtherPlayerCity>
<bDeclareWar>0</bDeclareWar>
<iGold>-50</iGold>
<bGoldToPlayer>0</bGoldToPlayer>
<iRandomGold>20</iRandomGold>
<iCulture>0</iCulture>
<iEspionagePoints>0</iEspionagePoints>
<bGoldenAge>0</bGoldenAge>
<iFreeUnitSupport>0</iFreeUnitSupport>
<iInflationMod>0</iInflationMod>
<iSpaceProductionMod>0</iSpaceProductionMod>
<Tech>NONE</Tech>
<TechFlavors/>
<iTechPercent>0</iTechPercent>
<iTechCostPercent>0</iTechCostPercent>
<iTechMinTurnsLeft>0</iTechMinTurnsLeft>
<PrereqTech>NONE</PrereqTech>
<UnitClass>NONE</UnitClass>
<iNumFreeUnits>0</iNumFreeUnits>
<bDisbandUnit>0</bDisbandUnit>
<iUnitExperience>0</iUnitExperience>
<iUnitImmobileTurns>0</iUnitImmobileTurns>
<UnitPromotion/>
<UnitName/>
<UnitCombatPromotions/>
<UnitClassPromotions/>
<BuildingClass>NONE</BuildingClass>
<iBuildingChange>0</iBuildingChange>
<BuildingExtraYields/>
<BuildingExtraCommerces>
<BuildingExtraCommerce>
<BuildingClass>BUILDINGCLASS_PALACE</BuildingClass>
<CommerceType>COMMERCE_CULTURE</CommerceType>
<iExtraCommerce>2</iExtraCommerce>
</BuildingExtraCommerce>
</BuildingExtraCommerces>
<BuildingExtraHappies/>
<BuildingExtraHealths/>
<iHappy>0</iHappy>
<iHealth>0</iHealth>
<iHurryAnger>0</iHurryAnger>
<iHappyTurns>0</iHappyTurns>
<iRevoltTurns>0</iRevoltTurns>
<iMinPillage>0</iMinPillage>
<iMaxPillage>0</iMaxPillage>
<iFood>0</iFood>
<iFoodPercent>0</iFoodPercent>
<FreeSpecialistCounts/>
<FeatureType>NONE</FeatureType>
<iFeatureChange>0</iFeatureChange>
<ImprovementType>NONE</ImprovementType>
<iImprovementChange>0</iImprovementChange>
<BonusType>NONE</BonusType>
<iBonusChange>0</iBonusChange>
<RouteType>NONE</RouteType>
<iRouteChange>0</iRouteChange>
<BonusRevealed>NONE</BonusRevealed>
<BonusGift>NONE</BonusGift>
<PlotExtraYields/>
<iConvertOwnCities>0</iConvertOwnCities>
<iConvertOtherCities>0</iConvertOtherCities>
<iMaxNumReligions>-1</iMaxNumReligions>
<iOurAttitudeModifier>0</iOurAttitudeModifier>
<iAttitudeModifier>-1</iAttitudeModifier>
<iTheirEnemyAttitudeModifier>0</iTheirEnemyAttitudeModifier>
<iPopulationChange>0</iPopulationChange>
<AdditionalEvents/>
<EventTimes/>
<ClearEvents/>
<PythonCallback/>
<PythonExpireCheck/>
<PythonCanDo/>
<PythonHelp/>
<Button>,Art/Interface/Buttons/Process/Blank.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,8,5</Button>
<iAIValue>1000</iAIValue>
</EventInfo>


The Text
Spoiler :
<TEXT>
<Tag>TXT_KEY_EVENTTRIGGER_LOYALTY_TESTS_1</Tag>
<English>The %s1_civ_adjective Empire has begun purging their government of suspected traitors. Other world leaders are concerned.</English>
<French>The %s1_civ_adjective Empire has begun purging their government of suspected traitors. Other world leaders are concerned.</French>
<German>The %s1_civ_adjective Empire has begun purging their government of suspected traitors. Other world leaders are concerned.</German>
<Italian>The %s1_civ_adjective Empire has begun purging their government of suspected traitors. Other world leaders are concerned.</Italian>
<Spanish>The %s1_civ_adjective Empire has begun purging their government of suspected traitors. Other world leaders are concerned.</Spanish>
</TEXT>
<TEXT>
<Tag>TXT_KEY_EVENT_TRIGGER_LOYALTY_TESTS_1</Tag>
<English>We have begun purging those in our government with questionable loyalties.</English>
<French>We have begun purging those in our government with questionable loyalties.</French>
<German>We have begun purging those in our government with questionable loyalties.</German>
<Italian>We have begun purging those in our government with questionable loyalties.</Italian>
<Spanish>We have begun purging those in our government with questionable loyalties.</Spanish>
</TEXT>
<TEXT>
<Tag>TXT_KEY_EVENT_LOYALTY_TESTS_1</Tag>
<English>Let the fall of these traitors be a sign that better times are coming.</English>
<French>Let the fall of these traitors be a sign that better times are coming.</French>
<German>Let the fall of these traitors be a sign that better times are coming.</German>
<Italian>Let the fall of these traitors be a sign that better times are coming.</Italian>
<Spanish>Let the fall of these traitors be a sign that better times are coming.</Spanish>
</TEXT>

<TEXT>
<Tag>TXT_KEY_EVENTTRIGGER_EXPENSIVE_HABITS_1</Tag>
<English>The %s1_civ_adjective monarch seems more interested in his gardens than in the welfare of his state.</English>
<French>The %s1_civ_adjective monarch seems more interested in his gardens than in the welfare of his state.</French>
<German>The %s1_civ_adjective monarch seems more interested in his gardens than in the welfare of his state.</German>
<Italian>The %s1_civ_adjective monarch seems more interested in his gardens than in the welfare of his state.</Italian>
<Spanish>The %s1_civ_adjective monarch seems more interested in his gardens than in the welfare of his state.</Spanish>
</TEXT>
<TEXT>
<Tag>TXT_KEY_EVENT_TRIGGER_EXPENSIVE_HABITS_1</Tag>
<English>Our monarch seems more concerned with beautifying his gardens than preserving the royal treasury.</English>
<French>Our monarch seems more concerned with beautifying his gardens than preserving the royal treasury.</French>
<German>Our monarch seems more concerned with beautifying his gardens than preserving the royal treasury.</German>
<Italian>Our monarch seems more concerned with beautifying his gardens than preserving the royal treasury.</Italian>
<Spanish>Our monarch seems more concerned with beautifying his gardens than preserving the royal treasury.</Spanish>
</TEXT>
<TEXT>
<Tag>TXT_KEY_EVENT_EXPENSIVE_HABITS_1</Tag>
<English>At least these new additions to the Palace will brighten up the capital.</English>
<French>At least these new additions to the Palace will brighten up the capital.</French>
<German>At least these new additions to the Palace will brighten up the capital.</German>
<Italian>At least these new additions to the Palace will brighten up the capital.</Italian>
<Spanish>At least these new additions to the Palace will brighten up the capital.</Spanish>
</TEXT>


I guess this can serve as an unintentional playtesting of these events for my mod. :)
 
Here's another question (and a thread bump so people can see it):

I want to make an event that requires a resource, such as cows. However, I want the benefit to be "spreading" that resource, so I actually need a blank plot for the event to work properly (after all, the intended result is that you get another tile of cows). Can access to cows be checked easily in Python, or do I have to do something else to make this work?
 
I wouldn't worry about the text file- thats dependent on the trigger and events,and if They don't fire...

Ill have a look at this tomorrow.

HDK
 
I wouldn't worry about the text file- thats dependent on the trigger and events,and if They don't fire...

Ill have a look at this tomorrow.

HDK

I know that, I just included them for completion's sake. I've been trying to activate them using jkp1187's method (post 69) with the Python command prompt, and I get aggravated by all the capital letters.
 
@Solver (just because it seems you are the god in this topic :p but I appreciate anybody's help)

I have made a quest. Everything's working like it should except one thing: if I fail to complete the quest the QuestFailText 'fails' to show up.

I have the text in the EVENT_XYZ_DONE event.

Can you tell me what could be the problem? Thanks in advance.
 
Does the fail event trigger, or is it just the text?

It was just the text.

I've solved it meanwhile. The problem was that initially I included the fail condition in the PythonCanDo script which is tied to the EventTriggerInfos file. I've simply recreated the condition in a separate script and tied it to the PythonExpireCheck line in the EventInfos file.
 
I started a seperate thread for my event trouble, but just in case people frequent this more, I'll link it in here. The main problem is that my event refuses to trigger, even if I have no prereq but a python check (which is only a "check if city has a building" for Final Frontier, where the XML check doesn't seem to work), and even if I just set the python check to "return True". Which should make it auto-trigger. And... it doesn't. I also just tried moving it directly into the main FF (Star Trek) event and event trigger XMLs (it was a module), and it still didn't trigger...
 
Recently, I have had a slew of problems with XML event programming. I say it requires a forested tundra tile; the event triggers when this condition is not met. I made another event like Solver's pasture built event that builds fishing boats for you, but my requirement of there to be a fish, crab, or clam resource in the tile is ignored. And it doesn't have any effect.

It's been so frustrating I've just been taking out my rage in other games and not modding.
 
i am searching for a way to benefit the victory over a specific unit. The only thing i find out is to increase <iXPValueAttack> and <iXPValueDefense> of the specific unit. Which other rewards are possible by xml? Could an Event help me?
 
I'm trying to make a random event like the various "Barbarian uprising" ones. So I checked the Python and tried to add my code. However when I try to manually trigger the event, it just gives me the message load_module CvRandomEventInterface, and nothing happens.

Any idea what I'm doing wrong?
 
You've messed up the intendation in the python file.
Look at it more closely, with an editor, how can show the intendation better (i guess, notepad++ can do that), and redo it.

And acitvate the python exceptions (will not help here, i guess, but it's never wrong).
Go to My Documents\My Games\BtS\Civilizatin4.ini, open it with a texteditor, and change

PHP:
; Set to 1 for no python exception popups
HidePythonExceptions = 1

to

PHP:
; Set to 1 for no python exception popups
HidePythonExceptions = 0
 
Top Bottom