That's only for the individual crusaders though, nobody thought to advance the idea further. Taiji's idea focuses on disbanding whole arrays of units, wherever they may be in your armies, if you get it bad with the pope.
Last edited by SigniferOne; April 03, 2010 at 09:31 PM.
"If ye love wealth greater than liberty,
the tranquility of servitude greater than
the animating contest for freedom, go
home from us in peace. We seek not
your counsel, nor your arms. Crouch
down and lick the hand that feeds you,
and may posterity forget that ye were
our countrymen."
Yeah, they disband the crusader's units when he's gone. I'm talking about you hiring units throughout your campaign, units widely dispersed across all your armies, triggered by papal excommunications or other non-scripted normal changes in game's diplomacy, status, etc.
The crusader's soldiers were made to appear by script and disappeared by script, so everyone assumed applications of this were localized to scripted triggering.
Last edited by SigniferOne; April 03, 2010 at 09:38 PM.
"If ye love wealth greater than liberty,
the tranquility of servitude greater than
the animating contest for freedom, go
home from us in peace. We seek not
your counsel, nor your arms. Crouch
down and lick the hand that feeds you,
and may posterity forget that ye were
our countrymen."
....triggered by papal excommunications or other non-scripted normal changes in game's diplomacy, status, etc.
Which then can be tested through script (IsCrusade, FactionExcommunicated, DiplomaticStanceFactions) and applied to disbandment (and recuitment obviously) of units? Or am I understanding wrongly what you meant?
I have to agree with gigantus. Only specific units allowable in crusades would have the attribute. All other units in the crusade would and could be regular units in your army or even mercenary units. Ifyou disband these (say a mailed knight) you may aswell say good bye to your army at home too!
You have to be very selective of the units you give the attribute too. When giving it to crusader units you have have to be very selective. Is the unit ONLY recruitable by a crusading general? or can i simply train the unit at home?. If i can train the unit at home and then some script disbands them, that could destroy me and therefore any of the AI factions home armies. If only the units available to a crusading general had these, then only my crusading army would disband. Not including regular units that joined with the crusaders. They would be left alone.
Using the attribute is a great idea and fantastic. But it has to be very well thought out before using it.
When i was writing my Garrison script i wanted to use a special unit just for the garrison. Or a select few. Give them the attribute and destroy them after the siege. Noone would be able to recruit these units as they would be only available by script. That was my original idea 2 years ago. But i couldnt find anyone to make the units for me. So i wrote the script without it.
...longbows, in skilled hands, could reach further than trebuchets...
Basically all you have to do is to copy an existing unit in the EDU, give it a different name, enter the attribute, add some lines in text\export_units and you are set.
The idea of specific garrison_units is excellent - I suspect the only reason T's ideas weren't taken up at the the time was down to lack of vacant slots in the EDU.
I'm sure there's a few units we could remove from SS (for example) to make way for specific garrison_units - 1 spear / 1 archer / 1 sword / 1 x-bow / 1 pike -
Although they'd have to be common across all cultures / factions, or they start eating up serious amounts of EDU slots.
(Or removing lots of units from the main faction roster.)
--
Re removing pirate ships - seems to work most of the time, but I'm finding odds and ends left over in some places,
ships which originally have 25 crew are left with 2 - 5.
I wondering if the script only removes the basic crew size (20), rather the actual number which depends on what size units you're using generally.
I know some of the pirate ships get hit by storms so that may account for some variation in the size of the remaining crew?
Once they are reduced to this size (2 -5) the script doesn't seem to affect them any more whenever it subsequently fires.
The idea of specific garrison_units is excellent - I suspect the only reason T's ideas weren't taken up at the the time was down to lack of vacant slots in the EDU.
That is correct. The garrison script was originally written for stainless steel, and they have the 500 unit limit.
The other way around it, which is a little hard to exaplin... is what is called a 'Dummy' faction. Its not really a faction as it does not take up a faction slot. But you can have as many 'dummy' factions as you like. Basically, Every unit (or a select few) is available to this dummy faction, All units available to the dummy faction are available to every other faction, thus creating a super 'dummy' faction. (A faction that in essence could have every unit at its disposal). In that sense, you would/could make English Longbow available to Egypt. The trick, however, is that egypt will never be able to train this unit, because it isnt specified in the EDB. But the unit can be spawned via script. The dummy faction idea simply removes the silver surfer effect you get when a unit spawns for a faction it is not otherwise meant to have.
That same idea, except a select few uinits that are available to every faction, thus creating your dummy 'garrison' faction. These units are given the attribute to be able to destroy them. The units would only be available through script so would only be on the map at your choosing.
The reason you would have multiple dummy factions (possibly with different units) is because there can be multiple sieges going on at once and you dont want to remove the units until after the siege. So multiple dummy factions solve that problem.
But it is as Rozanov pointed out. If its not very well thought out, you will take up a lot of unit slots in the EDU quickly.
...longbows, in skilled hands, could reach further than trebuchets...
Seems the problem with my not removing pirate ships is due to a terminate_monitor after the first instance of the destroy pirate ships
(or some other problem as no line after it fires in the campaign script!!)
The other way around it, which is a little hard to exaplin... is what is called a 'Dummy' faction. Its not really a faction as it does not take up a faction slot. But you can have as many 'dummy' factions as you like. Basically, Every unit (or a select few) is available to this dummy faction, All units available to the dummy faction are available to every other faction, thus creating a super 'dummy' faction. (A faction that in essence could have every unit at its disposal). In that sense, you would/could make English Longbow available to Egypt. The trick, however, is that egypt will never be able to train this unit, because it isnt specified in the EDB. But the unit can be spawned via script. The dummy faction idea simply removes the silver surfer effect you get when a unit spawns for a faction it is not otherwise meant to have.
That same idea, except a select few uinits that are available to every faction, thus creating your dummy 'garrison' faction. These units are given the attribute to be able to destroy them. The units would only be available through script so would only be on the map at your choosing.
The reason you would have multiple dummy factions (possibly with different units) is because there can be multiple sieges going on at once and you dont want to remove the units until after the siege. So multiple dummy factions solve that problem.
But it is as Rozanov pointed out. If its not very well thought out, you will take up a lot of unit slots in the EDU quickly.
The concept makes sense, but what exactly do you mean when you say 'dummy faction'. Adding a name to the ownership line which doesn't exist in sm_factions? And how would this mitigate EDU needs; as in, are the units being spawned under this dummy faction, rather than the faction which owns the settlement, which in turn would allow for any units to be killed off since they're localized to that faction?
I think he means that you spawn units that the faction owns (EDU ownership) but cannot build (EDB). That way when you destroy this unit for the faction you can be assured that you will only destroy previously spawned units.
Correct. The dummy faction is just like a place holder. A place for said units to call home. Even though they are in every other factions unit roster (or atleast the factions you want to be able to spawn them). They dont appear in the EDB as no one can racruit them, and you are assured that when you kill the units via script that no other units other then the ones spawned will be removed.
I guess 'dummy' faction is kind of misleading because it isnt really a faction. Its just a place holder.
...longbows, in skilled hands, could reach further than trebuchets...
I just thought of some very nice ways to use it; set up catholic religious order troops with a common attribute, and then destroy them when the faction gets excommunicated.
And also for destroying crusading mercenaries when the crusade is over.
I think they're both great ideas and I might use them (if I can work out how ). Thanks for the inspiration, Rozanov! +rep
Both scripts now in place, complete with recruit restriction for holy orders
Here, if you're interested:
Spoiler Alert, click show to read:
Code:
;crusaders go home
monitor_event FactionTurnStart FactionIsLocal
and I_TurnsSinceLastCrusade = 4
destroy_units venice crusader
destroy_units elo crusader
destroy_units milan crusader
destroy_units sicily crusader
destroy_units spain crusader
destroy_units portugal crusader
destroy_units norway crusader
destroy_units scotland crusader
destroy_units denmark crusader
destroy_units ireland crusader
destroy_units poland crusader
destroy_units hungary crusader
destroy_units hre crusader
destroy_units flanders crusader
destroy_units england crusader
destroy_units france crusader
destroy_units teutons crusader
end_monitor
;excommunication? Goodbye holy troops
declare_counter xcom
set_event_counter xcom 0
monitor_event FactionTurnStart FactionType france
and FactionExcommunicated
destroy_units france xcom
end_monitor
monitor_event FactionTurnStart FactionType england
and FactionExcommunicated
destroy_units england xcom
end_monitor
monitor_event FactionTurnStart FactionType flanders
and FactionExcommunicated
destroy_units flanders xcom
end_monitor
monitor_event FactionTurnStart FactionType hre
and FactionExcommunicated
destroy_units hre xcom
end_monitor
monitor_event FactionTurnStart FactionType hungary
and FactionExcommunicated
destroy_units hungary xcom
end_monitor
monitor_event FactionTurnStart FactionType poland
and FactionExcommunicated
destroy_units poland xcom
end_monitor
monitor_event FactionTurnStart FactionType ireland
and FactionExcommunicated
destroy_units ireland xcom
end_monitor
monitor_event FactionTurnStart FactionType denmark
and FactionExcommunicated
destroy_units denmark xcom
end_monitor
monitor_event FactionTurnStart FactionType scotland
and FactionExcommunicated
destroy_units scotland xcom
end_monitor
monitor_event FactionTurnStart FactionType norway
and FactionExcommunicated
destroy_units norway xcom
end_monitor
monitor_event FactionTurnStart FactionType portugal
and FactionExcommunicated
destroy_units portugal xcom
end_monitor
monitor_event FactionTurnStart FactionType spain
and FactionExcommunicated
destroy_units spain xcom
end_monitor
monitor_event FactionTurnStart FactionType sicily
and FactionExcommunicated
destroy_units sicily xcom
end_monitor
monitor_event FactionTurnStart FactionType milan
and FactionExcommunicated
destroy_units milan xcom
end_monitor
monitor_event FactionTurnStart FactionType venice
and FactionExcommunicated
destroy_units venice xcom
end_monitor
;Preventing recruit of holy troops
monitor_event FactionTurnStart FactionExcommunicated
set_event_counter xcom 1
end_monitor
monitor_event FactionTurnEnd I_EventCounter xcom 1
set_event_counter xcom 0
end_monitor
The EDB event restricting recruitment, 'xcom', I've set up using 'and not event_counter xcom 1' as the condition.
Perhaps I could have used a series of if's instead of making so many monitors for the xcom script... But it looked like a bad option. I'd rather have small monitor scripts firing in each instance than a large if statement that covers all of them firing each time. Perhaps I misunderstand something but it seems like the if statement route for this would cause a performance loss.
I'm trying to make a unique mision for third age total war.. the idea is to use the reinforce region script to let the player collect elven units in grey haven.. when the conditions are met the collected units must be disbanded in order to recreate the "elven are leaving middle earth idea".. as a reward i was thinking of then giving some units of unique elven soldiers..
i know that most of it is possible but i'm wondering if it's possible to disband all units in a certain settlement?
and with the trigger as a certain total of units and not interfering with the reinforce region script.. so actually first trigger the reinforce region succeeded and then clean out the settlement, is this possible?
I've been looking into this a lot but it's hard to find an answer and since i'm only a beginner in scripting it's really hard to figure this out by starting testing right away
When you disband a unit, it will disband ALL instances of that unit faction wide (or maybe it is world wide). Which means you cant just disband a single settlement of units unless those units were ONLY in that settlement.
It is a shame we cant give 'tags' to units once they are recruited/spawned, then we could simply disband individual untis as we please. if only...
...longbows, in skilled hands, could reach further than trebuchets...
It is a shame we cant give 'tags' to units once they are recruited/spawned, then we could simply disband individual untis as we please. if only...
Why can't we?
According to the docudemons it should be possible to label a certain unit when created by a script.
Hence, for example for the garrison script, it should be possible to label the units of every city differently, shouldn't it?