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 Script Master - How to integrate?
Thread: ERM Script Master - How to integrate?
yarhad
yarhad

Tavern Dweller
posted April 27, 2010 10:25 AM

ERM Script Master - How to integrate?

I fell in love with the ERM Script Master tool as soon as I saw it, I thought great now I can start to balance some stuff out myself, tho im not that gr8 with all this scripting stuff so need a bit of help im afraid

Anyway here is my situation:
I play LAN games with 3 buddies, 2vs2 original heroes 3 - complete edition, but we hardly ever use half of the races because of obvious balance issues and so we have a zillion implicit rules about what to use/not to use. Using WoGification can sort out a lot of the imbalanced abilities/buildings, but there is still too much for some races to be truly viable. Also, we never use premade maps, we use the RMG, and would like to keep it that way! Is it possible to integrate a script to WoG games, or make the RMG run the script when constructing random maps, or do I have to make the maps and apply scripts manually?

A few other things I haven't been able to figure out:
- Is it possible to add a script for RMG maps that forces other preexisting starting abilities/specialities for specific heroes?
- Is it possible to force all towns to be able to contruct all 5 magic school levels? (again using RMG)

thanks!

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

Tavern Dweller
posted April 27, 2010 11:02 AM
Edited by yarhad at 11:04, 27 Apr 2010.

OK, adding script to a RMG map manually (Using the ERM Script Manager) is not a problem, I figured that out rather easily, and guess that will do (doesnt take that long to make map, copy in the script and reload the map)

Using the map editor its rather easy to just reorganize what skills heroes start with, just figured out, but would love to have it on script so I dont have to manually change heroes click-click mode every time we start a new map :S

/Yarhad

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


Promising
Famous Hero
feanor on DF2.ru
posted April 27, 2010 01:13 PM

Quote:

- Is it possible to add a script for RMG maps that forces other preexisting starting abilities/specialities for specific heroes?
- Is it possible to force all towns to be able to contruct all 5 magic school levels? (again using RMG)

1.Write necessary script and put it into data/s/ folder with vaild filename.
2.No.

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


Admirable
Legendary Hero
ghost of the past
posted April 27, 2010 05:00 PM
Edited by Vlaad at 22:33, 27 Apr 2010.

It is possible to script level 4 and 5 Mage Guilds. Here's Fnord's script for Fortress:


!?TH1; [Exit Town Hall trigger]
!!CA-1:T?y-1 G?y-2; [Town type (y-1), Mage Guild Level (y-2)]
!!CA-1:B3/17; [Set Flag 1 to TRUE if Cage of Warlords built]
!!FU|y-1<>7/-1/y-2<>3:E; [Exit if not Fortress, no Cage or Mage Guild not L3]
!!CA-1:G5 G3/2 G4/1; [Set 5 levels of Mage Guild, 2 spells for L4, 1 for L5]]
!!FU$spell$:P4/4/0/11/1/0; [Random L4 Air, Earth or Water spell, exluding banned spells: y-99]
!!CA-1:G3/0/y-99; [Set 1st L4 spell: y-99]
!!FU$spell$:P4/4/0/11/1/1/y-99; [Random L4 Air, Earth or Water spell, exluding banned and 1st random spell: y-99]
!!CA-1:G3/1/y-99; [Set 2nd L4 spell: y-99]
!!FU$spell$:P5/5/0/11/1/0; [Random level 5 Air, Earth or Water spell, exluding banned spells: y-99]
!!CA-1:G4/0/y-99; [Set L5 spell: y-99]

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


Hired Hero
posted April 27, 2010 05:14 PM

Vlaad,may i ask a question about "!!FU$spell$"?

I tried to modify Magic Level in TXT,it works fine in new TXT.

But in this command !!FU$spell$, Magic Level seems not change,i'm not sure,is it true?


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


Admirable
Legendary Hero
ghost of the past
posted April 27, 2010 10:40 PM
Edited by Vlaad at 22:42, 27 Apr 2010.

