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 300 ... 331 332 333 334 335 ... 350 400 407 · «PREV / NEXT»
szaman
szaman


Known Hero
posted July 08, 2017 01:32 AM

Is there a way to modified this script to summon random stronghold creatures?

the amount of creatures is based on hero spell power. Just like the classic summon spells.


ZVSE

!?BA0&1000;
!!BA:H0/?v1 H1/?v2; left Hero, right Hero
!!HEv1:Fd/d/?y4/d S16/?y5; get power, water skill--left side
!!VRy5:+1; 1,2,3-->2,3,4
!!VRy5&y5<2:S2;
!!VRv801&v801<1:S35;
!!FU&v2=-2:E;
!!HEv2:Fd/d/?y4/d S16/?y5; get power, water skill--right side
!!VRy5:+1; 1,2,3-->2,3,4
!!VRy5&y5<2:S2;
!!VRv802&v802<1:S35;

!?BG0&1000;
!!BG:A?y1 S?y2 Q?y3; action, spell #, side
!!FU|y1<>1/y2<>67:E; exit if not Hero casting Summon Earth
!!VRv2:S0;
!!DO3750/19/155/17&y3=0-1/2; left side
!!DO3750/31/167/17&y3=11/2;  right side
!!FU&v2=0:E;
!!BG:A0;
!!HE-10&y3=0:Id-25/1; spell cost 25--left side
!!HE-20&y3=1:Id-25/1; right side
!!BU&y3=0:S63/v801/v2/y3/-1/1; summon wamps
!!BU&y3=1:S63/v802/v2/y3/-1/1; summon wamps
!!BHy3:M1; disable further spell-casting by Hero this turn

!?FU3750; x1=offset to rear hex, x2=output hex v=#, x16=front hex to check
!!BU:Ex16/?y1; check for live stack at x16
!!FU&y1>-1:E;
!!VRy2:Sx16+x1; rear hex
!!BU:Ey2/?y1; check for live stack at x16+x1
!!FU&y1>-1:E;
!!VRvx2:Sx16;
!!VRx16:S255; end loop

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


Responsible
Supreme Hero
posted July 08, 2017 01:49 PM
Edited by Hero_of_Light at 13:55, 08 Jul 2017.

can someone help me edit the new Morn's Battlefields script? I think it is flawed in many ways (as oppossed to the old one) and I would like to fix it.

First of all, I need a command that stores the subtype of an object on a variable. I want to add it to this script so that each object has its own background and not a random one. I don't get why this was changed in the new script. In the old script you could set specific pics on specific objects which was quite awesome. And now it is random? Honestly why? Specifiying the object's subtype on the script will fix that. Can someone help me?

!!if&x3=98:; creature banks
!!VRy1:S0R22;
!!VRz2&y1=0:S^aren01.pcx^;
!!VRz2&y1=1:S^arena.pcx^;
!!VRz2&y1=2:S^arena02.pcx^;
!!VRz2&y1=3:S^cave.pcx^;
!!VRz2&y1=4:S^cb01.pcx^;
!!VRz2&y1=5:S^cb02.pcx^;
!!VRz2&y1=6:S^cb03.pcx^;
!!VRz2&y1=7:S^cb04.pcx^;
!!VRz2&y1=8:S^cb05.pcx^;
!!VRz2&y1=9:S^cb07.pcx^;
!!VRz2&y1=10:S^cb09.pcx^;
!!VRz2&y1=11:S^cb10.pcx^;
!!VRz2&y1=12:S^cb13.pcx^;
!!VRz2&y1=13:S^cb15.pcx^;
!!VRz2&y1=14:S^cb16.pcx^;
!!VRz2&y1=15:S^cb17.pcx^;
!!VRz2&y1=16:S^cb18.pcx^;
!!VRz2&y1=17:S^cit01.pcx^;
!!VRz2&y1=18:S^horns2.pcx^;
!!VRz2&y1=19:S^ruin.pcx^;
!!VRz2&y1=20:S^temple.pcx^;
!!VRz2&y1=21:S^temple1.pcx^;
!!VRz2&y1=22:S^arena12.pcx^;
!!BA:B^%Z2^;
!!en:;

Secondly, I always thought that it was nice that the terrain changed during the siege. It was only Natural. You attack a Stronghold in the snow, the siege screen has SNOW (and not rocky terrain). This was ALSO scrapped in the new version of Morn's Battlefields (again WHY????). Can someone help me fix this as well? To make the script change the terrain even when attacking a town.

I think the answer is here:

!?FU217811;
;x1=terrain type
;x2=special terrain
;x3=CB
;x4=monster (ID=54)

Can there be added an variable x5 that checks if town is attacked?
____________
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 July 08, 2017 03:18 PM
Edited by Salamandre at 15:18, 08 Jul 2017.

Szaman, the script you gave is incorrectly pasted, main DO command is wrong. Here is what you ask for but ofc is weird, hero power * summoned creatures makes no sense when you can randomly get hobgoblins as well as Ancient behemots. But this is what you asked.

ZVSE


!?BG0&1000;
!!BA:H0/?y7 H1/?y8;
!!BG:A?y1 S?y2 Q?y3; action, spell #, side
!!FU|y1<>1/y2<>67:E; exit if not Hero casting Summon Earth
!!VRv2:S0;
!!DO3750/19/155/17&y3=0:P-1/2; left side
!!DO3750/31/167/17&y3=1:P1/2;  right side
!!FU&v2=0:E;
!!BG:A0;
!!HE-10&y3=0:Id-25/1; spell cost 25--left side
!!HE-20&y3=1/y8>-1:Id-25/1; right side
!!VRy4:S85R12;
!!VRy4|y4=86/y4=88/y4=90/y4=92/y4=94/y4=96:+1;
!!HE-10:Fd/d/?y5/d;
!!HE-20&y8>-1:Fd/d/?y6/d;
!!VRy5:*4;
!!VRy6:*4;
!!BU&y3=0:Sy4/y5/v2/y3/-1/-1;
!!BU&y3=1/y8>-1:Sy4/y6/v2/y3/-1/-1;
!!VRz1:S^Sumnelm.wav^;
!!SN:Pz1;
!!BHy3:M1; disable further spell-casting by Hero this turn

!?FU3750; x1=offset to rear hex, x2=output hex v=#, x16=front hex to check
!!BU:Ex16/?y1; check for live stack at x16
!!FU&y1>-1:E;
!!VRy2:Sx16+x1; rear hex
!!BU:Ey2/?y1; check for live stack at x16+x1
!!FU&y1>-1:E;
!!VRvx2:Sx16;
!!VRx16:S255; end loop
____________
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 July 08, 2017 03:25 PM

I think I fixed the town battlefields problem with this script (this is test for snow).

;Snow and monster
!!if&x1=3/x4=54:;
!!VRy1:S0R7;
!!VRz2&y1=0:S^aquarium.pcx^;
!!VRz2&y1=1:S^snow02.pcx^;
!!VRz2&y1=2:S^snow03.pcx^;
!!VRz2&y1=3:S^snow1.pcx^;
!!VRz2&y1=4:S^snow2.pcx^;
!!VRz2&y1=5:S^snow3.pcx^;
!!VRz2&y1=6:S^snow4.pcx^;
!!VRz2&y1=7:S^snow5.pcx^;
!!BA:B^%Z2^;
!!en:;

;Snow and town
!!if&x1=3/x4=98:;
!!BA:B^snwsg.pcx^;
!!en:;

This will change battlefield when attacking a town. However, it still sometimes overruled (and original battlefield is present). Is there a way to make Morn's Battlefields script override the battlefield at ALL times (with no exceptions)?

Also, can someone help me with the object subtype? I want to make the creature banks to have a fixed battlefield (and not random).
____________
Not idly do the leaves of Lorien fall.

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


Legendary Hero
posted July 08, 2017 04:56 PM

Hero_of_Light said:
Secondly, I always thought that it was nice that the terrain changed during the siege. It was only Natural. You attack a Stronghold in the snow, the siege screen has SNOW (and not rocky terrain).

Have you tried Titan's Winter? So, let's use it as an example, you attack the stronghold in the middle of the snow, the picture shows snow, you have Titans and Master Genies, your enemy has Thunderbirds. They all have speed 11 and you are on snow so you would have the speed bonus and expect to be the one moving first, yet the Thunderbirds have their turn before you and he casts mass Slow or mass Haste. Don't you see this is a major problem then what looks better in the picture?

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


