Ok, this thread is for those scripters/coders out there who are interested in trying to get a SINGLE UNIT of Sauron into the campaign on Huge settings. I have been working on it myself and have a sort of beta way of doing it but it doesn't work all the time, I am also new to scripting so I'm sure someone else could do better then me.
OLD METHOD, cannot be used on characters!!!
Spoiler Alert, click show to read:Here is the coding for spawning Sauron in the campaign as a SINGLE model(thanks to Baron Samedi!)
Post of Baron's Regarding the Matter
Screenshots of Sauron in Siege
And here is the coding in the EDU for Sauron Able to be used in Sieges. (nevermind the stats, I have made him stronger)
Spoiler Alert, click show to read:Code:type Sauron Elephants dictionary Sauron_Elephants ; "**"Sauron Elephants category cavalry class heavy voice_type Heavy banner faction main_cavalry banner holy crusade_cavalry soldier Elephant_Crew4, 6, 1, 1 mounted_engine elephant_serpentine mount sauron attributes very_hardy, frighten_foot, frighten_mounted formation 3, 3, 6, 6, 1, horde stat_health 15, 15 ;stat_pri 0, 0, no, 0, 0, no, no, no, none, 0, 1 stat_pri 1, 1, stone, 240, 2, missile, missile_mechanical, piercing, none, 0, 1 ; The projectile could be anything, I was just experimenting. stat_pri_attr no stat_sec 55, 25, no, 0, 0, melee, melee_simple, piercing, sword, 0, 1 stat_sec_attr launching, bp, ap, area stat_pri_armour 5, 5, 5, metal stat_sec_armour 27, 35, metal stat_heat 0 stat_ground 0, 0, -5, 5 stat_mental 18, disciplined, highly_trained, lock_morale stat_charge_dist 30 stat_fire_delay 0 stat_food 60, 300 stat_cost 1, 3500, 1000, 500, 500, 3250, 1, 100000 armour_ug_levels 4 armour_ug_models Elephant_Crew4 ; This change prevents CTD from fire ballista ownership england era 0 england era 1 england era 2 england
FINAL method!!!
Spoiler Alert, click show to read:After a LONG time without doing anything with this, I decided to try and get an actual general into a single unit form on the battlefield. Meaning Sauron could actually have his strat_map model along with being a single soldier in fights. *Also balrog,treebeard etc...
I believe I have finally gotten both to work fluently with each other. Alot of various different tries and many hours of research later, I present to you, the final necessary steps for having Sauron in the campaign for both humans and AI!Also, it is the edition that Sauron is not a ranged unit either so no ugly ammo bar.
Here is the EDU that is necessary for this action, along with what I had in the campaign script to spawn him.
EDU:
Spoiler Alert, click show to read:Code:type Sauron Elephants dictionary Sauron_Elephants ; "**"Sauron Elephants category cavalry class heavy voice_type Heavy banner faction main_cavalry banner holy crusade_cavalry soldier Elephant_Crew4, 100, 1, 1 mount sauron attributes very_hardy, frighten_foot, frighten_mounted formation 3, 3, 6, 6, 1, square stat_health 1, 15 stat_pri 0, 0, no, 0, 0, no, no, no, none, 0, 1 stat_pri_attr no stat_sec 55, 25, no, 0, 0, melee, melee_simple, piercing, sword, 0, 1 stat_sec_attr launching, bp, ap, area stat_pri_armour 5, 5, 5, metal stat_sec_armour 27, 35, metal stat_heat 0 stat_ground 0, 0, -5, 5 stat_mental 18, disciplined, highly_trained, lock_morale stat_charge_dist 30 stat_fire_delay 0 stat_food 60, 300 stat_cost 1, 3500, 1000, 500, 500, 3250, 1, 100000 armour_ug_levels 0 armour_ug_models Elephant_Crew3 ownership england era 0 england era 1 england era 2 england
Script: If you want to test. *This does not have sauron's strat model trait because I have done that in one other version of the mod and I cant find the file, and I don't feel like dealing with it.
Spoiler Alert, click show to read:Code:monitor_event FactionTurnStart FactionType england if I_TurnNumber = 1 ;note that this wont spawn sauron till turn 2 spawn_army faction england character random_name, named character, age 18, x 262, y 126 traits LoyaltyStarter 1 , GoodCommander 1 ;doesn't matter if you dont use sauron strat model unit Sauron Elephants soldiers 1 exp 0 armour 0 weapon_lvl 0 end end_if end_monitor
*Note: I tested this up in multiple scenario's
Leaving the character in a base for 20 turns, sauron starts with 100 numbers in the campaign card. However it is only 1 in fights. If Sauron gets into a fight and loses numbers(only happens in auto resolve) it raised the campaign numbers up to 77(77 seems to be the max for the mounted_engine line method also...)
All had ONE SINGLE MODEL in actual fights regardless of what the unit card says in campaign. The unit card says 3 in fighting.
The actual way I beat the hardcode was fighting it with another hardcode. So fight the power of hardcodes!
P.S. Hopefully you guys will have fun with this, it's just a huge weight of my back to finally finish this deal![]()
*Note to self*
"monitor_event FactionTurnEnd FactionType slave" is the moment right before replenishing bodyguard unit occurs






Reply With Quote

Under the patronage of 




