JMRC
06-11-2007, 11:14
Hi.
This weekend I was trying to implement a new feature into EBBS and also change my current money assistance code to reduce the number of monitor_event rules.
However, it didn't work, so I would like your help to understand what I'm doing wrong here:
1. The feature was: when a (named character) general with Despoiler Trait devastates an enemy tile, the general's faction receives some money.
Note: I use the docudemon files as source for the programming rules.
So I started by this code:
monitor_event GeneralDevastatesTile FactionType seleucid
and Trait Despoiler > 0
and AgentType = named character
console_command add_money seleucid, 500
end_monitor
Apparently, it didn't work. Or maybe my concept of "devastating tile" is not correct.
2. Right now, I have the following type of code to implement the money assistance:
;monitor_event 1
monitor_event FactionTurnStart FactionType seleucid
and not FactionIsLocal
and I_TurnNumber < 100
and Treasury > 10000
and Treasury < 20001
console_command add_money seleucid, 10000
end_monitor
;monitor_event 2
monitor_event FactionTurnStart FactionType seleucid
and not FactionIsLocal
and I_TurnNumber < 100
and Treasury < 10001
console_command add_money seleucid, 20000
end_monitor
Now I would like to join it in a single monitor_event. I want to do this because I think that when the monitor_event 2 occurs and the Treasury goes into the range of the monitor_event 1, this last event is triggered, effectively giving 30000 to the faction instead of the intended 20000. Note: I'm not sure of this behavior, but it explains some distortion that I have in the money assistance. I tried to change to the code below, so that the event is only triggered once per turn:
monitor_event FactionTurnStart FactionType seleucid
and not FactionIsLocal
and I_TurnNumber < 100
if Treasury > 10000 and Treasury < 20001
console_command add_money seleucid, 10000
end_if
if Treasury < 10001
console_command add_money seleucid, 20000
end_if
end_monitor
However, this did not work because the Treasury trigger is outside the monitor_event condition. Can someone give me some help with this?
Thanks in advance.
This weekend I was trying to implement a new feature into EBBS and also change my current money assistance code to reduce the number of monitor_event rules.
However, it didn't work, so I would like your help to understand what I'm doing wrong here:
1. The feature was: when a (named character) general with Despoiler Trait devastates an enemy tile, the general's faction receives some money.
Note: I use the docudemon files as source for the programming rules.
So I started by this code:
monitor_event GeneralDevastatesTile FactionType seleucid
and Trait Despoiler > 0
and AgentType = named character
console_command add_money seleucid, 500
end_monitor
Apparently, it didn't work. Or maybe my concept of "devastating tile" is not correct.
2. Right now, I have the following type of code to implement the money assistance:
;monitor_event 1
monitor_event FactionTurnStart FactionType seleucid
and not FactionIsLocal
and I_TurnNumber < 100
and Treasury > 10000
and Treasury < 20001
console_command add_money seleucid, 10000
end_monitor
;monitor_event 2
monitor_event FactionTurnStart FactionType seleucid
and not FactionIsLocal
and I_TurnNumber < 100
and Treasury < 10001
console_command add_money seleucid, 20000
end_monitor
Now I would like to join it in a single monitor_event. I want to do this because I think that when the monitor_event 2 occurs and the Treasury goes into the range of the monitor_event 1, this last event is triggered, effectively giving 30000 to the faction instead of the intended 20000. Note: I'm not sure of this behavior, but it explains some distortion that I have in the money assistance. I tried to change to the code below, so that the event is only triggered once per turn:
monitor_event FactionTurnStart FactionType seleucid
and not FactionIsLocal
and I_TurnNumber < 100
if Treasury > 10000 and Treasury < 20001
console_command add_money seleucid, 10000
end_if
if Treasury < 10001
console_command add_money seleucid, 20000
end_if
end_monitor
However, this did not work because the Treasury trigger is outside the monitor_event condition. Can someone give me some help with this?
Thanks in advance.