User avatar
Citizen X
General of the Army
Posts: 678
Joined: Tue Feb 02, 2010 1:34 pm

event code

Tue Sep 11, 2018 10:13 am

What does

Code: Select all

 Probability = 50


mean in the

Code: Select all

Conditions


section of an event?

User avatar
Nikel
Posts: 2367
Joined: Sun Apr 20, 2008 8:38 pm

Re: event code

Tue Sep 11, 2018 2:50 pm

The probability of happening every turn?

User avatar
Captain_Orso
Posts: 5745
Joined: Tue Sep 01, 2009 5:02 pm
Location: Stuttgart, Germany

Re: event code

Tue Sep 11, 2018 5:56 pm

Basically it adds a 50% chance of the event failing, to what ever other conditions are present.

The script engine goes through the Conditions section from top to bottom, and if all statement are Boolean "True", then the event fires successfully and does what is in the Actions section.

A quick explanation of Events.

Nearly always before the event is actually evaluated, there is a statement selecting a faction, and sometimes a region. These are for the script engine to use as a default reference during evaluating the event.

'StartEvent' starts the script engine evaluating the event, and ends with 'EndEvent'.

The parameters are separated into fields by '|' (pipe character). The position of a field within a statement determines the meaning of the field content.

eg: StartEvent = USA_DistantBlockade_FtMonroe|999|0|NULL|NULL|$Ft_Monroe_VA|NULL

USA_DistantBlockade_FtMonroe : Unique Event Name

999 : Occurrences - How often an event may be evaluated.
- 0 = Never (although other events can change this value to turn an event on or off.
- 1 = The event will be evaluated, until it was completed successfully once, or time-frame conditions make it illogical. More to that later.
- 999 = The event will always be evaluated, unless there are time-frame conditions make it illogical.
- From 2 to 998 = Event may fire successfully this many times. This is valid, but very rarely seen.

0 : Type of Event.
- 0 = Quiet Event, the event will not output an event message to the message box nor have a pop-up.
- 1 = Line Event, a 1-line fixed text from the strings database will appear in the message box, if the event was successfully fired.
- 2 = Pop-up Event, not only is a line message generated, but if you click on the line text in the message box, a pop-up will be displayed, generally with an illustration, some extra text (often simply historical flavor), and possibly some accompanying sound or song.

NULL = If a pop-up event, the pop-up event's pop-up text-name. The text itself is found in the strings database.

NULL = If a pop-up event, the pop-up event's graphics.

$Ft_Monroe_VA : If the event fires successfully, AND is at least a Line Event, clicking on the Line Text will position the map to this region.

NULL = If a pop-up event, the pop-up event's sound file.


Conditions

Nearly all events have MinDate and MaxDate, which determine the time-frame within which the event may successfully fire.

There are very many conditional statements, which may be evaluated. Probability is simply one of them.

User avatar
Citizen X
General of the Army
Posts: 678
Joined: Tue Feb 02, 2010 1:34 pm

Re: event code

Tue Sep 11, 2018 10:20 pm

Thanks for your insight

User avatar
Captain_Orso
Posts: 5745
Joined: Tue Sep 01, 2009 5:02 pm
Location: Stuttgart, Germany

Re: event code

Wed Sep 12, 2018 5:04 pm

What event are you looking at?

User avatar
Citizen X
General of the Army
Posts: 678
Joined: Tue Feb 02, 2010 1:34 pm

Re: event code

Wed Sep 12, 2018 6:18 pm

I am still trying to determine why Nizami Cedid wouldn't come out of "locked" state (TUR Reforms.sct). Nor does Empire Reforms.

All conditions are met as far as my understaning goes.

User avatar
Captain_Orso
Posts: 5745
Joined: Tue Sep 01, 2009 5:02 pm
Location: Stuttgart, Germany

Re: event code

Sun Sep 16, 2018 12:10 am

I've had some time to start analyzing this script.

First preliminary results are that several events have 2 (two) MinDate parameters:


evt_nam_TUR_EmpireReformFailure_Test1807Above100
MinDate = 1807/06/01
MinDate = 1808/01/01

evt_nam_TUR_EmpireReformFailure_Test1807Below100
MinDate = 1807/06/01
MinDate = 1808/01/01

evt_nam_TUR_EmpireReformFailure_Test1808Below100
MinDate = 1808/01/01
MinDate = 1810/01/01

Assuming that the later date ought to be MaxDate, this will, at best, cause these events to only possibly be successful after what their MaxDate was intended to be, because it would be the first point in time, when both MinDate parameters would be TRUE, as the events are currently written.

Return to “WON Technical support / Aide technique”

Who is online

Users browsing this forum: No registered users and 8 guests