Jump to content
Age of History
  • 1
ckobbrf

Help me configure trigger in event

Question

id=generic_socialist_revolution
title=generic_socialist_revolution.t
desc=generic_socialist_revolution.d
 
image=generic_communist_revolution.png
 
show_in_missions=false
 
only_once=false
 
trigger_and
next_and
random_chance=6
year_over=1850
year_below=1970
next_and_not
civ_government_is=10
next_or
civ_capital_unrest_over=25
civ_capital_is_occupied=true
trigger_and_end
 
option_btn
name=AcceptRevolt
ai=15
legacy=-50
change_ideology=10
bonus_duration=5
bonus_units_attack=-3
bonus_duration=5
bonus_units_defense=-1
bonus_duration=5
bonus_discipline=-4.5
bonus_duration=5
bonus_siege_effectiveness=-12.5
bonus_duration=5
bonus_max_morale=-25
bonus_duration=5
bonus_army_movement_speed=-2.15
option_end
 
option_btn
name=RejectRevolt
ai=15
legacy=50
bonus_duration=5
bonus_units_attack=-4
bonus_duration=5
bonus_units_defense=-3
bonus_duration=5
bonus_discipline=-7.5
bonus_duration=5
bonus_siege_effectiveness=-25.5
bonus_duration=5
bonus_max_morale=-40
bonus_duration=5
bonus_army_movement_speed=-5.15
option_end


// I want to make the event appear when all the conditions above are met and one of these is optional the capital is occupied or the unrest in the capital is over 25, but it appears regardless of the set conditions at a random time

Безымянный.png

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
25 minutes ago, Łukasz Jakowski said:

but what is wrong?

You don't have to use everytime 'bonus_duration=5'
Declare it only once per button(option_btn) at the beginning

 

it does not follow the conditions, but appears immediately after the start of the game, although the conditions are not met, I want to understand what the problem is?
Perhaps I incorrectly specified the next_or check or made a mistake before that, I want to figure out why it appears even when the conditions are not met: either the capital is occupied or the unrest in the capital is over 25

Share this post


Link to post
Share on other sites

  • 0

Read it like that:

Firrst trigger, if true the event is run

AND:
random_chance=6

AND:
year_over=1850

AND:
year_below=1970

AND NOT:
civ_government_is=10

Second trigger, if true then the event is run.

OR:
civ_capital_unrest_over=25

Third trigger, if true then the event is run.

OR:
civ_capital_is_occupied=true

 

If one of these is true then the event is run!

 

I think it should be like that:

Use separate triggers

trigger_and
next_and
random_chance=6
year_over=1850
year_below=1970
trigger_and_end


trigger_and_not
next_and
civ_government_is=10
trigger_and_not_end


trigger_or
next_and
civ_capital_unrest_over=25
civ_capital_is_occupied=true
trigger_or_end

 

 

Then it will be like that:

First trigger, if true then event is run:
 

trigger_and
next_and
random_chance=6
year_over=1850
year_below=1970
trigger_and_end


trigger_and_not
next_and
civ_government_is=10
trigger_and_not_end

Second trigger, if both(unrest and occupied) are true then event is run
 

trigger_or
next_and
civ_capital_unrest_over=25
civ_capital_is_occupied=true
trigger_or_end




 

Share this post


Link to post
Share on other sites

  • 0
24 minutes ago, Łukasz Jakowski said:

Read it like that:

Firrst trigger, if true the event is run

AND:
random_chance=6

AND:
year_over=1850

AND:
year_below=1970

AND NOT:
civ_government_is=10

Second trigger, if true then the event is run.

OR:
civ_capital_unrest_over=25

Third trigger, if true then the event is run.

OR:
civ_capital_is_occupied=true

 

If one of these is true then the event is run!

 

I think it should be like that:

Use separate triggers

trigger_and
next_and
random_chance=6
year_over=1850
year_below=1970
trigger_and_end


trigger_and_not
next_and
civ_government_is=10
trigger_and_not_end


trigger_or
next_and
civ_capital_unrest_over=25
civ_capital_is_occupied=true
trigger_or_end

 

 

Then it will be like that:

First trigger, if true then event is run:
 

trigger_and
next_and
random_chance=6
year_over=1850
year_below=1970
trigger_and_end


trigger_and_not
next_and
civ_government_is=10
trigger_and_not_end

Second trigger, if both(unrest and occupied) are true then event is run
 

trigger_or
next_and
civ_capital_unrest_over=25
civ_capital_is_occupied=true
trigger_or_end




 

Thank you so much!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Age of History Games