PDA

View Full Version : Simple Script for Kingdoms



Teia
02-27-2008, 15:30
I have a problem with a simple script for my great campaign (running Kingdoms atm); it's supposed to decimate pop in a settlement at the occurrence of an event called "test". Here's the code:

monitor_event EventCounter EventCounterType test
and EventCounter = 1

console_command add_population Paris -3700
terminate_monitor
end_monitor

Obviously, in descr_events I put:

event historic test
date 1

...and it pops-up just fine on 1081.

BUT: the population does not decrease.
I also tried this version of the script:

monitor_event EventCounter EventCounterType test
and EventCounter = 1

add_population Paris, -3700
end_monitor

but nothing changes at all. Any idea? PLEASE :help: :help:

Atilius
02-27-2008, 15:48
I think this is what you want:


monitor_event EventCounter I_EventCounter test = 1
console_command add_population Paris -3700
terminate_monitor
end_monitor

Teia
02-29-2008, 00:21
First of all, thank you for your reply!

Unfortunately, the code you proposed didn't work.
And: I definitely don't why - it seemed quite reasonable to me...

I must say that either "add_population Paris -3700" and "add_population Paris, -3700" do work in the in-game consolle. So what :furious3: ?!?!?!?

Maybe it's a matter of version: I'm running Kingdoms, which should be equal to medieval + 1.2 patch.

PLEASE :help: :help: :help: :help: :help: :help: :help: :help: PLEASE

Atilius
02-29-2008, 04:36
Unfortunately, the code you proposed didn't work.
It works just fine, but it does require you to define the event counter and use "historic_event" in the script.

I tried the code you posted, added an event to descr_events.txt and it worked for me, so I'm afraid I don't know what the problem is. I'm also running Kingdoms. I'd suggest you look at the log file; that may tell you something.

Teia
02-29-2008, 11:44
It works just fine, but it does require you to define the event counter and use "historic_event" in the script.



:404:
If "define the event counter" means declare:

event historic prova
date 1


in the descr_events.txt, I did it. If you mean something else in the script, I ask you to be more explicit, because I'm really confused about this scripting-language:dizzy2:
And where should I use the keyword "historic_event" in the script?~:confused:

Thank you again for your kind help!

Teia
02-29-2008, 11:47
It works just fine, but it does require you to define the event counter and use "historic_event" in the script.



:404:
If "define the event counter" means declare:

event historic test
date 1


in the descr_events.txt, I did it. If you mean something else in the script, I ask you to be more explicit, because I'm really confused about this scripting-language:dizzy2:
And where should I use the keyword "historic_event" in the script?~:confused:

Thank you again for your kind help!