muzbang
Prince
- Joined
- Feb 22, 2007
- Messages
- 319
Hello
I'am trying to create a non random event ( a quest for a specific civilization - in FFH2)
In the Civ4EventTriggerInfos, i wrote this code :
So that's simple. 100%game active, iWeight=-1 for the event to trigger when conditions are met.
Conditions are very simple... just need the amurite civilization, and i pick one of their cities.
That said, i expected the event to occur the turn after the 1st settler build a city (basically turn 2)
But the event don't trigger.
More surprisingly, i can trigger the event manualy (ctrl+maj+E).
As far as i know, it's only possible to trigger like this an event that has met his prereq conditions.
So why doesn't the event trigger automatically turn 2 ? or why can i trigger it manualy ?
Last thing... as i'am not totaly sure about the <PrereqCivilizationPleased> tag, i also tried to set a prereq with python
i removed the <PrereqCivilizationPleased> tag
and added
+ added in the CvRandomEventInterface.py
There again, the event don't trigger turn 2, but i can manually fire it
I guess this must be a very simple mistake...
Thanks for advises !
I'am trying to create a non random event ( a quest for a specific civilization - in FFH2)
In the Civ4EventTriggerInfos, i wrote this code :
Code:
<EventTriggerInfo><!-- QUEST_AMURITES -->
<Type>EVENTTRIGGER_QUEST_AMURITES</Type>
<WorldNewsTexts>
<Text></Text>
</WorldNewsTexts>
<TriggerTexts>
<TriggerText>
<Text>TXT_KEY_EVENT_TRIGGER_QUEST_AMURITES</Text>
<Era>NONE</Era>
</TriggerText>
</TriggerTexts>
<EventArt>Art\EventImages\e_AMURITES_QUEST.dds</EventArt>
<bGlobal>0</bGlobal>
<iPercentGamesActive>100</iPercentGamesActive>
<iWeight>-1</iWeight>
<bPickCity>1</bPickCity>
<PrereqCivilizationPleased>CIVILIZATION_AMURITES</PrereqCivilizationPleased>
<Events>
<Event>EVENT_QUEST_AMURITES_1</Event>
</Events>
<PythonCanDo></PythonCanDo>
</EventTriggerInfo>
So that's simple. 100%game active, iWeight=-1 for the event to trigger when conditions are met.
Conditions are very simple... just need the amurite civilization, and i pick one of their cities.
That said, i expected the event to occur the turn after the 1st settler build a city (basically turn 2)
But the event don't trigger.
More surprisingly, i can trigger the event manualy (ctrl+maj+E).
As far as i know, it's only possible to trigger like this an event that has met his prereq conditions.
So why doesn't the event trigger automatically turn 2 ? or why can i trigger it manualy ?
Last thing... as i'am not totaly sure about the <PrereqCivilizationPleased> tag, i also tried to set a prereq with python
i removed the <PrereqCivilizationPleased> tag
and added
Code:
<PythonCanDo>CanTriggerQUEST_AMURITES</PythonCanDo>
+ added in the CvRandomEventInterface.py
Code:
def CanTriggerQUEST_AMURITES(argsList):
kTriggeredData = argsList[0]
pPlayer = gc.getPlayer(kTriggeredData.ePlayer)
if pPlayer.getCivilizationType() != gc.getInfoTypeForString('CIVILIZATION_AMURITES'):
return False
return True
There again, the event don't trigger turn 2, but i can manually fire it
I guess this must be a very simple mistake...
Thanks for advises !
Last edited: