Condition test

Moderators: Balthagor, Legend, Moderators

Message
Author
Hullu Hevonen
General
Posts: 3601
Joined: Dec 11 2008
Location: Turunmaa/Turunseutu, Suomi
Contact:

Condition test

#1 Post by Hullu Hevonen » Dec 28 2013

45 Condition Test Email/News # (optional) i0: Condition To Test (#)
i1 etc: Condition Parameter
f0 etc: Condition Parameter Test a Condition (list coming soon).
Event ID set to 'True' if Condition met or when eventbcondnot=1 if condition NOT met.
Email only sent if Condition met.
Was wondering about that list. What conditions can you set?
Happy Linux user!
Links: List of Mods

User avatar
Balthagor
Supreme Ruler
Posts: 20742
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: Condition test

#2 Post by Balthagor » Dec 28 2013

Started another new wiki page;

http://www.supremewiki.com/node/308
Chris Latour
BattleGoat Studios
chris@battlegoat.com

User avatar
Balthagor
Supreme Ruler
Posts: 20742
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: Condition test

#3 Post by Balthagor » Dec 28 2013

The list is incomplete, but you got the first 20...
Chris Latour
BattleGoat Studios
chris@battlegoat.com

vahadar
Lt. Colonel
Posts: 247
Joined: May 19 2010
Human: Yes

Re: Condition test

#4 Post by vahadar » May 23 2014

is there a way to test if a region is in a sphere? to trigger specific events?
I see that you can test if it is in allies/axis alliance but i'm looking only for a "leaning to sphere" test
edit : nevermind, found in the wiki :

Region Sphere Check

i1=0: Strong Axis
i1=1: Strong or Weak Axis
i1=2: Neutral
i1=3: Strong or Weak Allied
i1=4: Strong Allied

vahadar
Lt. Colonel
Posts: 247
Joined: May 19 2010
Human: Yes

Re: Condition test

#5 Post by vahadar » May 24 2014

is there a way to test in event 45 if a region have a certain tech (by id) or not?

also on event surrender/elimination, what does i2: 1=Research Merge exactly do? brings all tech of fallen nation to the victor?

vahadar
Lt. Colonel
Posts: 247
Joined: May 19 2010
Human: Yes

Re: Condition test

#6 Post by vahadar » May 25 2014

Hello,

Some more questions about events (still need answers for above^^), big wall of request [_]O

- "eventbcondnot" : if i understand it right, specifying NOT here invert the condition check, so a greater than or equal become a less than or equal.
Does it also work for all conditions in an event 45 checks ? a minimum check become a maximum check (exemple for Region has colonies, 1 or more can become 5 or less) ?
The parameter for "eventbcondnot" is nothing = default and 1 = not, or i should write TRUE? http://www.supremewiki.com/node/305 for event 45 it says 1 for not.

- Event 45 AND OR NOT : they can take up to 3 event IDs if i understand right? but how to tell which previous event to look? As far i know, eventID is not the id of a specific event but the id type of an event. Or they must happen same time with an event 45?
this seems much more powerfull than the "eventconditional" & "eventconditional2" (they seem to work like AND/NOT depending on check done), what is the exact difference then, simpler way to write it (instead of writing 3 consecutive event with eventconditional)?

- TBA, what does this word mean in the wiki for event 45 (ie for i0=17)?

- "eventbnotally", "eventbnotneutral", "eventbnotwary", "eventbonlyff", "eventbonlyreg", what are they and how do they work, parameters?

- "eventbdoalways", "eventbpersist", what is the difference between those? first will repeat infinitly while second will check persistantly but occur just once? what are the parameters?
in this case is "eventpersistcount" related here? how it works, parameters?
If "eventdoalways" always repeat an event, how to specifiy the time between 2 events?

- "eventballowdead", what does it do? allow a dead country to be played for example? what event is it linked to and what parameters?

- "eventparam", when refering to an email, it needs the email id? when optional parameter can the system build email automaticly depending on event if true?

- Test for human player. In wiki for event 45, on entry no14 : "Set to true if region (or otherregion if defined) is Human player ", what are the parameters, just i0=14 ? :)
what is the relation with those if any : "eventbnotifhuman", "eventbnotifotherhu" and how do they work, parameters?

- "eventbresvd1", "eventbresvd2", what are they?

I know its a lot of questions ^^ but like this, all holes in the wiki will be filled and my understanding of events complete :p also i read the list of parameters for event 45 is incomplete, could we have more details? :roll:

Thanks in advance !

vahadar
Lt. Colonel
Posts: 247
Joined: May 19 2010
Human: Yes

Re: Condition test

#7 Post by vahadar » May 29 2014

Mister devs, when you have some free time, feel free to enlight me, would be aswome :wink:

Hullu Hevonen
General
Posts: 3601
Joined: Dec 11 2008
Location: Turunmaa/Turunseutu, Suomi
Contact:

Re: Condition test

#8 Post by Hullu Hevonen » May 29 2014

I will also look at this when I have time, I should be getting more time to do modding in the next few weeks :)
Happy Linux user!
Links: List of Mods

User avatar
Balthagor
Supreme Ruler
Posts: 20742
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: Condition test

#9 Post by Balthagor » May 29 2014

You may need to keep bumping this periodically, work on the next update is keeping me busy currently.
Chris Latour
BattleGoat Studios
chris@battlegoat.com

dax1
Colonel
Posts: 448
Joined: Apr 05 2012
Human: Yes
Location: Italy

Re: Condition test

#10 Post by dax1 » May 30 2014

vahadar wrote: - "eventbnotally", "eventbnotneutral", "eventbnotwary", "eventbonlyff", "eventbonlyreg", what are they and how do they work, parameters?

- "eventparam", when refering to an email, it needs the email id? when optional parameter can the system build email automaticly depending on event if true?

- Test for human player. In wiki for event 45, on entry no14 : "Set to true if region (or otherregion if defined) is Human player ", what are the parameters, just i0=14 ? :)
what is the relation with those if any : "eventbnotifhuman", "eventbnotifotherhu" and how do they work, parameters?
- "eventbnotally", "eventbnotneutral", "eventbnotwary".
if u set it 1 it means event don't happen if country are ally-neutral-at war

- "eventparam": mail id are in default.newsitems and LocalText-Newsitems.csv! of course you can add new id

- Test for human player: yes just i0=14
about the relation..this is a test.
with eventbnotifhuman=1, the event don't happen if eventdbregion is player
with condition test you can test many region
example:
if A is human
if B is human
if C is human
if A or C is human x is true
if x is true and relation between b and c is less xy% set war
Con forza ed ardimento


Hullu Hevonen
General
Posts: 3601
Joined: Dec 11 2008
Location: Turunmaa/Turunseutu, Suomi
Contact:

Re: Condition test

#12 Post by Hullu Hevonen » Aug 27 2014

Is there a condition test for user feedback, say I click yes or no on something and that then has the following effects?
EDIT: is it also possible to condition say declaration of war events like, ev2 or 17? or does everything have to be hardcoded/hard evented/set in stone?
Happy Linux user!
Links: List of Mods

User avatar
Balthagor
Supreme Ruler
Posts: 20742
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: Condition test

#13 Post by Balthagor » Aug 27 2014

Hullu Hevonen wrote:Is there a condition test for user feedback, say I click yes or no on something and that then has the following effects?
Sorta. If you experiment with an objective, you'll learn how to test if the objective has been accepted or not. You can use the "accept" news item property for any news item/message. You can test on a given day if the player has accepted or not, but that's more of a "you have X days to say yes". I see where you're going but we haven't tried to create any messages like these, we've only considered how possible it would be.
Hullu Hevonen wrote: is it also possible to condition say declaration of war events like, ev2 or 17? or does everything have to be hardcoded/hard evented/set in stone?
Anything can have a condition applied. If you have an event line for an event type 2, DoW, it can use the condition ID fields to be linked to up to two events with an AND or and OR statement. Event ID 5062 in the '36 events file is a DoW Germany to Luxemburg. It only happens if ID 7332 is true. It has no second condition check. 7332 could itself be a condition test, type AND, to look at up to 3 more events that could condition test 3 different things. I didn't actually look up 7332 to see what it is.

Our goal is that DoWs always have conditions, but the trick is finding the right conditions.
Chris Latour
BattleGoat Studios
chris@battlegoat.com

Hullu Hevonen
General
Posts: 3601
Joined: Dec 11 2008
Location: Turunmaa/Turunseutu, Suomi
Contact:

Re: Condition test

#14 Post by Hullu Hevonen » Aug 27 2014

Balthagor wrote:
Hullu Hevonen wrote:Is there a condition test for user feedback, say I click yes or no on something and that then has the following effects?
Sorta. If you experiment with an objective, you'll learn how to test if the objective has been accepted or not. You can use the "accept" news item property for any news item/message. You can test on a given day if the player has accepted or not, but that's more of a "you have X days to say yes". I see where you're going but we haven't tried to create any messages like these, we've only considered how possible it would be.
Hullu Hevonen wrote: is it also possible to condition say declaration of war events like, ev2 or 17? or does everything have to be hardcoded/hard evented/set in stone?
Anything can have a condition applied. If you have an event line for an event type 2, DoW, it can use the condition ID fields to be linked to up to two events with an AND or and OR statement. Event ID 5062 in the '36 events file is a DoW Germany to Luxemburg. It only happens if ID 7332 is true. It has no second condition check. 7332 could itself be a condition test, type AND, to look at up to 3 more events that could condition test 3 different things. I didn't actually look up 7332 to see what it is.

Our goal is that DoWs always have conditions, but the trick is finding the right conditions.
Ok, thanks, I'll start trying out objectives, how does the AI handle events and objectives, can it pick one option or does it default a true value? Since I plan to make it possible to choose for countries different outcomes, and these outcomes will effect other events in other countries. Thanks for that example event, it helped alot.

EDIT: Have you planed in a sense making an empty event that returns a true/false value depending on the user response? Then you could use a condition test to test the event.
Happy Linux user!
Links: List of Mods

User avatar
Balthagor
Supreme Ruler
Posts: 20742
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: Condition test

#15 Post by Balthagor » Aug 27 2014

Hullu Hevonen wrote:Ok, thanks, I'll start trying out objectives, how does the AI handle events and objectives, can it pick one option or does it default a true value?
They don't. AI regions don't respond to objectives. You should use "not if human" events for what you want the AI to do that parallels the player actions.
Hullu Hevonen wrote:EDIT: Have you planed in a sense making an empty event that returns a true/false value depending on the user response? Then you could use a condition test to test the event.
Let me know if it works...
Chris Latour
BattleGoat Studios
chris@battlegoat.com

Post Reply

Return to “Modding 1936”