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 help and discussion
Thread: ERM help and discussion This Popular Thread is 407 pages long: 1 50 100 150 200 250 ... 281 282 283 284 285 ... 300 350 400 407 · «PREV / NEXT»
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted December 23, 2015 10:16 PM

I think you can get y2 only if it was set before. If it was not set, it will return always -1, no?
____________
Era II mods and utilities

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


Supreme Hero
Work at Magic Dimmension
posted December 24, 2015 12:51 AM

Quote:

!?FU55420;
x1/x2/x3 - coordinates
x4= -1 next or -2 previous
x5= object type
x6= object subtype

!!VRy4&x4=-1:S0 -2;
!!VRy4&x4=-2:S0 -1;

!_!VRy9:Sx16 -1;


!!IF:M^x16 %X16 ... v951 %V951 ... v952 %V952^;

!!SN:W^FU55420_LOCK^/?y7;
!!FU&y7=1:E;

!!if|v951=1/v951=0:;
 !!IF:M^v951 %V951^;
 !!VRv952:Sx4;
 !!SN:W^FU55420_LOCK^/1;
 !!FU:E;
!!en:;

!!if&x1=v952/x2=v953/x3=v954:;

 !_!SN:W^FU55420_LOCK^/?y7;
 !_!FU&y7=1:E;
 !!IF:M^MATCHED ! ... x16 %X16 ... v951 %V951 ... v952 %V952^;

   !!VRv952&x16=1:Sx4;
   !_!VRv952&v951=x16:Sx4;

   !_!UN&v951>x16/x16>1:Ux5/x6/y4/952;
   !!UN&x16>1:Ux5/x6/y4/952;
   
 !!SN:W^FU55420_LOCK^/1;
 !!FU:E;
!!en:;

!_!SN:W^FU55420_LOCK^/0;
!!UN:Ux5/x6/x4/952; [get x/y/l of yellow square of object into v952-v954]

