killerkebab
Prince
- Joined
- Jun 25, 2009
- Messages
- 571
Can I load the game I had going previously and check for less lag, or does it not work that way?
No, you can't. The Triggers aren't saved together with the RFC stuff anymore, but in another place (actually in a tile object ). This prevents constant pickling and storing of large amounts of data, which takes time.Can I load the game I had going previously and check for less lag, or does it not work that way?
Trigger().turn(97,120).name("Romola","Roma").once()
Oh, good!EDIT: oh now it works...i just started another game...
so i can't test and modify the triggers while playing like with pyton?
The technical explanation is that when the Python automatically reloads (and I mean all of it) then all "objects" are also created again. This means that all old objects expire - and this also affects the PyScenario object holding the list of Trigger objects, containing Condition and Action objects, and so on.3.8 Reloading Triggers
Any time a Python module associated with the mod is saved during gameplay, then all the Python modules will be reloaded. (You will probably be editing your Scenario module while the game is running.) When this happens all the Triggers that were loaded on initialization are instantly lost!
To reload all Triggers you need to use the shortkey shift + alt + R. But this will only work if the Scenario module really has been re-saved! (Otherwise reloading will erase the Triggers from the memory... Save the module and reload the Triggers once again.)
No, not with the current setup. I do however intend to build in support for using the PyScenario classes (mainly Conditions and Actions) in regular Python programming. So instead of learning how make iteration happen and how to decipher the CivIV Python API, there would be another procedure to follow. But it would be actual Python programming - with some useful tools.I have another question: is it possible to trigger an event only if more than one specific civilization is not human? (example: I want to spawn some units only if Rome and Greece are not human)
This exact thing is something I intend to work on tonight! (As I already did the new Actions mentioned in a post above.)oh and it would be cool if one event could be triggered only if two civilizations are at war (or in peace)
ummm but by doing so depending on how i set trigger the player could lose or acquire a city for free...In your case, since the human player wouldn't be likely to see any of the spawned units - could it be sufficient to simply flip the Greek city to the Romans (if this is what the purpose would be)?
I think that they should be counted as in peace (for the case that they already met once and they lost contact i don't know °_°)Should such a situation count as a positive or a negative outcome?
Ok, next up is a feature that can be used to tie together Triggers into larger events.I have another question: is it possible to trigger an event only if more than one specific civilization is not human? (example: I want to spawn some units only if Rome and Greece are not human)
This is something I've tried to avoid from the get-go; the flip() Action actually has built-in conditions:ummm but by doing so depending on how i set trigger the player could lose or acquire a city for free...
So what you do is:flip( name=None, eOwner=None, bMinorsOnly=True, bAIOnly=True, bSafe=True )
(...)
Only cities belonging to Minor Civs and controlled by the AI are, by default, subject to city flipping. These settings (bMinorsOnly and bAIOnly, respectively) can however be altered.
flip(bMinorsOnly=False)
flip(bMinorsOnly=False,bAIOnly=True)
But why would you wanna know if, say, the Spanish are at peace with the Aztecs - if they haven't met? What Actions would you use in such a Trigger with that Condition?I think that they should be counted as in peace (for the case that they already met once and they lost contact i don't know °_°)
But why would you wanna know if, say, the Spanish are at peace with the Aztecs - if they haven't met? What Actions would you use in such a Trigger with that Condition?
Yeah, this is actually how it works now.Don't know...maybe there should be a third ouput that means that they have not met? (so it would fail when controlling both if they are at war and if they are not)
But it could be turned the other way around if need be. (Then the Condition would always pass if there is no contact.) Actually, this could be a setting in itself - whether or not the Condition should pass with no contact. What do you think? (Arguments with default settings hardly make it more cumbersome to use the method, but it does clutter up the API entry with additional information.)
You mean like a contact() Condition or the like? It isn't sufficient to use the war() method and set it to look for a peace treaty (as described above)? Because if the two sides haven't met, then the Conditions isn't met either.i think that it could be useful to have some way to know if two civilization have met or not...
Not quite. I've renamed the flag() Condition triggers() and it can now be used to check whether or not several (actually any number of) Triggers have fired, making this feature somewhat more powerful.From the next update it will be possible to label individual Triggers with the label() method (...)
The new flag() Condition checks if a specific Trigger has fired (and thus cleared all of its Conditions). (...)
...this means that it will be possible (...) to bind together Triggers by giving them labels and checking whether or not those Triggers have fired.
No, I actually don't think so... I think I've only been restricting the human player as I, as a rule of thumb, don't think he should get any spawns or the like. But if you can think of a use for a human-only Condition then, sure.Sorry if you've said already, but my memory is drawing a blank - is it possible to set triggers to fire only if a civ is human?