I copied this script to teutonic campaign, replacing Rome with Magdeburg, papal_states with hre, and peasants with zweihanders. But when i attack this city, nothing happens.
Spoiler Alert, click show to read:
I copied this script to teutonic campaign, replacing Rome with Magdeburg, papal_states with hre, and peasants with zweihanders. But when i attack this city, nothing happens.
Spoiler Alert, click show to read:
What happened to the top part of the script (radar control etc) I hope it was there?
Looks like a logic flaw:
NOT under siege = counter zero
Under siege = counter one
Now you are asking for 'counter one' but your event is 'under_siege'
Remove this line and try again:
and I_CompareCounter magdeburg_siege = 0
For an easy check increase the number of units to 20 - that will fill up the garrison completely, excess units will not be created.
Another option would be to change the event to 'GeneralAssaultsResidence' with conditions specifying the settlement, then the compare_counter line should work.
So this tutorial is wrong? I copied weissnicht script and changed only city and faction. I thought this will work.
It wasn't, i don't change anything else, just added this script.
Then the script was faulty. Let me give it a shot in Bare Geomod and see if I can get an error message.
Edit: I don't know if it was because I capitalized the name of the unit, but it works (units spawn when besieging):
Code:; ; Campaign script ; script restrict_strat_radar false ;---------- Counter ---------- declare_counter magdeburg_siege ;---------- Garrisonscript ---------- monitor_conditions not I_SettlementUnderSiege Magdeburg set_counter magdeburg_siege 0 end_monitor monitor_conditions I_SettlementUnderSiege Magdeburg and I_CompareCounter magdeburg_siege = 0 if I_SettlementOwner Magdeburg = hre create_unit Magdeburg, Zweihander, num 20, exp 1, arm 1, wep 2 end_if set_counter magdeburg_siege 1 end_monitor ; keep script unfinished until last monitor termination wait_monitors end_script
Should i copy all this code or just capitalize unit's name? In fact, both ways doesn't make change.
Yes it is, no doubt about that.
I have just re-read from #21 onward: you are saying you copied the script to the teutonic campaign. That is a default campaign - how do you start it?
Have you ever run this tutorial? If not, do so from step 3 onward, including the deleting of the Med2 folder in the VirtualStore
Sorry, i have win xp, not vista or 7. And what do you mean by:"That is a default campaign - how do you start it?"?
Normally the teutonic campaign is started through the desktop icon that is provided by the installation of the kingdoms campaigns. That desktop shortcut uses the CFG file in the root folder of the game which does not have the file_first command which is necessary for edited files to be recognized.
The campaign_script is one of the files that is not effected by this as it is one the unpacked files - just a general thought of mine until I checked the original installation.
Can you do me a favor? Download Bare Geomod (kingdoms version) and use the attached campaign_script (adjusted as I said Frankfurt-->Magdeburg) and descr_strat (Venetian army next to Frankfurt). Then play Venice and attack Frankfurt and see if it works.
Yes, i created a bat file to run this teutonic modification. I did like you said, i have this army near Frankfurt, but still no new units in city.
Sorry i did it wrong way, now it's working in Bare Geomod. But now, how to set it right in teutonic script? Copy script and put at the bottom lines? If i replace those files, i loose original scripts like Kalmar Union, etc.
In post #26 I have now marked which is your independent script part. for easy working I would suggest to copy that part into the other script right under the 'script' entry (under line 4 of he code in post #26).
General guideline: look for a 'end_monitor' line. that is always the end of an individual script part and yu copy a new script part right under it (before the next script part begins. Most modders leave two empty lines at the end of a script part for easy identification.
Now its finally working, appreciate your help uncle Gig![]()
I wonder if i can edit my garrison script, to create additional units, after making specified building? Also, is it possible, to make "major" garrison script? That will monitor all faction citys, without scripting every settlement on the map one after another?