*** Adventure map Objects ***
!?CM5;                     (Left-click on Adventure Map so we can use ctrl-click instead of right-click)
!!UN:P36/?v1;              (Check if Mithril Enhancements script is enabled: v1)
!!VRv1&-999:S0;            (check if the current player is in front of the PC that clicked)
!!FU&v1=0:E;               (If script is disabled or not player's turn, exit trigger)

!!CM:I?y-1;                (Location clicked: y-1]
!!CM:F?y-40;               (Get Flags for type of mouse-click: y-40)
!!FU|y-1<>37/y-40<>4:E;    (Exit if not on the Adventure Map itself or not a ctrl-click)

!!IF:V10/0;                (General abort if Flag 10 is True)
!!IF:V9/0;                 (special abort if Flag 9 is True)
!!CM&-10:P?v4/?v5/?v6;     (Get location: v4/v5/v6)
!!TRv4/v5/v6&-10:E?y-20;   (Check for yellow trigger square: y-20)
!!IF&y-20=1:V10/1;         (Check if entrance)

!!OBv4/v5/v6:T?v1;         (Get type of object)
!!OBv4/v5/v6:U?v2;         (Get Subtype)

!!if|v1=175/v1=124:; if hole
  !!VRy5:S5; mithril cost
  !!OW:R-1/7/?y6;
  !!IF&y6<y5:M^You need %Y5 Mithril to plant magic well !^;
  !!if&y6>=y5:;
     !!IF:Q1^Would you like to plant magic well here for %Y5 Mithril ?^;
     !!if&1:;
         !!UN:Iv4/v5/v6/49/0;
         !!VRy6:-y5;
         !!OW:R-1/7/y6;
         
         !!SN:W^FU55420_LOCK^/0;
         !!UN:U49/-1/?v951; [count number of wells]
         !!VRv952:S-2; [Initialize v952 to last object for faster UN:U format]
         !!DO55420/1/v951/1:Pv4/v5/v6/-2/49/-1;
         !!FU5211:P-1;
     !!en:;
  !!en:;
  !!FU:E;
!!en:;





please help me to fix
!?FU55420;

it is intended to search through objects, until found and move back one object (to make FU5211 hit the well).

anyway when 2 or more wells it errors.

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


Admirable
Omnipresent Hero
Wog refugee
posted December 24, 2015 01:23 AM

Its very difficult to fix something when have no idea what you want to do exactly -for you it may be obvious, but all I see are codes. Can you put in words what your script should do precisely? Then I am sure there may be easier ways, looks to me over complicated.

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


Supreme Hero
Work at Magic Dimmension
posted December 24, 2015 06:28 AM

FU5211 starts with UN:U/49/-1/-2/952
I want it to find object at v4/v5/v6
so I roll through objects, and if found roll back

... Or at least this is my intention ...

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


Supreme Hero
Work at Magic Dimmension
posted December 24, 2015 07:26 AM

it seems this work:

Quote:

!?FU55420;
x1/x2/x3 - coordinates
x4= -1 next or -2 previous
x5= object type
x6= object subtype

!!VRy4&x4=-1:S-2;
!!VRy4&x4=-2:S-1;

!!VRy9:Sx16 -1;


!!IF:M^x16 %X16 ... v951 %V951 ... v952 %V952^;

!!SN:W^FU55420_LOCK^/?y7;
!!FU&y7=1:E;

!!if|v951=1/v951=0:;
 !_!IF:M^v951 %V951^;
 !!VRv952:Sx4;
 !!SN:W^FU55420_LOCK^/1;
 !!FU:E;
!!en:;

!!if&x1=v952/x2=v953/x3=v954:;

 !_!SN:W^FU55420_LOCK^/?y7;
 !_!FU&y7=1:E;
 !_!IF:M^MATCHED ! ... x16 %X16 ... v951 %V951 ... v952 %V952^;

   !!VRv952&y9=1:Sx4;
   !_!VRv952&v951=x16:Sx4;

   !_!UN&v951>x16/x16>1:Ux5/x6/y4/952;
   !!UN&y9>1:Ux5/x6/y4/952;
   !_!IF:M^x16 %X16 ... v951 %V951 ... v952 %V952^;
   
 !!SN:W^FU55420_LOCK^/1;
 !!FU:E;
!!en:;

!!FU&x16=v951:E;
!_!SN:W^FU55420_LOCK^/0;
!!UN:Ux5/x6/x4/952; [get x/y/l of yellow square of object into v952-v954]




the line
Quote:

!!FU&x16=v951:E;



was missing and is very important :P

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


Responsible
Supreme Hero
posted December 25, 2015 03:39 PM

OxFEA said:
Hero_Of_Light said:

Can you also make Catherine's troops be replaced with war Zealots (I'll change the numbers accordingly later). I am asking because in my new mod I gave her the ability to upgrade creatures to War Zealots (like Gelu and Dracon) and so I want her to start with the creature she upgrades to (like the other two).

And also, can you make Boragus start with normal Elementalist creatures as well? Meaning Pixies and Air or Water Elementals. I asked for Storm Elementals because I needed it for a campaign, but now that they can be changed in the map editor (without ERM scripts) there's no need for it. I would prefer for Boragus to have the plain Conflux starting troops.

If it's not too much trouble that is

Reload
https://dl.dropboxusercontent.com/u/61759222/HoMM/boragus_for_hol.bin



OXFEA

Do you think you can help me just one more time with this? If it's not that much trouble that is.

This bin file made Boragus a female Elementalist with the appropriate stats and starting troops. However, a small problem remains with the starting skills.

Boragus, being a Barbarian, starts with Tactics and Adv Offense, which I changed with Expert Wisdom and Sorcery (The way I intend to make the new Elementalist hero). So, naturally, I used these commands.

!!HE154:S19/0; [loose: Tactics]
!!HE154:S22/0; [loose: Adv Offense]
!!HE154:S7/3;  [Starting Skills: Wisdom]
!!HE154:S25/1;  [Starting Skills: Sorcery]

They work OK but there is a small bug concerning custom scenarios and campaigns. The problem there is that If the new Elementalist hero obtains these skills (tactics and Offense) they will be deleted in the next one, as these commands delete them when the new scenario starts.

I was wondering If this bin file could change hero's starting skills by default, the way it changed the hero class and starting troops etc.