Quote:
Vlaad,may i ask a question about "!!FU$spell$"?
It was set elsewhere, I copied just part of the script. It should work when the map is wogified. Keep in mind that this is for Fortress only, that the Cage of Warlords has to be built (even then it's too cheap, but you can change it), and that you have to click the Town Hall to trigger the script.

The entire thing (for non-wogified maps) would look like this:

ZVSE
*** Generate Random Spell Number by Fnord ***

!#MCv3500:S@spell@;
!#VR$spell$:S7777;

Syntax:

* FU$spell$:P#1/#2/#3/#4/#5/#6/#7/#8/#9/#10/#11/#12/#13/#14/#15;
* Spell Number is returned in y-99, value is -1 if no spell exists.

#1 = minimum spell level: 0=any, or 1..5
#2 = maximum spell level: 0=any, or 1..5
#3 = type: 0=any, 1=adventure, 2=combat
#4 = element: 0=any, 1=air, 2=earth, 4=fire, 8=water. Add numbers for multiple elements.
#5 = banning: 0=ignore spell banning, 1=skip banned spells
#6 = exclusions: 0=no exclusions, 1..9=number of specific spell exclusions (#7..#15)
#7..#15 = specific spell exclusions: 0..69 for spell number, anything else is ignored
          and only exclusions up to the number in #6 are used, so if #6 is 0, all
          specific exclusions will be ignored.

Example:
  To generate a random Level 3 Combat Fire or Air spell excluding all Banned
  spells and excluding the Misfortune (spell #52), use:
  * !!FU$spell$:P3/3/2/5/1/1/52;


A subfunction of this function may be used to determine the level, element and type
(combat or adventure) of any given spell:

Syntax:
   FU7779:P#;

#=spell number being checked (0..69).

Returned Values:
y-96 : Level (1..5)
y-97 : Type (1=Adventure, 2=Combat)
y-98 : Element (1=air, 2=earth, 4=fire, 8=water, 15=all elements)

--------------------------------------------------------------------------------

!?FU7777;
[x1=min. level, x2=max. level, x3=type, x4=element, x5=banning]
[x6=number of exclusions, x7..x15=specific exclusions]

[Display invalid parameter message for an invalid parameter]
!!IF|x1<0/x1>5:M1/z100032;
!!IF|x2<0/x2>5:M1/z100033;
!!IF|x3<0/x3>2:M1/z100034;
!!IF|x4<0/x4>15:M1/z100035;
!!IF|x5<0/x5>3:M1/z100036;
!!IF|x6<0/x6>9:M1/z100037;

[Set y-99 to -99 for an invalid parameter]
!!VRy-99|x1<0/x1>5/x2<0/x2>5/x3<0/x3>2/x4<0/x4>15/x5<0/x5>3/x6<0/x6>9:S-99;

!!FU&y-99=-99:E; [Exit if an invalid parameter is entered]

!!VRy-99:S-1; [Initialize y-99 to -1]

[Do up to 500 loops to find a valid spell number: y-99]
!!DO7778/1/500/1:Px1/x2/x3/x4/x5/x6/x7/x8/x9/x10/x11/x12/x13/x14/x15;

--------------------------------------------------------------------------------

[Generate Valid Random Spell Number: y-99]
!?FU7778;
[x1=min. level, x2=max. level, x3=type, x4=element, x5=banning]
[x6=number of exclusions, x7..x15=specific exclusions]

!!VRy1:S0 R69; [Random spell number (0..69): y1]
!!FU7779:Py1; [Determine Spell Level (y-96), Type (y-97), Element (y-98)]

!!VRy2:S0; [Initialize y2 to 0]
!!VRy2&x1<>0/y-96<x1:S1; [If level too low, set y2 to 1]
!!VRy2&x2<>0/y-96>x2:S1; [If level too high, set y2 to 1]
!!VRy2&x3<>0/x3<>y-97:S1; [If invalid type, set y2 to 1]
!!VRy3:Sx4; [Copy x4 (elements) to y3]
!!VRy3:&1; [Check for Air Element]
!!VRy2&x4<>0/x4<>15/y-98<>15/y-98=1/y3<>1:S1; [If Air Spell and invalid, set y2 to 1]
!!VRy3:Sx4; [Copy x4 (elements) to y3]
!!VRy3:&2; [Check for Earth Element]
!!VRy2&x4<>0/x4<>15/y-98<>15/y-98=2/y3<>2:S1; [If Earth Spell and invalid, set y2 to 1]
!!VRy3:Sx4; [Copy x4 (elements) to y3]
!!VRy3:&4; [Check for Fire Element]
!!VRy2&x4<>0/x4<>15/y-98<>15/y-98=4/y3<>4:S1; [If Fire Spell and invalid, set y2 to 1]
!!VRy3:Sx4; [Copy x4 (elements) to y3]
!!VRy3:&8; [Check for Water Element]
!!VRy2&x4<>0/x4<>15/y-98<>15/y-98=8/y3<>8:S1; [If Water Spell and invalid, set y2 to 1]
!!UN:J0/y1/?y4; [Check if spell is enabled (0) or disabled (1): y4]
!!VRy2&y4=1/x5=1:S1; [If spell is disabled and banning is selected, set y2 to 1]
!!VRy5:S0; [Initialize y5 to 0]
!!UN&y1=0:P152/?y5; [Check for banned Summon Boat    - y5=1 if banned]
!!UN&y1=7:P153/?y5; [Check for banned Water Walk     - y5=1 if banned]
!!UN&y1=9:P154/?y5; [Check for banned Town Portal    - y5=1 if banned]
!!UN&y1=8:P155/?y5; [Check for banned Dimension Door - y5=1 if banned]
!!UN&y1=6:P156/?y5; [Check for banned Fly            - y5=1 if banned]
!!UN&y1=1:P221/?y5; [Check for banned Scuttle Boat   - y5=1 if banned]
!!UN&y1=2:P222/?y5; [Check for banned Visions        - y5=1 if banned]
!!UN&y1=26:P223/?y5; [Check for banned Armageddon    - y5=1 if banned]
!!UN&y1=5:P246/?y5; [Check for banned View Air       - y5=1 if banned]
!!UN&y1=3:P247/?y5; [Check for banned View Earth     - y5=1 if banned]
!!VRy2&y5=1/x5=1:S1; [If spell is banned and banning is selected, set y2 to 1]
!!VRy2&x6>=1/x7=y1:S1; [If spell is 1st excluded spell, set y1 to 1]
!!VRy2&x6>=2/x8=y1:S1; [If spell is 2nd excluded spell, set y1 to 1]
!!VRy2&x6>=3/x9=y1:S1; [If spell is 3rd excluded spell, set y1 to 1]
!!VRy2&x6>=4/x10=y1:S1; [If spell is 4th excluded spell, set y1 to 1]
!!VRy2&x6>=5/x11=y1:S1; [If spell is 5th excluded spell, set y1 to 1]
!!VRy2&x6>=6/x12=y1:S1; [If spell is 6th excluded spell, set y1 to 1]
!!VRy2&x6>=7/x13=y1:S1; [If spell is 7th excluded spell, set y1 to 1]
!!VRy2&x6>=8/x14=y1:S1; [If spell is 8th excluded spell, set y1 to 1]
!!VRy2&x6>=9/x15=y1:S1; [If spell is 9th excluded spell, set y1 to 1]

!!VRy-99&y2=0:Sy1; [If spell is valid, set y-99 to spell number: y-99]
!!VRx16&y2=0:S999; [If spell is valid, set x16 to 999 to exit loop: x16]

--------------------------------------------------------------------------------

[Determine Spell Level, Type, Element]
!?FU7779;
[x1=spell number, y-96 returns level, y-97 returns type, y-98 returns element]

!!VRy-97&x1<=9:S1; [Set y-97 to 1 for an Adventure Spell]
!!VRy-97&x1>=10:S2; [Set y-97 to 2 for a Combat Spell]

!!VRy-96&x1=0:S1; [Summon Boat]
!!VRy-98&x1=0:S8; [Water]
!!VRy-96&x1=1:S2; [Scuttle Boat]
!!VRy-98&x1=1:S8; [Water]
!!VRy-96&x1=2:S2; [Visions]
!!VRy-98&x1=2:S15; [All Elements]
!!VRy-96&x1=3:S1; [View Earth]
!!VRy-98&x1=3:S2; [Earth]
!!VRy-96&x1=4:S2; [Disguise]
!!VRy-98&x1=4:S1; [Air]
!!VRy-96&x1=5:S1; [View Air]
!!VRy-98&x1=5:S1; [Air]
!!VRy-96&x1=6:S5; [Fly]
!!VRy-98&x1=6:S1; [Air]
!!VRy-96&x1=7:S4; [Water Walk]
!!VRy-98&x1=7:S8; [Water]
!!VRy-96&x1=8:S5; [Dimension Door]
!!VRy-98&x1=8:S1; [Air]
!!VRy-96&x1=9:S4; [Town Portal]
!!VRy-98&x1=9:S2; [Earth]
!!VRy-96&x1=10:S2; [Quicksand]
!!VRy-98&x1=10:S2; [Earth]
!!VRy-96&x1=11:S3; [Land Mine]
!!VRy-98&x1=11:S4; [Fire]
!!VRy-96&x1=12:S3; [Force Field]
!!VRy-98&x1=12:S2; [Earth]
!!VRy-96&x1=13:S2; [Fire Wall]
!!VRy-98&x1=13:S4; [Fire]
!!VRy-96&x1=14:S3; [Earthquake]
!!VRy-98&x1=14:S2; [Earth]
!!VRy-96&x1=15:S1; [Magic Arrow]
!!VRy-98&x1=15:S15; [All Elements]
!!VRy-96&x1=16:S2; [Ice Bolt]
!!VRy-98&x1=16:S8; [Water]
!!VRy-96&x1=17:S2; [Lightning Bolt]
!!VRy-98&x1=17:S1; [Air]
!!VRy-96&x1=18:S5; [Implosion]
!!VRy-98&x1=18:S2; [Earth]
!!VRy-96&x1=19:S4; [Chain Lightning]
!!VRy-98&x1=19:S1; [Air]
!!VRy-96&x1=20:S3; [Frost Ring]
!!VRy-98&x1=20:S8; [Water]
!!VRy-96&x1=21:S3; [Fireball]
!!VRy-98&x1=21:S4; [Fire]
!!VRy-96&x1=22:S4; [Inferno]
!!VRy-98&x1=22:S4; [Fire]
!!VRy-96&x1=23:S4; [Meteor Shower]
!!VRy-98&x1=23:S2; [Earth]
!!VRy-96&x1=24:S2; [Death Ripple]
!!VRy-98&x1=24:S2; [Earth]
!!VRy-96&x1=25:S3; [Destroy Undead]
!!VRy-98&x1=25:S1; [Air]
!!VRy-96&x1=26:S4; [Armageddon]
!!VRy-98&x1=26:S4; [Fire]
!!VRy-96&x1=27:S1; [Shield]
!!VRy-98&x1=27:S2; [Earth]
!!VRy-96&x1=28:S3; [Air Shield]
!!VRy-98&x1=28:S1; [Air]
!!VRy-96&x1=29:S4; [Fire Shield]
!!VRy-98&x1=29:S4; [Fire]
!!VRy-96&x1=30:S2; [Protection from Air]
!!VRy-98&x1=30:S1; [Air]
!!VRy-96&x1=31:S1; [Protection from Fire]
!!VRy-98&x1=31:S4; [Fire]
!!VRy-96&x1=32:S1; [Protection from Water]
!!VRy-98&x1=32:S8; [Water]
!!VRy-96&x1=33:S3; [Protection from Earth]
!!VRy-98&x1=33:S2; [Earth]
!!VRy-96&x1=34:S3; [Anti-Magic]
!!VRy-98&x1=34:S2; [Earth]
!!VRy-96&x1=35:S1; [Dispel]
!!VRy-98&x1=35:S8; [Water]
!!VRy-96&x1=36:S5; [Magic Mirror]
!!VRy-98&x1=36:S1; [Air]
!!VRy-96&x1=37:S1; [Cure]
!!VRy-98&x1=37:S8; [Water]
!!VRy-96&x1=38:S4; [Resurrection]
!!VRy-98&x1=38:S2; [Earth]
!!VRy-96&x1=39:S3; [Animate Dead]
!!VRy-98&x1=39:S2; [Earth]
!!VRy-96&x1=40:S5; [Sacrifice]
!!VRy-98&x1=40:S4; [Fire]
!!VRy-96&x1=41:S1; [Bless]
!!VRy-98&x1=41:S8; [Water]
!!VRy-96&x1=42:S1; [Curse]
!!VRy-98&x1=42:S4; [Fire]
!!VRy-96&x1=43:S1; [Bloodlust]
!!VRy-98&x1=43:S4; [Fire]
!!VRy-96&x1=44:S2; [Precision]
!!VRy-98&x1=44:S1; [Air]
!!VRy-96&x1=45:S2; [Weakness]
!!VRy-98&x1=45:S8; [Water]
!!VRy-96&x1=46:S1; [Stone Skin]
!!VRy-98&x1=46:S2; [Earth]
!!VRy-96&x1=47:S2; [Disrupting Ray]
!!VRy-98&x1=47:S1; [Air]
!!VRy-96&x1=48:S4; [Prayer]
!!VRy-98&x1=48:S8; [Water]
!!VRy-96&x1=49:S3; [Mirth]
!!VRy-98&x1=49:S8; [Water]
!!VRy-96&x1=50:S4; [Sorrow]
!!VRy-98&x1=50:S2; [Earth]
!!VRy-96&x1=51:S2; [Fortune]
!!VRy-98&x1=51:S1; [Air]
!!VRy-96&x1=52:S3; [Misfortune]
!!VRy-98&x1=52:S4; [Fire]
!!VRy-96&x1=53:S1; [Haste]
!!VRy-98&x1=53:S1; [Air]
!!VRy-96&x1=54:S1; [Slow]
!!VRy-98&x1=54:S2; [Earth]
!!VRy-96&x1=55:S4; [Slayer]
!!VRy-98&x1=55:S4; [Fire]
!!VRy-96&x1=56:S4; [Frenzy]
!!VRy-98&x1=56:S4; [Fire]
!!VRy-96&x1=57:S5; [Titan's Lightning Bolt]
!!VRy-98&x1=57:S1; [Air]
!!VRy-96&x1=58:S4; [Counterstrike]
!!VRy-98&x1=58:S1; [Air]
!!VRy-96&x1=59:S4; [Berserk]
!!VRy-98&x1=59:S4; [Fire]
!!VRy-96&x1=60:S3; [Hypnotize]
!!VRy-98&x1=60:S1; [Air]
!!VRy-96&x1=61:S3; [Forgetfulness]
!!VRy-98&x1=61:S8; [Water]
!!VRy-96&x1=62:S2; [Blind]
!!VRy-98&x1=62:S4; [Fire]
!!VRy-96&x1=63:S3; [Teleport]
!!VRy-98&x1=63:S8; [Water]
!!VRy-96&x1=64:S2; [Remove Obstacle]
!!VRy-98&x1=64:S8; [Water]
!!VRy-96&x1=65:S4; [Clone]
!!VRy-98&x1=65:S8; [Water]
!!VRy-96&x1=66:S5; [Fire Elemental]
!!VRy-98&x1=66:S4; [Fire]
!!VRy-96&x1=67:S5; [Earth Elemental]
!!VRy-98&x1=67:S2; [Earth]
!!VRy-96&x1=68:S5; [Water Elemental]
!!VRy-98&x1=68:S8; [Water]
!!VRy-96&x1=69:S5; [Air Elemental]
!!VRy-98&x1=69:S1; [Air]

**LEVEL 4 AND 5 SPELLS IN FORTRESS (no Fire Magic)**

!?TH1; [Exit Town Hall trigger]
!!CA-1:T?y-1 G?y-2; [Town type (y-1), Mage Guild Level (y-2)]
!!CA-1:B3/17; [Set Flag 1 to TRUE if Cage of Warlords built]
!!FU|y-1<>7/-1/y-2<>3:E; [Exit if not Fortress, no Cage or Mage Guild not L3]
!!CA-1:G5 G3/2 G4/1; [Set 5 levels of Mage Guild, 2 spells for L4, 1 for L5]]
!!FU$spell$:P4/4/0/11/1/0; [Random L4 Air, Earth or Water spell, exluding banned spells: y-99]
!!CA-1:G3/0/y-99; [Set 1st L4 spell: y-99]
!!FU$spell$:P4/4/0/11/1/1/y-99; [Random L4 Air, Earth or Water spell, exluding banned and 1st random spell: y-99]
!!CA-1:G3/1/y-99; [Set 2nd L4 spell: y-99]
!!FU$spell$:P5/5/0/11/1/0; [Random level 5 Air, Earth or Water spell, exluding banned spells: y-99]
!!CA-1:G4/0/y-99; [Set L5 spell: y-99]



This is what I get!

Quote:
I tried to modify Magic Level in TXT,it works fine in new TXT.
Great!

____________

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


Hired Hero
posted April 28, 2010 02:24 AM

Thank you very much,Vlaad!

I understand the reason now

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

Tavern Dweller
posted May 01, 2010 08:49 PM
Edited by yarhad at 20:53, 01 May 2010.

Quote:
Quote:

- Is it possible to add a script for RMG maps that forces other preexisting starting abilities/specialities for specific heroes?
- Is it possible to force all towns to be able to contruct all 5 magic school levels? (again using RMG)

1.Write necessary script and put it into data/s/ folder with vaild filename.
2.No.


can you explain how this works step-by-step? I'm kinda new to this >_<
How to make the script?
Putting it in the mentioned folder will make it automatically run with RMG maps, add it to the WoG menu, or how does it work out? Please I have no clue here

@ Vlaad:

Do I add the script to a timed event in the map, or can I make the RMG make maps automatically with this script? Generally it would be awesome having the RMG using my scripts automatically... Also, can I make a script for changing professions/starting abilities of specific heroes, and how do I add that? manually as timed event, or can I add script so it is added automatically when I make random maps, or when maps are WoGified?

thx guys ur help to this newb is appreciated

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


Admirable
Legendary Hero
ghost of the past
posted May 01, 2010 09:30 PM

Something like this.

 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.0797 seconds