Responsible
Supreme Hero
posted July 08, 2017 05:30 PM

Speed bonus of creatures native to defending town is not affected, I checked. It is only the background that changes, not the parameters of the battle.
____________
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 July 08, 2017 05:33 PM

Hero_of_Light said:
I don't get why this was changed in the new script.


Hero_of_Light said:
Honestly why?


Hero_of_Light said:
This was ALSO scrapped in the new version of Morn's Battlefields (again WHY????).



First of all, Morn Battlefields is about aesthetics, it does NOT change the battlefield but only the pcx used, so people get various and well done designed 120 battlefields instead of always same 10. And as every aesthetic choice, is subjective, some will like, others probably not. However, the bottom point is that it does NOT technically change how Heroes works, is only about what you see.

I don't even recall having two Morn mods, one old and one new. As far as I remember, I only made one. If one day I get some time and motivation, I will look into what you say and see whats all this fuzz about, I promise.


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


Legendary Hero
posted July 08, 2017 05:38 PM
Edited by bloodsucker at 17:40, 08 Jul 2017.

Hero_of_Light said:
Speed bonus of creatures native to defending town is not affected, I checked. It is only the background that changes, not the parameters of the battle.
That's exactly my point, you see one terrain but you are fighting on another, for me this is worst then the terrain in the battle not reflecting what was outside.
But since you probably don't want to distribute your changes to someone else work do what you want.

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


Admirable
Omnipresent Hero
Wog refugee
posted July 08, 2017 05:44 PM

Best upload a saved game -attack a town where you think it doesn't look right- done only with morn mod then I will check what is wrong.

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


Responsible
Supreme Hero
posted July 08, 2017 05:46 PM

I am not reffering to any older version of your mod, I am refering to the original WOG script that allowed new custom battlefields.

That old version had various benefits, one of which is giving modders the opportunity to change or even add more battlefields as they pleased.

You're correct aesthetics is subject to personal likes and dislikes. In my opinion the original New Battlefields script had the advantages I mnentioned before.

The things I am trying to implement to your version of the mod is these:

1) Custom Battlefields based on terrain while attacking a town as well.

2) Overriding the Battlefields always with one of the list (and not randomly) if possible, if not that is not that important.

3) Custom Battlefields for objects (currently random, I would personally preferred prefixed). Regarding this point the original script was way stronger as it didn't just change the battlefield for crypts, creature banks and Utopias as yours did, but any object that could be attacked as well (ex. Shipwreck, Pyramid, even Portal to Portal combats!).

Anyway, I think I fixed the first problem. I don't seem to be able to fix the third one though. I don't know where to put the object subtype check in order to give fixed battlefields on different Creature Banks.
____________
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 July 08, 2017 06:00 PM

Well, is quite complicated, as in Morn script I set the subtype of creature banks in PO (square) at game start. So when battle occurs, it checks PO then sets a different pcx according to creature banks, so it already does that.

!?FU217810;
!!UN:Ux1/-1/-1/1; [Creature Bank coordinates in v1/v2/v3]
!!OB1:T?y1;
!!PO1&y1=84:B0/97;   [set PO for crypts/CB/Utopias]
!!PO1&y1=16:B0/98;
!!PO1&y1=25:B0/99;

It sets various pcx for three types of CB, crypts, utopias and the rest. If you want to add subtypes, you must go in TM2 and add DO runs for dwarvens, imps etc, for now it does only 3 runs, crypts, utopias and all others in one.

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


Responsible
Supreme Hero
posted July 08, 2017 06:30 PM
Edited by Hero_of_Light at 18:37, 08 Jul 2017.

OK, so let's say I add this to the TM trigger:

!!UN:U16/0/?y-1;  Cyclops Stockpile number
!!VRv1:S-1;
!!DO217810/1/y-1/1&y-1>0:P16;  Run through

If I understand it correctly, this searches all Cyclops Stockpiles in map right? Then I should write something like this?

!?FU217810;
!!UN:Ux1/-1/-1/1; [Creature Bank coordinates in v1/v2/v3]
!!OB1:T?y1;
!!OB1:U?y2;          <-------------- check subtype
!!PO1&y1=84:B0/97;   [set PO for crypts/CB/Utopias]
!!PO1&y1=16/y2=0:B0/98;  <-------------- check subtype
!!PO1&y1=25:B0/99;

Does this look right to you? And then on the end, this?

!!if&x3=98:; cyclops stockpile
!!BA:B^Cclps.pcx^;
!!en:;

Did I miss anything? Am I even to the right path? Because it doesn't seem to work.
____________
Not idly do the leaves of Lorien fall.

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


Responsible
Supreme Hero
posted July 08, 2017 06:39 PM

It doesn't work. Nothing is changed when I do this.
____________
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 July 08, 2017 06:44 PM
Edited by Salamandre at 18:44, 08 Jul 2017.

No, because the 16 means the type, not subtype, so it searches for all CB type 16.

What you mist do is change this:

!?FU217810;
!!UN:Ux1/-1/-1/1; [Creature Bank coordinates in v1/v2/v3]
!!OB1:T?y1;
!!PO1&y1=84:B0/97;   [set PO for crypts/CB/Utopias]
!!PO1&y1=16:B0/98;
!!PO1&y1=25:B0/99;

To:

!?FU217810;
!!UN:Ux1/-1/-1/1; [Creature Bank coordinates in v1/v2/v3]
!!OB1:T?y1 U?y2;
!!PO1&y1=84:B0/97;   [set PO for crypts/CB/Utopias]
!!PO1&y1=25:B0/99;
!!PO1&y2=0:B0/100; cyclops stockpile (subtype 0)
!!PO1&y2=1:B0/101; dwarven (subtype 1)
[... and so on until]
!!PO1&y2=20:B0/120; (grotto subtype 20)

Then you add in:

!!if&x3=100:; cyclops stockpile
!!BA:B^Cclps.pcx^;
!!en:;

etc


____________
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 July 08, 2017 07:05 PM

Thanks it worked!

Can you give me some pointers on the Siege background issue?

;Snow and monster
!!if&x1=3/x4=54:;
!!VRy1:S0R7;
!!VRz2&y1=0:S^aquarium.pcx^;
!!VRz2&y1=1:S^snow02.pcx^;
!!VRz2&y1=2:S^snow03.pcx^;
!!VRz2&y1=3:S^snow1.pcx^;
!!VRz2&y1=4:S^snow2.pcx^;
!!VRz2&y1=5:S^snow3.pcx^;
!!VRz2&y1=6:S^snow4.pcx^;
!!VRz2&y1=7:S^snow5.pcx^;
!!BA:B^%Z2^;
!!en:;

;Snow and town
!!if&x1=3/x4=98:;  <------- I added this here using the same variable for creatures
!!VRy1:S0;
!!VRz2&y1=0:S^snwsg.pcx^;
!!BA:B^%Z2^;
!!en:;

This kinda works, only it doesn't always change the background when attacking a town on different terrain. Is there a way to make it work always? Or if there is a better way can you help me?

Notice that I used the same variable x4 as creatures. Is that ok? If not how could I set a different background on sieges that is based always on terrain?
____________
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 July 08, 2017 07:18 PM

Please paste all your modified script.

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


Responsible
Supreme Hero
posted July 08, 2017 08:14 PM
Edited by Hero_of_Light at 23:31, 08 Jul 2017.

I think it is ready. The only problem is that attacking towns in different terrain doesn't seem to work all the time. If you attack more than one town during your turns, only the first one changes.

