Page 2 of 2 FirstFirst 12
Results 21 to 38 of 38

Thread: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on). Version 2a!

  1. #21
    Civis
    Join Date
    Jul 2013
    Location
    Colima, México
    Posts
    189

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on)

    I have not noticed that. The dodongos and firewarriors may be not recruitable because there isnīt the building dodongoīs cavern in the settlement dodongos cavern. Maybe it will work if it is added this to the file descr_strat.txt located in Medieval II Total War\mods\Hyrule\data\world\maps\campaign\imperial_campaign
    Spoiler Alert, click show to read: 
    Code:
    faction    saxons, fortified smith
    ai_label        default
    denari    10000
    denari_kings_purse    2000
    settlement castle
    {
        level town
        region Death_Mountain_Ridge
    
    
        year_founded 0
        population 400
        plan_set default_set
        faction_creator goron
        building
        {
            type hinterland_issettlement issettlement_1
        }
        building
        {
            type core_building wooden_pallisade
        }
        building
        {
            type hinterland_dodongocave dodongo_cavern
        }
    }
    I will add it either way in the next update I make.It may make the gorons even more OP.

    As far as I can remember, these units have been added in this submod: moblinox, shield ghoma, flayl knight, doomknocker, kokiri mantlet (besides being recruitable the stalfos one). I have added the wind wishes and devourer for the next update, but, What other units are missing ?

  2. #22

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on)

    Gorons are missing:
    Berserkers, which are identical to miners except they don't have armor-piercing, can go out of control, and presumably don't have to be tied to mines. Your choice on adding them.
    Bomb platforms. Because of a bug, I believe that they are invulnerable in melee combat. Please, for the love of all that is holy, do not add them.

    Gohma are missing:
    Royal Larva
    Long Legs, which are supposed to cause fear but currently don't so are kind of useless right now
    Shield Gohma

    Gerudo:
    Wind Witches
    Bronze Knuckles
    Iron Knuckles
    In another submod, they were added to the Spirit temple after you built a certain level of armory. You could do that, or something else. They're honestly not that great right now, so you could probably get away with adding them to all settlements.

    Ordona Province:
    Elder Goats. These are super-powerful, special units, that probably need some sort of limit or special recruitment method. Maybe only recruitable in provinces that actually contain the trade resource "Ordona Goats." Something like that. Your choice on whether to add them, though.

    Moblins:
    Dodoblins. These would be a lot of fun to use in the campaign, I think. Plus their name is just fun to say.

    Sheikah Cadre:
    Because the stance system was broken, it was rather difficult to get Spies, Monks, Truthbearers, and Blood Wizards; I know that I never got anything beyond Spies, at any rate. Because you fixed this, it may not be a problem any more, but there's also the option of making them recruitable as a back-up measure.

    Darknuts:
    Dishonored. Your choice, fully. I like that you added the Doomknockers, and I'd understand if you don't add the Dishonored, but in the Custom Battle selection, these are listed as Darknut units rather than Mercenaries. The only real reason to make these recruitable is for an anti-cavalry measure.

    Faires:
    Phantoms of Tarm.

    River Zora:
    Octozora.

    As far as I can tell, everything else is accounted for either by you or by default. I hope that helps.

  3. #23

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on)

    I'm sorry to double-post, but I don't believe I can yet edit my posts on account of not having posted enough. Anyways, I forgot to mention that some factions cannot actually recruit their generals; these are the Sheikah, the Gohma, the Kingdom of Ikana, and the Order of the Wizzrobe. Further, they never seem to receive any more as the campaign progresses. This is a problem, as they are clearly supposed to be able to recruit generals, unlike the River Zora and the Stalfos, who have no locus of power yet receive periodic generals. The Sheikah are also unable to recruit Spies and Assassins - the map agents, rather than the battle units - which is wrong, as the Hylians get them, and the models are already in the game and everything. I don't know how far you intend to take this submod, but I figured I'd at least mention these here as well.

  4. #24
    Jakeford's Avatar Ducenarius
    Join Date
    Mar 2013
    Location
    EARTH
    Posts
    954

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on)

    Kingdom of Hyrule
    Mounted Knights: Because of a mistake in coding they are unobtainable. It's seriously time that it is fixed and they are added. The Kingdom of Hyrule needs its heavy cavalry!

    By the way, Ordona Goat Lords can be obtained, they are the generals body guard so you can just train a general and you have it.
    https://www.battleforthenet.com/
    Go to this site and call your congressmen!
    Do not le the FCC destroy net neutrality in America!
    On Dec. 14 the FCC will vote on whether to destroy net neutrality or not! Congress can stop them beforehand, so tell congress and the FCC that you don't want them to ruin the internet!

  5. #25

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on)

    No, Elder Goats, not Goat Lords. Elder Goats are basically just goats the size of elephants that do an obscene amount of damage on charge but only have, peculiarly, one hit point. I know Goat Lords can be obtained, and not even as part of a General's bodyguard; they can also be obtained regularly.

  6. #26
    Civis
    Join Date
    Jul 2013
    Location
    Colima, México
    Posts
    189

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on)

    Okay, Iīm almost done with this submod and I added what I consider a lot of stuff. Beside adding some units (bronze,ironkucle windwishes, eldergoats, manyofthesheikas, MountedHyruleknights, somegohmas, somemoblins, fairyoftarmsthings, StalfosrecruitingFromPlaceRatherThanBarracks) I changed a little bit the way she sheikahs plays. starting in shadow stand, when changing to death stance they will become more powerfull (Theorically randomly), having some of the gifted settlement taken back automatically so it is like a traition thing. Added a stuff for the twili and tonned down the earnings for the stalfos (And I added some performance stuff for the players not playing as the stalfos). Iīm currently working for the sheikahs to make them able to recruit general (only on death stance); apparently they doesnīt have the script for the general.

    Before I post it, Is there any small thing/fix that is needed to be added?

  7. #27

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on)

    add link to the game, the majora faction is already in the game is it not.

  8. #28

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on)

    As a personal thing, I enabled a few buildings for the Wizzrobes, the Sheikah, and the Twili, like Gardens, paved roads, academies, and so forth, so long as they made sense. They only have military buildings and pretty much nothing else. I didn't give them a ton of buildings, because they're not supposed to be good governors like the Hylians are, but just a few things that reflect their academic and civilized leanings and made it easier to deal with unrest. I also allowed Ikana to build Paved Roads, Colosseums, and Academies, and the Zola to build Lesser Deity Statues and Fighting Pits, on the grounds that Ikana is a civilized kingdom that just happens to be composed of dead people, and the Zola can probably dig a hole in the ground for blood sport and throw up a quick statue to Bellum or whoever. Again, not big changes, just little building permissions that I think make sense and make these factions a bit easier to play as.

    I also allowed the Gorons and Deku to build one more level of the Market building line, as they can recruit Merchants but can't actually build them unless they capture an enemy city that happens to have a level 2 market already built there, and I allowed the Deku and the Kokiri to build one more level of the Armorer building line, so that they can build a grand barracks, which they can't currently unless they capture a city that already has either a grand barracks or a high enough level of armorer.

    The last change I made was to remove the local religious requirements for Goddess Acknowledgement and Lesser Deity Worship, so that factions can build those statues regardless of the level of religion in the province. I think it was an oversight that many Goddess Acknowledging and all Deity Worshiping factions can't build priests to spread their religion, but every Strict Goddess Worshiping and Majora Worshiping faction can, so this change balances it out somewhat. I did it this way as a quick and easy fix, because I don't know how to model and texture new priest units for all the factions, so this was what I could figure out how to do immediately.

    Anyway, those are just the changes I incorporated into my personal game. I encourage you to consider them, as I think they make the game better, but it's up to you to choose which, if any, of them you decide to incorporate.

  9. #29
    Civis
    Join Date
    Jul 2013
    Location
    Colima, México
    Posts
    189

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on)

    There is a faction and some units for the Majoras, but there is not scripted in the campaign as far as i have check it. in which turn, which condition, working for whom would I make Link to show up here? Yes, it is possible but it still requires a lot of work to make the conditions to make it feel logical; it needs to be a majora faction or something worthy to have link in any factionīs side. As far as this submod, I will not add it but maybe I will explain how to add it some time later if I have time.

  10. #30
    Civis
    Join Date
    Jul 2013
    Location
    Colima, México
    Posts
    189

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on). Version 2a!

    I updated this submod. Now it has some little changes for sheikahs and twili. The link to download this submod and the description of it is in the first post of this thread. I hope you guys enjoy.

  11. #31

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on). Version 2a!

    I've been playing with this submod, as the Sheikah, and have been highly impressed with the changes. At first, I was worried because the game would regularly crash at around turn twenty, but then I copied historic_events.txt.strings.bin over again and it's been going fine, as I'm on turn 35 now. The only minor possible bugs I noticed were that Sheikah Monks and Sheikah Spies can't be recruited in any province where Kingmakers can be recruited, and that Spies and Assassins - the overworld agents, not the battle units - can't be recruited either. However, given that overworld agents currently can't gain any traits and are of questionable usefulness, it's probably fine to leave them out, for now, even if it does seem weird to play as a faction all about spies and assassins without any access to either spies or assassins.

    In other news, your Shadow Stance/Death Stance system seems to work perfectly. I decided to conquer the Lizalfos early on while they were weak, and managed to hand over most of the south-eastern quarter of the map to Hyrule. However, after that, I had my diplomat ask Hyrule for their map information, and they decided to break their alliance with me and strand all my men. The next turn I assumed direct control of the empire because they'd clearly gone mad and were utterly incapable of making sensible decisions on their own, after which they decided to besiege most of my cities.

    All in all, a very different and exciting campaign experience that gives you a lot of freedom, and promises to play very differently each time. Furthermore, it also seems to be more stable than the base game, crash-wise, as after I replaced historic_events.txt.strings.bin it hasn't had any minor hiccoughs at all.

  12. #32
    Civis
    Join Date
    Jul 2013
    Location
    Colima, México
    Posts
    189

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on). Version 2a!

    Quote Originally Posted by HisRotundity View Post
    I've been playing with this submod, as the Sheikah, and have been highly impressed with the changes. At first, I was worried because the game would regularly crash at around turn twenty, but then I copied historic_events.txt.strings.bin over again and it's been going fine, as I'm on turn 35 now. The only minor possible bugs I noticed were that Sheikah Monks and Sheikah Spies can't be recruited in any province where Kingmakers can be recruited, and that Spies and Assassins - the overworld agents, not the battle units - can't be recruited either. However, given that overworld agents currently can't gain any traits and are of questionable usefulness, it's probably fine to leave them out, for now, even if it does seem weird to play as a faction all about spies and assassins without any access to either spies or assassins.

    In other news, your Shadow Stance/Death Stance system seems to work perfectly. I decided to conquer the Lizalfos early on while they were weak, and managed to hand over most of the south-eastern quarter of the map to Hyrule. However, after that, I had my diplomat ask Hyrule for their map information, and they decided to break their alliance with me and strand all my men. The next turn I assumed direct control of the empire because they'd clearly gone mad and were utterly incapable of making sensible decisions on their own, after which they decided to besiege most of my cities.

    All in all, a very different and exciting campaign experience that gives you a lot of freedom, and promises to play very differently each time. Furthermore, it also seems to be more stable than the base game, crash-wise, as after I replaced historic_events.txt.strings.bin it hasn't had any minor hiccoughs at all.
    Thanks for the review and I appreciate that you have played and enjoined this. It is really difficult to make a balanced submod but with many untested new features/ideas that may or may not change everything. About the sheikah spies and sheikah monks are not a bug, but rather a thing I forgot to balance(I didnīt know how). The thing is that I noticed that there were not recruitable spies (unit) in the barracks from the original mod, and I wanted to add them; but it would cause the sheikahs to have many units to recruit (with agahnim soldiers and interrogators already) and it didnīt feel lore wise, as they are suppose to be less in numbers. So I implemented a half solution (make them recruitable only in zones outside hyrule "culture") until I would come with another Idea; then the time passed and I completely forgot. The same thing happened for the sheikahs monks, because there were simply no more "lore wise" space in the barracks for them. But that just my opinion, and either way it is not balance as I purposely make the agahnim soldiers to replenish like one turn more often and all other units one turn less often. And I gave them some profit by relic income for the purpose of being dependent of mercenaries units, but I think I didnīt gave them enough to make it viable; There is a high reward but just after the sixth conquered and maintained settlement in shadow stance. I should also have added some kind of reward of better relation with the hyrule kingdom.

    About the spies (agent) and assasins(agent) I just forgot to put them in a barracks as I felt it werenīt that useful. As far as I remember, they are recruitable in kakariko, the capital of the sheikahs. On a second thought, they need to be available to recruit in shadow stance, but I have no Idea of how to make this without having a settlement.

    Being honest, I have not played the submod I just made, specially for the sheikahs. I tested all the new things to be sure that worked as intended, but I had no time to play 1 campaign with the sheikahs to see how well do they do at long turn (maybe I would had make more units to spawn in the cities at the moment of changing to death stance). Again, thanks for the review, I learned a lot from it.

  13. #33

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on). Version 2a!

    Great Submode i need to test that when i have time.
    Its good that your are doing Bugfixes.
    You missed 2/1
    Barracks could not be build in some citys because the settlement_min town was like this it needs to be like this settlement_min village
    second one is automatik religos convertion
    In the building core_building and building core_castle_building
    You need ad this to the(justthe) capability tab
    religion_level bonus 1
    amplify_religion_level 1

    To all Levels of the two buildings
    Then it will con vert to the owning faction
    The third is a bit Taste
    The Riverzora can not, thanks to there unique Unitmaking way, retrain there soldiers
    Adding Lines like this, to supplyline-building trees could redemy that
    recruit_pool "Manhunters" 0 0.2 0.9 0 requires factions { zola, }
    recruit_pool "Outrunners" 0 0.2 0.9 0 requires factions { zola, }

    do that for all Zola units
    As long this Number is smaller than 1 the unit cannot be recrutet but cann be retrained.
    I did this changes in my owne Game, there work, exept that one with the zola did not test that one
    Second Point it seems to me that you want to make the Faction more unique
    In description of the Labrynna and the Zuna in Vanilie is written that there cann advance there Citys very fast, wich does not translate ingame adding the folloing Lines to the requires-line
    Make them abel to ignor the evething eels
    or factions { labrynna, zuna, }
    The same way you could make it possible to ad the NPC-barracks to different factions under building Contions
    I did enable the darknut to build zuna building whenn there have a highlevel smith(Zuna being Smithing experts)
    NPCbarracks01 requires factions { zuna, } or factions { darknut, } and building_present_min_level smith armourer
    The darknut cann recrut Zuna crossbow right on the Start when there get this building.
    Or one the farys so there cann get one for the Horons when there build temples
    NPCbarracks05 requires factions { horon, } or factions { fairy, } and building_present_min_level temple_deity_statue templedeity
    The Gorons dug to deep and found
    NPCbarracks02 requires factions { subrosian, } or factions { goron, } and building_present_min_level hinterland_mines mines+1
    Can be changed to work for all Factions.

    Sorry for my English

  14. #34

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on). Version 2a!

    Quote Originally Posted by Gebilde View Post
    Great Submode i need to test that when i have time.
    Its good that your are doing Bugfixes.
    You missed 2/1
    Barracks could not be build in some citys because the settlement_min town was like this it needs to be like this settlement_min village
    second one is automatik religos convertion
    In the building core_building and building core_castle_building
    You need ad this to the(justthe) capability tab
    religion_level bonus 1
    amplify_religion_level 1

    To all Levels of the two buildings
    Then it will con vert to the owning faction
    The third is a bit Taste
    The Riverzora can not, thanks to there unique Unitmaking way, retrain there soldiers
    Adding Lines like this, to supplyline-building trees could redemy that
    recruit_pool "Manhunters" 0 0.2 0.9 0 requires factions { zola, }
    recruit_pool "Outrunners" 0 0.2 0.9 0 requires factions { zola, }

    do that for all Zola units
    As long this Number is smaller than 1 the unit cannot be recrutet but cann be retrained.
    I did this changes in my owne Game, there work, exept that one with the zola did not test that one
    Second Point it seems to me that you want to make the Faction more unique
    In description of the Labrynna and the Zuna in Vanilie is written that there cann advance there Citys very fast, wich does not translate ingame adding the folloing Lines to the requires-line
    Make them abel to ignor the evething eels
    or factions { labrynna, zuna, }
    The same way you could make it possible to ad the NPC-barracks to different factions under building Contions
    I did enable the darknut to build zuna building whenn there have a highlevel smith(Zuna being Smithing experts)
    NPCbarracks01 requires factions { zuna, } or factions { darknut, } and building_present_min_level smith armourer
    The darknut cann recrut Zuna crossbow right on the Start when there get this building.
    Or one the farys so there cann get one for the Horons when there build temples
    NPCbarracks05 requires factions { horon, } or factions { fairy, } and building_present_min_level temple_deity_statue templedeity
    The Gorons dug to deep and found
    NPCbarracks02 requires factions { subrosian, } or factions { goron, } and building_present_min_level hinterland_mines mines+1
    Can be changed to work for all Factions.

    Sorry for my English
    Wouldn't the same thing apply for the (Tokay + Labrynna Regime) and the (Huskus + Kokiri/Deku Tribes)?

    Edit:

    Quote Originally Posted by Gebilde View Post
    The Riverzora can not, thanks to there unique Unitmaking way, retrain there soldiers
    Adding Lines like this, to supplyline-building trees could redemy that
    recruit_pool "Manhunters" 0 0.2 0.9 0 requires factions { zola, }
    recruit_pool "Outrunners" 0 0.2 0.9 0 requires factions { zola, }

    do that for all Zola units
    As long this Number is smaller than 1 the unit cannot be recrutet but cann be retrained.
    I did this changes in my owne Game, there work, exept that one with the zola did not test that one
    Wouldn't this Idea fix the problem of Heroes and generals not being able to replenish their troops.
    Last edited by Eldren; March 16, 2014 at 03:47 PM.

  15. #35

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on). Version 2a!

    Quote Originally Posted by Eldren View Post
    Wouldn't the same thing apply for the (Tokay + Labrynna Regime) and the (Huskus + Kokiri/Deku Tribes)?

    Edit:


    Wouldn't this Idea fix the problem of Heroes and generals not being able to replenish their troops.
    Generals can replenish their Troops everywhere
    That were just sugestions I did not want to write down everything
    I did enable Tokay and Huskus in my Game to
    Q: fernavliz i just went trough your edb
    If you that a Faction does not get a Bonus you like you wanted for the Staflos you denie it for some factions.
    Your Code:
    happiness_bonus bonus 1
    happiness_bonus bonus -1 requires factions { stalfos, } ;Stalfos campaign

    I did not test your Mode yet but i think this bloats up the description Tab
    If you set this way:

    happiness_bonus bonus 1 requires not factions { stalfos,}
    It will disable the bonus and will not appear in the description
    2. Bug fix
    The plate_armourer has the recruit_pool "Legendaries"
    Its upgrade the gothic_armourer does not.

  16. #36
    Civis
    Join Date
    Jul 2013
    Location
    Colima, México
    Posts
    189

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on). Version 2a!

    Quote Originally Posted by Gebilde View Post
    Generals can replenish their Troops everywhere
    That were just sugestions I did not want to write down everything
    I did enable Tokay and Huskus in my Game to
    Q: fernavliz i just went trough your edb
    If you that a Faction does not get a Bonus you like you wanted for the Staflos you denie it for some factions.
    Your Code:
    happiness_bonus bonus 1
    happiness_bonus bonus -1 requires factions { stalfos, } ;Stalfos campaign

    I did not test your Mode yet but i think this bloats up the description Tab
    If you set this way:

    happiness_bonus bonus 1 requires not factions { stalfos,}
    It will disable the bonus and will not appear in the description
    2. Bug fix
    The plate_armourer has the recruit_pool "Legendaries"
    Its upgrade the gothic_armourer does not.
    About the bonus denied for stalfos, I guess I did it because I was very inexperienced with coding. Strangely I didnīt know that it could be done that way, even thought I use some "not" for hidden resources required things. Maybe I update this submod and fix all these little things. Thanks for noticing that!, I appreciate it.

  17. #37
    Civis
    Join Date
    Jul 2013
    Location
    Colima, México
    Posts
    189

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on). Version 2a!

    If there is anything wrong with these files or some of the instructions, please let me know and I will try to fix it. In a few days Iīm going to start posting in this thread all the changes that are required to make, to make this submod possible; This with the purpose of making these changes more easy to be understood and maybe be aplied to any other mod/submod.


    List for short tutorials:
    1.- How to change a weapon for a tower defense in a m2tw settlement. (descr_wall.txt)
    2.- Basic export_descr_building.txt (capabilities, easy two building requiered recruit, agent, bonus and limits of it)
    3.- hidden resources in export_descr_buildings.txt. How to make different recruits for each region, limit certain bonus and some Ideas for the future. [included what did stalfos and sheikahs benefits + required file to be erased]
    4.- Basic campaign scripting. [there will not be extended explanations, just simple stuff of how to] Making the ai earn more money each turn. Some warning on the performance.
    5.- Stalfos AI campaign. Basic spawn army instruction. Implication and tips to make it work for this mod. Included basic tips on how to make a pop up message throught historic_event.txt
    6.- Twili campaign. pretty much the same but with making the portraits to work. Simple scripted orders you can give to a stack of units in campaign.
    7.- Stalfos player campaign. Basic stuff about counters. Using counters to predict population; very little details about how did I "predicted" the population.
    8.- Stalfos player campaign. Export_descr_buildings; a brief list of manny changes. Justification on why to do that mess.
    9.- Sheikah campaign. Explanation of how do gifting a settlement to other faction works; all thanks to UndyingNephalym who made it.
    10.- Sheikah campaign. Little explanation of how to use the random event generator. Taking advantage of certain console commands to make an easy way to retake a settlement for the localplayer.
    11.- Final comments. Thank you for reading.



    These little tutorial (Or half-tutorial) are not going to be extensively explained (or at least I will try not to). I will make the asumption that at least you know how to do a little scripting in campaign_script.txt . Take note that Iīm not that experienced with modding, so there may be script that arenīt efficient enough; any recommendation are welcome, as my intention here is to improve the mod itself. Because of my ignorance, recomend you to look for tutorials in the modworkshop forum.
    Remember that anything writted after a ";" is a commented line that wont execute any command and wont crash the game.
    Thank you for reading and I hope it helps you somehow.


    Take note that each topic may include more than planned.


    1.- How to change a weapon for a tower defense in a m2tw settlement. (descr_walls.txt) [Note: I know very little about this file].
    Spoiler Alert, click show to read: 

    Open the file "descr_walls.txt" located in the folder "data". You will see an arragement of code; if you pay atention, you will notice all the hp of the walls, efects of the proyectile, etc... I think there are 4 walls levels and the first one that doesnīt have a level on it. Each wall level has its own stats for the wall hp, the gateway hp, the defense tower weapon with its three tipes of tower (arrow, ballista, canon tower) and the gatehouse with its two weapon (arroy, oil). Pretty self explanatory there. Because the weapon "arrow" destroys siege towers with two hits, I recommend you to change it to ballista.


    But you can do a lot more of things; (possibly) you can change these weapons to any proyectile weapon that any units in the file "export_descr_unit.txt" can carry. I have tested only a few but it is possible to add a sol canon (of the twilight) as a gatehouse arrow weapon, with its same effects. I have tested with esmerald archerīs arrows and it works too, but it doesnīt do any damage to the siege weapon. Maybe it can be applied to canon towers and have twili sol canon.
    To change it look for the part where it says "missile_level {"... and then "stat ...." and change the whole weapon, OR you can just change the main weapon without changing the stats.


    Spoiler Alert, click show to read: 
    Code:
    
    		missile_level
    		{
    			stat		12, 0, tower_ballista, 120, 10, missile, missile_mechanical, piercing, arrow_tower, 10, 1
    			stat_attr	no
    			shot_sfx	TOWER_ARROW_FIRING
    			shot_gfx	
    			fire_angle	90
    
    
    			; unit size 	 reload_ms flaming_reload_ms 
    			fire_rate small  6000	   3250
    			fire_rate normal 6500	   3250
    			fire_rate large  5500       3250
    			fire_rate huge   4550       3250
    		}



    I have not tested with the oil level. would that work? (is up to you to test it).



    2.- Basic export_descr_building.txt (capabilities, easy two building requiered recruit, agent, bonus and limits of it)
    [Note: Iīm bad at explaining things; because of that sometimes I will asume that you have read a tutorial on how to mod the file "export_descr_building.txt"]
    Spoiler Alert, click show to read: 

    Okay, so you open the file export_descr_building.txt. You will see that each building has its levels to build up, its capabilities and its upgrades (very important if you want to fix the thing about lon_lon ranch level 2). Pretty self explanatory too; There is a "cost" and a number beside that that is the cost of the building... under it there is a "settlement_min" and then a level of town or related; for the mod barracks (barracks01 and the "castle" equivalent) the settlement_min are in town, It should be in village if you want to fix the problem of some ruins not being able to build barracks (thanks to the guy who discovered it recently, posted the solution in the bug section).


    So basically, a buidling have the bonus or capabilities for training units when it has them written inside the "{" "}" just after the word "capability".


    Example:
    Spoiler Alert, click show to read: 
    Code:
    building animalden
    {
        levels small_animalden medium_animalden large_animalden
        {
    		small_animalden requires factions { goron, zora, kokiri, lanayru, deku, twili, } and building_present_min_level hinterland_issettlement issettlement_2
            {
    			convert_to 0
                capability
                {	
                    recruit_pool "Dodongos"  1   0.2   2  0  requires factions { goron, } 
                    recruit_pool "Bigocto Riders"  1   0.2   2  0  requires factions { zora, }	 
                    recruit_pool "Wolfos Riders"  1   0.2   2  0  requires factions { kokiri, }		
                    recruit_pool "Arurodas"  1   0.2   2  0  requires factions { lanayru, }
                    recruit_pool "Deku Babas"  1   0.2   2  0  requires factions { deku, }					
                    recruit_pool "Shadow Kargaroks"  1   0.2   2  0  requires factions { twili, } 				
                }
                material wooden
                construction  2 
                cost  600 
                settlement_min village
                upgrades
                {
    			medium_animalden
                }
            }	
    etc etc etc etc....



    Inside it there can be some bonus like these (being the number the thing that can be changed): happiness_bonus bonus 2, law_bonus bonus 5, population_health_bonus bonus -20, construction_cost_bonus_wooden bonus 20, construction_cost_bonus_stone bonus 20, recruits_morale_bonus bonus 5, free_upkeep bonus 5, retrain_cost_bonus bonus 5, population_growth_bonus bonus 5, etc. Many of these thing can have a negative bonus, except the population growth bonus which can substract the population growth but it wonīt be lower than the base farm growth population. Many of these bonus have a Max and a min bonus, controlled by the file descr_settlement_mechanics.xml . Some bonus like happiness or law are in quantity of 5% per unit (2 = 10%, 5 = 25%).
    You can have bonus of the same building but that will only function for specific factions. Here is an example:
    Spoiler Alert, click show to read: 
    Code:
    capability
                {         		
    		happiness_bonus bonus 3 
    		happiness_bonus bonus -7 requires factions { stalfos, } 
    		happiness_bonus bonus 2 requires factions { darknut, lizalfos, goron, }
    		free_upkeep bonus 3 requires factions { labrynna, }
    		law_bonus bonus 7  requires factions { northern_european, mesoamerican, middle_eastern, }
    	    }
    The happines bonus 3 is for all the factions. The -7 substract for the stalfos. It adds two to the darknut, lizalfos and goron. It gives another different bonus only to labrynna. It gives law bonus to the factions that are inside the cultures descrived (I think northern_europe is for civilized, middle_ for the gohmas, mesoamerican for twili).


    To make an agent, like a spy or assassin, being available for recruiting, simply write something like this:
    Spoiler Alert, click show to read: 
    Code:
    	capability
                {
    		agent diplomat  0  requires factions { sheikah, }
    		agent spy  0  requires factions { sheikah, }
    		agent assassin  0  requires factions { sheikah, }
    
    
                }

    Note: the part that says "requires factions { sheikah, }" is not really required; if you take that out, you will enable a spy for every faction but it may cause some problems because not all the factions have spies, assasins and diplomats.




    A trick to make a unit to need two building [thanks to a guy that posted this trick in a discussion about labrynna, in the developement forum] is to separate the recruit pool stats into two buildings. Here is an example [enabling bronze knucle in the spirit temple but it requires a large barracks]["..." means a bunch of text, not related with the trick]:
    Spoiler Alert, click show to read: 
    Code:
            large_barracks01 city requires factions { northern_european, mesoamerican, middle_eastern, barbari_european, vreek, southern_european, darknutish, }  and building_present_min_level smith armourer
            {
    	...		
                capability
                {
    		...
    		recruit_pool "Bronze Knuckle"  1   0.2   0  0  requires factions { gerudo, }
    		...
    	     }
    		...
    
    
    building hinterland_temple_spirit
    {
    	religion orthodox
        levels spirittemple 
        {
            spirittemple requires factions { saxons, } 
            {
                capability
                {
    				recruit_pool "Bronze Knuckle"  0   0   2  0  requires factions { gerudo, } 
    		...
    	      }
    		...

    The trick with this is that the barracks gives a replenish number[5 turns in this case] for the unit, but the maximun of the unit is 0, so there is nothing to replenish; and it doesnīt show the unit[take note on this, in some cases where you want to make a unique place for a unit to recruit]. The spirit temple building gives a maximun of two units to recruit but it doesnīt replenish and it will show that the unit is (un)available to recruit. So you need the spirit temple building and large barracks to combine the two of these and you will have a new unit to recruit.


    You can also make a recruitable unit that requires certain event. Assuming that you know how to make a script in campaign map to make an event counter to true, here is an example:
    Spoiler Alert, click show to read: 
    Code:
    	capability
    	{
    	...
    	recruit_pool "Bonemold Monk"  1   0.2   2  0  requires factions { twili, }	and event_counter middee_defeated 1
    	...
    	}

    I didnīt test it very well, and I had problems with making it work. Expect to have some problems trying to do that if you are unexperienced.


    The units arent attached to the faction by this file, you can make a goron guardians being recruited by labrynna for example, But you need to modify something from the file "battle_models.modeldb" inside unit_models [I donīt know how to do this, you should check for a tutorial in m2tw modworkshop forum].


    Something related: If you want to change a description of a building, but that it will only display for a certain culture or faction(sugested by someone in how can freeform campaign be improved? tread in post# 151): you must open the file "export_buildings" located in mods\Hyrule\data\text [backup all the folder]. Each description has a title, a body and a short description. Here is an examplenot used in this submod)
    Spoiler Alert, click show to read: 
    Code:
    {colosseum} Colosseum
    {colosseum_desc} These massive structures are built with the single purpose of hosting organized grand battles between famous warriors.
    {colosseum_desc_short} These massive structures are built with the single purpose of hosting organized grand battles between famous warriors.
    {colosseum_goron} Sumo pit
    {colosseum_goron_desc} These massive structures host the sumo fight that the gorons like to probe...[any text you want].
    {colosseum_goron_desc_short} These massive structures host the sumo fight that the gorons like to probe...[any text you want].
    {colosseum_northern_european} Colosseum
    {colosseum_northern_european_desc} Maintained for the purporse of entretain the local population, although more people from your empire apretiate t....[any text you want]
    {colosseum_northern_european_desc_short} Maintained for the purporse of entretain the local population, although more people from your empire apretiate t....[any text you want]
    The building that only says colosseum will display the description for all the faction except gorons and civilized faction (I think). You can make a special display of description for faction specific or culture specific (Pretty much self explanatory).



    3.- hidden resources in export_descr_buildings.txt (And descr_regions.txt). How to make different recruits for each region, limit certain bonus and some Ideas for the future. [included what did stalfos and sheikahs benefits + required file to be erased]
    Spoiler Alert, click show to read: 

    These hidden resources can be named in the begining just like this (all must be in the same line):
    Spoiler Alert, click show to read: 
    Code:
    hidden_resources sparta rome italy america atlantic explorers_guild swordsmiths_guild woodsmens_guild teutonic_knights_chapter_house knights_of_santiago_chapter_house crusade jihad arguin horde_target no_pirates no_brigands hylian_hr gerudo_hr zora_hr goron_hr deku_hr darknut_hr wildlife_hr sheikah_hr lizalfos_hr moblin_hr human_hr kokiri_hr lanayru_hr twili_hr tokay_hr fairy_hr labrynna_hr gohma_hr subrosia_hr ikana_hr ordona_hr zuna_hr no_farmable_area_hr

    The limit for hidden resources are 64. As you have noticed, I added a lot of new hidden resources in the stalfos c. idea submod. My intention was to make a culture oriented regions so it work like "in this region you can find this culture like unit"; for example, stalfos recruit dark stalfos only in regions marked with "darknut_hr" (hr is for hidden resource. I made the name out, it is not necesary to have "_hr"), or recruit phantom of tarm only in fairy_hr regions. To make it work, you also need to add the hidden resource to the regions you like in the file "descr_regions.txt" in the folder mods\Hyrule\data\world\maps\base and you need to delete the file "map.rwm" in that folder too; if not, it will not work.


    An example from the file "descr_regions.txt" of what adding a hidden resourse would look like:
    Spoiler Alert, click show to read: 
    Code:
    ...
    Gerudo_Desert
    	Ashinon
    	gerudo
    	Gerudo_Extremists
    	255 100 200
    	no_pirates, no_brigands, gerudo_hr
    	5
    	1
    	religions { catholic 0 orthodox 100 islam 0 pagan 0 heretic 0 }
    ...
    Just adding it after a "," should work.
    For the stalfos idea submod, I added mostly the hidden resources to their respective initial regions and adjacent rebel cities. Some of them, like lanayru have also a human_hr. Some minor far from reference rebel settlement may not have the correct culture represented (by hidden resource). There is a human_hr for every human settlement that arent ordona, hylian, labrynna or gerudo. Zora and lanayru have different hidden_resource. I also added a no farmable area hidden resource, just in case someone wants to use it. Thank to the guy who suggested the use of hidden resource; I was almost not going to continue with this submod if it were not for the idea of adding hidden_resource tricks.


    After you have all the regions, you can make a unit only available to a certain region (by hidden_resource). Here is an example (lets say it is a barracks):
    Spoiler Alert, click show to read: 
    Code:
    ...
            capability
            {...
                    recruit_pool "Soldiers of Agahnim"  1   0.34   3  0  requires factions { sheikah, }		
                    recruit_pool "Interrogators"  1   0.17   2  0  requires factions { sheikah, }	and hidden_resource hylian_hr 	
                    recruit_pool "Interrogators"  1   0.17   1  0  requires factions { sheikah, }	and not hidden_resource hylian_hr 	
                    recruit_pool "Sheikah Spies"  1   0.17   1  0  requires factions { sheikah, }	and not hidden_resource hylian_hr
    			...
    	recruit_pool "Phantoms of Tarm"  1   0.2   2  0  requires factions { fairy, } and hidden_resource fairy_hr and not hidden_resource kokiri_hr 		
    			...
                                     recruit_pool "Stalfos Eurdi"  1   0.2   2  0  requires factions { stalfos, } and hidden_resource hylian_hr 
                                     recruit_pool "Stalfos Eurdi"  1   0.2   2  0  requires factions { stalfos, } and hidden_resource human_hr 
                                     recruit_pool "Stalfos Gerudo"  1   0.2   2  0  requires factions { stalfos, } and hidden_resource gerudo_hr 
                                     recruit_pool "Stalfos Zarko"  1   0.2   2  0  requires factions { stalfos, } and hidden_resource zora_hr 
                                     recruit_pool "Stalfos Zarko"  1   0.2   2  0  requires factions { stalfos, } and hidden_resource lanayru_hr 
                                     recruit_pool "Rotting Scrubs"  1   0.2   2  0  requires factions { stalfos, } and hidden_resource deku_hr 
                                     recruit_pool "Fallen Skull Kids"  1   0.2   2  0  requires factions { stalfos, } and hidden_resource kokiri_hr 
                                     recruit_pool "Stalfos Lizal"  1   0.2   2  0  requires factions { stalfos, } and hidden_resource lizalfos_hr 
                                     recruit_pool "Dark Stalfos"  1   0.2   2  0  requires factions { stalfos, } and hidden_resource darknut_hr 
                                     recruit_pool "Bubbles"  1   0.2   2  0  requires factions { stalfos, } and hidden_resource fairy_hr
    	...
    	}
    ...



    Soldiers of agahnim can be recruited by the sheikahs at any barracks anywhere. Can be recruited two interrogators inside any barracks in regions with hyrule_hr. spies can be recruited anywhere but not in regions with hylian_hr.
    I added the unit "Phantoms of Tarm" to this game, and I added the fairy_hr (hidden resource) the tarm ruins, natzu, horon cementery and great deku tree grove regions. The great deku tree grove region also have a kokiri_hr. To make the phantom being able to recruit in tarm ruins, natzu BUT NOT in great deku tree, I added a condition "and hidden_resource fairy_hr and not hidden_resource kokiri_hr ", can be recruited in any fairy_hr region but not in the region that has a kokiri_hr.
    I added a bunch of stalfos units (in this submod, they are in "issettlement" building, not in a barracks) to ilustrate the potential it has to make this mod even more unique.
    There was an idea in the tread "improve the campaign" thing; It said that it would be cool to have like regional militia for the region of faction that you conquered: like If I where the zora and I conquered the gorons, There would be goron guardians or maybe gorons militia available to recruit in the barracks located in the gorons culture cities (Using goron_hr now it is possible to identify these regions). It is possible having all the regions even now, just add goron guardians to a recruit pool that requires zora faction and goron_hr (hidden resource). The only inconvinient is that it will not have the texture of goron guardian because the zora faction doesnīt have loaded the texture of goron guardians for zoras; so it is your job (any voluntiers?) to add them in the file "battle_models.modeldb" and improve your mod/submodd. Mainly because I donīt know how to do it by myself and I cannot read it clearly because I code everything by hand (I have the bad habit of not using any programs to code/uncode).


    The hidden resources can also be applied to bonus. Here is a not used example:
    Spoiler Alert, click show to read: 
    Code:
    ...
            capability
            {...
    	happiness_bonus bonus 3 
    	happiness_bonus bonus 5 requires hidden_resource hylian_hr
    	happiness_bonus bonus 2 requires factions { darknut, } and hidden_resource gerudo_hr
    	free_upkeep bonus 3 requires factions { labrynna, } and not hidden_resource deku_hr
    	}
    	...
    NOTE: Iīm not sure about the bonus that only requires a hidden resource because I habe not test it. There isnīt many applications to this. The other ones are proved to work perfectly.


    You can have a no_farmable_area_hr to apply the idea of making some regions unable to farm (This idea was suggested by someone; other guy proposed a solution using hidden resourse trick):
    Spoiler Alert, click show to read: 
    Code:
    ...
            farms  requires factions { northern_european, middle_eastern, barbari_european, vreek, southern_european, darknutish, mesoamerican,}  and building_present_min_level hinterland_issettlement issettlement_1 ;;;;[comented, not executed nor readed] (    and not hidden_resource no_farmable_area_hr      )
            {
                convert_to 0
                capability
                {
                    farming_level 1	requires factions { northern_european, middle_eastern, barbari_european, southern_european, darknutish, mesoamerican, sheikah, ikana, }  and not hidden_resource no_farmable_area_hr  
     				population_growth_bonus bonus -1 requires factions { stalfos, } ;Stalfos campaign
                }
    ...
    If you add it to the bonus, the farm will be able to build but will not give any bonus. If you add it to the building, the will not be any building to build. For the second one, I couldnīt make it work because the building simply dissapeared from the game; there must be a way to implement it but I donīt know how.


    There is a way to use only 8 hidden resourses to make like an ID for every region in the game. Using something like "A","B",the same to "H", you can have 255 different possible combination (hardcoded limit for regions are 199+1sea; current mod have 107 regions). The problem would be that it would require a lot of codding and to remember the table of truth(combination) of the Id of the region.
    http://www.twcenter.net/forums/showt...1#post10892447



    4.- Basic campaign scripting. [there will not be extended explanations, just simple stuff of how to] Making the ai earn more money each turn. Some warning on the performance.
    Spoiler Alert, click show to read: 

    You should read some tutorials, or analyze what UndyingNephalim have done in the original HTW 3.5 campaign_script.txt . Better get the "M2TW Ultimate Docudemons 4.0" that is available for download somewhere in the m2tw modworkshop forum(TWC). Iīm bad at explaining things, so I will not explain it extensively. The whole campaign_script execute only once, but every "monitor" command you write, will be excecuting forever until the game ends or you have a "terminate_monitor" written inside it (There is a wait_monitors in the last lines that will mantain the monitors). Many of the things are too complicated for me to explain, just see that you can have or a "monitor" or an "if" condition, and that they required a condition that if they math, the code inside it will excecute. Take note that if you add a large amount of monitors, the game will start to run slowly (It depends on the CONDITION it is evaluating, not the length of the code; you can have a very large code in a monitor that execute on a simple condition and it will not make the game not even slightly slow).
    The conditions in docudemons 4.0 you will read two tipes of conditions; one that start with "I_" and others without; The ones that start with that are able to be used in an if or in a monitors; the ones without can only be used in monitors.I donīt know what more to write, so I will give you just examples:


    Code for making a faction controlled by AI to make more relic incomeused in stalfos submod)
    Spoiler Alert, click show to read: 
    Code:
    monitor_event FactionTurnStart FactionType twili
    	and IsFactionAIControlled
    	and I_TurnNumber = 1
          					
    		increment_kings_purse twili 4500
    
    
          terminate_monitor
    end_monitor
    So this code will execute when the faction twili start its turn, and when that faction is controlled by AI and when the turn is 1 [Note that in game turn 1, 2, 3... are in script 0, 1, 2... so this is really turn 2]. increment_kings_purse is a command to increment the amount of relic income. "terminate_monitor" will make the monitor to not execute again. As mentioned before, the condition "I_TurnNumber = 1" could be used also in an "if"; the condition "IsFactionAIControlled" can only be used in monitors. [few condition have both versions; in the game exist a "I_IsFactionAIControlled" condition too].



    5.- Stalfos AI campaign. Basic spawn army instruction. Implication and tips to make it work for this mod. Included basic tips on how to make a pop up message throught historic_event.txt
    Spoiler Alert, click show to read: 

    There is a lot you need to know about the command "spawn_army", and for this mod you need to make a lot more things that you would need to do in the vanilla game. You need to know that the next files are involed:
    Spoiler Alert, click show to read: 
    descr_names.txt that is inside \Hyrule\data
    names.txt that is inside \Hyrule\data\text
    names.txt.strings.bin that is inside \Hyrule\data\text
    custom_portraits folder that is inside \Hyrule\data\ui
    export_descr_unit.txt
    battle_models.modeldb
    [There may be other related but with these are enough].


    If you want to spawn an army for the AI and you donīt care about the portrait:
    Spoiler Alert, click show to read: 
    Code:
    monitor_event FactionTurnStart FactionType stalfos
    	and IsFactionAIControlled
    	and I_TurnNumber = 34
    ...
    ...
    		spawn_army
    			faction stalfos
    			character	Cap_Vimarx, general, age 60, x 97, y 148, portrait general_stalfos, direction S
    			unit		Scythe Lord 	exp 3 armour 0 weapon_lvl 0
    			unit		Stalfos Eurdi 	exp 1 armour 0 weapon_lvl 0
    			unit		Stalhounds 	exp 1 armour 0 weapon_lvl 0
    			unit		Stalhounds 	exp 1 armour 0 weapon_lvl 0
    			unit		Bubbles		exp 1 armour 0 weapon_lvl 0
    			unit		Dark Stalfos	exp 1 armour 0 weapon_lvl 0
    			unit		Stalfos Eurdi		exp 1 armour 0 weapon_lvl 0
    			unit		Stal Troops	exp 1 armour 0 weapon_lvl 0
    			unit		Stal Troops	exp 1 armour 0 weapon_lvl 0
    			unit		Stalfos Zarko	exp 0 armour 0 weapon_lvl 0
    			unit		Stalfos Gerudo	exp 0 armour 0 weapon_lvl 0
    			unit		Stalfos Eurdi	exp 1 armour 0 weapon_lvl 0
    		end
    ...
    ...
    
    
    	terminate_monitor
    end_monitor
    Pretty self explanatory, it execute when the faction stalfos just starts its turn, and bein AI and in turn 35. Every command "spawn_army" must have an "end", without it will crash/cause problems. Iīm not that expert in this command, so there might be some things added that may not be necesary[I will tell you the things I have not tested]. There might be some missing details.


    As you noticed, You need to have a faction that the spawned army will belong, a character with a name[can be random, Iīll explain later], "general" or "named character" ,age and coordinates where it will spawn [portrait may be not necesary but I have not tested this; direction is optional]; at least needs one unit to spawn[I have not tested 0 units, but it is illogical] and an "end". You can change the units experience, armour level and weapon level.
    About the name: the name must exist in the file "descr_names.txt" for the faction that you are spawning the army (this is the scipting name). Also this same name must exist in the file "names.txt" located inside "text" folder; This files determine the name that will be display when playing the game, so it is useful to have "ī Ļ ä ö á é í ó ú ü" or any other kind of acent,special letter but without need to have that letter in scripting name (this is a recomendation by many modders). [bad example: "Majóraü" displayed for scriptname majorau]
    About the general, named character: I donīt know every detail of this. The only thing I know is that you use "named character" for heroes that will have traits and ancillary, and "general" for the ones who not [I might be wrong].
    About the portrait: Locate the folder \Hyrule\data\ui\custom_portraits. You will notice that there will be a bunch of folder with the names of the heroes of the game. Inside these folders there is a .tga [image] file with the name "portrait_young.tga" or "portrait_old.tga" [there are free visors/editor of .tga image on the web, look for one of them]. Basically, If you want a general/hero with your own custom portrait you need to have a folder with a name you want [write the same name after ", portrait "in the spawn_army command] and the image file you want[in .tga], but with the same size as other[I have not tested otherwise] and with the name "portrait_young.tga". You might want to check out the hidden image of link that is located inside \Hyrule\data\ui\units\mercs [it is the same size as the portrait].
    About the units: Notice that the first unit is scythe lord, This is because it is the unit that will serve as the body guard of the character; so if the first unit "bubbles", the general will have bubbles as bodyguards. Thatīs why many spawned over time generals in the campaign have different units and not the usual lore-wise general bodyguard. Notice also that some heroes have a special unit described in the file "export_descr_unit.txt" just for them [Thatīs because of a little problem, all the generals in medieval total war are the same but can have Different models extra Officers, and in this mod these officers are the heroes (zelda, rauru, twinrova, etc...); thatīs why you can have a "dead" hero but the unit is still in campaign]. TAKE NOTE that the unit must exist in the file "export_descr_unit.txt", must have the ownership of the faction [otherwise they will sudenly disapear when in battle] AND they must have the proper unit battle model and animation for that faction, which is set up in the file "battle_models.modeldb"[If they have the ownership in EDU but not the model, they will show up as textureless kind of terminator two "metal" unicolored spawn from hell][some actual glith are presented with some rebel settlement because there are units in rebel settlement that the rebels doesnīt have the model texture]. [I donīt know how to mod the file "battle_models.modeldb", so it is your job to find out] [link already have a model available for the hylians if you are wondering].
    About the coordinates: The coordinates must exist. You can see the tile coordinate in game opening the comand console, and typing "show_cursorstat" and it will show the coordinates of the tile where your mouse is. If you spawn an army in the exact tile that is ocupied by another army,city, the army will spawn next to it.
    About the direction: It is not necesary, but because Iīm inexperienced I still put it[copy-paste and never deleted this].


    Remembering the name, you might want to give them scripted orders, like move or siege a settlement. ExampleUsed from stalfos submod, but partially modified so it is understandable)
    Spoiler Alert, click show to read: 
    Code:
    monitor_event FactionTurnStart FactionType stalfos
    	and IsFactionAIControlled
    	and I_TurnNumber > 34
    
    
    		if I_TurnNumber = 35
    		...
    		spawn_army
    			faction stalfos
    			character	Cap_Vimarx, general, age 60, x 97, y 148, portrait general_stalfos, direction S
    			unit		Stalfos Eurdi 	exp 3 armour 0 weapon_lvl 0
    			unit		Stalfos Eurdi 	exp 1 armour 0 weapon_lvl 0
    			unit		Stalhounds 	exp 1 armour 0 weapon_lvl 0
    			unit		Stalhounds 	exp 1 armour 0 weapon_lvl 0
    			unit		Bubbles		exp 1 armour 0 weapon_lvl 0
    			unit		Dark Stalfos	exp 1 armour 0 weapon_lvl 0
    			unit		Stalfos Eurdi		exp 1 armour 0 weapon_lvl 0
    			unit		Stal Troops	exp 1 armour 0 weapon_lvl 0
    			unit		Stal Troops	exp 1 armour 0 weapon_lvl 0
    			unit		Stalfos Zarko	exp 0 armour 0 weapon_lvl 0
    			unit		Stalfos Gerudo	exp 0 armour 0 weapon_lvl 0
    			unit		Stalfos Eurdi	exp 1 armour 0 weapon_lvl 0
    		end		
    		...
    		end_if
    ....
    	move Cap_Vimarx,  100,  150,
    ....
    	siege_settlement Cap_Vimarx, Naldoriko, mantain
    ...
    if I_TurnNumber > 38
    	terminate_monitor
     end_if
    ...
    end_monitor
    I suppose you will not have problems understanding ifs. Pretty simple, the move command [different of reposition] is like when you select an army and make a right click to that tile. The siege settlement command automatically moves the army to attack a settlement with that name; the settlement must be near the army. The siege settlement can have a "maintain" or an "attack". (the second inmediatly attacks the settlement, with or without the siege equipement).
    Take note that if the name of the general donīt exist in descr_names.txt or in names.txt (names.string.txt.bin), the game will not know who is that character and will show in the log this error but wonīt crash the game; you will notice that you have a problem if the general doesnīt display a name. The game causes serious problems if there are repeated names.

    Uf!, that was a lot of text. But it is just the begining, as there are a lot of problems when you want to spawn a hero for yourself, or other faction. I will explain these in the next subtopic.


    EXTRA: example of code for the spawn of stalfos AI to attack settlements [lines 16111 - 16361]:


    Spoiler Alert, click show to read: 
    Code:
    monitor_event FactionTurnStart FactionType stalfos
    	and IsFactionAIControlled
    	and I_TurnNumber > 34
    	if I_NumberOfSettlements hylian  > 14
    ...	...
    ...	...
    		spawn_army
    			faction stalfos
    			character	Cap_Vimarx, general, age 60, x 97, y 148, portrait general_stalfos, direction S
    			unit		Stalfos Eurdi 	exp 3 armour 0 weapon_lvl 0
    			unit		Stalfos Eurdi 	exp 1 armour 0 weapon_lvl 0
    			unit		Stalhounds 	exp 1 armour 0 weapon_lvl 0
    			unit		Stalhounds 	exp 1 armour 0 weapon_lvl 0
    			unit		Bubbles		exp 1 armour 0 weapon_lvl 0
    			unit		Dark Stalfos	exp 1 armour 0 weapon_lvl 0
    			unit		Stalfos Eurdi		exp 1 armour 0 weapon_lvl 0
    			unit		Stal Troops	exp 1 armour 0 weapon_lvl 0
    			unit		Stal Troops	exp 1 armour 0 weapon_lvl 0
    			unit		Stalfos Zarko	exp 0 armour 0 weapon_lvl 0
    			unit		Stalfos Gerudo	exp 0 armour 0 weapon_lvl 0
    			unit		Stalfos Eurdi	exp 1 armour 0 weapon_lvl 0
    		end
    
    
    	siege_settlement Cap_Vimarx, Naldoriko, mantain
    	end_if	
    
    
    	if I_NumberOfSettlements Gerudo > 14
    		spawn_army
    			faction stalfos
    			character	Cap_Koruthax, general, age 60, x 97, y 148, portrait general_stalfos, direction S
    			unit		Scythe Lord 	exp 3 armour 0 weapon_lvl 0
    			unit		Stalfos Gerudo 	exp 1 armour 0 weapon_lvl 0
    			unit		Stalhounds 	exp 1 armour 0 weapon_lvl 0
    			unit		Stalhounds 	exp 1 armour 0 weapon_lvl 0
    			unit		Bubbles		exp 1 armour 0 weapon_lvl 0
    			unit		Dark Stalfos	exp 1 armour 0 weapon_lvl 0
    			unit		Stal Troops		exp 1 armour 0 weapon_lvl 0
    			unit		Stal Troops	exp 1 armour 0 weapon_lvl 0
    			unit		Stal Troops	exp 1 armour 0 weapon_lvl 0
    			unit		Stalfos Gerudo	exp 0 armour 0 weapon_lvl 0
    			unit		Stalfos Gerudo	exp 0 armour 0 weapon_lvl 0
    			unit		Stalfos Gerudo	exp 1 armour 0 weapon_lvl 0
    		end
    
    
    	siege_settlement Cap_Koruthax, Ayloch, mantain
    	end_if
    
    
    	if I_NumberOfSettlements Goron > 11
    		spawn_army
    			faction stalfos
    			character	Cap_Kaldorid, general, age 60, x 165, y 205, portrait general_stalfos2, direction S
    			unit		Scythe Lord 	exp 3 armour 0 weapon_lvl 0
    			unit		Dark Stalfos 	exp 1 armour 0 weapon_lvl 0
    			unit		Dark Stalfos 	exp 1 armour 0 weapon_lvl 0
    			unit		Stalhounds 	exp 1 armour 0 weapon_lvl 0
    			unit		Stalhounds 	exp 1 armour 0 weapon_lvl 0
    			unit		Bubbles		exp 1 armour 0 weapon_lvl 0
    			unit		Dark Stalfos	exp 1 armour 0 weapon_lvl 0
    			unit		Stal Troops		exp 1 armour 0 weapon_lvl 0
    			unit		Stal Troops	exp 1 armour 0 weapon_lvl 0
    			unit		Stal Troops	exp 1 armour 0 weapon_lvl 0
    			unit		Stal Troops	exp 0 armour 0 weapon_lvl 0
    			unit		Stal Troops	exp 0 armour 0 weapon_lvl 0
    			unit		Stalfos Zarko	exp 1 armour 0 weapon_lvl 0
    		end
    	siege_settlement Cap_Kaldorid, Gor_Dalagra, mantain
    	end_if
    ...	...
    ...	...



    EXTRA:
    list of all settlement and its coordinates in campaign map. [in game you can check the coordinates of a tile by using console commands and typing "cursor_showstat"]:[ x , y]
    Spoiler Alert, click show to read: 
    Code:
    Hyrule_Prime         122, 178  
    NalOrdona            121, 87
    Grand_Central_Hive   55, 208
    Ashinon             66, 152
    Demise              9, 58
    Ok_Ru                 60, 61
    Deku_Trees_Grove        172, 149
    Lynna_City              253, 113
    Tarm_Ruins           252, 222
    Airu                     126, 221
    Gor_Goronon      155, 185
    Faron_Prime        165, 105
    Ukshulut            148, 102
    Ontheon                 18, 168
    Deku_Prime           223, 158
    Domain_Prime       183, 185
    Kakariko       146, 171
    Gor_Unduga         186, 201
    Gor_Galonga       203, 209
    Nayrunis         201, 178
    Rutoval        202, 196
    Vigjaro          107, 191
    Lon_Lon           127, 148
    Hylia_Marine        130, 121
    Mesu_Ordona              102, 977
    Arbiter_Grounds          62, 134
    Unyus              25, 133
    Aidaidorf                46, 170
    Sacred_Forest_Meadow       182, 172
    Palagards_Sanctuary       190, 155
    Bando_Grove         165, 129
    Ikana               136, 53
    Ft_Olnach            159, 64
    Ft_Nuun         276, 163
    Symmetry        252, 139
    Sunken_City     217, 137
    Horon            243, 190
    Tokay_Village            256, 62
    Hive_Arrghus               88, 188
    Hive_Node_Vitreous     39, 206
    Ayloch                 101, 147
    Audorn          87, 178
    Aslosus              28, 111
    Ft_Ordonafawn               32, 95 
    Zunayus           32, 141
    Dondongos_Cavern         138, 186
    Doodlewee          206, 127
    Korkuloki          197, 108
    Rutolan       202, 196
    Larusl         65, 112
    Snowpeak        90, 207    
    Stone_Tower_Ruins    117, 53
    Timberfell               145, 85
    Fort_of_Wings            172, 90
    Mothulus                   233, 199
    Greshou             197, 244
    Sand_Crab_Cove          226, 186
    Holly            250, 167
    Crown_Ridge              288, 109
    Paladorf      48, 152
    Onalon          16, 152
    Ft_Eldara          132, 81
    Hasanadorf             91, 131
    Sorkariko              150, 122
    Gor_Dalagra            166, 200
    Goobalwee           212, 143
    Kanokiri              151, 146
    Boxoblin             18, 82
    Wejyblin              37, 60
    Xexoblin              76, 74
    Panaclecove              154, 225
    Seshei            189, 227
    Vigjaro_Glade       122, 199
    Malkariko         141, 138
    Naldoriko 110, 148
    Natzu            269, 228
    Yoll            283, 78
    Mohl_Dar              239, 92
    Moruge              64, 185
    Palace_of_Twilight   272, 15
    Molcana                121, 34
    Dead_Makou_Tree     27, 19
    Meesiam            485, 46
    Parapa             82, 173
    Tantari               45, 126
    Picorou_Ruins           188, 129
    Joogal          228, 132
    Turongo                 213, 172 
    Malcove          87, 44
    Midoro             84, 219
    Subrosia       6, 244
    Xebo              268, 186
    Horon_Cemetery          25, 242
    Barals_Stand             25, 182
    Wynalodorf             34, 179
    Death_Mountain_Crater        151, 194
    Gor_Forgaru             164, 185
    Orlara            273, 56
    Bakalushut        166, 90
    Kadolukshut              175, 120
    Val_Jabun               205, 191
    Orkalisch       298, 1
    Uzu                 245, 28
    Elmenzhia            242, 14
    Valran              227, 11
    Xolin                  281, 174
    Xulo                  0, 232
    Tokay_Village2 252, 66




    6.- Twili campaign. pretty much the same but with making the portraits to work. Simple scripted orders you can give to a stack of units in campaign.
    Spoiler Alert, click show to read: 

    So here is the thing. If you try to spawn an army with a hero you like only using the method I showed you earlier, You will see the next bugs (some or even all of them):
    1.- The campaign model unit will have its arms and head twisting, rotating in its own axis. I donīt know why does that happen (related to the lack of the family member campaign model?).
    2.- The hero/general will be the faction leader, and then you will have a spam of adoption messages.
    3.- The portrait of the hero/general will be glitching, changing it with any image over the change of turns.
    4.- Other minor bugs I donīt remember right now. [nameless hero/general is because the name doesnīt exist in descr_names.txt files nor in names.txt]


    UndyingNephalin found out a solution to it, so thatīs why we dont see these bugs in the original HTW 3.5 campaign (Or maybe we do sometimes in glitched twili mirrorgate?).


    First it is needed to have an empty faction that will serve as a step between the script (Have you noticed a faction called "herooftime"? That is the empty faction that is used to many of these tricks, so donīt make a sugestion of erasing it because without it most of the cool scripts wont be possible).[take note that the faction herooftime has all the names of all the heroes in the file descr_names.txt].
    What the scripts do to spawn a hero that is not faction leader, is general and that is not bugged.
    [first make sure that the script "Anti Adoption" made by UndyingNephalim have run.(it runs in turn 0 for everyfaction except a few like twili). Look for them in the campaign_script.txt]


    When I write something like "<faction>", subtitute it with for example "twili" or "hylian",etc.
    When I write something like "<heroname>", subtitute it with for example "Princess_Midna" or "king_zant". This must be the exact same name as you spawned the army.
    -> Spawn an army for the faction "herooftime" with the hero name and TWO units and its correct portrait.
    -> then use the command "give_everything_to_faction herooftime <faction> false"
    -> then use the command "send_character_off_map <heroname>". The name must be exact name that you put in the spawn_army command. It will be the final name.
    -> then Spawn an army for Your faction (or the faction of the hero) with the hero same name, the final units, the correct age and portrait.
    -> then you may use the command "console_command give_trait <heroname> <trait>" and "console_command give_ancillary <heroname> <ancillary>".
    -> then you may issue an order by "move" or "siege settlement" commands.
    -> then you might enjoy.


    If you have played this submod for the faction twili, you may have noticed that I made midna available if you choose to join her (It is not so lore-wise, Remember that I it was made before UndyingNephalim posted the playthrough videos of twili HH missions). You may notice that there is already a custom portrait for princess midna. Here is an example from the twili campagin of the stalfos submod:
    Spoiler Alert, click show to read: 
    Code:
    monitor_event EventCounter EventCounterType Twiliplayer_midna_accepted 
      and EventCounter > 0
    ...
    ...
    		spawn_army	
    			faction herooftime
    			character	Princess_Midna, named character, age 22, x 231, y 10, portrait Princess_Midna, direction S 
    			unit		Midna		 	exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    		end
    
    
    		give_everything_to_faction herooftime twili false
    		send_character_off_map Princess_Midna
    
    
    		spawn_army	
    			faction twili
    			character	Princess_Midna, named character, age 22, x 228, y 11, portrait Princess_Midna, direction S
    			unit		Midna		 	exp 0 armour 0 weapon_lvl 0
    			unit		Twili Sorceress 	exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Sorceress		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Sorceress		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry		exp 0 armour 0 weapon_lvl 0
    			unit		Sol Cannon		exp 0 armour 0 weapon_lvl 0
    			unit		Sol Cannon		exp 0 armour 0 weapon_lvl 0
    		end
    
    
    		console_command give_trait Princess_Midna LoyaltyStarter 1
    		console_command give_trait Princess_Midna ReligionStarter 2			
    		console_command give_trait Princess_Midna Authoritarian 3
    
    
    		console_command give_ancillary Princess_Midna rank_general1
    ...
    ...
    ...
    terminate_monitor
    end_monitor
    Note that if you make some mistake,you will have bugs. If you make the first spawn army with just one unit, The portrait will be glitching (You might have noticed that most heroes in the original HTW 3.5 game spawn with an extra unit next to it, now you know why). Portrait must exist [I have not texted if it is really needed to be in custom portrait or not]. I donīt know why, but it gave me problems changing "named character" to general [I have not tested it extensively]. Donīt forget the "give_everything_to_faction" or "send_character_off_map" commands. The units must belong to the faction in EDU (ownership); you can spawn any other units and even having autoresolve battle with them, but the moment you fight in battle, these units will disappear. [may or may not happen. It will certanly happen with "create unit" command].
    Self explanatory but i will tell you this:
    - "give_everything_to_faction" gives all the units and all the settlement to that faction. The "false" means that the faction will not show the "destroyed faction" message.
    - "send_character_off_map" Takes out the character (can be a general, or an agent) from the campaign map, but doesnīt kill the character. [meaning at least that you can use the name to spawn the character again].


    noticed that there is a "monitor_event EventCounter EventCounterType Twiliplayer_midna_accepted "? This is the next mini-tutorial: how to make a text message that will ask for a yes/no question and an example of use.
    First you need to back up the folder text inside data folder(just in case). You will have to modify the file "historic_event.txt" in the folder \Hyrule\data\text. This files generates another file called "historic_event.string.txt.bin" that the game will use for the messages of scripted events in campaign script. [There is a VERY UGLY bug, If you script a message to show up in X conditions, but there is no text for that message in "historic_event.string.txt.bin" the game will crash instantly, and will always crash. I will explain it a little bit later].
    Download The historic_event.txt file of this submod (it is inside the same .rar file); I fixed all (Iīm 99% sure) the missing messages that will cause crash if you attempted to modify this file.


    Okay, assuming that you have the fixed historic_event.txt file. If you want your own message to show up, you will have to write something like this (example of two messages):
    Spoiler Alert, click show to read: 
    Code:
    {HYRULE_FIGHTSBACK_HISTORIC_TITLE} Hyrule fightsback
    {HYRULE_FIGHTSBACK_HISTORIC_BODY} Some Loyalist survivor from Hyrule prime are trying to retake their loved homeland. Let them come!
    {TWILIPLAYER_MIDNA_TITLE} Civil war approaching
    {TWILIPLAYER_MIDNA_BODY} Join midna?
    The name of the event here have to be all in MAYUS letters. Must seem like that example, the event inside {} , one with "_title" (this will the the text in the title of the message) and one with _body (This is the main text). just after "}" write wathever you want; that will display when playing the campaign and when the scripted conditions are met. But Iīm missing the script to invoke the messages.


    Long story short, there are two types of event messages: the ones that are only text, and the ones that have an accept/decline option. [in this case, I made the "Hyrule_fightsback_historic" only a message and the "twiliplayer_midna" a accept/decline desition]
    The ones that are text must be written in the campaign_script.txt like thisobviously inside a monitor_event)
    Spoiler Alert, click show to read: 
    Code:
    				
    	add_events		
    		event	historic	Hyrule_fightsback_historic
    		date	0	
    	end_add_events
    Notice that the mayus in the name here does not matter with the counterpart in historic_event.txt
    The ones that are a accept/decline decision must be written in the campaign_script.txt, like this:
    Spoiler Alert, click show to read: 
    Code:
    	historic_event Twiliplayer_midna true
    Notice that there are not an "add_events" because it is not needed. The decision that the player makes will generate an event "Twiliplayer_midna_accepted" 1 or an "Twiliplayer_midna_declined" 1 (1 meaning true condition)[will add an "_accepted" or an "_declined" to the original]. These true condition can be monitored so it execute a script when that condition is met. example:
    Spoiler Alert, click show to read: 
    Code:
    monitor_event EventCounter EventCounterType Twiliplayer_midna_accepted 
      and EventCounter > 0
    ...		...
    ...		...
    		spawn_army	
    			faction herooftime
    			character	Princess_Midna, named character, age 22, x 231, y 10, portrait Princess_Midna, direction S 
    			unit		Midna		 	exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    		end
    
    
    		give_everything_to_faction herooftime twili false
    		send_character_off_map Princess_Midna
    
    
    		spawn_army	
    			faction twili
    			character	Princess_Midna, named character, age 22, x 228, y 11, portrait Princess_Midna, direction S
    			unit		Midna		 	exp 0 armour 0 weapon_lvl 0
    			unit		Twili Sorceress 	exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Sorceress		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Sorceress		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry		exp 0 armour 0 weapon_lvl 0
    			unit		Sol Cannon		exp 0 armour 0 weapon_lvl 0
    			unit		Sol Cannon		exp 0 armour 0 weapon_lvl 0
    		end
    
    
    		console_command give_trait Princess_Midna LoyaltyStarter 1
    		console_command give_trait Princess_Midna ReligionStarter 2			
    		console_command give_trait Princess_Midna Authoritarian 3
    
    
    		console_command give_ancillary Princess_Midna rank_general1
    		move Princess_Midna,  227,  11,
    ...		...
    ...		...
    terminate_monitor
    end_monitor
    As you noticed these will execute in the exact moment the player hits the buton accept. You may want to add a message to pop up for the desition made. You can add something like "Twiliplayer_midna_accepted" in both files, the "historic_event.txt" and in "campaign_script".
    historic_event.txt :
    Spoiler Alert, click show to read: 
    Code:
    ...
    {TWILIPLAYER_MIDNA_ACCEPTED_TITLE} Twiliplayer_midna_accepted
    {TWILIPLAYER_MIDNA_ACCEPTED_BODY} This is a desesperate situation over here. Thankfully we managed to arrive safe to Valran.
    As far as we know, Zant the usurper is gathering forces from Twilight Palace and is coming to our way, so we shall prepare the defenses. The other cities have been taken, So this is the last stand. We shall prepare our defenses.     
    ...

    campaign_script.txt :
    Spoiler Alert, click show to read: 
    Code:
    monitor_event EventCounter EventCounterType Twiliplayer_midna_accepted 
      and EventCounter > 0
    ...	...
    		add_events
    			event	historic	TWILIPLAYER_MIDNA_ACCEPTED
            	date	0
    		end_add_events
    ...	...



    So after that, now we proceed to all the script of the twili campaign and I will explain what does it do and the small changes it needs for it to be done.
    So, I made that in the first turn of the twili campaign, a message will pop up asking for a decision; if the player hits accept, then the twili will loose the palace of twili, then will gain Valran and then zant and middee will pop up with their respective army. at the first turn the player will manually put midna inside Valran[I wrote a siege settlement comand for midna to move inside it automaticaly, but because of some strange thing if it is a settlement just gained, it still siege their own settlement instead of entering]. Then on the next turn, Zant and middee will siege the settlement and mantain. Then reinforcement for the player will spawn and go to valran. Then two turns later, zant will attack [with siege weapons because of the AI]. The player wins the battle and probably middee and zant ends dying. If middee is dead, then she will appear as a hero but for the twili (will join). If zant is defeated, he will spawn (only once of course) in the palace of twilight and will enter there. Balanced or not, this is all the code needed to make that happen. [Before that, middee subfaction must be commented-out/erased from descr_stat,txt]
    Code for spawning middee and making midna not faction leader [anti adoption script provided in the original HTW script]
    Spoiler Alert, click show to read: 
    Code:
    monitor_event PreFactionTurnStart FactionType twili
    	;and I_TurnNumber = 0
    ;antiadoption script implemented by Undying Nephalin<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    
    
    
    
    		spawn_army 
    			faction herooftime
    			character	Dalagra, named character, age 23, x 272, y 15, portrait general_hylian, direction S
    			unit		Hylian Infantry 	exp 0 armour 0 weapon_lvl 0		
    		end
    		
    		console_command give_trait Dalagra LoyaltyStarter 1
    		console_command give_trait Dalagra ReligionStarter 1	
    				
    		spawn_army 
    			faction herooftime
    			character	Dalagrab, named character, age 23, x 272, y 15, portrait general_hylian, direction S
    			unit		Hylian Infantry 	exp 0 armour 0 weapon_lvl 0		
    		end
    		
    		console_command give_trait Dalagrab LoyaltyStarter 1
    		console_command give_trait Dalagrab ReligionStarter 1	
    
    
    		spawn_army 
    			faction herooftime
    			character	Dalagrac, named character, age 23, x 272, y 15, portrait general_hylian, direction S
    			unit		Hylian Infantry 	exp 0 armour 0 weapon_lvl 0		
    		end
    		
    		console_command give_trait Dalagrac LoyaltyStarter 1
    		console_command give_trait Dalagrac ReligionStarter 1	
    		
    		spawn_army 
    			faction herooftime
    			character	Dalagrad, named character, age 23, x 272, y 15, portrait general_hylian, direction S
    			unit		Hylian Infantry 	exp 0 armour 0 weapon_lvl 0		
    		end
    		
    		console_command give_trait Dalagrad LoyaltyStarter 1
    		console_command give_trait Dalagrad ReligionStarter 1	
    
    
    		spawn_army 
    			faction herooftime
    			character	Dalagrae, named character, age 23, x 272, y 15, portrait general_hylian, direction S
    			unit		Hylian Infantry 	exp 0 armour 0 weapon_lvl 0		
    		end
    		
    		console_command give_trait Dalagrae LoyaltyStarter 1
    		console_command give_trait Dalagrae ReligionStarter 1	
    		
    		spawn_army 
    			faction herooftime
    			character	Dalagraf, named character, age 23, x 272, y 15, portrait general_hylian, direction S
    			unit		Hylian Infantry 	exp 0 armour 0 weapon_lvl 0		
    		end
    		
    		console_command give_trait Dalagraf LoyaltyStarter 1
    		console_command give_trait Dalagraf ReligionStarter 1	
    		
    		spawn_army 
    			faction herooftime
    			character	Dalagrag, named character, age 23, x 272, y 15, portrait general_hylian, direction S
    			unit		Hylian Infantry 	exp 0 armour 0 weapon_lvl 0		
    		end
    		
    		console_command give_trait Dalagrag LoyaltyStarter 1
    		console_command give_trait Dalagrag ReligionStarter 1	
    		
    		give_everything_to_faction herooftime twili false
    		
    		send_character_off_map Dalagra
    		send_character_off_map Dalagrab
    		send_character_off_map Dalagrac
    		send_character_off_map Dalagrad
    		send_character_off_map Dalagrae
    		send_character_off_map Dalagraf
    		send_character_off_map Dalagrag
    
    
    ;END antiadoption actions<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    
    
    
    
    		spawn_army	
    			faction herooftime
    			character	Middee, named character, age 21, x 273, y 15, portrait Middee, direction S 
    			unit		Middee		 	exp 0 armour 0 weapon_lvl 0
    			unit		Bonemold Monk	 	exp 0 armour 0 weapon_lvl 0
    		end
    		give_everything_to_faction herooftime slave false
    		send_character_off_map Middee
    		spawn_army	
    			faction slave					             
    			character	Middee, named character, age 21, x 226, y 11, portrait Middee, direction S
    			unit		Middee		 	exp 0 armour 0 weapon_lvl 0
    			unit		Bonemold Monk	 	exp 0 armour 0 weapon_lvl 0
    			unit		Bonemold Monk 		exp 0 armour 0 weapon_lvl 0
    			unit		Bonemold Monk 		exp 0 armour 0 weapon_lvl 0
    			unit		Bonemold Monk 		exp 0 armour 0 weapon_lvl 0
    			;unit		Bonemold Monk 		exp 0 armour 0 weapon_lvl 0
    			;unit		Bonemold Monk 		exp 0 armour 0 weapon_lvl 0
    		end
    		console_command give_trait Middee LoyaltyStarter 5
    		console_command give_trait Middee ReligionStarter 5			
    		console_command give_trait Middee Authoritarian 3
    
    
    		console_command give_ancillary Middee rank_general1
    
    
    	if I_CompareCounter twiliAIcontrolled = 1
    		siege_settlement Middee, Valran, mantain
    	end_if
    terminate_monitor
    end_monitor

    Script for spawning the accept/decline desicion + actions when the twili are AI controlled:
    Spoiler Alert, click show to read: 
    Code:
    monitor_event FactionTurnStart FactionType twili
    	and I_TurnNumber = 0
    	
    	if not I_IsFactionAIControlled twili
    	historic_event Twiliplayer_midna true ;it will generate a Twiliplayer_midna_accepted 1 or Twiliplayer_midna_declined 1
          	end_if
    
    
        terminate_monitor
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType twili
    	and IsFactionAIControlled
    	and I_TurnNumber = 1
          increment_kings_purse twili 4500
    
    
    set_event_counter Twiliplayer_midna_declined 1
    set_event_counter Twiliplayer_midna_accepted 0
          terminate_monitor
    end_monitor

    Script for when the player accepts to join midna:
    Spoiler Alert, click show to read: 
    Code:
    monitor_event EventCounter EventCounterType Twiliplayer_midna_accepted 
      and EventCounter > 0
    
    
    
    
    console_command add_money 8000
    
    
    		add_events
    			event	historic	TWILIPLAYER_MIDNA_ACCEPTED
            	date	0
    		end_add_events
    
    
    	give_everything_to_faction twili slave false
    	console_command capture_settlement Valran
    create_unit Valran, Twili Infantry, num 1, exp 0, arm 0, wep 0
    
    
    		spawn_army	
    			faction herooftime
    			character	Princess_Midna, named character, age 22, x 231, y 10, portrait Princess_Midna, direction S 
    			unit		Midna		 	exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    		end
    
    
    		give_everything_to_faction herooftime twili false
    		send_character_off_map Princess_Midna
    
    
    		spawn_army	
    			faction twili
    			character	Princess_Midna, named character, age 22, x 228, y 11, portrait Princess_Midna, direction S
    			unit		Midna		 	exp 0 armour 0 weapon_lvl 0
    			unit		Twili Sorceress 	exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Sorceress		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Sorceress		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry		exp 0 armour 0 weapon_lvl 0
    			unit		Sol Cannon		exp 0 armour 0 weapon_lvl 0
    			unit		Sol Cannon		exp 0 armour 0 weapon_lvl 0
    		end
    
    
    		console_command give_trait Princess_Midna LoyaltyStarter 1
    		console_command give_trait Princess_Midna ReligionStarter 2			
    		console_command give_trait Princess_Midna Authoritarian 3
    
    
    		console_command give_ancillary Princess_Midna rank_general1
    		move Princess_Midna,  227,  11,
    		;siege_settlement Princess_Midna, Valran, mantain
    
    
    		
    
    
    	spawn_army	
    		faction herooftime
    		character	reb_King_Zant, named character, age 22, x 225, y 5, portrait King_Zant, direction S 
    		unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    		unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    	end
    	give_everything_to_faction herooftime slave false
    	send_character_off_map reb_King_Zant
    	spawn_army	
    		faction slave
    		character	reb_King_Zant, named character, age 22, x 225, y 10, portrait King_Zant, direction S
    		unit		King Zant		 	exp 0 armour 0 weapon_lvl 0
    		unit		Twili Infantry	 	exp 0 armour 0 weapon_lvl 0
    		unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    		;unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    		;unit		Twili Sorceress		exp 0 armour 0 weapon_lvl 0
    		unit		Shadow Messenger		exp 0 armour 0 weapon_lvl 0
    		unit		Shadow Messenger		exp 0 armour 0 weapon_lvl 0
    		;unit		Shadow Messenger		exp 0 armour 0 weapon_lvl 0
    		unit		Shadow Kargaroks		exp 0 armour 0 weapon_lvl 0
    		unit		Shadow Bloat		exp 0 armour 0 weapon_lvl 0
    		unit		Shadow Insect		exp 0 armour 0 weapon_lvl 0
    		unit		Shadow Insect		exp 0 armour 0 weapon_lvl 0
    		unit		Sol Cannon		exp 0 armour 0 weapon_lvl 0
    	end
    
    
    		console_command give_trait reb_King_Zant LoyaltyStarter 1
    		console_command give_trait reb_King_Zant ReligionStarter 1		
    		console_command give_trait reb_King_Zant Paranoia 2
    		console_command give_trait reb_King_Zant Introvert 2
    		console_command give_trait reb_King_Zant Berserker 3
    		console_command give_trait reb_King_Zant Insane 2
    		console_command give_trait reb_King_Zant Noctophilia 3
    
    
    
    
    terminate_monitor
    end_monitor
    Notice that "console_command capture_settlement Valran" command will only work for the local player; you cannot give settlement to an AI faction by this method [Unless you enable hotseat and change the localplayer faction, but I donīt know how to do it. It will make scipting easier]. Pretty much you know what everything else do.


    Script for zant and middee to siege Valran in turn 2,3,4:
    Spoiler Alert, click show to read: 
    Code:
    monitor_event FactionTurnStart FactionType twili
    	and I_EventCounter  Twiliplayer_midna_accepted = 1
    	and I_TurnNumber > 0
    
    
    	if I_TurnNumber = 1	
    	siege_settlement reb_King_Zant, Valran, mantain
    	siege_settlement Middee, Valran, mantain
    			spawn_army 
    				faction twili
    					character	random_name, named character, age 23, x 231, y 14, portrait general_twili, label Twilireinforcement
    			unit		Twili Infantry 	exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Infantry		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Sorceress		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Sorceress		exp 0 armour 0 weapon_lvl 0
    			unit		Twili Sorceress 	exp 0 armour 0 weapon_lvl 0
    			unit		Twili Sorceress 	exp 0 armour 0 weapon_lvl 0
    			unit		Sol Cannon		exp 0 armour 0 weapon_lvl 0		
    			end	
    			move Twilireinforcement, 228, 11
    			send_character_off_map Twilireinforcement
    	end_if
    	if I_TurnNumber = 2	
    		siege_settlement reb_King_Zant, Valran, mantain
    		siege_settlement Middee, Valran, mantain
    	end_if
    	if I_TurnNumber = 3
              and I_CharacterExists reb_King_Zant
    		siege_settlement reb_King_Zant, Valran, attack
    		siege_settlement Middee, Valran, mantain	;if there is no middee, it will say that the character doesnīt exist(in the log) but it will not crash; or at least I hope it donīt.
    	end_if
    
    
    
    
    		if not I_CharacterExists Middee		
    	add_events
    			event	historic	Hero_Middee
            	date	0
            end_add_events
    		
    		spawn_army 
    			faction herooftime
    			character	Middee, named character, age 21, x 227, y 11, portrait Middee, direction N
    			unit		Middee 	exp 0 armour 0 weapon_lvl 0
    			unit		Bonemold Monk	exp 0 armour 0 weapon_lvl 0
    		end
    		
    		give_everything_to_faction herooftime twili false
    		
    		send_character_off_map Middee
    		spawn_army 
    			faction twili
    			character	Middee, named character, age 21, x 227, y 11, portrait Middee, direction N
    			unit		Middee 	exp 0 armour 0 weapon_lvl 0
    			unit		Bonemold Monk	exp 0 armour 0 weapon_lvl 0
    		end
    		
    		console_command give_trait Middee GoodAmbusher 4
    		console_command give_trait Middee Disciplinarian 3	
    		console_command give_trait Middee HighPersonalSecurity 3
    		console_command give_trait Middee MarriedAPrincess 1
    		console_command give_trait Middee NightBattleCapable 1
    		console_command give_trait Middee Stoic 2
    		
    		console_command give_ancillary Arthon rank_general1
    
    
    		set_event_counter middee_defeated 1
    		end_if
    
    
    
    
    		if I_CompareCounter MidnaDefeatZant = 1
    		move reb_King_Zant, 272, 15
    		end_if
    		
    		
    		if I_CompareCounter MidnaDefeatZant = 1
    			and I_TurnNumber > 6
    			move reb_King_Zant, 272, 15
    		end_if
    	
      if not I_CharacterExists reb_King_Zant
    	and I_CompareCounter MidnaDefeatZant = 0	
    	spawn_army	
    		faction herooftime
    		character	reb_King_Zant, named character, age 22, x 273, y 10, portrait King_Zant, direction S 
    		unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    		unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    	end
    	give_everything_to_faction herooftime slave false
    	send_character_off_map reb_King_Zant
    	spawn_army	
    		faction slave
    		character	reb_King_Zant, named character, age 22, x 273, y 14, portrait King_Zant, direction S
    		unit		King Zant		 	exp 0 armour 0 weapon_lvl 0
    		unit		Twili Infantry	 	exp 0 armour 0 weapon_lvl 0
    		unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    		unit		Twili Infantry 		exp 0 armour 0 weapon_lvl 0
    		unit		Twili Sorceress		exp 0 armour 0 weapon_lvl 0
    		unit		Twili Sorceress		exp 0 armour 0 weapon_lvl 0
    		unit		Shadow Messenger		exp 0 armour 0 weapon_lvl 0
    		unit		Shadow Messenger		exp 0 armour 0 weapon_lvl 0
    		unit		Shadow Kargaroks		exp 0 armour 0 weapon_lvl 0
    		unit		Shadow Insect		exp 0 armour 0 weapon_lvl 0
    		unit		Shadow Insect		exp 0 armour 0 weapon_lvl 0
    		unit		Sol Cannon		exp 0 armour 0 weapon_lvl 0
    		unit		Sol Cannon		exp 0 armour 0 weapon_lvl 0
    	end
    		console_command give_trait reb_King_Zant LoyaltyStarter 1
    		console_command give_trait reb_King_Zant ReligionStarter 1		
    		console_command give_trait reb_King_Zant Paranoia 2
    		console_command give_trait reb_King_Zant Introvert 2
    		console_command give_trait reb_King_Zant Berserker 3
    		console_command give_trait reb_King_Zant Insane 2
    		console_command give_trait reb_King_Zant Noctophilia 3
    	move reb_King_Zant, 272, 15
    	;siege_settlement reb_King_Zant, Palace_of_Twilight, mantain
    	
    	set_counter MidnaDefeatZant 1
      end_if
    
    
       if I_SettlementOwner Palace_of_Twilight twili
    	terminate_monitor
       end_if
    
    
    end_monitor
    Two things new and unexplained: counters ("if I_CompareCounter MidnaDefeatZant = 1") and labels for armies ("character random_name, named character, age 23, x 231, y 14, portrait general_twili, label Twilireinforcement"). The counters are going to be explained later (it is an easy topic either way). About the labeled armies, the labels are used to identify a stack of units that have a general [or captain, not tested] and you spawn it with a random name as you can see. So you can give scripted orders, traits and ancillaries to that general without the need to know its name. see the event historic middee_defeated? I used the same as the original, because it there already (So I just added the event, and the other already existing monitor catches it and execute).


    And thatīs all about the twili campaign add on. As you may or may not noticed, the declined decision will not affect anything, so it is like the zant campaign. I know that nothing of this script is lore wise but at least added midna. Others may complain that I arrived to late with this implementation. The mayority will agree that They donīt know what Iīm talking about because they havenīt played the submod; It doesnīt matter because in the next installement of HTW there will be a new fully enjoyable twili campaign with new units, new colors and a more interesting story [Sure it cannot be worse than this implementation].




    EXTRA stuff: All the events messages requested from the original campaign_script.txt and the ones that I fixed:
    Spoiler Alert, click show to read: 
    Code:
    
    GAMESTART_HYLIAN	Both files have it
    Hero_PrincessZeldaI	Both files have it
    Hero_PrincessZeldaII	Both files have it
    Hero_PrincessZeldaIII	Both files have it
    Hero_PrincessZeldaIV	Both files have it
    Hero_PrincessZeldaV	Both files have it
    Hero_Rauru		Both files have it
    GAMESTART_GERUDO	Both files have it
    Hero_Ganondorf		Both files have it
    Hero_Nabooru		Both files have it
    Hero_Twinrova		Both files have it
    Hero_Runeka		Both files have it
    GAMESTART_GORON		Both files have it
    Hero_Darunia		Both files have it
    Hero_Dangoro		Both files have it
    GAMESTART_ZORA		Both files have it
    Hero_Farkos		Both files have it
    Hero_Ruto		Both files have it
    Hero_Zaleen		Both files have it
    Hero_Telara		Both files have it
    GAMESTART_KOKIRI	Both files have it
    Hero_GDT		Both files have it
    Hero_Saria		Both files have it
    Hero_Mido		Missing in historic_event, Fixed, 
    Hero_Mirora		Both files have it
    GAMESTART_GOHMA		Both files have it
    GAMESTART_ORDONA	Both files have it
    Hero_Mayorbo		Both files have it
    Hero_Rusl		Both files have it
    Hero_Ilia		Both files have it
    Hero_Annara		Both files have it
    GAMESTART_LANAYRU	Both files have it
    Hero_Rutela		Both files have it
    Hero_Aydia		Both files have it
    Hero_Laruto		Both files have it
    Hero_Ralis		Both files have it
    GAMESTART_DEKU		Both files have it
    Hero_Dekuking		Both files have it
    Hero_Dekuprincess	Both files have it
    Hero_Voiceofodolwa	Both files have it
    GAMESTART_MOBLIN	Both files have it
    Hero_Ganon		Both files have it
    Hero_Ogalon		Both files have it
    Hero_Kingbulblin	Both files have it
    GAMESTART_DARKNUT	Both files have it
    Hero_Zalunbar		Both files have it
    Hero_Senturon		Both files have it
    Hero_Onan		Both files have it
    GAMESTART_LIZALFOS	Both files have it
    Hero_Nardu		Both files have it
    Hero_Okakusha		Both files have it
    Hero_Vakat		Both files have it
    Hero_Talik		Both files have it
    GAMESTART_LABRYNNA	Both files have it
    Hero_Ambi		Both files have it
    Hero_Ralph		Both files have it
    Hero_Veran		Both files have it
    GAMESTART_FAIRY		Missing in historic_event, Fixed
    GAMESTART_STALFOS	Both files have it
    Hero_Akazoo		comented, Missing in historic_event, not found
    Hero_Onox		comented, Missing in historic_event, not found
    Hero_Stallord		comented, Missing in historic_event, not found
    Stalfos_Spawn		Both files have it
    GAMESTART_SHEIKAH	Missing in historic_event, Fixed
    Sheikah_Trained		Missing in historic_event, Fixed
    Sheikah_Spawn		Both files have it
    GAMESTART_IKANA		Missing in historic_event, Fixed
    Ikana_Spawn		Both files have it
    GAMESTART_TWILI		Missing in historic_event, Fixed
    Hero_Zant		Missing in historic_event, Fixed
    GAMESTART_WIZZROBE	Missing in historic_event, Fixed
    Wizzrobe_Spawn		Both files have it
    GAMESTART_ZOLA		Both files have it
    Hero_Zarosef		Both files have it
    Hero_Sokuuf		Both files have it
    Hero_Baruudakan		Both files have it
    zola_invasion		Both files have it
    GENERAL_HYLIANGET	Both files have it
    GENERAL_GERUDOGET	Both files have it
    GENERAL_GORONGET	Both files have it
    GENERAL_ZORAGET		Both files have it
    GENERAL_KOKIRIGET	Both files have it
    GENERAL_ORDONAGET	Both files have it
    GENERAL_LANAYRUGET	Both files have it
    GENERAL_DEKUGET		Both files have it
    GENERAL_MOBLINGET	Both files have it
    GENERAL_DARKNUTGET	Both files have it
    GENERAL_LIZALFOSGET	Both files have it
    GENERAL_LABRYNNAGET	Both files have it
    GENERAL_FAIRYGET	Both files have it
    GENERAL_STALFOSGET	Both files have it
    GENERAL_ZOLAGET		Both files have it
    GENERAL_TWILIGET	Both files have it
    Hero_Middee		Missing in historic_event, Fixed
    testwork		Both files have it
    malon_hylian		Both files have it
    malon_ordona		Both files have it
    ashei_hylian		Both files have it
    ashei_ordona		Both files have it
    ashei_labrynna		Both files have it
    ruins_foundguard	Missing in historic_event, Fixed
    ruins_founditem		Missing in historic_event, Fixed
    ruins_foundrupees	Missing in historic_event, Fixed
    ruins_foundnone		Missing in historic_event, Fixed
    zuna_hylianjoin_accepted	Both files have it
    zuna_gerudojoin_accepted	Both files have it
    zuna_goronjoin_accepted		Both files have it
    zuna_zorajoin_accepted		Both files have it
    zuna_kokirijoin_accepted	Both files have it
    zuna_gohmajoin_accepted		Both files have it
    zuna_ordonajoin_accepted	Both files have it
    zuna_lanayrujoin_accepted	Both files have it
    zuna_dekujoin_accepted		Both files have it
    zuna_moblinjoin_accepted	Both files have it
    zuna_darknutjoin_accepted	Both files have it
    zuna_lizalfosjoin_accepted	Both files have it
    zuna_labrynnajoin_accepted	Both files have it
    zuna_fairyjoin_accepted		Both files have it
    zuna_stalfosjoin_accepted	Both files have it
    zuna_sheikahjoin_accepted	Both files have it
    zuna_ikanajoin_accepted		Both files have it
    zuna_twilijoin_accepted		Both files have it
    zuna_wizzrobejoin_accepted	Both files have it
    zuna_zolajoin_accepted		Both files have it
    zuna_ritojoin_accepted		Both files have it
    subrosian_hylianjoin_accepted	Both files have it
    subrosian_gerudojoin_accepted	Both files have it
    subrosian_goronjoin_accepted	Both files have it
    subrosian_zorajoin_accepted	Both files have it
    subrosian_kokirijoin_accepted	Both files have it
    subrosian_gohmajoin_accepted	Both files have it
    subrosian_ordonajoin_accepted	Both files have it
    subrosian_lanayrujoin_accepted	Both files have it
    subrosian_dekujoin_accepted	Both files have it
    subrosian_moblinjoin_accepted	Both files have it
    subrosian_darknutjoin_accepted	Both files have it
    subrosian_lizalfosjoin_accepted	Both files have it
    subrosian_labrynnajoin_accepted	Both files have it
    subrosian_fairyjoin_accepted	Both files have it	
    subrosian_stalfosjoin_accepted	Both files have it
    subrosian_sheikahjoin_accepted	Both files have it
    subrosian_ikanajoin_accepted	Both files have it
    subrosian_twilijoin_accepted	Both files have it
    subrosian_wizzrobejoin_accepted	Both files have it
    subrosian_zolajoin_accepted	Both files have it
    subrosian_ritojoin_accepted	Both files have it
    tokay_hylianjoin_accepted	Both files have it
    tokay_gerudojoin_accepted	Both files have it
    tokay_goronjoin_accepted	Both files have it
    tokay_zorajoin_accepted		Both files have it
    tokay_kokirijoin_accepted	Both files have it
    tokay_gohmajoin_accepted	Both files have it
    tokay_ordonajoin_accepted	Both files have it
    tokay_lanayrujoin_accepted	Both files have it
    tokay_dekujoin_accepted		Both files have it
    tokay_moblinjoin_accepted	Both files have it
    tokay_darknutjoin_accepted	Both files have it
    tokay_lizalfosjoin_accepted	Both files have it
    tokay_labrynnajoin_accepted	Both files have it
    tokay_fairyjoin_accepted	Both files have it
    tokay_stalfosjoin_accepted	Both files have it
    tokay_sheikahjoin_accepted	Both files have it
    tokay_ikanajoin_accepted	Both files have it
    tokay_twilijoin_accepted	Both files have it
    tokay_wizzrobejoin_accepted	Both files have it
    tokay_zolajoin_accepted		Both files have it
    tokay_ritojoin_accepted		Both files have it
    huskus_hylianjoin_accepted	Both files have it
    huskus_gerudojoin_accepted	Both files have it
    huskus_goronjoin_accepted	Both files have it
    huskus_zorajoin_accepted	Both files have it
    huskus_kokirijoin_accepted	Both files have it
    huskus_gohmajoin_accepted	Both files have it
    huskus_ordonajoin_accepted	Both files have it
    huskus_lanayrujoin_accepted	Both files have it
    huskus_dekujoin_accepted	Both files have it
    huskus_moblinjoin_accepted	Both files have it
    huskus_darknutjoin_accepted	Both files have it
    huskus_lizalfosjoin_accepted	Both files have it
    huskus_labrynnajoin_accepted	Both files have it
    huskus_fairyjoin_accepted	Both files have it
    huskus_stalfosjoin_accepted	Both files have it
    huskus_sheikahjoin_accepted	Both files have it
    huskus_ikanajoin_accepted	Both files have it
    huskus_twilijoin_accepted	Both files have it
    huskus_wizzrobejoin_accepted	Both files have it
    huskus_zolajoin_accepted	Both files have it
    huskus_ritojoin_accepted	Both files have it
    horon_hylianjoin_accepted	Both files have it
    horon_gerudojoin_accepted	Both files have it
    horon_goronjoin_accepted	Both files have it
    horon_zorajoin_accepted		Both files have it
    horon_kokirijoin_accepted	Both files have it
    horon_gohmajoin_accepted	Both files have it
    horon_ordonajoin_accepted	Both files have it
    horon_lanayrujoin_accepted	Both files have it
    horon_dekujoin_accepted		Both files have it
    horon_moblinjoin_accepted	Both files have it
    horon_darknutjoin_accepted	Both files have it
    horon_lizalfosjoin_accepted	Both files have it
    horon_labrynnajoin_accepted	Both files have it
    horon_fairyjoin_accepted	Both files have it
    horon_stalfosjoin_accepted	Both files have it
    horon_sheikahjoin_accepted	Both files have it
    horon_ikanajoin_accepted	Both files have it
    horon_twilijoin_accepted	Both files have it
    horon_wizzrobejoin_accepted	Both files have it
    horon_zolajoin_accepted		Both files have it
    horon_ritojoin_accepted		Both files have it
    undead_battlewon		Missing in historic_event, Fixed
    sheikah_shadowstance_accepted	Both files have it
    sheikah_deathstance_accepted	Both files have it
    Twili_Spawn			Both files have it	
    zola_invasion			Both files have it
    stalfos_emerge			Both files have it
    twili_invasion			Missing in historic_event, Fixed
    The_Wizzrobe_Emerge		Both files have it
    wizzrobe_ask_accepted		Missing in historic_event, Fixed
    The_Sheikah_Emerge		Both files have it
    impa_hylian			Both files have it
    
    
    wizzrobe_ask		Missing in historic_event, Fixed
    sheikah_deathstance	Both files have it
    sheikah_shadowstance	Both files have it
    rito_horonjoin		Both files have it
    zola_horonjoin		Both files have it
    wizzrobe_horonjoin	Both files have it
    twili_horonjoin		Both files have it
    ikana_horonjoin		Both files have it
    sheikah_horonjoin	Both files have it
    stalfos_horonjoin	Both files have it
    fairy_horonjoin		Both files have it
    labrynna_horonjoin	Both files have it
    lizalfos_horonjoin	Both files have it
    darknut_horonjoin	Both files have it
    moblin_horonjoin	Both files have it
    deku_horonjoin		Both files have it
    lanayru_horonjoin	Both files have it
    ordona_horonjoin	Both files have it
    gohma_horonjoin		Both files have it
    kokiri_horonjoin	Both files have it
    zora_horonjoin		Both files have it
    goron_horonjoin		Both files have it
    gerudo_horonjoin	Both files have it
    hylian_horonjoin	Both files have it
    rito_huskusjoin		Both files have it
    zola_huskusjoin		Both files have it
    wizzrobe_huskusjoin	Both files have it
    twili_huskusjoin	Both files have it
    ikana_huskusjoin	Both files have it
    sheikah_huskusjoin	Both files have it
    stalfos_huskusjoin	Both files have it
    fairy_huskusjoin	Both files have it
    labrynna_huskusjoin	Both files have it
    lizalfos_huskusjoin	Both files have it
    darknut_huskusjoin	Both files have it
    moblin_huskusjoin	Both files have it
    deku_huskusjoin		Both files have it
    lanayru_huskusjoin	Both files have it
    ordona_huskusjoin	Both files have it
    gohma_huskusjoin	Both files have it
    kokiri_huskusjoin	Both files have it
    zora_huskusjoin		Both files have it
    goron_huskusjoin	Both files have it
    gerudo_huskusjoin	Both files have it
    hylian_huskusjoin	Both files have it
    rito_tokayjoin		Both files have it
    zola_tokayjoin		Both files have it
    wizzrobe_tokayjoin	Both files have it
    twili_tokayjoin		Both files have it
    ikana_tokayjoin		Both files have it
    sheikah_tokayjoin	Both files have it
    stalfos_tokayjoin	Both files have it
    fairy_tokayjoin		Both files have it
    labrynna_tokayjoin	Both files have it
    lizalfos_tokayjoin	Both files have it
    darknut_tokayjoin	Both files have it
    moblin_tokayjoin	Both files have it
    deku_tokayjoin		Both files have it
    lanayru_tokayjoin	Both files have it
    ordona_tokayjoin	Both files have it
    gohma_tokayjoin		Both files have it
    kokiri_tokayjoin	Both files have it
    zora_tokayjoin		Both files have it
    goron_tokayjoin		Both files have it
    gerudo_tokayjoin	Both files have it
    hylian_tokayjoin	Both files have it
    rito_subrosianjoin	Both files have it
    zola_subrosianjoin	Both files have it
    wizzrobe_subrosianjoin	Both files have it
    twili_subrosianjoin	Both files have it
    ikana_subrosianjoin	Both files have it
    sheikah_subrosianjoin	Both files have it
    stalfos_subrosianjoin	Both files have it
    fairy_subrosianjoin	Both files have it
    labrynna_subrosianjoin	Both files have it
    lizalfos_subrosianjoin	Both files have it
    darknut_subrosianjoin	Both files have it
    moblin_subrosianjoin	Both files have it
    deku_subrosianjoin	Both files have it
    lanayru_subrosianjoin	Both files have it
    ordona_subrosianjoin	Both files have it
    gohma_subrosianjoin	Both files have it
    kokiri_subrosianjoin	Both files have it
    zora_subrosianjoin	Both files have it
    goron_subrosianjoin	Both files have it
    gerudo_subrosianjoin	Both files have it
    hylian_subrosianjoin	Both files have it
    rito_zunajoin		Both files have it
    zola_zunajoin		Both files have it
    wizzrobe_zunajoin	Both files have it
    twili_zunajoin		Both files have it
    ikana_zunajoin		Both files have it
    sheikah_zunajoin	Both files have it
    stalfos_zunajoin	Both files have it
    fairy_zunajoin		Both files have it
    labrynna_zunajoin	Both files have it
    lizalfos_zunajoin	Both files have it
    darknut_zunajoin	Both files have it
    moblin_zunajoin		Both files have it
    deku_zunajoin		Both files have it
    lanayru_zunajoin	Both files have it
    ordona_zunajoin		Both files have it
    gohma_zunajoin		Both files have it
    kokiri_zunajoin		Both files have it
    zora_zunajoin		Both files have it
    goron_zunajoin		Both files have it
    gerudo_zunajoin		Both files have it
    hylian_zunajoin		Both files have it
    The message where found in the original file historic_event.txt.string.bin





    7.- Stalfos player campaign. Basic stuff about counters. Using counters to predict population; very little details about how did I "predicted" the population.
    Spoiler Alert, click show to read: 



    I donīt know where to start. Okay, let me see... how about basics on counters? Just the very basic stuff: The counters are assigned space where you can retain a number, consult it, compare it and modify it when needed. There are two types of counters; 1.- simply counters and 2.- event_counters. I will begin with the simple counters.


    So to declare a counter simply write "declare_counter " and then any name you want after it. (example: "declare_counter popestim_Hyrule_Prime"). So "popestim_Hyrule_Prime" serves as a new variable that somehow will be used. The declare_counter command inmediatly gives a value to this new counter.


    There is a command called "set_counter " that will change the previous value of the counter to a number you want to set it. Example: "set_counter popestim_Hyrule_Prime 5000".


    There is a command called "inc_counter " that will add (or substract) to the value the number you put. Example: "set_counter popestim_Hyrule_Prime 100". If we assume that all the previous command excecuted in that order, now the value of popestim_Hyrule_Prime would be 5100. This same command can also substract the value if you put a negative number.


    Now, there is a condition that will make this useful: the "I_CompareCounter". It can be used in both monitor and if conditions. The "I_CompareCounter" can compare if a counter has a higher value(">"), a lesser value ("<") or an equal value ("="). So you write something like this:
    Spoiler Alert, click show to read: 
    Code:
    monitor_event FactionTurnStart FactionType stalfos
    ...
    	if I_CompareCounter popestim_Hyrule_Prime < 10000
    		inc_counter popestim_Hyrule_Prime 156
    	end_if
    ...
    end_monitor
    Considering that the starting value of popestim_Hyrule_Prime is 5000, each turn that counter will be compared and will increment by 156 until it passes the value 9999. But, why to make an ezfors of making something like this? For this submod, I wanted to make that the stalfos would substract population Until they run out of people, and then gain something in exchange of it.
    But there is a problem: There do not exist any command that would measure or compare the population of a settlement. So after many considerations, I got to my mind that if I implement this idea (considering at least 107 counters, trying to predict population, tons of script) maybe I will inspire others to mod, considering that there is still potential of new script to implement new ideas. There were needed 4 scripts (very different lenght) to make this idea possible (stalfos killing population, earning something from it and "knowing"[untrue, only an aprox.] when the city runs out of people).
    0.- Obiously I need a counter for every settlementīs population and I need a counter for the total quantity of "harvested souls" for the stalfos.
    1.- A script to somewhat predict the population (Very basic to avoid too much scripting).
    2.- A basic script for the stalfos to kill population just for owning the settlement
    3.- A script for the stalfos to kill population depending on the building that is present there [I tested so many ways that didnīt worked out how it was supposed to. I ended up with a script that seems to always work but it should not work[but it do]].
    4.- A script for rewarding the "harvesting souls" (killing population). I made it because I felt that nobody would appretiate the "realism" of necromancy [no workers, no taxes, no money]. It is not lore-wise nor anything.


    So letīs begin:
    0.- I declared every counter outside any monitors, because it will only excecute once. I added an initial value based on the initial population [In my script I added these inside a monitor_event; in retrospective, it should be better if these were just outside].
    it looks like these: [I only put for 3 settlements; look from the line 907 to 1015 and 1192 to 1301]
    Spoiler Alert, click show to read: 
    Code:
    ...
    		declare_counter stalfos_killpop 
    		declare_counter popestim_Hyrule_Prime  ;variable for the estimate of the population to be later calculated
    		declare_counter popestim_NalOrdona 
    		declare_counter popestim_Grand_Central_Hive 
    ...
    ...
    ...
    ...
    		set_counter popestim_Hyrule_Prime 5000 ; initial population  
    		set_counter popestim_NalOrdona 1400
    		set_counter popestim_Grand_Central_Hive 4050 
    ...
    ...



    1.- Because I changed the way I predicted the population many times and it failed (it still fails, but it goes somewhat near) iīm only going to say what I did. I opened an excel file, puted a population of a big, a bigger medium,a medium, a medium small and a small size population number, I multiplied them by tree diferent percentaje separately (1.5%, 2.5%, 3.5%)[Assuming that the AI would build buidlings with bonus in growth]. I multiplied over 50 turns and it is the value of the maximun population expected[Of course it is far from reality, but it goes near the average players last turn game]. Then I gave a linear increment between 50 turns, using numbers near 3.5% increment to the regions with more base farming bonus; the oposite with the ones with less farming bonus; with them I used a number that resembles the growing number for a linear ecuation (population versus turns). Even with that many calculations, I ended up making up all these numbers again based on two gameplay I did for testing. [of course the real growth is not linear because it have a bigger percentaje with bonus buildings],
    Here is the script for tree settlement[repeat for all the settlements]:[lines 1312 - 1747]
    Spoiler Alert, click show to read: 
    Code:
    monitor_event FactionTurnStart FactionType stalfos
    
    
           if not I_SettlementOwner Hyrule_Prime stalfos
    	and I_CompareCounter popestim_Hyrule_Prime < 10000  ;
    		inc_counter popestim_Hyrule_Prime 156       ;Calculated/made-up increment(linear) 
    	end_if
           if not I_SettlementOwner NalOrdona stalfos
    	and I_CompareCounter popestim_NalOrdona < 4000
    		inc_counter popestim_NalOrdona 33
    	end_if
           if not I_SettlementOwner Gor_Galonga stalfos
    	and I_CompareCounter popestim_Gor_Galonga < 1300
    		inc_counter popestim_Gor_Galonga 8
    	end_if
    ...
    ...



    2.- Basic script if the stalfos owns a settlement. Notice that now there will be a counter called "stalfos_killpop", that will store all the registered killed people. The killed people are given by the command "console_command add_population <settlement> <number>" using a negative number. [all these script is in the same monitor as the script 1.-] [this is for settlements that has less than 400 of population]
    [lines 1753 - 2400]
    Spoiler Alert, click show to read: 
    Code:
    ...
    ...
    if I_SettlementOwner Hyrule_Prime stalfos
       and I_CompareCounter popestim_Hyrule_Prime < 351
         console_command add_population Hyrule_Prime -10
         inc_counter popestim_Hyrule_Prime -10
         inc_counter stalfos_killpop 10
    end_if
    if I_SettlementOwner NalOrdona stalfos
       and I_CompareCounter popestim_NalOrdona < 351
         console_command add_population NalOrdona -10
         inc_counter popestim_NalOrdona -10
         inc_counter stalfos_killpop 10
    end_if
    if I_SettlementOwner Gor_Galonga stalfos
       and I_CompareCounter popestim_Gor_Galonga < 351
         console_command add_population Gor_Galonga -10
         inc_counter popestim_Gor_Galonga -10
         inc_counter stalfos_killpop 10
    end_if
    ...
    ...


  18. #38
    Civis
    Join Date
    Jul 2013
    Location
    Colima, México
    Posts
    189

    Default Re: Stalfos campaign idea SUBMOD (a suggestion made to submod/add-on). Version 2a!

    Spoiler Alert, click show to read: 
    3.- The longest script I made, the most criminally long and the "what the f... , who did it work" one. I have not tested this entirely but it seems to be working (many scripts more logical to works didnīt I donīt know why). Because this code was so long (I think it uses > 1620 monitor_event) I put an if that test if the faction stalfos is AI controlled; If it is, all this code will not be executing and will not make the game go slower. [this script is intended for the settlement that has more than 400 of population]
    So here is the code for 3 settlements [line 2411 - 15378]:
    Spoiler Alert, click show to read: 
    Code:
    if not I_IsFactionAIControlled stalfos             ; longest "If" of all the history...of the submod 
    
    
    monitor_event FactionTurnStart FactionType stalfos               ;Hyrule_Prime
    	and I_SettlementOwner Hyrule_Prime stalfos
    	and I_CompareCounter popestim_Hyrule_Prime > 350
    		console_command add_population Hyrule_Prime -30
         		inc_counter popestim_Hyrule_Prime -30
    		inc_counter stalfos_killpop 30
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    log_counter StalfosAIcontrolled
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Hyrule_Prime stalfos
    	and I_CompareCounter popestim_Hyrule_Prime > 1000
    		console_command add_population Hyrule_Prime -50
         		inc_counter popestim_Hyrule_Prime -50
        		inc_counter stalfos_killpop 50
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    log_counter gerudoAIcontrolled
    log_counter gerudoAIcontrolled
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Hyrule_Prime stalfos
    	and I_CompareCounter popestim_Hyrule_Prime > 2500
    		console_command add_population Hyrule_Prime -50
         		inc_counter popestim_Hyrule_Prime -50
        		inc_counter stalfos_killpop 50
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Hyrule_Prime stalfos
    	and I_CompareCounter popestim_Hyrule_Prime > 350
    	and FactionBuildingExists = farms
    		console_command add_population Hyrule_Prime -10
         		inc_counter popestim_Hyrule_Prime -10
        		inc_counter stalfos_killpop 10
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Hyrule_Prime stalfos
    	and I_CompareCounter popestim_Hyrule_Prime > 350
    	and FactionBuildingExists = farms+1
    		console_command add_population Hyrule_Prime -15
         		inc_counter popestim_Hyrule_Prime -15
        		inc_counter stalfos_killpop 15
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Hyrule_Prime stalfos
    	and I_CompareCounter popestim_Hyrule_Prime > 350
    	and FactionBuildingExists = farms+2
    		console_command add_population Hyrule_Prime -20
         		inc_counter popestim_Hyrule_Prime -20
        		inc_counter stalfos_killpop 20
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Hyrule_Prime stalfos
    	and I_CompareCounter popestim_Hyrule_Prime > 350
    	and FactionBuildingExists = farms+3
    		console_command add_population Hyrule_Prime -25
         		inc_counter popestim_Hyrule_Prime -25
        		inc_counter stalfos_killpop 25
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    log_counter gerudoAIcontrolled
    log_counter gerudoAIcontrolled
    	end_if
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Hyrule_Prime stalfos
    	and I_CompareCounter popestim_Hyrule_Prime > 350
    	and FactionBuildingExists = c_small_barracks01
    		console_command add_population Hyrule_Prime -10
         		inc_counter popestim_Hyrule_Prime -10
        		inc_counter stalfos_killpop 10
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Hyrule_Prime stalfos
    	and I_CompareCounter popestim_Hyrule_Prime > 350
    	and FactionBuildingExists = c_medium_barracks01
    		console_command add_population Hyrule_Prime -25
         		inc_counter popestim_Hyrule_Prime -25
        		inc_counter stalfos_killpop 25
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Hyrule_Prime stalfos
    	and I_CompareCounter popestim_Hyrule_Prime > 350
    	and FactionBuildingExists = c_large_barracks01
    		console_command add_population Hyrule_Prime -40
         		inc_counter popestim_Hyrule_Prime -40
        		inc_counter stalfos_killpop 40
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Hyrule_Prime stalfos
    	and I_CompareCounter popestim_Hyrule_Prime > 350
    	and FactionBuildingExists = c_grand_barracks01
    		console_command add_population Hyrule_Prime -50
         		inc_counter popestim_Hyrule_Prime -50
        		inc_counter stalfos_killpop 50
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    
    
    
    
    monitor_event FactionTurnStart FactionType stalfos               ;NalOrdona
    	and I_SettlementOwner NalOrdona stalfos
    	and I_CompareCounter popestim_NalOrdona > 350
    		console_command add_population NalOrdona -15
         		inc_counter popestim_NalOrdona -15
    		inc_counter stalfos_killpop 15
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner NalOrdona stalfos
    	and I_CompareCounter popestim_NalOrdona > 1000
    		console_command add_population NalOrdona -50
         		inc_counter popestim_NalOrdona -50
        		inc_counter stalfos_killpop 50
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner NalOrdona stalfos
    	and I_CompareCounter popestim_NalOrdona > 2500
    		console_command add_population NalOrdona -50
         		inc_counter popestim_NalOrdona -50
        		inc_counter stalfos_killpop 50
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner NalOrdona stalfos
    	and I_CompareCounter popestim_NalOrdona > 350
    	and FactionBuildingExists = farms
    		console_command add_population NalOrdona -5  
         		inc_counter popestim_NalOrdona -5
        		inc_counter stalfos_killpop 5 
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner NalOrdona stalfos
    	and I_CompareCounter popestim_NalOrdona > 350
    	and FactionBuildingExists = farms+1
    		console_command add_population NalOrdona -10
         		inc_counter popestim_NalOrdona -10
        		inc_counter stalfos_killpop 10
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner NalOrdona stalfos
    	and I_CompareCounter popestim_NalOrdona > 350
    	and FactionBuildingExists = farms+2
    		console_command add_population NalOrdona -15
         		inc_counter popestim_NalOrdona -15
        		inc_counter stalfos_killpop 15
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner NalOrdona stalfos
    	and I_CompareCounter popestim_NalOrdona > 350
    	and FactionBuildingExists = farms+3
    		console_command add_population NalOrdona -25
         		inc_counter popestim_NalOrdona -25
        		inc_counter stalfos_killpop 25
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner NalOrdona stalfos
    	and I_CompareCounter popestim_NalOrdona > 350
    	and FactionBuildingExists = small_barracks01
    		console_command add_population NalOrdona -10     
         		inc_counter popestim_NalOrdona -10   
        		inc_counter stalfos_killpop 10 
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner NalOrdona stalfos
    	and I_CompareCounter popestim_NalOrdona > 350
    	and FactionBuildingExists = medium_barracks01
    		console_command add_population NalOrdona -25
         		inc_counter popestim_NalOrdona -25
        		inc_counter stalfos_killpop 25
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner NalOrdona stalfos
    	and I_CompareCounter popestim_NalOrdona > 350
    	and FactionBuildingExists = large_barracks01
    		console_command add_population NalOrdona -40
         		inc_counter popestim_NalOrdona -40
        		inc_counter stalfos_killpop 40
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner NalOrdona stalfos
    	and I_CompareCounter popestim_NalOrdona > 350
    	and FactionBuildingExists = grand_barracks01
    		console_command add_population NalOrdona -50
         		inc_counter popestim_NalOrdona -50
        		inc_counter stalfos_killpop 50
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    
    
    
    
    monitor_event FactionTurnStart FactionType stalfos               ;Gor_Galonga
    	and I_SettlementOwner Gor_Galonga stalfos
    	and I_CompareCounter popestim_Gor_Galonga > 350
    		console_command add_population Gor_Galonga -5   
         		inc_counter popestim_Gor_Galonga -5   
    		inc_counter stalfos_killpop 5 
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Gor_Galonga stalfos
    	and I_CompareCounter popestim_Gor_Galonga > 1000
    		console_command add_population Gor_Galonga -50
         		inc_counter popestim_Gor_Galonga -50
        		inc_counter stalfos_killpop 50
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Gor_Galonga stalfos
    	and I_CompareCounter popestim_Gor_Galonga > 2500
    		console_command add_population Gor_Galonga -50
         		inc_counter popestim_Gor_Galonga -50
        		inc_counter stalfos_killpop 50
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Gor_Galonga stalfos
    	and I_CompareCounter popestim_Gor_Galonga > 350
    	and FactionBuildingExists = farms
    		console_command add_population Gor_Galonga -5   
         		inc_counter popestim_Gor_Galonga -5   
        		inc_counter stalfos_killpop 5 
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Gor_Galonga stalfos
    	and I_CompareCounter popestim_Gor_Galonga > 350
    	and FactionBuildingExists = farms+1
    		console_command add_population Gor_Galonga -10
         		inc_counter popestim_Gor_Galonga -10
        		inc_counter stalfos_killpop 10
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Gor_Galonga stalfos
    	and I_CompareCounter popestim_Gor_Galonga > 350
    	and FactionBuildingExists = farms+2
    		console_command add_population Gor_Galonga -15
         		inc_counter popestim_Gor_Galonga -15
        		inc_counter stalfos_killpop 15
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Gor_Galonga stalfos
    	and I_CompareCounter popestim_Gor_Galonga > 350
    	and FactionBuildingExists = farms+3
    		console_command add_population Gor_Galonga -25
         		inc_counter popestim_Gor_Galonga -25
        		inc_counter stalfos_killpop 25
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Gor_Galonga stalfos
    	and I_CompareCounter popestim_Gor_Galonga > 350
    	and FactionBuildingExists = small_barracks01
    		console_command add_population Gor_Galonga -10   
         		inc_counter popestim_Gor_Galonga -10   
        		inc_counter stalfos_killpop 10 
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Gor_Galonga stalfos
    	and I_CompareCounter popestim_Gor_Galonga > 350
    	and FactionBuildingExists = medium_barracks01
    		console_command add_population Gor_Galonga -25
         		inc_counter popestim_Gor_Galonga -25
        		inc_counter stalfos_killpop 25
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Gor_Galonga stalfos
    	and I_CompareCounter popestim_Gor_Galonga > 350
    	and FactionBuildingExists = large_barracks01
    		console_command add_population Gor_Galonga -40
         		inc_counter popestim_Gor_Galonga -40
        		inc_counter stalfos_killpop 40
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    monitor_event FactionTurnStart FactionType stalfos
    	and I_SettlementOwner Gor_Galonga stalfos
    	and I_CompareCounter popestim_Gor_Galonga > 350
    	and FactionBuildingExists = grand_barracks01
    		console_command add_population Gor_Galonga -50
         		inc_counter popestim_Gor_Galonga -50
        		inc_counter stalfos_killpop 50
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    end_monitor
    ...
    ...
    end_if     ;end longest "if" of this submod
    Something I forgot to mention. This game cannot have less population than 400. I left it in 350 as minimun


    4.- The earnings. Because I was so tired about the previous code, I just added relic income for them. (note the counter "stalfos_killpop")
    Here is the code [line 15368 - ]
    Spoiler Alert, click show to read: 
    Code:
    monitor_event FactionTurnStart FactionType stalfos 
    		and I_TurnNumber > 0
    
    
    		if I_CompareCounter stalfos_killpop > 5
    		set_kings_purse stalfos 2
    		end_if
    		if I_CompareCounter stalfos_killpop > 10
    		set_kings_purse stalfos 4
    		end_if
    		if I_CompareCounter stalfos_killpop > 20
    		set_kings_purse stalfos 8
    		end_if
    		if I_CompareCounter stalfos_killpop > 30
    		set_kings_purse stalfos 12
    		end_if
    		if I_CompareCounter stalfos_killpop > 40
    		set_kings_purse stalfos 16
    		end_if
    		if I_CompareCounter stalfos_killpop > 50
    		set_kings_purse stalfos 20
    		end_if
    		if I_CompareCounter stalfos_killpop > 60
    		set_kings_purse stalfos 24
    		end_if
    		if I_CompareCounter stalfos_killpop > 70
    		set_kings_purse stalfos 28
    		end_if
    		if I_CompareCounter stalfos_killpop > 80
    		set_kings_purse stalfos 32
    		end_if
    		if I_CompareCounter stalfos_killpop > 90
    		set_kings_purse stalfos 36
    		end_if...
    ...		...
    ...		...
    ...		...
    		if I_CompareCounter stalfos_killpop > 500000
    		set_kings_purse stalfos 200000
    		end_if
    		if I_CompareCounter stalfos_killpop > 800000
    		set_kings_purse stalfos 320000
    		end_if
    		if I_CompareCounter stalfos_killpop > 1000000;<<<<<Ni el mismo Majora lograría esto 
    		set_kings_purse stalfos 400666
    		end_if
    
    
    	if I_IsFactionAIControlled stalfos
    	terminate_monitor
    	end_if
    
    
    end_monitor
    Notice the "terminate_monitor"? a little logic that I put because of my inexperience. In the next lines after this script is a basic earning for the salfos AI controlled and a little counter attack if the stalfos conquers hyrule castle.









    8.- Stalfos player campaign. Export_descr_buildings; a brief list of many changes. Justification on why to do that mess.
    Spoiler Alert, click show to read: 

    I was going to explain and ask for forgiveness about my stuborness about cancelling out the happines bonuses of buildings for the stalfos, but recently someone in the forums come out with a suggestions of a script that makes the same effect but without having a mess in the building description window.


    Quote Originally Posted by Gebilde View Post
    Q: fernavliz i just went trough your edb
    If you that a Faction does not get a Bonus you like you wanted for the Staflos you denie it for some factions.
    Your Code:
    happiness_bonus bonus 1
    happiness_bonus bonus -1 requires factions { stalfos, } ;Stalfos campaign
    I did not test your Mode yet but i think this bloats up the description Tab
    If you set this way:


    happiness_bonus bonus 1 requires not factions { stalfos,}
    It will disable the bonus and will not appear in the description

    So here is a brief list of what I remmember cancelling bonuses for stalfos and adding recruits pools for buildings capabilities in export_descr_building.txt:
    >>All levels of issettlement have stalking, have the regional recruit requiring hidden resource, have cancelled bonuses.
    >>All iscastle buildings have more law bonus only for the stalfos.
    >>All core buildings (first two, castles and city) have canceled bonuses for stalfos.
    >>All bonuses for traders, bars and artist gallery have cancelled bonuses for stalfos.
    >>Animals Farms has recruit pool for stalhounds and canceled bonuses for them.
    >>Farms farm bonus requires to not have the hidden resource "no_farmable_area_hr" (I gave it to goron mountain, misery mire and twili zone I think). They have recruits pools depending on level and have negative bonus for happines for the stalfos.
    >>Barracks have the normal recruit pools, but it adds negative hapiness bonus for the stalfos
    >>The capitals gives a huge negative hapiness bonus for the stalfos, but it gives a recruit pool to them.
    >>Some other buildings (fire temple, spirit temple, water temple, etc) have something like the capitals.
    >>The stalfos are able to build a mindcontrol for the gohmas.



    9.- Sheikah campaign. Explanation of how do gifting a settlement to other faction works; all thanks to UndyingNephalym who made it.
    Spoiler Alert, click show to read: 

    Because Im getting tired iīm going to be brief. The next script was always available in the original HTW 3.5 script and it was made by UndiyngNephalim; The only detail it has is a ";" that canceled one crucial line that cancelled out the efect of all the code regarding the sheikahs giftings settlements to the hyrule kingdom.
    Here is the code for only 3 settlements [lines of all the code: 119549 - 122977]:


    Spoiler Alert, click show to read: 
    Code:
    ...monitor_event FactionTurnStart FactionType hylian
    		if I_EventCounter sheikah_under_agahnim == 0
    
    
    			if I_SettlementOwner Hyrule_Prime sheikah
    				and not I_SettlementUnderSiege Hyrule_Prime			
    				set_event_counter ros_is_switching 1	
    				console_command create_building Hyrule_Prime ros_target
    				console_command create_unit Hyrule_Prime ros_Peasants 1 0 0		
    				spawn_army
    					faction herooftime
    					character spA, named character, age 18, x 0, y 0, direction S
    					unit Peasants	exp 0	armour 0	weapon_lvl 0
    				end	
    				     faction_emerge herooftime sheikah 1 400.0 0.0 1.2 town true	 ;Important line that was cancelled in HTW3.5 I donīt know why	
    				kill_character spA
    				campaign_wait 0.1			
    				if I_NumberOfSettlements herooftime == 0
    					give_everything_to_faction herooftime sheikah false
    				end_if		
    				if I_NumberOfSettlements herooftime > 0			
    					if not I_SettlementOwner Hyrule_Prime herooftime						
    						give_everything_to_faction herooftime sheikah false			
    					end_if						
    					if I_SettlementOwner Hyrule_Prime herooftime						
    						give_everything_to_faction herooftime hylian false			
    					end_if						
    				end_if			
    				destroy_buildings hylian ros_target false
    				destroy_buildings sheikah ros_target false
    				destroy_units hylian ros_Peasants
    				destroy_units sheikah ros_Peasants		
    				set_event_counter ros_is_switching 0		
    				create_unit Hyrule_Prime, Town Guards, num 1, exp 0, arm 0, wep 0			
    			end_if
    			
    			if I_SettlementOwner NalOrdona sheikah
    				and not I_SettlementUnderSiege NalOrdona			
    				set_event_counter ros_is_switching 1	
    				console_command create_building NalOrdona ros_target
    				console_command create_unit NalOrdona ros_Peasants 1 0 0		
    				spawn_army
    					faction herooftime
    					character spA, named character, age 18, x 0, y 0, direction S
    					unit Peasants	exp 0	armour 0	weapon_lvl 0
    				end	
    				     faction_emerge herooftime sheikah 1 400.0 0.0 1.2 town true		
    				kill_character spA
    				campaign_wait 0.1			
    				if I_NumberOfSettlements herooftime == 0
    					give_everything_to_faction herooftime sheikah false
    				end_if		
    				if I_NumberOfSettlements herooftime > 0			
    					if not I_SettlementOwner NalOrdona herooftime						
    						give_everything_to_faction herooftime sheikah false			
    					end_if						
    					if I_SettlementOwner NalOrdona herooftime						
    						give_everything_to_faction herooftime hylian false			
    					end_if						
    				end_if			
    				destroy_buildings hylian ros_target false
    				destroy_buildings sheikah ros_target false
    				destroy_units hylian ros_Peasants
    				destroy_units sheikah ros_Peasants		
    				set_event_counter ros_is_switching 0		
    				create_unit NalOrdona, Town Guards, num 1, exp 0, arm 0, wep 0			
    			end_if
    
    
    			if I_SettlementOwner Grand_Central_Hive sheikah
    				and not I_SettlementUnderSiege Grand_Central_Hive			
    				set_event_counter ros_is_switching 1	
    				console_command create_building Grand_Central_Hive ros_target
    				console_command create_unit Grand_Central_Hive ros_Peasants 1 0 0		
    				spawn_army
    					faction herooftime
    					character spA, named character, age 18, x 0, y 0, direction S
    					unit Peasants	exp 0	armour 0	weapon_lvl 0
    				end	
    				     faction_emerge herooftime sheikah 1 400.0 0.0 1.2 town true		
    				kill_character spA
    				campaign_wait 0.1			
    				if I_NumberOfSettlements herooftime == 0
    					give_everything_to_faction herooftime sheikah false
    				end_if		
    				if I_NumberOfSettlements herooftime > 0			
    					if not I_SettlementOwner Grand_Central_Hive herooftime						
    						give_everything_to_faction herooftime sheikah false			
    					end_if						
    					if I_SettlementOwner Grand_Central_Hive herooftime						
    						give_everything_to_faction herooftime hylian false			
    					end_if						
    				end_if			
    				destroy_buildings hylian ros_target false
    				destroy_buildings sheikah ros_target false
    				destroy_units hylian ros_Peasants
    				destroy_units sheikah ros_Peasants		
    				set_event_counter ros_is_switching 0	
    				create_unit Grand_Central_Hive, Town Guards, num 1, exp 0, arm 0, wep 0				
    			end_if			
    ...			...
    ...			...
    ...			...
    So first it verifies with "" counter if the sheikahīs are in shadow stance [see lines 119430 - 119545]. Then verifies the settlements the sheikahs own. Then it adds a building and a unit that have like -100% bonus in happiness and law. Then it emerges a new faction (herooftime), it only emerge in zones with the least law order and happiness. Then it returns to the sheikahs through give everything to faction if it failed (I have not see this happen) and errase all the units(ros) and buildings(ros) that just spawned. If it herooftime emerges, it will give everything to the hylian and will erase the ros units and buildings. Ehm, I forgot to mention that I added a "create_unit" command because I felt that these just gained cities where defendless and would riot again to return to the conquered faction.





    10.- Sheikah campaign. Little explanation of how to use the random event generator. Taking advantage of certain console commands to make an easy way to retake a settlement for the localplayer.
    Spoiler Alert, click show to read: 



    So there exist a command that generates a random number and assign it to a created event_counter (it creates it). Damm it, I forgot to mention what event_counter is. Ok, in short an event_counter is almost the same as a counter, but it can be tested within monitors and "if" by conditions like:
    Spoiler Alert, click show to read: 
    Code:
    ...	...
    monitor_event EventCounter EventCounterType zola_invasion
    		and EventCounter > 0
    ...	...
    ...	...
    monitor_event FactionTurnStart FactionType twili
    	and I_EventCounter  Twiliplayer_midna_accepted = 1
    	and I_TurnNumber > 0
    ...	...
    ...	...
    ...	...
    	if I_EventCounter sheikah_under_agahnim == 0
    ...	...
    ...	...
    	monitor_event FactionTurnEnd FactionType lizalfos
    		and I_UnitExists lizalfos Train_General
    		and I_EventCounter trained_generals_lizalfos9 == 1
    ...	...
    ...	...
    monitor_event EventCounter EventCounterType ruins_foundguard
    
    
    
    
    		if I_EventCounter Ruin_Sand_Crab_Cove 1
    			create_unit Sand_Crab_Cove, Armos1, num 1, exp 1, arm 1, wep 1
    		end_if
    ...	...
    ...	...
    etc...


    So the comand to learn is "generate_random_counter <even_counterName> <minValue> <MaxValue>". It is pretty easy to use, just write it anywhere and then use an "if" with "if I_EventCounter (nameofthevariable) > 5" or with "<" or "=" if you prefer.
    Here is an example: [implied that it is inside a monitor]
    Spoiler Alert, click show to read: 
    Code:
    ...
    generate_random_counter Sheikahretakecity 1 10  
    			
    		if  I_EventCounter Sheikahretakecity > 5
    			...
    			console_command capture_settlement Hyrule_Prime
    			...
    		end_if
    ...	...
    ...	...
    As easy as that. Just remember that it is a event_counter, not a simple counter; a condition "I_CompareCounter" cannot compare that value. You dont declare an event_counter, it is just generated by some commands (like this, "historic_event"[the one that generates a windows with an accept/decline option],etc). Remember the twili mini-campaign script I presented you?, it shows up a message if the option midna is accepted. It is another application of I_Event_counter.


    So the use for the sheikahs is this: When in shadow stance, if the sheikahs conquers a city, it will be gifted to hyrule, but it will be remmembered for when the player decides to pass to death stance. When in the first instance of the death stance, each remmembered settlement will have a random chance to automatically become to sheikah ownership. Obviouly the remmembered thing has to be forgotten when that gifted settlement is taken by another faction. Take note that it will require a counter for each settlement that will "remmember" the sheikahs taken cities; There will be another counter that will have the quantity of cities taken by the sheikahs and , because it may go down, there will be another counter that will count the rewards that were given (If it is given units at 5 cities taken, it will not give units if a city is lost and then retaken).


    To make all of this possible, first there is a script to detect if the player have conquered a city:[lines 17483 - 17917]
    Spoiler Alert, click show to read: 
    Code:
    ...
    		if I_SettlementOwner Hyrule_Prime sheikah
    			set_counter Sheikahcontrol_Hyrule_Prime 1	
    			inc_counter Sheikahcitycount 1	
    		end_if
    		if I_SettlementOwner NalOrdona sheikah
    		set_counter Sheikahcontrol_NalOrdona 1		
    			inc_counter Sheikahcitycount 1		
    		end_if
    		if I_SettlementOwner Grand_Central_Hive sheikah
    		set_counter Sheikahcontrol_Grand_Central_Hive 1		
    			inc_counter Sheikahcitycount 1		
    		end_if
    		if I_SettlementOwner Ashinon sheikah
    		set_counter Sheikahcontrol_Ashinon 1		
    			inc_counter Sheikahcitycount 1		
    		end_if
    ...		...
    ...		...



    Then there is the script to forgot that the settlement is part sheikahs for the settlement that where taken back or conquered by other faction. This core must be written first than the previous one, to not mess up with the just conquered by sheikahs.
    lines [16751 - 17290]:
    Spoiler Alert, click show to read: 
    Code:
    monitor_event FactionTurnEnd FactionType sheikah
    	and not IsFactionAIControlled
    	;and I_NumberOfSettlements sheikah > 0; test and error left over code
    
    
    	if I_EventCounter sheikah_under_agahnim == 0 
    
    
    
    
    		if not I_SettlementOwner Hyrule_Prime hylian
    		   and I_CompareCounter Sheikahcontrol_Hyrule_Prime = 1
    		set_counter Sheikahcontrol_Hyrule_Prime 0
    			inc_counter Sheikahcitycount -1			
    		end_if
    		if not I_SettlementOwner NalOrdona hylian
    		   and I_CompareCounter Sheikahcontrol_NalOrdona = 1
    		set_counter Sheikahcontrol_NalOrdona 0	
    			inc_counter Sheikahcitycount -1	
    		end_if
    		if not I_SettlementOwner Grand_Central_Hive hylian
    		   and I_CompareCounter Sheikahcontrol_Grand_Central_Hive = 1
    		set_counter Sheikahcontrol_Grand_Central_Hive 0	
    			inc_counter Sheikahcitycount -1	
    		end_if
    		if not I_SettlementOwner Ashinon hylian
    		   and I_CompareCounter Sheikahcontrol_Ashinon = 1
    		set_counter Sheikahcontrol_Ashinon 0	
    			inc_counter Sheikahcitycount -1	
    		end_if
    Notice that if the hylians loose a gifted settlement, the player will loose the remembered settlement, and it will affect in death stance.


    Then it should make effect the code that UndyingNephalim make for the sheikahs to gift settlements. And then the rewards script should be in place.(with then I mean in executing zone, not in the lines of the script; If there are in different monitors, it is the same if you write them before and after).


    The counter "Sheikahcitycount" will function as a reward giver, so if this value reach a number, it will give a reward but only once. To make that happend, you use another counter ["Sheikahcitycount2"] that donīt go down if a settlement is lost. It just gets to itīs maximun reached.
    The code for all the rewards:[lines 17294 - 17478]
    Spoiler Alert, click show to read: 
    Code:
    ...	...
      if I_CompareCounter Sheikahcitycount2 < 1 
    	if I_CompareCounter Sheikahcitycount > 0
    	   	increment_kings_purse sheikah 200
    		
    		spawn_army 
    				faction sheikah
    					character	random_name, named character, age 23, x 148, y 162, portrait general_sheikah, label SheikaShadowreinforcement
    			unit		Sheikah Spies 	exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Spies		exp 0 armour 0 weapon_lvl 0		
    			end	
    			send_character_off_map SheikaShadowreinforcement		
    
    
    		set_counter Sheikahcitycount2 1
    	end_if
       end_if
    
    
       if I_CompareCounter Sheikahcitycount2 < 2
    	if I_CompareCounter Sheikahcitycount > 1
    	   	increment_kings_purse sheikah 200
    		
    		spawn_army
    				faction sheikah
    					character	random_name, named character, age 23, x 148, y 162, portrait general_sheikah, label SheikaShadowreinforcement
    			unit		Sheikah Spies 	exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Spies		exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Assassins		exp 0 armour 0 weapon_lvl 0		
    			end	
    			send_character_off_map SheikaShadowreinforcement
    
    
    	   set_counter Sheikahcitycount2 2
    	end_if
       end_if
    
    
       if I_CompareCounter Sheikahcitycount2 < 3
    	if I_CompareCounter Sheikahcitycount > 2
    	   	increment_kings_purse sheikah 200
    
    
    		spawn_army 
    				faction sheikah
    					character	random_name, named character, age 23, x 148, y 162, portrait general_sheikah, label SheikaShadowreinforcement
    			unit		Sheikah Spies 	exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Spies		exp 0 armour 0 weapon_lvl 0	
    			unit		Sheikah Spies		exp 0 armour 0 weapon_lvl 0	
    			unit		Sheikah Monks		exp 0 armour 0 weapon_lvl 0	
    			unit		Interrogators		exp 0 armour 0 weapon_lvl 0		
    			end	
    			send_character_off_map SheikaShadowreinforcement
    
    
    	   set_counter Sheikahcitycount2 3
    	end_if
       end_if
    
    
       if I_CompareCounter Sheikahcitycount2 < 4
    	if I_CompareCounter Sheikahcitycount > 3
    	   	increment_kings_purse sheikah 300
    	   set_counter Sheikahcitycount2 4
    	end_if
       end_if
    
    
       if I_CompareCounter Sheikahcitycount2 < 5
    	if I_CompareCounter Sheikahcitycount > 4
    	   	increment_kings_purse sheikah 200
    
    
    			spawn_army
    				faction sheikah
    					character	random_name, named character, age 23, x 148, y 162, portrait general_sheikah, label SheikaShadowreinforcement
    			unit		Sheikah Spies 	exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Spies		exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Assassins		exp 0 armour 0 weapon_lvl 0		
    			end	
    			send_character_off_map SheikaShadowreinforcement
    
    
    	   set_counter Sheikahcitycount2 5
    	end_if
       end_if
    
    
       if I_CompareCounter Sheikahcitycount2 < 6
    	if I_CompareCounter Sheikahcitycount > 5
    	   	increment_kings_purse sheikah 1000
    		
    		spawn_army
    				faction sheikah
    					character	random_name, named character, age 23, x 148, y 162, portrait general_sheikah, label SheikaShadowreinforcement
    			unit		Sheikah Spies 	exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Spies		exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Assassins		exp 0 armour 0 weapon_lvl 0		
    			end	
    			send_character_off_map SheikaShadowreinforcement
    
    
    	   set_counter Sheikahcitycount2 6
    	end_if
       end_if
    
    
       if I_CompareCounter Sheikahcitycount2 < 7
    	if I_CompareCounter Sheikahcitycount > 6
    	   	increment_kings_purse sheikah 200
    	   set_counter Sheikahcitycount2 7
    	end_if
       end_if
    
    
       if I_CompareCounter Sheikahcitycount2 < 8
    	if I_CompareCounter Sheikahcitycount > 7
    	   	increment_kings_purse sheikah 200
    
    
    		spawn_army
    				faction sheikah
    					character	random_name, named character, age 23, x 148, y 162, portrait general_sheikah, label SheikaShadowreinforcement
    			unit		Sheikah Spies 	exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Spies		exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Assassins		exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Assassins		exp 0 armour 0 weapon_lvl 0
    			unit		Interrogators		exp 0 armour 0 weapon_lvl 0		
    			end	
    			send_character_off_map SheikaShadowreinforcement
    
    
    	   set_counter Sheikahcitycount2 8
    	end_if
       end_if
    
    
       if I_CompareCounter Sheikahcitycount2 < 9
    	if I_CompareCounter Sheikahcitycount > 8
    	   	increment_kings_purse sheikah 200
    	   set_counter Sheikahcitycount2 9
    	end_if
       end_if
    
    
       if I_CompareCounter Sheikahcitycount2 < 10
    	if I_CompareCounter Sheikahcitycount > 9
    	   	increment_kings_purse sheikah 200
    
    
    		spawn_army
    				faction sheikah
    					character	random_name, named character, age 23, x 148, y 162, portrait general_sheikah, label SheikaShadowreinforcement
    			unit		Sheikah Spies 	exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Spies		exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Assassins		exp 0 armour 0 weapon_lvl 0		
    			end	
    			send_character_off_map SheikaShadowreinforcement
    
    
    	   set_counter Sheikahcitycount2 10
    	end_if
       end_if
    
    
       if I_CompareCounter Sheikahcitycount2 < 12
    	if I_CompareCounter Sheikahcitycount > 11
    	   	increment_kings_purse sheikah 200
    
    
    			spawn_army 
    				faction sheikah
    					character	random_name, named character, age 23, x 148, y 162, portrait general_sheikah, label SheikaShadowreinforcement
    			unit		Sheikah Spies 	exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Spies		exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Assassins		exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Assassins		exp 0 armour 0 weapon_lvl 0		
    			end	
    			send_character_off_map SheikaShadowreinforcement
    
    
    	   set_counter Sheikahcitycount2 12
    	end_if
       end_if
    
    
       if I_CompareCounter Sheikahcitycount2 < 14
    	if I_CompareCounter Sheikahcitycount > 14
    	   	increment_kings_purse sheikah 2000
    
    
    			spawn_army
    				faction sheikah
    					character	random_name, named character, age 23, x 148, y 162, portrait general_sheikah, label SheikaShadowreinforcement
    			unit		Sheikah Spies 	exp 0 armour 0 weapon_lvl 0
    			unit		Kingmakers		exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Assassins		exp 0 armour 0 weapon_lvl 0
    			unit		Blood Wizards		exp 0 armour 0 weapon_lvl 0
    			unit		Blood Wizards		exp 0 armour 0 weapon_lvl 0
    			unit		Shadow Cannon		exp 0 armour 0 weapon_lvl 0
    			unit		Soldiers of Agahnim		exp 0 armour 0 weapon_lvl 0
    			unit		Soldiers of Agahnim		exp 0 armour 0 weapon_lvl 0
    			unit		Soldiers of Agahnim		exp 0 armour 0 weapon_lvl 0
    			unit		Sheikah Monks		exp 0 armour 0 weapon_lvl 0
    			unit		Devoured		exp 0 armour 0 weapon_lvl 0		
    			end	
    			send_character_off_map SheikaShadowreinforcement
    
    
    	   set_counter Sheikahcitycount2 15
    	end_if
       end_if
    ...	...



    After that, there is a code that is inside a monitor_condition that execute in the exact moment the player go to death stance. In this script it looks for each counter that represent a "remembered" conquered settement; then execute the command "generate_random_counter Sheikahretakecity 1 10 " and if the random value is greater than the met condition, it uses the command "console_command capture_settlement <SettlementName>" to pass the settlement to the local faction (the faction that is controlled by the player, in this case the sheikahs)[this command only works for local faction].
    script with three settlement[whole code, lines 17928 - 18916]:


    Spoiler Alert, click show to read: 
    Code:
    monitor_conditions I_EventCounter sheikah_deathstance_accepted = 1
    	
    set_kings_purse sheikah 0
    	set_counter Sheikahcitycount2 0	
    
    
    	if I_CompareCounter SheikahFirstdeathstance < 1		
    		console_command capture_settlement Kakariko
    		create_unit Kakariko, Soldiers of Agahnim, num 1, exp 0, arm 0, wep 0
    
    
    		;generate_random_counter algo1 1 10
    
    
    		set_event_counter Sheikahretakecity 0
    		generate_random_counter Sheikahretakecity 1 10      ;Hyrule_Prime
    			if  I_EventCounter Sheikahretakecity > 5
    			and I_SettlementOwner Hyrule_Prime hylian
    			and I_CompareCounter Sheikahcontrol_Hyrule_Prime > 0
    				console_command capture_settlement Hyrule_Prime
    				create_unit Hyrule_Prime, Soldiers of Agahnim, num 1, exp 0, arm 0, wep 0
    			end_if
    
    
    		set_event_counter Sheikahretakecity 0
    		generate_random_counter Sheikahretakecity 1 10      ;NalOrdona
    			if  I_EventCounter Sheikahretakecity > 5
    			and I_SettlementOwner NalOrdona hylian
    			and I_CompareCounter Sheikahcontrol_NalOrdona > 0
    				console_command capture_settlement NalOrdona
    				create_unit NalOrdona, Soldiers of Agahnim, num 1, exp 0, arm 0, wep 0
    			end_if
    
    
    		set_event_counter Sheikahretakecity 0
    		generate_random_counter Sheikahretakecity 1 10      ;Grand_Central_Hive
    			if  I_EventCounter Sheikahretakecity > 5
    			and I_SettlementOwner Grand_Central_Hive hylian
    			and I_CompareCounter Sheikahcontrol_Grand_Central_Hive > 0
    				console_command capture_settlement Grand_Central_Hive
    				create_unit Grand_Central_Hive, Soldiers of Agahnim, num 1, exp 0, arm 0, wep 0
    			end_if
    ...	...	...
    Just after this script, I added a script for the sheikahs generals, because there where not a script for them.





    11.- Final comments. Thank you for reading.


    Spoiler Alert, click show to read: 

    I want to thank UndyingNephalim for making this great mod and still continuing it works on all aspects of it; From his Hyrule Historia missions, all diversity in units and strategy factions, to all the speccial factions and to many more aspects in the campaign. I ended up learning from all the scripts that you have in your original HTW mod; maybe I repeated some of the same mistakes to come up with the same way of scripting and solutions (spawn a hero for example). I know that when the twili civil war gets implemented in freeform campaign, it will be great. I also want to thank all the people in this forum for the support and recommendation/suggestions you have given, even your ideas (This submod started with an idea that it would not be difficult to improve the stalfos). It really make me motivated to make an effort to complete (almost) this submod. I may not do something like these again in the short term.


    All these mini-kind of tutorials/explanations are here to complement the sugestions. The sugestion is that this mod will improve its gameplay quality if one of the features of these sumbod is implemented:
    Spoiler Alert, click show to read: 

    - Stalfos being able to recruit just basic units from barracks (I exagerated it here in this submod).
    - Make the stalfos recruit units based from where they are recruiting (using the hidden_resource trick)[dark stalfos in ontheon,onalon; stalfos lizal in faron prime, etc...].
    - Make the stalfos feels that they are the doom. With for example, decreasing population. Rewarding them with that if it is needed; it doesnīt need to be money (like it does in this submod).
    - Make the people fights back the stalfos if they take important cities/temples.
    - Make the AI stalfos spawn and attack the settlements of the strongest factions.
    - Make the sheikahs (player) have units and money rewards for each settlent conquered and gifted to the hylians.
    - Make the sheikahs feel totally different when playing in death stance. My intention in this submod were to make the death stance to feel like an instant declaration of war to the kingdom of hyrule, and retaking some of the gifted settlements.[I made it like a random percentage of succeding with interesting results, although it still not well executed because of the instant war with hyrule (through worsen the relation, I thought it would be realistic)]. Maybe there are other ways to implement different ideas thought these stances.

    Of course these are from my very point of view. I wanna know what you guys think of these features. I know that between the idea and the executions are a lot of errors in this submod, but leaving that out, What would you change from these ideas to use it to improve the Hyrule Total War mod? What other ideas should be implemented to the mod? Any more ideas?
    Last edited by fernavliz; March 17, 2014 at 10:21 PM.

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •