Well here's the code for my first programmed event. Let me know what you guys think, and if you spot any little coding errors.
Code:
vent = {
id = 222222
random = no
trigger = {
exists = TEX
}
name = "Texas Oil is in demand"
desc = "Texas oil has an added natural lubricant that is high in demand for machine parts. The capitalists need this oil to make top notch machine parts for their factories and is anxious for a strategic occupation and annexation of Texas. The lower class however, is not too thrilled at the idea of war for a luxury good."
style = 0
action_a = {
name = "Perhaps diplomacy is a better idea."
command = { type = pop_militancy which = capitalists value = 3 }
command = { type = pop_militancy which = clerks value = 1 }
command = { type = pop_militancy which = soldiers value = -2 }
command = { type = pop_militancy which = officers value = -2 }
command = { type = pop_militancy which = labourers value = -2 }
command = { type = relation which = TEX value = 5 }
action_b = {
name = "Let us claim their lands for the glory of our people."
command = { type = war which = TEX }
command = { type = relation which = TEX value = -25 }
command = { type = capitalist_bonus value = 3 }
command = { type = pop_militancy which = capitalists value = -2 }
command = { type = pop_militancy which = clerks value = -1 }
command = { type = pop_militancy which = soldiers value = 1 }
command = { type = pop_militancy which = officers value = 1 }
command = { type = pop_militancy which = labourers value = 1 }
}
}