If you can make it change the terrain on both monsters and town that would be great (it's how it worked on the old script).

Is there an OR command? For example:

;Dirt and monster
!!if&x1=0/x4=54:; <-------- check if monster (54) OR town (98) and if yes then execute

If that would be possible, to have the script work on both creatures and towns that would be great. If not then OK, no big deal. Here is the script. I also added new objects.

ZVSE

;use flag 411
;use FU217810, FU217811
!#IF:V411/0;
!#TM2:S1/999/1/255;
!?TM2; (universal timer)
!!if&v2392=1:;  limit to day 1 (v2392 from 78.wogify)
!!UN:U16/-1/?y-1;  creature banks number
!!VRv1:S-1;
!!DO217810/1/y-1/1&y-1>0:P16;  Run through
!!UN:U84/-1/?y-1;  crypts
!!VRv1:S-1;
!!DO217810/1/y-1/1&y-1>0:P84;  Run through
!!UN:U25/-1/?y-1;  utopias
!!VRv1:S-1;
!!DO217810/1/y-1/1&y-1>0:P25;  Run through
!!UN:U24/-1/?y-1;  derelict ship
!!VRv1:S-1;
!!DO217810/1/y-1/1&y-1>0:P24;  Run through
!!UN:U43/-1/?y-1;  portal
!!VRv1:S-1;
!!DO217810/1/y-1/1&y-1>0:P43;  Run through
!!UN:U45/-1/?y-1;  portal 2
!!VRv1:S-1;
!!DO217810/1/y-1/1&y-1>0:P45;  Run through
!!UN:U53/-1/?y-1;  mine
!!VRv1:S-1;
!!DO217810/1/y-1/1&y-1>0:P53;  Run through
!!UN:U63/-1/?y-1;  pyramid
!!VRv1:S-1;
!!DO217810/1/y-1/1&y-1>0:P63;  Run through
 !!UN:U85/-1/?y-1;  Shipwreck
!!VRv1:S-1;
!!DO217810/1/y-1/1&y-1>0:P85;  Run through
!!UN:P68/0; [disable new battlefields script]
!!en:;

!?FU217810;
!!UN:Ux1/-1/-1/1; [Creature Bank coordinates in v1/v2/v3]
!!OB1:T?y1 U?y2;
!!PO1&y1=84:B0/97;   [set PO for crypts/CB/Utopias]
!!PO1&y2=2:B0/98; griffin observatory (subtype 2)
!!PO1&y1=25:B0/99;
!!PO1&y2=0:B0/100; Cyclops Stockpile
!!PO1&y2=1:B0/101; Dwarven Treasure
!!PO1&y2=3:B0/102; Imp Cache
!!PO1&y2=4:B0/103; Medusa Stores
!!PO1&y2=5:B0/104; Naga
!!PO1&y2=6:B0/105; Dragon Fly
!!PO1&y2=11:B0/106; Buckaneer
!!PO1&y2=12:B0/107; Apprentice
!!PO1&y2=13:B0/108; God1
!!PO1&y2=14:B0/109; God2
!!PO1&y2=15:B0/110; God3
!!PO1&y2=16:B0/111; God4
!!PO1&y2=17:B0/112; Banshees
!!PO1&y2=18:B0/113; Forgotten Temple
!!PO1&y2=20:B0/114; Underground
!!PO1&y1=24:B0/115; Derelict Ship
!!PO1&y1=43:B0/116; Portal
!!PO1&y1=45:B0/117; Portal 2
!!PO1&y1=53:B0/118; Mine
!!PO1&y1=63:B0/119; Pyramid
!!PO1&y1=85:B0/120; Shipwreck
!!PO1&y2=57:B0/121; Adventure Cave

!?BA0&1000; [Human only]
!!BA:Q?y2; [state of Quick Combat: y5=1 if it's a Quick Combat battle]
!!BA&y2=0:B-1; [enable default battlefield if Quick Combat]
!!FU&y2=1:E; [exit if Quick Combat]
!!BA:S?y67;
!!FU&y67>0:E;
!!BA:P?v2/?v3/?v4;
!!TR2:T?y2/d/d/d/d/d/d/d;  [get terrain]
!!TR2:G?y3; [check for special terrain: y3]
!!PO2:B0/?y4; get PO
!!IF&y4=99:V411/1;
!!OB2:T?y5;   get type of object (for monsters)
; coast
!!if&y2<>8:; <---
!!UN:X?y10/?i;
!!VRy11:Sv2; !!VRy11&v2>0:-1;
!!VRy12:Sv2; !!VRy12&v2<y10:+1;
!!VRy13:Sv3; !!VRy13&v3>0:-1;
!!VRy14:Sv3; !!VRy14&v3<y10:+1;
!!TRy11/v3/v4&v2>0:T?y21/d/d/d/d/d/d/d;
!!TRy12/v3/v4&v2<y10:T?y22/d/d/d/d/d/d/d;
!!TRy11/y13/v4&v2>0/v3>0:T?y23/d/d/d/d/d/d/d;
!!TRy12/y13/v4&v2<y10/v3>0:T?y24/d/d/d/d/d/d/d;
!!TRy11/y14/v4&v2>0/v3<y10:T?y25/d/d/d/d/d/d/d;
!!TRy12/y14/v4&v2<y10/v3<y10:T?y26/d/d/d/d/d/d/d;
!!TRv2/y13/v4&v3>0:T?y27/d/d/d/d/d/d/d;
!!TRv2/y14/v4&v3<y10:T?y28/d/d/d/d/d/d/d;
!!VRy2|y21=8/y22=8/y23=8/y24=8/y25=8/y26=8/y27=8/y28=8:S10;
!!en:;
; end coast
!!FU217811&y2<>10:Py2/y3/y4/y5;

!?BF&411;
;clean battlefield in utopias (Improved dungeons)
!!BF:C;
!!IF:V411/0;

!?FU217811;
;x1=terrain type
;x2=special terrain
;x3=CB
;x4=monster (ID=54)

***CLEAN TERRAIN AND MONSTER***

;Dirt and monster
!!if&x1=0/x4=54:;
!!VRy1:S0R5;
!!VRz2&y1=0:S^dirt1.pcx^;
!!VRz2&y1=1:S^dirt2.pcx^;
!!VRz2&y1=2:S^dirt3.pcx^;
!!VRz2&y1=3:S^dirt4.pcx^;
!!VRz2&y1=4:S^dirt5.pcx^;
!!VRz2&y1=5:S^dirt.pcx^;
!!BA:B^%Z2^;
!!en:;

;Dirt and town
!!if&x1=0/x4=98:;
!!BA:B^PlainS.pcx^;
!!en:;

;Sand and monster
!!if&x1=1/x4=54:; if clean sand and no object
!!VRy1:S0R3;
!!VRz2&y1=0:S^sand.pcx^;
!!VRz2&y1=1:S^sand1.pcx^;
!!VRz2&y1=2:S^sand2.pcx^;
!!VRz2&y1=3:S^sand3.pcx^;
!!BA:B^%Z2^;
!!en:;

;Grass and monster
!!if&x1=2/x4=54:;
!!VRy1:S0R4;
!!VRz2&y1=0:S^grass1.pcx^;
!!VRz2&y1=1:S^grass2.pcx^;
!!VRz2&y1=2:S^grass4.pcx^;
!!VRz2&y1=3:S^grass3.pcx^;
!!VRz2&y1=4:S^grass.pcx^;
!!BA:B^%Z2^;
!!en:;

;Grass and town
!!if&x1=2/x4=98:;
!!VRy1:S0R2;
!!VRz2&y1=0:S^CastleS.pcx^;
!!VRz2&y1=1:S^ForestS.pcx^;
!!VRz2&y1=2:S^GrassS.pcx^;
!!BA:B^%Z2^;
!!en:;

;Snow and monster
!!if&x1=3/x4=98:;
!!VRy1:S0R4;
!!VRz2&y1=0:S^snow1.pcx^;
!!VRz2&y1=1:S^snow2.pcx^;
!!VRz2&y1=2:S^snow3.pcx^;
!!VRz2&y1=3:S^snow4.pcx^;
!!VRz2&y1=4:S^snow.pcx^;
!!BA:B^%Z2^;
!!en:;

;Snow and town
!!if&x1=3/x4=98:;
!!BA:B^SnowS.pcx^;
!!en:;

;Swamp and monster
!!if&x1=4/x4=54:;
!!VRy1:S0R3;
!!VRz2&y1=0:S^swamp1.pcx^;
!!VRz2&y1=1:S^swamp2.pcx^;
!!VRz2&y1=2:S^swamp3.pcx^;
!!VRz2&y1=3:S^swamp.pcx^;
!!BA:B^%Z2^;
!!en:;

;Swamp and town
!!if&x1=4/x4=98:;
!!BA:B^JungleS.pcx^;
!!en:;

;rough and monster
!!if&x1=5/x4=54:;
!!VRy1:S0R3;
!!VRz2&y1=0:S^rough.pcx^;
!!VRz2&y1=1:S^rough1.pcx^;
!!VRz2&y1=2:S^rough2.pcx^;
!!VRz2&y1=3:S^rough3.pcx^;
!!BA:B^%Z2^;
!!en:;

;Rough and town
!!if&x1=5/x4=98:;
!!BA:B^RoughS.pcx^;
!!en:;

;underground and monster
!!if&x1=6/x4=54:;
!!VRy1:S0R3;
!!VRz2&y1=0:S^subt.pcx^;
!!VRz2&y1=1:S^subt1.pcx^;
!!VRz2&y1=2:S^subt2.pcx^;
!!VRz2&y1=3:S^subt3.pcx^;
!!BA:B^%Z2^;
!!en:;

;Subt and town
!!if&x1=6/x4=98:;
!!BA:B^DungeonS.pcx^;
!!en:;

;lava and monster

!!if&x1=7/x4=54:;
!!VRy1:S0R11;
!!VRz2&y1=0:S^lava.pcx^;
!!VRz2&y1=1:S^lava1.pcx^;
!!VRz2&y1=2:S^lava2.pcx^;
!!VRz2&y1=3:S^lava3.pcx^;
!!BA:B^%Z2^;
!!en:;

;Lava and town
!!if&x1=7/x4=98:;
!!BA:B^LavaS.pcx^;
!!en:;

;water
!!if&x1=8:;
!!VRy1:S0R3;
!!VRz2&y1=0:S^deck0.pcx^;
!!VRz2&y1=1:S^deck1.pcx^;
!!VRz2&y1=2:S^deck2.pcx^;
!!VRz2&y1=3:S^deck3.pcx^;
!!BA:B^%Z2^;
!!en:;

***SPECIAL TERRAINS***

!!if|x2=231/x2=225:; winds and rocklands, regular, haven't got any...
!!BA:B-1;
!!en:;

!!if&x2=21:; cursed ground
!!VRy1:S0R3;
!!VRz2&y1=0:S^cursed.pcx^;
!!VRz2&y1=1:S^cursed2.pcx^;
!!VRz2&y1=2:S^rough2.pcx^;
!!VRz2&y1=3:S^ruins.pcx^;
!!BA:B^%Z2^;
!!en:;

!!if&x2=46:; magic plains
!!VRy1:S0R3;
!!VRz2&y1=0:S^grass3.pcx^;
!!VRz2&y1=1:S^greenroom.pcx^;
!!VRz2&y1=2:S^magic1.pcx^;
!!VRz2&y1=3:S^magic07.pcx^;
!!BA:B^%Z2^;
!!en:;

!!if&x2=227:; holy ground
!!VRy1:S0R1;
!!VRz2&y1=0:S^grass6.pcx^;
!!VRz2&y1=1:S^holy1.pcx^;
!!BA:B^%Z2^;
!!en:;

!!if&x2=224:; evil fog
!!VRy1:S0R4;
!!VRz2&y1=0:S^evil1.pcx^;
!!VRz2&y1=1:S^evil2.pcx^;
!!VRz2&y1=2:S^evil3.pcx^;
!!VRz2&y1=3:S^evil4.pcx^;
!!VRz2&y1=4:S^snow7.pcx^;
!!BA:B^%Z2^;
!!en:;

!!if&x2=222:; clover field
!!VRz2:S^clover1.pcx^;
!!BA:B^%Z2^;
!!en:;

!!if&x2=228:; lucid pools
!!VRy1:S0R3;
!!VRz2&y1=0:S^lucid.pcx^;
!!VRz2&y1=1:S^lucid2.pcx^;
!!VRz2&y1=2:S^lucid3.pcx^;
!!VRz2&y1=3:S^spec01.pcx^;
!!BA:B^%Z2^;
!!en:;

!!if&x2=226:; fiery fields
!!VRz2:S^fiery1.pcx^;
!!BA:B^%Z2^;
!!en:;

!!if&x2=229:; magic clouds
!!VRy1:S0R1;
!!VRz2&y1=0:S^air1.pcx^;
!!VRz2&y1=1:S^air2.pcx^;
!!BA:B^%Z2^;
!!en:;

***CREATURE BANKS***

!!if&x3=98:; creature bank
!!BA:B^t16s2pic1.pcx^;
!!en:;

!!if&x3=97:; crypt
!!BA:B^t84pic1.pcx^;
!!en:;

!!if&x3=99:; dragon utopia
!!BA:B^t25pic1.pcx^;
!!en:;

!!if&x3=100:; creature bank
!!BA:B^t16s0pic1.pcx^;
!!en:;

!!if&x3=101:; creature bank
!!BA:B^t16s1pic1.pcx^;
!!en:;

!!if&x3=102:; creature bank
!!BA:B^t16s3pic1.pcx^;
!!en:;

!!if&x3=103:; creature bank
!!BA:B^t16s4pic1.pcx^;
!!en:;

!!if&x3=104:; creature bank
!!BA:B^t16s5pic1.pcx^;
!!en:;

!!if&x3=105:; creature bank
!!BA:B^t16s6pic1.pcx^;
!!en:;

!!if&x3=106:; creature bank
!!BA:B^t16s11pic1.pcx^;
!!en:;

!!if&x3=107:; creature bank
!!BA:B^t16s12pic1.pcx^;
!!en:;

!!if&x3=108:; creature bank
!!BA:B^t16s13pic1.pcx^;
!!en:;

!!if&x3=109:; creature bank
!!BA:B^t16s14pic1.pcx^;
!!en:;

!!if&x3=110:; creature bank
!!BA:B^t16s15pic1.pcx^;
!!en:;

!!if&x3=111:; creature bank
!!BA:B^t16s16pic1.pcx^;
!!en:;

!!if&x3=112:; creature bank
!!BA:B^t16s17pic1.pcx^;
!!en:;

!!if&x3=113:; creature bank
!!BA:B^t16s18pic1.pcx^;
!!en:;

!!if&x3=114:; creature bank
!!BA:B^t16s20pic1.pcx^;
!!en:;

!!if&x3=115:; creature bank
!!BA:B^t85pic1.pcx^;
!!en:;

!!if&x3=116:; creature bank
!!BA:B^t43pic1.pcx^;
!!en:;

!!if&x3=117:; creature bank
!!BA:B^t45pic1.pcx^;
!!en:;

!!if&x3=118:; creature bank
!!BA:B^t53s7pic1.pcx^;
!!en:;

!!if&x3=119:; creature bank
!!BA:B^t63s0pic1.pcx^;
!!en:;

!!if&x3=120:; creature bank
!!BA:B^t85pic1.pcx^;
!!en:;

!!if&x3=121:; creature bank
!!BA:B^t63s57pic1.pcx^;
!!en:;
____________
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 July 08, 2017 11:36 PM

Well, the script NEVER worked when a town, it is easy to check, look at this line:

!!BA:S?y67;
!!FU&y67>0:E;

This checks if the battle is vs town with fort -- up to castle and it exits if not. Thats why I need the entire script, to see how to enable the town, as if you simply remove those 2 lines, you may get weird terrain when siege battle. I will look tomorrow if time.

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


Responsible
Supreme Hero
posted July 08, 2017 11:53 PM
Edited by Hero_of_Light at 15:46, 10 Jul 2017.

OK, I await your command

It would be nice if you could make it change screens in town based on terrain. I kinda need it for my mod because in Heroes Chronicles there were some nice scenarios that were stunning with that effect.

For instance on Master of the Elements, second scenario you enter the realm of Air. When you attack the enemy's Conflux town (with the old script) you would get the Siege with the air.pcx picture. This is a nice feature as far as I am concerned, it was as if the town was built on clouds (which is cool) while on the other hand if the script wasn't enabled the siege would have normal grass terrain.

Anyway, if you can do this I would really appreciate it.

***EDIT**

I tested the script a bit ang I found out that there are still some small bugs. For instance I attacked 3 Dragon Utopias as a test and only one had the battlefield changed. The old script changed the battlefield every single time with no exceptions. How can this be?
____________
Not idly do the leaves of Lorien fall.

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


Known Hero
posted July 15, 2017 03:03 PM

Is it possible to add additional spells AFTER the resurrected target?

!?BG0&1000;

!!BG:A?y1;
!!FU&y1<>1:E;

!!BG:Q?y1;
!!BA:Hy1/?y99;
!!HEy99&y99>=0:Fd/d/?y71/d;

!!BG:S?y4;
!!FU&y4<>38:E;

!!BG:E?y5;
!!BMy5:M48/y71/3; Cast Prayer at expert lvl

When i do that i get a error, wrong syntax !!BM, script skipped etc...

Is there a way to bypass/fix this?

 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 300 ... 331 332 333 334 335 ... 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.4664 seconds