Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: ERM tweaking fun
Thread: ERM tweaking fun
Russtops
Russtops

Tavern Dweller
posted April 11, 2006 04:14 AM

ERM tweaking fun

So, I've been experimenting with the Henchmen script (making it ridiculously powerful in many ways, as I tend to powergame), as well as tossing around and playing with some of Sagamosa's scripts (I've managed to get the Ambush script working separate of everything else; attempting to implement it as a benefit of Expert Tactics as "Ambush Tactics")...  but I keep thinking about various other things as well.

Since I'm not a full-on ERM programmer, and just a tweaker, I've been wondering if in the Map Enhancements how it's possible to add something like "Experience Stones give double experience" or "All enhancement dwellings twice as powerful" (school of war, mercenary camp, marletto tower, experience stones, etc).

The second thought was if someone could take Experience Stones along these same lines and make them equivalent to "Dream Teacher Stones" -- +500 or +1000 experience initially, then +500 per additional stone visited...

I've given the central arrow tower "Casts Disrupting Ray" (but can't get the other two to do it), and wanted to give all arrow towers "Ignores 90% Defense" as well as give that same benefit to the Catapult in combat (War Machines script).  Mainly because I want to get something representative of how their shots would pierce armor and reduce the stack's defensive strength...

I've given Magi Forgetfulness shot, and Archmagi Dispel Helpful shot...  and thought about the infinite modifications that can be given to the other creatures as well.

Anyone want to contribute ideas here?
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Fnord
Fnord


Promising
Famous Hero
posted April 11, 2006 08:59 AM

Learning Stones giving double experience (2000 XP) should be quite simple.

