• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

unmerged(100264)

Corporal
May 7, 2008
32
0
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 }
                   }
}
 

unmerged(100264)

Corporal
May 7, 2008
32
0
Your the man bro. And if I want to assign it to human controlled countries only?

Lol and sorry for the newbness, one more question... how do I make an event trigger when two countries are allied? Can't seem to find it on Vickywiky...

I can find it actually, but it doesn't work in the sense I want it to. I want the trigger to work when YOU the player are in an alliance with said country, no matter which country you play.
 
Last edited:

unmerged(100264)

Corporal
May 7, 2008
32
0
Shoot, if I could just figure out how to make something trigger when the player's country, regardless of which it is, is allied with a specified country, I'd have this mod out for you all to download already. Been working hard on it all day... Some real improvements for Great Power nations and some real improvements for small countries on the rise, or looking to rise.
 

Zuckergußgebäck

Den ökända hästen från Troja
11 Badges
Jan 7, 2004
8.851
2
  • Hearts of Iron II: Armageddon
  • Deus Vult
  • Europa Universalis III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Victoria 2
  • Victoria 2: A House Divided
  • 500k Club
  • Hearts of Iron IV Sign-up
Dallas94Ware said:
Your the man bro. And if I want to assign it to human controlled countries only?
ai = no

Lol and sorry for the newbness, one more question... how do I make an event trigger when two countries are allied? Can't seem to find it on Vickywiky...
alliance = { country = -1 country = [TAG] }

I am fairly confident that it will work with -1 (which means "this country" in most other triggers). You might have to experiment a bit though.
 

unmerged(100264)

Corporal
May 7, 2008
32
0
Zuckergußgebäck said:
ai = no


alliance = { country = -1 country = [TAG] }

I am fairly confident that it will work with -1 (which means "this country" in most other triggers). You might have to experiment a bit though.

That's the thing though. I'm assigned to bed rest for another day so I have time to code, but then it's back to work, so I won't have time to do much experimenting. :p

But thanks, I'm gonna make those couple changes and add a little military power, and "Victoria: Alternate Realities" will be available for you all to play and tell me how bad I suck. :p