I don't know if it's too much trouble but If it can be done I would like to remedy some other problems with it as well. I will sum up here.

I want to make:

1) Boragus, hero 154, to be female, Elementalist, have Conflux starting troops, Conflux commander (these are already made) and starting skills: Expert Wisdom and Basic Sorcery.

2)Geon, hero 92, starts with Wisdom and Eagle Eye. I would like to make him start with Basic Wisdom and Expert Earth Magic

3) Gretchin, hero 100, starts with Pathfinding and Offense. I would like to make him start with Basic Offense and Expert Ballistics.

Once Again, I would really appreciate the help. Consider it a Christmas gift
____________
Not idly do the leaves of Lorien fall.

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


Promising
Known Hero
posted December 25, 2015 10:01 PM
Edited by igrik at 22:07, 25 Dec 2015.

Hero_Of_Light said:

I want to make:

1) Boragus, hero 154, to be female, Elementalist, have Conflux starting troops, Conflux commander (these are already made) and starting skills: Expert Wisdom and Basic Sorcery.

2)Geon, hero 92, starts with Wisdom and Eagle Eye. I would like to make him start with Basic Wisdom and Expert Earth Magic

3) Gretchin, hero 100, starts with Pathfinding and Offense. I would like to make him start with Basic Offense and Expert Ballistics.

Once Again, I would really appreciate the help. Consider it a Christmas gift


1) specialization? Elementalist, I can not
2) female? specialization? type starting troops?
3) female? specialization? type starting troops?

https://copy.com/6Mm4YbB1uQnv4HMU?download=1

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


Responsible
Supreme Hero
posted December 26, 2015 12:32 AM
Edited by Hero_Of_Light at 00:38, 26 Dec 2015.

No you don't understand, I don't want all of them to be Elementalists and have the Conflux starting troops. Geon will still be a male Warlock that starts with Troglodytes etc. As for the specialization, that is easily edited via ERM commands that are not buggy in any way when playing campaigns.

Here, I'll tell you what I want. Forget ALL the above and do only this:

1) Boragus, hero 154, starting skills: Expert Wisdom and Basic Sorcery.

2)Geon, hero 92, starting skills: Basic Wisdom and Expert Earth Magic

3) Gretchin, hero 100, starting skills: Basic Offense and Expert Ballistics.

I will combine this pluggin with the one OxFEA gave me earlier and then it will work fine.
____________
Not idly do the leaves of Lorien fall.

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


Promising
Known Hero
posted December 26, 2015 12:38 AM
Edited by igrik at 00:39, 26 Dec 2015.

ok

; Boragus
0067D534 07000000
0067D538 03000000
0067D53C 19000000
0067D540 01000000

; Geon
0067BEEC 07000000
0067BEF0 01000000
0067BEF4 11000000
0067BEF8 03000000

; Gretchin
0067C1CC 16000000
0067C1D0 01000000
0067C1D4 0A000000
0067C1D8 03000000

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


Responsible
Supreme Hero
posted December 26, 2015 12:45 AM

Sorry I don't understand. I don't know how to use bin files. And also, I made a mistake, since Roland needs a tweaking too. The list is:


1) Boragus, hero 154, starting skills: Expert Wisdom and Basic Sorcery.

2)Geon, hero 92, starting skills: Basic Wisdom and Expert Earth Magic

3) Gretchin, hero 100, starting skills: Basic Offense and Expert Ballistics.

3) Roland, hero 152, starting skills: Basic Leadership and Expert Tactics.
____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted December 26, 2015 12:51 AM

bin file is a plugin. Create a folder in your mod, name it Eraplugin, a sub folder -After Wog, put the plugin in.

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


Promising
Known Hero
posted December 26, 2015 12:53 AM
Edited by igrik at 00:56, 26 Dec 2015.

Boragus + Geon + Gretchin + Roland

https://copy.com/6Mm4YbB1uQnv4HMU?download=1

put in "...Mods/your mod/EraPlugins/BeforeWoG"

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


Responsible
Supreme Hero
posted December 26, 2015 12:54 AM
Edited by Hero_Of_Light at 01:00, 26 Dec 2015.

Yes, I know how to use the pluggin, I was asking know what to do with these commands:

; Boragus
0067D534 07000000
0067D538 03000000
0067D53C 19000000
0067D540 01000000

; Geon
0067BEEC 07000000
0067BEF0 01000000
0067BEF4 11000000
0067BEF8 03000000

; Gretchin
0067C1CC 16000000
0067C1D0 01000000
0067C1D4 0A000000
0067C1D8 03000000

**EDIT**

I tested it and it seems to work OK, thanks a lot! I hope I don't need any more tweaks like this, but if I do, it is comforting to know that there is help to be found

Thanks again for your efforts
____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted December 26, 2015 12:58 AM

Those commands show the address modified. Is useful when you need to do tweaks later, so no need to search again. But now you don't need them.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted December 26, 2015 09:06 PM

I asked a question about the restore interface pluggin in ERA II forum but since it seems dead for the moment, I thought I'd address it here as well.

I would like to know If anyone can edit the restore interface pluggin. What it does is that it restores the original H3 interface and campaigns (instead of WoG). However, I found out that there are two shortcomings about it and I thought I'd ask If there's a way to change that.

1) This pluggin restores the original SoD interface and I would like to know if it can be edited to restore the original Heroes 3 Complete interface. The reason I asked is that I would like to have the RoE intro playing when I start Heroes. If it's not possible then fine, I just would like to know.

2) This pluggin restores the original SoD campaigns as well, which is pretty much why I want it to work so much. However, I noticed that it doesn't fully restore the campaign videos and keeps the (in my opinion really bad) WoG videos.

To be honest not all of them. I played the New Beginning campaign (to see how it is compatible with my mod) and the first 4 videos where the original ones but the final wasn't. Since WoG used the videos from the Elixir of Life campaign as well, the ending video from that campaign wasn't restored either. My guess is that when this pluggin was made the ending credits of these two campaigns were disregarded.

Can someone please help me with these?
____________
Not idly do the leaves of Lorien fall.

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

Tavern Dweller
posted December 27, 2015 01:12 PM

fnords drop ressource script

Hi All

Hopefully someone can help me with the following.
I would like to chance this script from 100% giving ressources after battle to a percantage chance. Like 5% chance of ressource drop instead of after every single battle.

I can manipulate this in Fnords artifact-drop script, but I think the premesis for these scripts are different, since one is depended on battle while the other runs once day one - If I am not mistaken.

Hope someone can help chance the chance for ressources to 5% instead of after every battle.

Also me and my cousins have sceduled to start playing tonight, so would be awesome if we could add this script for our game

ty in advance.

Script:

!?CM0;  **VR add, click on minimap to reinitialize options display
[** Check if Monster Stack Resource messages are disabled **]
!!FU&v8654<>99:E; exit if  disable options active
!!CM:I?y1;
!!FU&y1<>1:E; exit if not minimap
!!VRz1:S^Choose state of option^;
!!VRz2:S^Reinitialize Monsters Drop Resources options^;
!!VRz3:S^Exit (no changes)^;
!!IF:G1/1/1/z1/z2/z3;
!!CM:R0;
!!FU&v1=2:E;
!!VRv8654&v1=1:S1;