ZVSE
!?OB100; [Learning Stone is trigger]
!!ST998:N?y-1; [Learning Stone's ID#: y-1]
!!HE-1:V0/y-1/?y-2; [See if Hero has already visited: y-2]
!!VRv1180:S0; [Initialize v1180 to 0]
!!VRv1180&y-2=0:S1; [Set v1180 to 1 if Hero hasn't visited]

!$OB100&v1180=1; [Learning Stone is post-visit trigger]
!!HE-1:Ed1000; [Give an additional 1000 XP to hero]
!!VRv1180:S0; [Reset v1180 to 0]

The only problem is that the message still says 1000 XP but I think this could be fixed too with a little more work.

To do a Dream Teacher style script, it would be similar but you would also need to use a w variable (hero variable) to keep track of how many stones had been visited so far and then calculate the total based on that. Perhaps that would be easiest with a DO loop or something so you could loop that number of times, doubling the XP each time through the loop.


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Vlaad
Vlaad


Admirable
Legendary Hero
ghost of the past
posted April 12, 2006 10:51 AM
Edited by Vlaad on 16 Apr 2006

ERM tweaking

I agree ERM tweaking is a lot fun for mapmakers and players alike. In addition to one's own work, tweaked scripts are a powerful tool for customization and a must when it comes to unique WoG scenarios.

Don't forget to list the credits, though!
;)
Quote:
I've given Magi Forgetfulness shot, and Archmagi Dispel Helpful shot...  and thought about the infinite modifications that can be given to the other creatures as well.


In one of my maps Rogues played an important role, so I decided to upgrade them to Assassins:

ZVSE

!?OB68/81/0; [object on the map]
!!IF:M^{Bandits' Hideout}

After sharing dark secrets of the Guild all your Rogues become Assassins.^;
!#VRz12:S^Assassin^;
!#VRz13:S^Assassins^;
!#VRz14:S^Spying.Climb walls.No retaliation.Strike all around.^;
!!UN:G1/143/0/12;
!!UN:G1/143/1/13;
!!UN:G1/143/2/14;
!!MA:X143/?i;
!!VRi:+2;
!!MA:X143/i;
!!MA:X143/?j;
!!VRj:+65536;
!!MA:X143/j;
!!MA:X143/?k;
!!VRk:+524288;
!!MA:X143/k;

Obviously, "Climb Walls" works as "Fly", but sounds more appropriate here. :P

In addition, one of the starting heroes got the Rogues specialty:


ZVSE

!#HE91:X4/143/5/5/5/0/0; [Set Jeddite's specialty to Rogues]
!#VRz999:S^Gives + 5 attack, defense and damage bonus to Rogues^; [Set up text]
!#UN:G2/91/2/999; [Set Jeddite's speciality text]
!#UN:G2/91/3/245; [Set specialty picture to Rogues]

Sadly, it seems my favorite Ghosts lose their Attract Souls ability if they get Strike All Around attack.  It would have been a mighty combination...!


Elsewhere, I modified the famous Artifact Boost script since I needed different bonuses - Sharpshooters, War Zealots and Nightmares! ;)

ZVSE

** Artifact Boost ERM script v1.4 - Donald X. Vaccarino, modified by Vlaad
** Requires WOG version 3.53 or later
** Make formerly weak artifacts do something special, usually once/week

** Bird Of Perception gives 10 Sharpshooters
** Pendant Of Life gives 10 War Zealots
** Pendant Of Death gives 10 Nightmares
** Targ Of The Rampaging Ogre provokes a fight with 300 Ogres
** Dead Man's Boots gives Dead Man's Boots
** Pendant Of Total Recall gives 1000 experience
** Emblem Of Cognizance gives 15 gold per troop
** Stoic Watchman reveals a large map area
** Pendant Of Second Sight upgrades lowly shooters
** Pendant Of Holiness gives a random holy spell
** Boots Of Polarity may be traded for a one-time movement bonus
** Garniture Of Interference may be traded for a magic skill
** Pendant Of Dispassion gives +1 knowledge
** Pendant Of Free Will upgrades golems and peasants

** following artifacts new as of script version 1.3

** Diplomat's Ring may be traded to double number of first level troops hero has
** Surcoat Of Counterpoise doubles the effects of these artifacts, where applicable
** Orb Of Vulnerability gives 1 Darkness Dragon plus another per level of Wisdom
** Sphere Of Permanence gives 1 Mighty Gorgon plus another per 10 Defense
** Statesman's Medal may be traded at a town for up to three buildings
** Orb Of Inhibition may be traded to modify a creature's abilities

** All artifacts function for the AI (if worn) but AI won't agree to trades.

** To use this code, put it into a Global Event, set to never happen.

** Variables Used: v600-v628, v630-v631, v640-v648, z326-z331, z410-z428, i-l
** Flags Used: 1, 2, 5
** z410-z428 must not be modified by other programs!
** The other variables may be used elsewhere but will be trashed by this code.

** Functions Used: 599-609
** Timers Used: 76


** Initialization Code

!#TM76:S1/999/7/255; [timer once/week for all players]

!#VRz410:S^{Bird Of Perception}

This figurine increases your Eagle Eye skill by 5 percent, and gives you 10 Sharpshooters at the start of each week.^;
!#HT5/63:T410;
!#VRz411:S^{Pendant Of New Order}

Wearing this item renders your units immune to the Death Ripple spell, and gives you 10 War Zealots at the start of each week.^;
!#HT5/103:T411;
!#VRz412:S^{Pendant Of Death}

Wearing this item renders your units immune to the Destroy Undead spell, and gives you 10 Nightmares at the start of each week.^;
!#HT5/104:T412;
!#VRz413:S^{Dead Man's Boots}

Worn on the feet, these boots increase your Necromancy skill by 15 percent, and produce a copy of themselves at the start of each week.^;
!#HT5/56:T413;
!#VRz414:S^{Pendant Of Total Recall}

Wearing this item renders your units immune to the Forgetfulness spell, and gives you 1000 experience at the start of each week.^;
!#HT5/107:T414;
!#VRz415:S^{Emblem Of Cognizance}

This item increases your Eagle Eye skill by 15 percent, and gives you 15 gold per troop at the start of each week.^;
!#HT5/65:T415;
!#VRz416:S^{Stoic Watchman}

This figurine increases your Eagle Eye skill by 10 percent, and reveals a large area around you at the start of each week.^;
!#HT5/64:T416;
!#VRz417:S^{Pendant Of Second Sight}

Wearing this item renders your units immune to the Blind spell, and upgrades your low-level shooting troops at the start of each week.^;
!#HT5/101:T417;
!#VRz418:S^{Pendant Of Holiness}

Wearing this item renders your units immune to the Curse spell, and gives you a random holy spell at the start of each week.^;
!#HT5/102:T418;
!#VRz419:S^{Boots Of Polarity}

Worn on the feet, this item increases your Magic Resistance by 15 percent, and at the start of a week may be traded for extra movement.^;
!#HT5/59:T419;
!#VRz420:S^{Garniture Of Interference}

Worn about the neck, this item increases your Magic Resistance by 5 percent, and at the start of a week may be traded to learn a Magic skill.^;
!#HT5/57:T420;
!#VRz421:S^{Pendant Of Dispassion}

Wearing this item renders your units immune to the Berserk spell, and gives you +1 Knowledge at the start of each week.^;
!#HT5/100:T421;
!#VRz422:S^{Pendant Of Free Will}

Wearing this item renders your units immune to the Hypnotize spell, and upgrades your Golems and Peasants at the start of each week.^;
!#HT5/105:T422;
!#VRz423:S^{Diplomat's Ring}

Worn on the finger, the Diplomat's Ring reduces the cost of surrenduring, and at the start of a week may be traded to double your amount of first-level troops.^;
!#HT5/67:T423;
!#VRz424:S^{Surcoat Of Counterpoise}

Worn about the shoulders, this item increases your Magic Resistance by 10 percent, and doubles the effects of some of your other strange new artifacts.^;
!#HT5/58:T424;
!#VRz425:S^{The Eye of the Darkness Dragon}

During combat, this orb negates the natural magic resistance of all creatures on the battlefield. At the start of each week, this Orb gives you a Darkness Dragon, plus an additional one for each level of Wisdom skill.^;
!#HT5/93:T425;
!#VRz426:S^{Sphere Of Permanence}

Wielding this sphere renders your units immune to the Dispel Magic spell, and gives you a Mighty Gorgon, plus a Mighty Gorgon per 10 Defense, at the start of each week.^;
!#HT5/92:T426;
!#VRz427:S^{Statesman's Medal}

Worn about the neck, the Statesman's Medal reduces the cost of surrenduring, and may be traded at a town to build a few structures.^;
!#HT5/66:T427;
!#VRz428:S^{Orb Of Inhibition}

This powerful orb prevents all spell casting in combat... and holds a djinn trapped inside it.^;
!#HT5/126:T428;
** end of Initialization Code


** Timer routine

!?TM76;

!!OW:C?v630; [get current player]
!!VRv600:S0; [start with hero #0]
!!DO600/0/155/1:P; [iterate through all heroes]

** end of timer routine


** function to iterate through current player's heroes

!?FU600;

!!HEv600:O?v602; [get owner of iterated hero]
!!FU602&v602>=0/v630=v602:P; [if hero in use and it's that hero's owner's turn, continue in function 602]
!!VRv600:+1; [inc hero #]

** end of function


** function to check one hero for special artifacts
** note the code is broken up into multiple functions to speed it up
** checking 156 heroes for 12 artifacts would take forever

!?FU602;

!!OW:Iv602/?v603; [get AI (1) or human (0)]

!!HEv600:A2/63/0/?v610; [check for Bird Of Perception]
!!HEv600:A2/103/0/?v611; [check for Pendant Of Life]
!!HEv600:A2/104/0/?v612; [check for Pendant Of Death]
!!HEv600:A2/16/0/?v613; [check for Targ Of The Rampaging Ogre]
!!HEv600:A2/56/0/?v614; [check for Dead Man's Boots]
!!HEv600:A2/107/0/?v615; [check for Pendant Of Total Recall]
!!HEv600:A2/65/0/?v616; [check for Emblem Of Cognizance]
!!HEv600:A2/64/0/?v617; [check for Stoic Watchman]
!!HEv600:A2/101/0/?v618; [check for Pendant Of Second Sight]
!!HEv600:A2/102/0/?v619; [check for Pendant Of Holiness]
!!HEv600:A2/59/0/?v620; [check for Boots Of Polarity]
!!HEv600:A2/57/0/?v621; [check for Garniture Of Interference]
!!HEv600:A2/100/0/?v622; [check for Pendant Of Dispassion]
!!HEv600:A2/105/0/?v623; [check for Pendant Of Free Will]
!!HEv600:A2/67/0/?v624; [check for Diplomat's Ring]
!!HEv600:A2/58/0/?v625; [check for Surcoat Of Counterpoise]
!!HEv600:A2/93/0/?v626; [check for Orb Of Vulnerability]
!!HEv600:A2/92/0/?v627; [check for Sphere Of Permanence]
!!HEv600:A2/126/0/?v628; [check for Orb Of Inhibition]

!!VRv608:Sv610 +v611 +v612 +v613 +v614 +v615 +v616 +v617 +v618 +v619 +v620 +v621 +v622 +v623;
!!VRv608:+v624 +v625 +v626 +v627 +v628;
!!FU601&v608>0:P; [handle any artifacts if found]

** end of function


** function to handle special artifacts for a hero who has one

!?FU601;

!!HEv600:B0/?z326; [get hero name]
!!HEv600:P?v604/?v605/?v606; [get hero x/y/level]
!!HEv600:R2/?v607; [get hero sex]
!!VRz327&v607=0:S^he^;
!!VRz327&v607=1:S^she^;
!!VRz328&v607=0:S^his^;
!!VRz328&v607=1:S^her^;
!!IF:V5/0;
!!IF&v603=0:V5/1; [use flag 5 to mean we've got a human player's hero]

!!IF&5/v625>0:M^%Z326's Surcoat Of Counterpoise grows warm, then cold, then warm again. It's unclear what it's doing, but it seems to be doing something.^;
!!VRv631:S1;
!!VRv631&v625>0:S2; [some effects will be multiplied by v631 - doubled for Surcoat]

!!IF&5/v610>0:M^Impressed by %Z326's sharp eye, some Sharpshooters offer to join %Z328 army.^;
!!VRv610:*10;
!!VRv610:*v631; [Surcoat factor]
!!HEv600&5/v610>0:C137/v610/-1/0/-1/0/-1/0/-1/0/-1/0/-1/0; [give 6 royal griffins per Bird]
!!FU603&-5/v610>0:P137/v610; [offer AI griffins]

!!IF&5/v611>0:M^Satisfied with %Z326's devotion to New Order, some War Zealots offer to join %Z328 army.^;
!!VRy1:S10;
!!VRy1:*v631; [Surcoat factor]
!!HEv600&5/v611>0:C169/y1/-1/0/-1/0/-1/0/-1/0/-1/0/-1/0; [give 24 sprites]
!!FU603&-5/v611>0:P169/y1; [offer AI sprites]


!!IF&5/v612>0:M^Trustful of %Z326's devotion to Death, some Nightmares offer to join %Z328 army.^;
!!VRy1:S10;
!!VRy1:*v631; [Surcoat factor]
!!HEv600&5/v612>0:C172/y1/-1/0/-1/0/-1/0/-1/0/-1/0/-1/0; [give 12 zombies]
!!FU603&-5/v612>0:P172/y1; [offer AI zombies]

!!HEv600:S7/?y2; [get wisdom level]
!!VRy1:Sy2;
!!VRy1:+1; [and one more]
!!VRy1:*v626; [per Orb Of Vulnerability]
!!VRy1:*v631; [Surcoat factor]
!!IF&5/v626>0/y1=1:M^Pleased with %Z326's ability to cast spells on magic resistant creatures, an Archmage offers to join %Z328 army.^;
!!IF&5/v626>0/y1>1/y2=0:M^Impressed with %Z326's ability to cast spells on magic resistant creatures, some Darkness Dragons offer to join %Z328 army.^;
!!IF&5/v626>0/y1>1/y2>0:M^Pleased with %Z326's ability to cast spells on magic resistant creatures, and impressed by %Z328 devotion to Wisdom, some Darkness Dragons offer to join %Z328 army.^;
!!HEv600&5/v626>0:C155/y1/-1/0/-1/0/-1/0/-1/0/-1/0/-1/0; [give 1-4 archmages]
!!FU603&-5/v626>0:P35/y1; [offer AI archmages]

!!HEv600:Fd/?y2/d/d; [get defense]
!!VRy2::10; [every 10 gets you a mighty gorgon]
!!VRy1:Sy2;
!!VRy1:+1; [plus one base gorgon]
!!VRy1:*v627; [per Sphere Of Permanence]
!!VRy1:*v631; [Surcoat factor]
!!IF&5/v627>0/y1=1:M^Heartened by %Z326's protection from Dispel, a Mighty Gorgon offers to join %Z328 army.^;
!!IF&5/v627>0/y1>1/y2=0:M^Heartened by %Z326's protection from Dispel, some Mighty Gorgons offer to join %Z328 army.^;
!!IF&5/v627>0/y1>1/y2>0:M^Heartened by %Z326's protection from Dispel, and impressed by %Z328 devotion to Defense, some Mighty Gorgons offer to join %Z328 army.^;
!!HEv600&5/v627>0:C103/y1/-1/0/-1/0/-1/0/-1/0/-1/0/-1/0; [give 1 or more mighty gorgons]
!!FU603&-5/v627>0:P103/y1; [offer AI mighty gorgons]

!!IF&5/v614>0:Q1/8/56/1^Eventually, everyone dies... %Z326 has been tramping around so long in the Dead's Man's Boots, %Z327 can't tell them apart from %Z328 other shoes...^;
!!HEv600&v614>0:A56; [give Dead Man's Boots]
!!HEv600&v614>0/v625>0:A56; [another pair for Surcoat]

!!VRy1:S1000;
!!VRy1:*v631; [Surcoat factor]
!!IF&5/v615>0:Q1/17/y1/1^With %Z328 handy Pendant, %Z326 is remembering all sorts of useful things... some %Z327 never knew in the first place!^;
!!HEv600&v615>0:Edy1; [give 1000 experience]

!!VRk:S0; [0 counted]
!!DO606/0/6/1&v616>0:P; [count number of creatures Hero has]
!!VRj:S15;
!!VRj:*v631; [Surcoat factor]
!!VRk&v616>0:*j; [15 gold per creature per Emblem]
!!VRk&v616>0:*v616;
!!IF&5/v616>0:Q1/6/k/1^With %Z328 Emblem Of Cognizance, %Z326 would surely notice if any of %Z328 troops kept any loot for themselves. That's what they think at least. They cough up %Vj gold per troop per Emblem.^;
!!OW&v616>0:Rv602/6/dk; [give the gold]

!!IF&5/v617>0:M^Through the magic of the Stoic Watchman, a large area around %Z326 is revealed.^;
!!VRy1:S30; [area]
!!VRy1&v625>0:S42; [double area for Surcoat - 30 times square root of 2]
!!UN&v617>0:Sv604/v605/v606/v602/y1; [reveal area]
!!UN&v617>0:R1; [redraw screen]

!!IF&5/v618>0:M^By studying with %Z326's Pendant Of Second Sight, %Z328 low-level shooting troops (if any) improve themselves.^;
!!HEv600&v618>0:C1/2/3/d; [turn archers to marksmen]
!!HEv600&v618>0:C1/18/19/d; [turn wood elves to grand elves]
!!HEv600&v618>0:C1/28/29/d; [turn gremlins to master gremlins]
!!HEv600&v618>0:C1/44/45/d; [turn gogs to magogs]
!!HEv600&v618>0:C1/74/75/d; [turn beholders to evil eyes]
!!HEv600&v618>0:C1/88/89/d; [turn orcs to orc chieftans]
!!HEv600&v618>0:C1/100/101/d; [turn lizard men to lizard warriors]
!!HEv600&v618>0:C1/112/127/d; [turn air elementals to storm elementals]

!!VRi&v619>0:S0 R6; [random #0-6]
!!VRj&v619>0/i<=1:S41; [0-1 Bless]
!!VRj&v619>0/i>=2/i<=3:S37; [2-3 Cure]
!!VRj&v619>0/i=4:S48; [4 Prayer]
!!VRj&v619>0/i=5:S25; [5 Destroy Undead]
!!VRj&v619>0/i=6:S38; [6 Resurrection]
!!HEv600&v619>0:A2/0/?k/?l; [check for spell book]
!!IF&5/v619>0/l=0:Q1/9/j/1^By communing with the Pendant of Holiness, %Z326 would have learned a holy spell... but %Z327 has no spell book.^;
!!IF&5/v619>0/l>0:Q1/9/j/1^By communing with the Pendant Of Holiness, %Z326 learns a holy spell.^;
!!HEv600&v619>0/l>0:Mj/1; [give spell]

!!IF&5/v620>0:Q2^%Z326's troops are eager to cover ground. %Z326 could probably go a lot further today, but it would wear out %Z328 Boots Of Polarity. Is that worth it to you?^;
!!IF&5/v620>0/-2:M^%Z326's troops grumble, but resign themselves to a long slow journey.^;
!!IF&5/v620>0/2:M^%Z326 gets ready for a long journey.^;
!!VRy1:S1700; [about a day's movement]
!!VRy1:*v631; [Surcoat factor]
!!HEv600&5/v620>0/2:Wdy1; [add movement]
!!HEv600&5/v620>0/2:A3/59/1/1; [remove Boots Of Polarity]

!!VRi&5/v621>0:S14 R3; [pick a random magic skill]
!!UN&5/v621>0:N4/z329/i; [get name of skill]
!!IF&5/v621>0:Q2^An irritated wizard appears before %Z326 and says: "There's been some Interference mucking up my experiments, and... I think it's coming from your Garniture. I'll teach you %Z329 if you give me the thing. Deal?"^;
!!IF&5/v621>0/-2:M^The wizard frowns, then disappears without saying a word.^;
!!HEv600&5/v621>0/2:Si/?j; [get level in that skill]
!!IF&5/v621>0/2/j=3:M^The wizard says, "Sadly, you are already an expert in %Z329. I couldn't cheat you out of your cursed Garniture." He vanishes.^;
!!VRk&5/v621>0/2/j<3:Si *3 +3 +j; [get picture number of skill at level given]
!!IF&5/v621>0/2/j<3:Q1/20/k/1^The wizard smiles politely. "Thanks. Now I can get on with my work." He vanishes.^;
!!HEv600&5/v621>0/2/j<3:A3/57/1/1; [remove Garniture Of Interference]
!!HEv600&5/v621>0/2/j<3:Si/d1; [give skill]

!!IF&5/v622>0:Q1/34/v631/1^With Dispassion comes calm... with calm comes Knowledge. %Z326 learns.^;
!!HEv600&v622>0:Fd/d/d/dv631; [+1 knowledge]

!!IF&5/v623>0:M^The Pendant Of Free Will works its mischievous magic on %Z326's mindless Golems and weak-willed Peasants (if any)!^;
!!HEv600&v623>0:C1/139/143/d; [turn peasants to rogues]
!!HEv600&v623>0:C1/116/117/d; [turn gold golems to diamond golems]
!!HEv600&v623>0:C1/33/116/d; [turn iron golems to gold golems]
!!HEv600&v623>0:C1/32/33/d; [turn stone golems to iron golems]
!!HEv600&v623>0/v625>0:C1/116/117/d; [turn gold golems to diamond golems, again for Surcoat]
!!HEv600&v623>0/v625>0:C1/33/116/d; [turn iron golems to gold golems, again for Surcoat]

!!VRk:S0; [0 counted]
!!DO607/0/6/1:P; [count number of first level troop stacks into k]
!!IF&5/v624>0/k>0:Q2^Some of %Z326's troops think that %Z327 should make a donation to a local charity. A Diplomat's Ring would do nicely. Does %Z326 make this generous donation?^;
!!IF&5/v624>0/k>0/2:M^%Z326's troops are impressed by %Z328 generosity... %Z328 ranks swell with new recruits!^;
!!IF&5/v624>0/k>0/-2:M^%Z326's troops grumble, but resign themselves to serving a stingy hero.^;
!!IF&-5:V2/0; [AI just says no]
!!DO608/0/6/1&v624>0/k>0/2:P; [double qty in first level stacks]
!!HEv600&5/v624>0/k>0/2:A3/67/1/1; [remove a Diplomat's Ring]
!!UN&v624>0/2:R1; [redraw screen]

!!VRk:S0 R6; [random slot # to start from]
!!DO599/0/6/1:P; [find a slot with a creature - we always will]
!!HEv600:C0/l/?j/?i; [get j type i qty of our random slot creature]
!!UN:N3/330/j/1; [get plural name of creature into z330]
!!VRy1:S0 R1; [pick no-retaliation or attack-twice to offer]
!!VRz331&y1=0:S^attack twice^;
!!VRz331&y1=1:S^not be retaliated against^;
!!IF&5/v628>0:Q2^Peering deep inside %Z328 Orb Of Inhibition, %Z326 can see a djinn trapped within. The djinn pleads to be freed.

"I see you are a lover of %Z330," it says. "If you set me free, I will make it so that, from this day forth, all %Z330 will %Z331 in battle!"

Does %Z326 shatter the Orb, to free the djinn?^;
!!IF&-5:V2/0; [AI doesn't do it]
!!IF&5/v628>0/2:M^The grateful djinn fulfills his promise!^;
!!IF&5/v628>0/-2:M^The djinn retreats sadly back into the mists inside the Orb.^;
!!HEv600&v628>0/2:A3/126/1/1; [remove an Orb Of Inhibition]
!!MA&v628>0/2:Xj/?y2; [read current creature flags]
!!VRy2&v628>0/2/y1=0:|32768; [attack twice bit]
!!VRy2&v628>0/2/y1=1:|65536; [no retaliation bit]
!!MA&v628>0/2:Xj/y2; [set creature flags!]

!!IF&5/v613>0:M^The Rampaging Ogre wants his Targ back! His minions attack %Z326!!^;
!!VRy1:S300;
!!VRy1:*v631; [Surcoat factor]
!!HEv600&v613>0:Tv604/v605/v606/90/y1; [ogre fight]

** end of function


** function to try to give creatures to AI hero
** x1=creature type x2=quantity

!?FU603;

!!VRv609:S0 -1; [-1 indicates no slot found]
!!DO604/0/6/1:Px1; [iterate through slots]
!!HEv600&v609>=0:C0/v609/?i/d; [see what's in the slot we found]
!!HEv600&v609>=0/i=x1:C0/v609/x1/dx2; [gain creatures in existing slot]
!!HEv600&v609>=0/i=-1:C0/v609/x1/x2; [set creatures in empty slot]

** end of function


** function to check if an AI hero slot is empty or has a given creature type
** x1=creature type x16=slot
** result is to set v609 to the slot # if usable

!?FU604;

!!HEv600:C0/x16/?i/d; [check creature type without modifying]
!!VRv609&i=-1:Sx16; [it's empty!]
!!VRv609&i=x1:Sx16; [it's our type!]

** end of function


** function to add one slot's number of troops
** slot number is in x16; result accumulates in k

!?FU606;

!!HEv600:C0/x16/d/?i; [get # of troops in slot x16]
!!VRk:+i; [add them up]

** end of function


** function to check a slot for first-level-troops
** slot number is x16; result accumulates in k

!?FU607;

!!HEv600:C0/x16/?y1/?y2; [get y1 creature type y2 qty]
!!FU609&y2>0:Py1; [check creature type for being first level]
!!VRk&y2>0/j=1:+1; [count it]

** end of function


** function to double first level troop slots
** slot number is x16

!?FU608;

!!HEv600:C0/x16/?y1/?y2; [get y1 creature type y2 qty]
!!FU609&y2>0:Py1; [check creature type for being first level]
!!VRy2:*2; [double qty]
!!VRy2&v625>0:*2; [again for Surcoat]
!!HEv600&y2>0/j=1:C0/x16/y1/y2; [double the stack]

** end of function


** function to check creature type for being first level
** type checked is x1, result (0 or 1) returned in j

!?FU609;

!!VRj:S0;
!!VRj&x1=138:S1; [halflings]
!!VRj&x1=139:S1; [peasants]
!!VRj&x1=143:S1; [rogues]
!!VRx1::2; [now normal and upgraded are same number]
!!VRj&x1=0:S1; [pikemen]
!!VRj&x1=7:S1; [centaurs]
!!VRj&x1=14:S1; [gremlins]
!!VRj&x1=21:S1; [imps]
!!VRj&x1=28:S1; [skeletons]
!!VRj&x1=35:S1; [troglodytes]
!!VRj&x1=42:S1; [goblins]
!!VRj&x1=49:S1; [gnolls]
!!VRj&x1=59:S1; [pixies]

** end of function


** function to check a slot for creatures
** k = random slot to check, l = slot found

!?FU599;

!!VRy1:Sk;
!!VRy1:%7; [now we have a usable slot number]
!!HEv600:C0/y1/?i/?j; [get i type j qty]
!!VRl&i<>-1/j>0:Sy1; [it's got something!]
!!VRk:+1; [next slot]

** end of function


** trigger for visiting towns/castles

!?OB98;

!!HE-1:A2/66/0/?v628; [check for Statesman's Medal]
!!IF:V2/0; [AI won't give medal]
!!IF&1000/v628>0:Q2/8/66/2^You could give your Statesman's Medal to this town. The citizens might be pleased enough to build something in your honor. Do you give the town your Medal?^;
!!IF&1000/v628>0/-2:M^They probably wouldn't have built anything for you anyway.^;
!!FU605&2:P; [handle giving the medal]

** end of trigger

** function to handle statesman's medal when trade chosen

!?FU605;

!!HE-1:A3/66/1/1; [remove Statesman's Medal]
!!HE-1:P?v604/?v605/?v606; [get hero x/y/level]
!!CA604:T?y7; [get town type]

!!CA604:B3/37; [check for upgraded dwelling 1]
!!VRy1:S0;
!!VRy1&-1:S1; [y1=1 means we built upgraded dwelling 1]
!!CA604:B3/30; [check for basic dwelling 1 - to see if we should add creatures]
!!CA604&-1:B1/30; [build basic dwelling if needed]
!!CA604:B1/37; [build upgraded dwelling 1]
!!VRy8:Sy7;
!!VRy8:*14; [get number of 1st level creature]
!!VRy8:+1; [upgraded]
!!VRy8&y8=113:S119; [sprites]
!!MA:Gy8/?y9; [get growth rate of that creature]
!!CA604&-1:M1/0/d/y9; [add creatures (0 = 1st level) if dwelling 1 wasn't there before]
!!UN:N2/326/y7/37; [name of upgrade building]

!!VRv640:C21/17/21/21/17/22/21/21/21; [look-up table of special building numbers by town]
!!VRv600:Sy7;
!!VRv600:+640; [now vv600 = special building number]
!!VRk:S1; [assume we met requirements to build it]
!!CA604:B3/33; [check for dwelling 4 (barracks)]
!!VRk&-1/y7=0:S0; [needed for castle's stables]
!!CA604:B3/7; [check for fort]
!!VRk&-1/y7=2:S0; [needed for tower's lookout tower]
!!VRk&-1/y7=7:S0; [and for fortress's glyphs]
!!VRk&-1/y7=4:S0; [and for necropolis's cover of darkness]
!!VRk&-1/y7=3:S0; [and for inferno's brimstone stormclouds]
!!CA604:B3/14; [check for market]
!!VRk&-1/y7=6:S0; [needed for stronghold's freelancer's guild]
!!VRk&y7=8:S0; [conflux gets no special building]
!!CA604:B3/vv600; [check for special building]
!!VRy2:S0;
!!VRy2&-1/k=1:S1; [y2=1 means we built special building]
!!CA604&-1/k=1:B1/vv600; [build special building if requirements met and not there]
!!UN:N2/327/y7/vv600; [name of special building]
!!HE-1&y2=1/y7=2:O?v602; [get hero owner]
!!UN&y2=1/y7=2:Sv604/v605/v606/v602/20; [reveal area for lookout tower]
!!UN&y2=1/y7=2:R1; [redraw screen]

!!VRy3:S0; [assume nothing built]
!!CA604:B3/14; [check for market]
!!VRy3&1:S1; [y3=1 means market there]
!!CA604&y3=1:B3/15; [check for resource silo]
!!VRy3&1:S0; [now y3=1 means market but no silo]
!!CA604&y3=1:B1/15; [build resource silo]
!!UN:N2/328/y7/15; [name of resource silo]

!!IF&y1=1/y2=1/y3>0:M^The citizens of your town are ecstatic! They build the %Z326, %Z327, and %Z328 in your honor!^;
!!IF&y1=1/y2=1/y3=0:M^The citizens of your town are overjoyed! They build the %Z326 and %Z327 in your honor!^;
!!IF&y1=1/y2=0/y3>0:M^The citizens of your town are overjoyed! They build the %Z326 and %Z328 in your honor!^;
!!IF&y1=0/y2=1/y3>0:M^The citizens of your town are overjoyed! They build the %Z327 and %Z328 in your honor!^;
!!IF&y1=1/y2=0/y3=0:M^The citizens of your town are pleased. They build the %Z326 in your honor.^;
!!IF&y1=0/y2=1/y3=0:M^The citizens of your town are pleased. They build the %Z327 in your honor.^;
!!IF&y1=0/y2=0/y3>0:M^The citizens of your town are pleased. They build the %Z328 in your honor.^;
!!IF&y1=0/y2=0/y3=0:M^The citizens of your town are sadly unimpressed. They take the Medal but build nothing.^;

** end of function

That was less work than it might seem! :)


Quote:
Anyone want to contribute ideas here?


Here's the edited Blacksmith script by Wolmah (one of the blank objects offers Offence and Armorer skills).

In my version another blank object (called Sylvan Warden) offers Logistics and Pathfinding:





ZVSE

*/ Warden ERM script v1.2 --- wolfmah, edited by vlaad
*/ Requires WOG 3.53 or later
*/
*/ Heroes who don't have the Logistic and/or the Pathfinding skill can buy them
*/ for 2500 gold each.
*/
*/ To use this script, copy and paste it in a global event on a map, set it to
*/ never happen (minimum of 500 day) and uncheck all colours.
*/
*/ Variable and Flag used :
*/ Q9 - 10 - 11 - 12 - 13 - 14 - 15
*/ v50 - 51 - 52
*/ z7

*/ Set up right-click hint text for object
!#VRz77:S^Sylvan Warden^;
!#HT63/63:T77;

!?OB63/63;  */ Triggers when Warden is visited

*/ Initialize the flags
!!IF:V9/0;
!!IF:V10/0;
!!IF:V11/0;
!!IF:V12/0;
!!IF:V13/0;
!!IF:V14/0;
!!IF:V15/0;

!!OW:R-1/6/?v50;     */ Get the total amount of gold
!!IF&v50>2500:V9/1;  */ Check if hero got enough money
!!HE-1&9:S0/?v51;   */ Get if the hero already has Logistics
!!HE-1&9:S2/?v52;   */ Get if the hero already has Pathfinding

*/ If the hero don't have enough money
!!IF&-9:M^{Sylvan Warden}

Sorry, but you don't have enough money to study here!^;

*/ If the hero already got both skill
!!IF&9/v51>0/v52>0:M^{Sylvan Warden}

Perhaps you would like to give up adventuring and become a teacher here?^;

*/ If the hero already got the Logistics skill
!!IF&9/v51>0/v52=0:Q10/20/9/2^{Sylvan Warden}

Would you like to ride as fast as zephyr?^;

*/ If the hero already got the Pathfinding skill
!!IF&9/v51=0/v52>0:Q11/20/3/2^{Sylvan Warden}

Would you like to discover hidden treks?^;

*/ If he don't have any skill
!!IF&9/v51=0/v52=0:Q12/20/9/20/3/2^{Sylvan Warden}

How can I help you? Would you like to ride fast and discover hidden treks?^;

*/ Show up the choice to make --- 14 (Logistics) --- 15 (Pathfinding)
!!IF&9/10/-11/-12:Q15/20/9/2^This will cost 2500 gold. Learn it?^;
!!IF&9/-10/11/-12:Q14/20/3/2^This will cost 2500 gold. Learn it?^;

*/ Left = Logistics - Right = Pathfinding
!!IF&9/-10/-11/12:Q13/20/9/20/3/7^Make your choice.^;
!!IF&9/12/-13:Q14/20/3/2^This will cost 2500 gold. Buy it?^;
!!IF&9/12/13:Q15/20/9/2^This will cost 2500 gold. Buy it?^;

*/ If hero bought Logistics (14)
!!HE-1&14:S0/1;
!!VRv50&14:-2500;
!!OW&14:R-1/6/v50;

*/ If hero bought Pathfinding (15)
!!HE-1&15:S2/1;
!!VRv50&15:-2500;
!!OW&15:R-1/6/v50;



Here's another script I've edited (with credits, of course! ). I needed a cave guarded by Lords of Thunder:

ZVSE

** "Lord of Thunder Cave" by Grigor Minchev, edited by Vlaad
** Save for map "Underdogs"
** 10 June 2003 and 1 November 2004

!#IF:V11/0;
Set flag 11 to 0.

!#VRz123:S^Thunder Tower (Not Visited)^;
Store text in ^ ^ to z123 string.

!#OB6/6/0:Hz123;
Set object's hint to z123 string.

Main part:

!?OB6/6/0&11;
!!IF&11:M^Thunder Tower^;
If Hero has won the battle visitor will get message: "Thunder Tower".

!?OB6/6/0&-11;
If Hero enters the Tower and he hasn't beaten Lords of Thunder this trigger is activated.

!!IF:Q10^This is Thunder Tower. Do you want to enter?^;
Hero must answer if he wants to fight or not. Answer is strored in flag 10.

!!HE-1&10:O?v5;
Store owner's color's number in v5 variable.

!!HE-1&10:T6/6/0/152/9;
Provoke a battle with 9 Lords of Thunder Tower

!!HE-1&10:O?v100;
Store owner's color's number in v100 variable.

!!HE-1&10/v5=v100:A28;
Give Tunic to Hero

!!OW-1&10/v5=v100:R0/6/d+20000;

!!HE-1&10/v5=v100:Fd0/d0/d0/d-2;

!!IF&10/v5=v100:V11/1;
If Hero survived set flag 11 to positive.

!!IF&11:Q1/6/20000/1^You have won the battle with Lords of Thunder and received:^;
!!IF&11:Q2/8/28/1^Tunic of the Cyclops King ^;

!!VRz123&11:S^Thunder Tower (Visited)^;
If Hero survived store text in ^ ^ to z123 string.

!!OB6/6/0&11:Hz123;
!!FU14&2:P;

I also like the fact that one can easily set the properties of creature banks. I love to include a small surprise for the players (easter eggs, as it were), such as "an imprisoned Enchanter" in a Dwarven Treasury:

ZVSE

!?OB34/17/0;
!!CB34/17/0:M136/1;

On the other hand, you surely know you can set a completely new creature bank (with custom guards, rewards and even appearance) with a few ERM lines!

In one of my scenarios, you get to fight all types of spellcasters in order to release a throng of Sorceresses:


ZVSE

!#UN:I22/18/0/16/5/63/5/-1;
!#VRz118:S^Guild of Magicians^;
!#HT16/5:T118;
!?OB20/17/0;
!!CB20/17/0:G0/169/30;
!!CB20/17/0:G1/35/30;
!!CB20/17/0:G2/121/30;
!!CB20/17/0:G3/37/30;
!!CB20/17/0:G4/136/30;
!!CB20/17/0:M193/100;

Finally, here's a short "inn" script. It doesn't do much really. :P I found a funny ERM sample at CH, which seemed like a good starting point. After I had finished my map, I still didn't know what to do with it. So I wrapped it up in a small bonus (resources bless):

ZVSE

!?OB60/18/0;
!!VRz150:S^Juicy ribs^;

change the Rib Cage to have that text:

!!UN:A26/9/150;

!!VRz151:S^Seasoned boars^;
!!UN:G1/140/0/151;

!!IF:Q1/8/26/21/140/7^{Beefnord Inn}

After a good meal at the local tavern, your workers will produce more wood and ore for the next seven days!

{check blesses and curses}

~ Choose from the menu~^;

!!UN:A26/9/0;
!!UN:G1/140/0/0;

restore original

!!HE-1:Y64/2/7/1;

I said the script was funny because when you visit the tavern it produces this dialogue box :P :




:P :P :P



* "The Beefnord Inn" is an homage, of course! ;) :)


__________________________________________________



P.S. Note that these scriplets often feature custom coordinates, so you'll have to change those in your maps! ;)


 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
greek_god_su...
greek_god_superman


Famous Hero
Bringer Of Light
posted April 13, 2006 08:45 AM

Ahh, Iīm glad to see thereīs other people like me...

Iīve made thousand tweaks in scripts, crexpbon.txt, sptraits.txt and such for my own fun and for hot seat games.. (sure thereīs a whole lotta copy pasting in future if they include script updates in 3.59 to move all those tweaks to new version... )

Hereīs just a few tweaks I could remember now, but Iīve modified almost every aspect of game to suit my own intentions..

*Changed almost all commander spells:
-Paladins cast mirth & bless (itīs like they now rally their troops in battle)
-Brutes cast stone skin, airshield & magic mirror (last one to prevent those minotaurs to be cursed etc...)
-cure is now for hierophants, IMO suits their style..
-Ogre leader casts prayer & frenzy... (barbaric rage)
I tried to change ogre magiīs bloodlust to frenzy but didnīt succeed
-temple guardians cast slayer after precision and magic mirror..

*Changed some spells to be more useful (added attack bonus for slayer, increased chance of reflecting spells by magic mirror... expert magic mirror counters 85% of hostile spells...)

*Trolls take *2 damage from fire damage spells & from fire-type attacks (for example efreeti, fire elementals & fire breath, I used  the hatred damage to this... )

*Iīve tweaked the abilities received through stack experience for almost all creatures, not only my favorite ones...
-Zealots cast exp. bless/prayer/destroy undead at higher experience levels
-Beholders have chance of casting hostile spells on attacked enemy (poison, weakness, curse, disrupting ray and such..)
-my mages cast forgetfullness too.. they also protect the rest of their army with magic mirror later on..
-Titans summon small amount of thunderbirds later on.. (storm elementals could have been nice too, but the fact that they are size of one hex would have made titans vulnerable to breath attack & especially the black dragon...)
-imagine behemoth with champion charge attack...
-vampire lords and hydras receive +1/+2 retaliations when on high levels... = undefeatable
-wyvern IS a dragon (King1) and is vulnerable to slayer
-manticore is a dragon slayer and thatīs why it has slayer from the beginning of battle...
-gargoyles have stone skin spell casted on them at the beginning of combat.. vampires have bloodlust...
-rogues receive no retal & poison attack later on, and strike and return too... they are also known enemies of gnoll marauders...
-troglodytes also immune to hypnotize (they canīt see.. )
-trolls & zombies have the phoenix-style rebirth..
-gogs and magogs fireball sometimes leads to firewall (at least useful against enemy shooters who get the damage if they wonīt move and waste a good shooting turn...)
-thunderbirds receive breath attack later..

and thatīs not nearly half of what Iīve done... just the few things I could remember now...
____________
After all, marriage and murder are not too different - one ends your life and the other is a crime

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Russtops
Russtops

Tavern Dweller
posted April 16, 2006 01:33 AM
Edited by Russtops on 15 Apr 2006

A couple of my modifications to script49.erm; my attempts at making the henchmen of the higher levels to feel a little more "henchy" than just a dragon with "+20 health, +2-5 damage" and you can pay to have him come back.  I have been tweaking the value levels, but made the values a lot lower than before; I like when small creatures get bonuses and appear to be nearly as strong or challenging as the larger ones.  They feel more like a second-in-command (beneath the commanders themselves).  Henchmen status becomes based on Hero Experience rather than level, allowing Henchmen of higher level heroes to have a chance to still improve based on the hero's experience.

Quote:
** function to give stat increases    x1=stack  x2=attacker/defender  x3=hero number
!?FU7101;

!!BMx1:T?y6;                                         [get stack type]
!!FU7104&y6>-1y6;                                  [get monster level]
!!VRy7&y6>-1:Sv7215;                                 [copy monster level]
!!IF&y6>-1:Wx3;                                      [enable hero variable]
!!HEx3:E?y1/?y2/1;                                   [get hero exp. level]
!!VRy10:Sy1 :250 +w117 +c +1 +c;                     [experience points = (hero level -1) x10  +earned xp + current day x 2]
!!VRv7213&x2=0/y6>-1:Sy10 :y7 +1;                    [level = experience points / monster level + 1 - attacker]
!!VRv7214&x2=1/y6>-1:Sy10 :y7 +1;                    [level = experience points / monster level + 1 - defender]
!!VRy8&x2=0/y6>-1:Sv7213;                            [copy attacker level to y8]
!!VRy8&x2=1/y6>-1:Sv7214;                            [copy defender level to y8]

!!VRy4&y6>-1:Sy8 :4 +1;                              [bonus = level / 4 + 1]
!!BMx1&y6>-1:Sdy4;                                   [give +1 speed per 4 levels]

!!MA&y6>-1:Lx1/?y12;                                        [get monster level (0-6)]
!!VRy11&y6>-1:Sy12 +1;                                      [monster level + 1 because it sucks to multiply by zero]
!!VRy13&y6>-1:S2 *y11 *y11;                                 [min damage: square it, times 2]
!!VRy14&y6>-1:S3 *y11 *y11;                                 [max damage: square it, times 3]
!!BMx1&y6>-1:U1/dy13;                                  [give +2 min damage/monster level]
!!BMx1&y6>-1:U2/dy14;                                  [give +3 max damage/monster level]

!!VRy4&y6>-1:Sy8 :2 +1;                              [bonus = level / 2 + 1]
!!BMx1&y6>-1:Ady4 Ddy4;                              [give +1 attack and +1 defense per 2 levels]

!!BMx1&y6>-1:H?y4;                                   [get health]
!!VRy5&y6>-1:Sy11 *5 +20 +y4 *y8;                    [hp = ML*5 +20 +origHP *henchLevel]
!!BMx1&y6>-1:Hy5;                                    [set health]
!!BMx1&y6>-1:Ny8;                                    [set quantity to level]
!!BMx1|y6=63/y6=154:By8;                             [if vampire lord or blood dragon set starting quantity to level]
!!BMx1&y6>-1:M4/100/1;                               [give disguise dummy spell to make tag yellow]
!!VRw117&y6>-1:+7 T15;                                [experience counter - gain 7-22 points per battle]


As for the "Status Points"...

Quote:
** function to get creature level    x1=type
!?FU7104;

!!MA:Lx1/?y7;                                        [get monster level (0-6)]

!!VRy8:S0;                                           [set to 0]
!!VRy8&x1<112:Sx1 %2;                                [check if upgraded]

!!VRv7215&y7=0/y8=0:S5;                              [if level 1 = 5]
!!VRv7215&y7=1/y8=0:S10;                             [if level 2 = 10]
!!VRv7215&y7=2/y8=0:S20;                             [if level 3 = 20]
!!VRv7215&y7=3/y8=0:S30;                             [if level 4 = 35]
!!VRv7215&y7=4/y8=0:S40;                             [if level 5 = 55]
!!VRv7215&y7=5/y8=0:S50;                             [if level 6 = 95]
!!VRv7215&y7=6/y8=0:S75;                             [if level 7 = 150]

!!VRv7215&y7=0/y8=1:S10;                             [if level 1 = 15 (upgrade)]
!!VRv7215&y7=1/y8=1:S20;                             [if level 2 = 25 (upgrade)]
!!VRv7215&y7=2/y8=1:S35;                             [if level 3 = 35 (upgrade)]
!!VRv7215&y7=3/y8=1:S45;                             [if level 4 = 55 (upgrade)]
!!VRv7215&y7=4/y8=1:S55;                             [if level 5 = 75 (upgrade)]
!!VRv7215&y7=5/y8=1:S65;                             [if level 6 = 125 (upgrade)]
!!VRv7215&y7=6/y8=1:S90;                             [if level 7 = 185 (upgrade)]


!!VRv7215&x1=112:S10;                                [make air elemental = 20]
!!VRv7215&x1=127:S20;                                [make storm elemental = 25]
!!VRv7215&x1=113:S40;                                [make earth elemental = 55]
!!VRv7215&x1=121:S55;                                [make magma elemental = 75]
!!VRv7215&x1=119:S10;                                [make sprite = 15]
!!VRv7215&x1=121:S65;                                [make magic elemental = 125]
!!VRv7215&x1=123:S35;                                [make ice elemental = 35]
!!VRv7215&x1=129:S45;                                [make energy elemental = 55]
!!VRv7215&x1=131:S100;                               [make phoenix = 185]

!!VRv7215&x1=132:S200;                               [make azure dragon = 400]
!!VRv7215&x1=133:S175;                               [make crystal dragon = 300]
!!VRv7215&x1=134:S125;                               [make faerie dragon = 200]
!!VRv7215&x1=135:S150;                               [make rust dragon = 250]
!!VRv7215&x1>=150/x1<=158:S150;                      [make level 8 creatures = 250]

!!VRv7215&x1=63:S60;                                 [make vampire lord = 80]
!!VRv7215&x1=159:S15;                                [make ghost = 20]
!!VRv7215&x1=172:S75;                               [make nightmare = 136]
!!VRv7215&x1=196:S200;                               [make dracolich = 450]


And for the other function...

Quote:
** function to display henchman    x1 = hero number
!?FU7106;
!!IF&x1>-1:Wx1;                                      [enable hero variable]
!!VRz1:S^^;
!!VRz1&w119=0:Sz149005;
!!FU7104&w118>-1w118;                              [function to get monster level]
!!HEx1:E?y1/?y2/1;                                   [get hero exp, level]
!!VRy1::250 +c +1 +c;                                [bonus status = (hero experience / 250) +days +1 +days]
!!VRy11:Sw117 +y1;                                   [total status points = earned status + bonus status]
!!VRy3:Sy11 :v7215 +1;                               [henchman level = status points / level rate + 1]
!!VRy4:Sy11 %v7215 -v7215 *-1;                       [calculate status needed for next level]

!!MA:Lx1/?y21;                                        [get monster level (0-6)]
!!VRy22:Sy21 +1;                                      [add 1 (it sucks to multiply by zero)]
!!VRy23:S2 *y22 *y22;                                 [min damage: square it, times 2]
!!VRy24:S3 *y22 *y22;                                 [max damage: square it, times 3]

!!MA&w118>-1:Aw118/?y1;                              [get base attack]
!!VRy5:Sy3 :2 +1 +y1;                                [attack = level / 2 + 1 + base]
!!MA&w118>-1w118/?y1;                              [get base defense]
!!VRy6:Sy3 :2 +1 +y1;                                [defense = level / 2 + 1 + base]
!!MA&w118>-1w118/?y1;                              [get base health]
!!VRy7:Sy22 *5 +20 +y1 *y3;                               [health = ML *5 +20 +base *henchlevel]
!!MA&w118>-1:Mw118/?y1;                              [get base damage min]
!!VRy8:Sy1 +y23 *y3;                                   [damage min = base + 4 x level]
!!MA&w118>-1:Ew118/?y1;                              [get base damage max]
!!VRy9:Sy1 +y24 *y3;                                   [damage max = base + 7 x level]
!!MA&w118>-1:Sw118/?y1;                              [get base speed]
!!VRy10:Sy3 :4 +1 +y1;                               [speed = level / 4 + 1 + base]


I did some modifying to the script49.ert text file, as well, so it would appear a little cleaner and prettier whenever things came up.

Quote:
{Enhanced Henchmen}

Your hero does not currently have a Henchman.

Do you wish to look over your troops and see if any are worthy of the honor?  (Selecting NO will disable future reminders for this hero.)

(To select/change a henchman, left-click the color banner on the hero screen.  To view henchman help, right-click the color banner on the hero screen.)


Quote:
{Enhanced Henchman}

{Henchman Level} : %Y3
{Status Total}: %Y11   [{Combat Status}: %W117]
{Status/Level Rate}: %V7215   [{Next Level}: %Y4]
{Attack:} %Y5 · {Defense:} %Y6
{Health:} %Y7 · {Speed:} %Y10
{Damage:} %Y8-%Y9
%Z1
{Do you wish to select a new Henchman?}


Quote:
{Enhanced Henchmen}

Slain level %Y3 henchman. Resurrecting this henchman will cost %Y4 gold.

Do you wish to revive this hero's henchman?


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Russtops
Russtops

Tavern Dweller
posted April 16, 2006 01:44 AM

Quote:
Learning Stones giving double experience (2000 XP) should be quite simple.

ZVSE
!?OB100; [Learning Stone is trigger]
!!ST998:N?y-1; [Learning Stone's ID#: y-1]
!!HE-1:V0/y-1/?y-2; [See if Hero has already visited: y-2]
!!VRv1180:S0; [Initialize v1180 to 0]
!!VRv1180&y-2=0:S1; [Set v1180 to 1 if Hero hasn't visited]

!$OB100&v1180=1; [Learning Stone is post-visit trigger]
!!HE-1:Ed1000; [Give an additional 1000 XP to hero]
!!VRv1180:S0; [Reset v1180 to 0]

The only problem is that the message still says 1000 XP but I think this could be fixed too with a little more work.

To do a Dream Teacher style script, it would be similar but you would also need to use a w variable (hero variable) to keep track of how many stones had been visited so far and then calculate the total based on that. Perhaps that would be easiest with a DO loop or something so you could loop that number of times, doubling the XP each time through the loop.


You might want to just add a variable that starts at 0, and each time that the hero visits the a learning stone, the stone adds (variable * 500) experience.  So, the stones would give 1000, 1500, 2000... etc.  I also realized that with a hero with learning, the experience is a straight 1000, and not modified properly; not sure how we'd go about cleaning that.  Also had Josephine with Enhanced Sorcery at some point, and she visited a stone via Sorcery, and realized Sorcery wasn't taken into account.  I love all the features of WoG...  so trying to keep them all together and connected...  challenge!  So, these are the hurdles I've found at the moment.  I haven't got the ambition to push myself past all them, and since I'm not a regular mapmaker (more of a tweaker), you're free to put them in your maps; just post the code out, too.  :-)  I think we should have a WoG code repository of some sort, apart from the full-on releases where most of the community gets scripts in.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
doom3d
doom3d


Known Hero
Avatar of general Z
posted April 23, 2006 04:14 PM
Edited by doom3d on 23 Apr 2006

my favorite scripts

Masters of spellcasting

!?BG0;
!!UN: P264/?y-1;
!!FU&y-1=0:E;
!!VRv25:S1;
!!BG:H?v26 A?v24 Q?v27;
!!VRv25 &v24=1|v24=8/v26=-1/v997<0:S0;
!!FU&v25=0:E;
!!BHv27:M0;
!!FU:E;

Am I mentionned that I am a Tower fan? Please notice, that the shape of this script looks similar to a wizzard's hand holding a magic wand. Harmony between Form and Content..

I have also added +2%/level resistance and +1/4 speed/level for commanders, magic arrow as adventure spell, AI tuning and some minor tweaks. Setup package is avalaible at http://games.groups.yahoo.com/group/wakeofgods/ (wogmodv2b7.rar / I am there as 'Eperbab') and also at doom3d.uw.hu (but this site is hungarian )

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Russtops
Russtops

Tavern Dweller
posted May 12, 2006 09:32 PM


Quote:
!?BRv997&v7181=1;
!!BMv7207&v7207>-1:R?v7218;
!!BMv7208&v7208>-1:R?v7219;
!!VRe29&v7207>-1:Sv7218 +1;
!!BMv7207&v7207>-1:Re29;
!!VRe31&v7208>-1:Sv7219 +1;
!!BMv7208&v7208>-1:Re31;


What seems to be wrong here?  I'm trying to take a creature stack (Henchmen) and give them an extra retaliation in the round (not setting to 2 because some creatures already have 2, and want to give them an extra.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Fnord
Fnord


Promising
Famous Hero
posted May 13, 2006 05:23 AM

Quote:

Quote:
!?BRv997&v7181=1;
!!BMv7207&v7207>-1:R?v7218;
!!BMv7208&v7208>-1:R?v7219;
!!VRe29&v7207>-1:Sv7218 +1;
!!BMv7207&v7207>-1:Re29;
!!VRe31&v7208>-1:Sv7219 +1;
!!BMv7208&v7208>-1:Re31;


What seems to be wrong here?  I'm trying to take a creature stack (Henchmen) and give them an extra retaliation in the round (not setting to 2 because some creatures already have 2, and want to give them an extra.


The !?BR trigger doesn't have any parameters. v997 keeps the number of the round but !?BR; works for every round anyway (that is, there's no such thing as !?BR0 or !?BR1 or !?BRv997). If you want to use v997 you would use it as a conditional check (e.g., !?BR&v997>0; )

Anyway, I don't know if that would cause a problem or not but it's hard to say without seeing the rest of the script. For example, what's v7181?  Is there a chance it's not being set correctly?

And v7207 and v7208 are stack numbers but where are they being set? Have you double checked they're correct?

As for the code that's there, I think it would work if the other numbers are correct unless number of retaliations is set or cleared at some other point in the battle round sequence, but in any case, there's a simpler way to do it using the d modifier:

!?BR&v7181=1;
!!BMv7207&v7207>-1:Rd1; [Add 1 to # of retaliations for stack v7207]
!!BMv7208&v7208>-1:Rd1; [Add 1 to # of retaliations for stack v7208]

That may not fix the problem but it eliminates four lines of code you don't need. :)


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Russtops
Russtops

Tavern Dweller
posted May 20, 2006 07:25 AM

Quote:
Quote:

Quote:
!?BRv997&v7181=1;
!!BMv7207&v7207>-1:R?v7218;
!!BMv7208&v7208>-1:R?v7219;
!!VRe29&v7207>-1:Sv7218 +1;
!!BMv7207&v7207>-1:Re29;
!!VRe31&v7208>-1:Sv7219 +1;
!!BMv7208&v7208>-1:Re31;


What seems to be wrong here?  I'm trying to take a creature stack (Henchmen) and give them an extra retaliation in the round (not setting to 2 because some creatures already have 2, and want to give them an extra.


The !?BR trigger doesn't have any parameters. v997 keeps the number of the round but !?BR; works for every round anyway (that is, there's no such thing as !?BR0 or !?BR1 or !?BRv997). If you want to use v997 you would use it as a conditional check (e.g., !?BR&v997>0; )

Anyway, I don't know if that would cause a problem or not but it's hard to say without seeing the rest of the script. For example, what's v7181?  Is there a chance it's not being set correctly?

And v7207 and v7208 are stack numbers but where are they being set? Have you double checked they're correct?

As for the code that's there, I think it would work if the other numbers are correct unless number of retaliations is set or cleared at some other point in the battle round sequence, but in any case, there's a simpler way to do it using the d modifier:

!?BR&v7181=1;
!!BMv7207&v7207>-1:Rd1; [Add 1 to # of retaliations for stack v7207]
!!BMv7208&v7208>-1:Rd1; [Add 1 to # of retaliations for stack v7208]

That may not fix the problem but it eliminates four lines of code you don't need. :)




Wonderful!  Yes, those will work wonderfully!  This is a modification to the Enhanced Henchmen script that I'm tweaking.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.2205 seconds