[Give Heroes resources for defeating monster stacks]
!?OB54;
!!UN242/?y4; [Check if script is enabled: y-1]
!!FU&y4<>1:E; [Exit if script isn't enabled]
!!VRv66:S0; [Initialize v66 to 0]
!!VRv67:S-1; [Initialize v67 to -1]
!!MO998:G?y-1; [Number of monsters in stack: y-1]
!!OB998:U?y-2; [Type of monster: y-2]

!!UN904/1 P905/0; [Disable ERM error messages and clear error flag]
!!MO998:A?y-7; [Check monster's artifact: y-7]
!!UN905/?y-8; [Check ERM error flag: y-8=1 if stack has no setup]
!!UN904/0; [Re-enable ERM error messages]
!!FU&y-8=0/y-7>=0:E; [Skip if monster has an artifact]

!!MA:Cy-2/6/?y-3; [Gold Cost of 1 Monster: y-3]
!!VRv66:Sy-1 *y-3; [Total Gold Cost of Monsters: v66]
!!HE-1:N?y-5; [Hero number: y-5]
!!DO17777/0/6/1y-5/y-2; [Count number of troops of type y-2 in hero's army. Result in y-6]
!!VRv67:Sy-6; [Set v67 to total number of troops of this type in hero's army]

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

!?BA0&v67>=0; [Start of Battle Trigger]
!!UN242/?y4; [Check if script is enabled: y-1]
!!FU&y4<>1:E; [Exit if script isn't enabled]
!!OB998:U?y-2; [Type of monster: y-2]
!!HE-1:N?y-5; [Hero number: y-5]
!!DO17777/0/6/1y-5/y-2; [Recount troops (in case of Succubus join ability) of type y-2 in hero's army. Result in y-6]
!!VRv67:Sy-6; [Set v67 to total number of troops of this type in hero's army]
!!VRv66:*-1; [Set v66 to negative number if there's a battle]

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

!$OB54&v66<>0/v67>=0;
!!UN242/?y4; [Check if script is enabled: y-1]
!!FU&y4<>1:E; [Exit if script isn't enabled]
!!OB998:U?y-1; [Type of monster: y-1]
!!HE-1:N?y-2 O?y-10; [Hero number: y-2, Owner: y-10]
!!DO17777/0/6/1y-2/y-1; [Count number of troops of type y-1 in hero's army. Result in y-6]
!!VRy-23|y-6>v67/y-10<0:S1; [Set y-23 to 1 if troops joined hero or if hero lost the battle: y-23]
!!VRv67:S-1; [Reset v67 to -1]
!!FU&y-23=1:E; [Exit if hero has more of this troop type now (i.e., if they joined) or if hero lost the battle]

!!VRy-3&v66>0:S1; [Set y-3 to 1 if stack flees]
!!VRy-3&v66<0:S2; [Set y-3 to 2 if stack fought combat]
!!VRv66&v66<0:*-1; [Make v66 a positive value again if it isn't]

[Check for resource specialty hero]
!!VRy-14:S-1; [Initialize y-14 to -1]
!!VRy-14&y-2=38:S1; [Rissa is Mercury specialist: y-14=1]
!!VRy-14&y-2=111:S5; [Saurug is Gems specialist: y-14=5]
!!VRy-14&y-2=60:S3; [Calid is Sulfur specialist: y-14=3]
!!VRy-14&y-2=94:S4; [Sephinroth is Crystal specialist: y-14=4]

[Check for gold specialty heroes: Caitlin, Clavius, Octavia, Nagash, Damacon, Jenova, Aine, Gelare, Grindan]
!!VRy-14|y-2=15/y-2=70/y-2=52/y-2=79/y-2=84/y-2=18/y-2=47/y-2=142/y-2=143:S6; [Gold specialists: y-14=6]

!!VRy-15&y-14>=0/y-14<6:S1 R9; [Random number 1-10 (70% chance of resource specialist finding their resource): y-15]

[Calculate Stack's Treasure]
!!VRv66&y-3=1::2; [50% if stack flees: v66]
!!VRy-4:Sv66 :24; [1/24th of stack's recruiting cost is gold: y-4]
!!VRy-4|y-1=16/y-1=17/y-14=6:Sv66 :18; [1/18th is gold for Dwarves, Battle Dwarves and Gold Resource specialists: y-4]
!!VRy-4&y-1=116:Sv66 :10; [1/10th is gold for Gold Golems: y-4]
!!VRy-4|y-1=26/y-1=27/y-1=68/y-1=69/y-1=82/y-1=83:Sv66 :12; [1/12th is gold for Dragons: y-4]
!!VRy-4|y-1=132/y-1=133/y-1=134/y-1=135/y-1=151/y-1=154/y-1=155/y-1=196:Sv66 :12; [1/12th is gold for Dragons: y-4]

!!VRy-11:S0 R4; [0=none, 1=wood, 2=ore, 3=precious, 4=wood/ore+precious: y-11]
!!VRy-11&v66<4000:S0 R3; [0=none, 1=wood, 2=ore, 3=precious: y-11]
!!VRy-11&v66<2000:S0 R2; [0=none, 1=wood, 2=ore: y-11]
!!VRy-11&y-15>=4:S3; [Resource specialist has 70% chance of finding their specialty resource: y-11]
!!VRy-4&y-11=0/y-1<>116:Sv66 :18; [If gold only, increase the amount to 1/18th of recruiting cost: y-4]
!!VRy-12&y-11=4:S1 R1; [If wood/ore+precious 1=wood, 2=ore: y-12]
!!VRy-11|y-1=22/y-1=23:S1; [Dendroids and Dendroid Guards always have wood: y-11]
!!VRy-11|y-1=32/y-1=33:S2; [Stone and Iron Golems always have ore: y-11]
!!VRy-11&y-1=116:S0; [Just gold for gold golems: y-11]
!!VRy-11|y-1=34/y-1=35/y-1=36/y-1=37/y-1=52/y-1=53/y-1=82/y-1=83/y-1=117/y-1=120/y-1=121:S3; [Just precious for specialty creatures: y-11]
!!VRy-11|y-1=130/y-1=131/y-1=133/y-1=134/y-1=135/y-1=136/y-1=151/y-1=155/y-1=158/y-1=193:S3; [Just precious for specialty creatures: y-11]
!!VRy-5&y-11=4/y-12=1:S0; [Set to 0 for Wood: y-5]
!!VRy-5&y-11=4/y-12=2:S2; [Set to 2 for Ore: y-5]
!!VRy-5&y-11=1:S0; [Set to 0 for Wood: y-5]
!!VRy-5&y-11=2:S2; [Set to 2 for Ore: y-5]
!!VRy-7:Sv66 :1000; [1/1000 of recruit cost is wood or ore: y-7]
!!VRy-7&y-7>=5:Sv66 :4000 +4; [1/4000 of recruit cost after first 4 wood/ore: y-7]
!!VRy-7&y-7>=9:Sv66 :8000 +7; [1/8000 of recruit cost after first 8 wood/ore: y-7]
!!VRy-7&y-7>=15:Sv66 :16000 +11; [1/16000 of recruit cost after first 14 wood/ore: y-7]
!!VRy-7&y-7>=20:Sv66 :32000 +16; [1/32000 of recruit cost after first 19 wood/ore: y-7]
!!VRy-7&y-7>=30:Sv66 :64000 +23; [1/64000 of recruit cost after first 29 wood/ore: y-7]
!!VRy-7&y-7>=50:Sv66 :128000 +37; [1/128000 of recruit cost after first 49 wood/ore: y-7]
!!VRy-7&y-7>=100:Sv66 :256000 +69; [1/256000 of recruit cost after first 99 wood/ore: y-7]
!!VRy-7&y-7>=200:Sv66 :512000 +135; [1/512000 of recruit cost after first 199 wood/ore: y-7]
!!VRy-7|y-1=22/y-1=23:Sy-7 *2 +1; [Dendroids and Dendroid Guards have more wood: y-7]
!!VRy-7|y-1=32/y-1=33:Sy-7 *2 +1; [Stone and Iron Golems have more ore: y-7]
!!VRy-7&y-7>=250:S250; [Maximum 250 wood/ore: y-7]
!!VRy-7&y-11=4::2; [Half the amount if it's wood/ore+precious: y-7]
!!VRy-5|y-11=0/y-11=3/y-7<1:S-1; [Set to -1 if no wood/ore: y-5]

!!VRy-8&y-11>=3:S1 R4; [Determine precious resource: y-8]
!!VRy-8&y-11>=3/v66<10000:S1 R3; [If mithril amount would be 0, exclude it from chance: y-8]
!!VRy-8&y-11>=3/y-8>=2:+1; [Skip ore: y-8]
!!VRy-8&y-11>=3/y-8>=6:+1; [Skip gold: y-8]
!!VRy-8&y-11=3/y-15>=4/y-14>=0/y-14<6:Sy-14; [Resource specialists have 70% chance of their specialty resource: y-8]
!!VRy-13|y-1=52/y-1=53/y-1=130/y-1=131/y-1=158:S1; [Efreet, Efreet Sultands, Firebirds, Phoenix, and Sacred Phoenix always have mercury: y-13]
!!VRy-13|y-1=82/y-1=83/y-1=135/y-1=155:S3; [Red, Black, Darkness and Rust Dragons always have sulfur: y-13]
!!VRy-13&y-1=133:S4; [Crystal Dragons always have crystal: y-13]
!!VRy-13|y-1=117/y-1=151:S5; [Diamond Golems and Diamond Dragons always have gems: y-13]
!!VRy-8&y-11>=3/y-13>0:Sy-13; [For specialty creatures, set resource to their specialty: y-8]
!!VRy-9&y-11>=3/y-8<7:Sy-7 :2; [1/2 of wood/ore value is precious resources: y-9]
!!VRy-9&y-11>=3/y-13>0:Sy-7 +1; [Specialty creatures have more of their specialty: y-9]
!!VRy-16&y-14>=0/y-8=y-14:Sy-9 :5; [20% of precious resource: y-16]
!!VRy-9&y-14>=0/y-8=y-14:+y-16 +1; [Resource specialists get additional 20%+1 of their specialty resource: y-9]

!!VRy-8|y-1=34/y-1=35/y-1=36/y-1=37/y-1=120/y-1=121/y-1=134/y-1=136/y-1=193:S7; [Magi, Arch Magi, Genies, Master Genies, Psychic Elementals, Magic Elementals, Faerie Dragons, Enchanters and Sorceresses always have Mithril: y-13]
!!VRy-9&y-8=7:Sy-7 :10; [1/10 of wood/ore value is mithril: y-9]
!!VRy-9|y-1=34/y-1=35/y-1=36/y-1=37/y-1=120/y-1=121/y-1=134/y-1=136/y-1=193:Sy-7 :8 +1; [Magi, Arch Magi, Genies, Master Genies, Psychic Elementals, Magic Elementals, Faerie Dragons, Enchanters and Sorceresses have more Mithril: y-8]

!!VRy-8|y-9<1/y-11<3:S-1; [Set to -1 if no precious resource: y-8]

!!FU&y-4<1:E; [Exit if no resource treasure]

!!VRy-17:S762 +y-10; [Index for v variable storing this player's last selected option: y-17]
!!VRy-18:Svy-17; [Last selected option: vy-17 (v762-v769)]
!!VRy-18&y-18=0:S1; [If no option was selected, default to option 1]

[** Check if Monster Stack Resource messages are disabled **]
!!VRy-19:Sy-10 +1; [Add 1 to y-10: y-19]
!!FU$bit$y-19; [Convert to bit number: y-100]
!!VRy-20:Sv3328; [Set y-20 to v3328]
!!VRy-20:&y-100; [Check if message is disabled for current player: y-20]
[** If y-20=y-100, messages are disabled for current player **]
!!VRy-20&v8654<>99:S0;
!!VRy-100&v8654<>99:S1;
!!HEy-2:W?y-22; [Hero's remaining movement points: y-22] **VR add

!!UN:N3/4/y-1/1; [Name of Monster: z4]
!!VRz-1:S^The %Z4 had resources? Do you want to collect them?

(Right-click on minimap to reinitialize options when display disabled)^;
!!VRz-2:S^Yes, collect the resources but Hero will lose 500 movement points (has %Y-22)^; **VR add
!!VRz-3:S^No, don't collect the resources, I'm in a hurry!^;
!!VRz-4:S^Yes, collect them every time and don't display this again.^;
!!VRz-5:S^No, don't collect them and don't display this again.^;
!!VRv1:S0; [Initialize v1 to 0]
!!IF&y-20<>y-100/1000:G1/1/y-18/-1/-2/-3/-4/-5/0/0/0/0/0/0/0/0; [Display option list unless disabled: choice in v1]
!!VRy-21&v1=0:S2; [Default to no for AI]
!!VRy-21|v1=1/v1=4:S1; [Set y-21 to Yes option selected: y-21]
!!VRy-21|v1=2/v1=8:S2; [Set y-21 to No option selected: y-21]
!!VRv8654|v1=4/v1=8:S99; **VR add
!!VRvy-17&1000/y-20<>y-100:Sy-21; [Store selected option in vy-17 (v762-v769) unless disabled]
!!VRy-21&1000/y-20=y-100:Sy-18; [If message disabled, use last selected option for human hero: y-21]

!!VRz1:S^Message Disabling^; [Section name: z1]
!!DO10938/3320/3328/1|v1=4/v1=80; [Load the disabling state variables from disk file]
!!VRv3328|v1=4/v1=8:|y-100; [Add message disabled state to v3328 for this player: v3328]
!!DO10938/3320/3328/1|v1=4/v1=81; [Save the disabling state variables to disk file]

!!HEy-2:W?y-22; [Hero's remaining movement points: y-22]
!!VRy-21&-1000/y-22<500:S1; [AI hero only gathers resources if it has less than 500 movement points remaining]

!!FU&y-21=2:E; [Exit if hero doesn't gather resources]

!!VRy-22:-1; [Remove 500 movement points: y-22]
!!VRy-22&y-22<0:S0; [Minimum 0: y-22]
!!HEy-2:Wy-22; [Remove 500 movement points from hero]

!!HEy-2:B0/?z1; [Hero's name]

!!VRz3&y-3=1:S^After the %Z4 flee, %Z1's army searches the camp and finds some treasure they left behind!^;
!!VRz3&y-3=2:S^After defeating the %Z4, %Z1's army searches the camp and finds treasure!^;

!!IF&1000/y-11=0:Q1/6/y-4/1^%Z3^; [Gold alone]
!!IF&1000/y-11>=1/y-11<=2:Q1/6/y-4/y-5/y-7/1^%Z3^; [Gold + Wood/Ore]
!!IF&1000/y-11=3:Q1/6/y-4/y-8/y-9/1^%Z3^; [Gold + Precious Resource]
!!IF&1000/y-11=4:Q1/6/y-4/y-5/y-7/y-8/y-9/1^%Z3^; [Gold + Wood/Ore + Precious Resource]

!!OW:R-1/6/dy-4; [Give player gold: y-4]
!!OW&y-5>=0/y-7>0:R-1/y-5/dy-7; [Give player wood or ore: y-7]
!!OW&y-8>=0/y-9>0:R-1/y-8/dy-9; [Give player precious resource: y-9]
!!UN:R2;

!?FU17777;
[x1=hero number, x2=monster type, total number in hero's army: y-6]
[Note: this function is also used by Monster Stack Resources]
!!HEx1:C0/x16/?y1/?y2; [Type: y1, Number: y2]
!!VRy-6&y1=x2/y2>0:+y2; [Add total creatures of type x2: y-6]


____________

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


Admirable
Omnipresent Hero
Wog refugee
posted December 27, 2015 02:04 PM
Edited by Salamandre at 14:10, 27 Dec 2015.

Check for this part in your script:

mbamartin said:

!$OB54&v66<>0/v67>=0;
!!UN:P242/?y4; [Check if script is enabled: y-1]
!!FU&y4<>1:E; [Exit if script isn't enabled]


then add right after it:

!!VRy1:S1R100;
!!FU&y1>5:E;  5 = 5% chance, change it to whatever % you want (1-101)
[...rest of the script...]

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

Tavern Dweller
posted December 27, 2015 02:14 PM

TY very much!

Will test it shortly

____________

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

Tavern Dweller
posted December 27, 2015 03:26 PM

It Works

Could I ask you kindly to help me with figuring out which part to alter, if I want the ressources given to be 10x the amount currently dropped.

Ty in advance


____________

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


Admirable
Omnipresent Hero
Wog refugee
posted December 27, 2015 06:17 PM

Search for this line:

!!VRz3&y-3=2:S^After defeating the %Z4, %Z1's army searches the camp and finds treasure!^;

Then add right after it:

!!VRy-4:*10; gold x 10
!!VRy-7:*10; wood and ore x 10
!!VRy-9:*10; precious resources x 10
;you can parameter each category by changing the 10 value
[...rest of the script...]
____________
Era II mods and utilities

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 407 pages long: 1 50 100 150 200 250 ... 281 282 283 284 285 ... 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.6617 seconds