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 ... 144 145 146 147 148 ... 150 200 250 300 350 400 407 · «PREV / NEXT»
carls1976
carls1976

Tavern Dweller
posted May 02, 2012 03:21 PM

installed this but it doesnt seem to show any map descriptions

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


Responsible
Supreme Hero
posted May 12, 2012 03:25 PM

Is there any way to change the function of a building? I want to make the ballista yard in Stronghold increase 2nd level creature growth by 4, because now with ERA you can get blacksmiths to have all three war machines. So the Balista yard is rendered uselless and I would like to change that.
____________
Not idly do the leaves of Lorien fall.

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


Responsible
Supreme Hero
posted May 12, 2012 04:06 PM

1) Choose a flag (or permanent variable to be used as a flag) which is not used by any other script which will be in the same map.  (See ERM Help, List of the Claimed, for flags used by WoG scripts.  Custom scripts can be checked by Exporting the map's text from the Map Editor and doing Edit/Find for flag commands in a Text Editor.)

2) Use the Town Screen mouse-click trigger, conditioned by the flag so that it will only be active when the flag has its starting value (typically zero, unless set to something else in an instruction).  (See ERM Help, Triggers/CM and ERM Help, Flags and Variables.)

3) Check whether the Town is a Stronghold and whether it has a Ballista Yard.  If not, exit the trigger.  If so, set the growth of the second-level creatures to the desired amount, and change the value of the flag so that the trigger will no longer be active and the change will only be done once.  (See ERM Help, CA receiver and MA receiver.)

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


Responsible
Supreme Hero
posted May 12, 2012 04:52 PM
Edited by Hero_of_Light at 17:16, 12 May 2012.

But this shouldn't work with the mouse click. I could get it to work but i was wondering if there's a command to make it work like that and actually add the additional troops in the town screen (for instance Mess Hall increases Goblin and Hobgoblin population and it is shown in the down-left corner of the screen).

**EDIT**

On second thought, i have a better idea

Is there a way to make it produce a steady income of 100 gold pieces per day? I thought I renamed it in "Caravan". One nice thought would also be that the daily income would be increased if you have more than one Stronghold under your control. For instance if you have two strongholds then each caravan would produce 2x100 gold daily and so on.
____________
Not idly do the leaves of Lorien fall.

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

Tavern Dweller
posted May 12, 2012 06:49 PM
Edited by jp10 at 00:56, 13 May 2012.

Is there a way to add a creature ability to another creature without having WoG? What's the ESR Script Master and what functions do it have? The ESR Script master have i script bar, but u can't write anything in it? If not can anyone help me to get the WoG editor, I have google for over 10h without finding anything that have worked. I still get a bitmap16 is missing zmainmen.pxc, dfault24.pxc and zpic1005.pxc, and get a crash log with alot lot of number, wich i read in [url=http://heroescommunity.com/viewthread.php3?TID=34717]WOG crashes[/url] was that u had to many maps or something. When i install the Era2 I can open the game, but when i try to load any thing it crash with the same message. The installer of WOG 3.58 + Era 1,8 open cmd and try to do some thing, and it says: do not close until installation is complete and that it can't find some .wog files. I can open the editor and a map, but there is nothing on it, except the ground and the brooks, and nothing can be dragged and placed in it. Can any give me some help? I don't care if I have WoG if u can mod creature, (more then the basic .txt stats), in the original game.

Update:

I have tried to install Era2 again, this time it crashes as fast as i open it, without any crash report or any thing. I can still open the map editor, which i could before with Era2.

Update2:

I have finally got it to work with Era2! Yes! The problem I had with the first version I tried I haven't find, and don't care any way, but the problem with Era2 i had was that it was some things left after the first version that made it malfunction. And the second time i tried i installed Era2 i had some .txt files in the original data folder that made it unable to start, which was pretty clumsy of me But I realized it because the original game crashed the same way when I did something 'stupid' with the text file, and a started to think: Wait a minute I had those files when i first launched WoG. It was as simple as that, probably why i couldn't find a solution to it online.

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


Responsible
Supreme Hero
posted May 13, 2012 12:11 AM

If someone knows a way to increase the kingdoms income by a variable per day I think I can make my idea work... I would then only need a way to get the number of Strongholds the player has and apply the math.

If anyone knows a way to make this work please share.
____________
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 May 13, 2012 01:02 AM
Edited by Salamandre at 01:04, 13 May 2012.

ZVSE

!#TM20:S2/999/1/255;
!?TM20;
!!VRv2000:C0/0/$$$; **replace $$$ with the income you wish for each stronghold
!!OW:C?v2001;
!!OW:Iv2001/?y1;
!!FU&y1<>0:E;
!!UN:U98/-1/?y-1;
!!VRv1:S-1;
!!DO3000/1/y-1/1:P98;  Run through
!!OW:Rv2001/6/dv2000;

!?FU3000;
!!UN:Ux1/-1/-1/1;
!!CAv1/v2/v3:T?y1 O?y2;
!!FU&v2001<>y2:E;
!!FU&y1<>6:E;
!!VRv2000:+v2002;

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


Responsible
Supreme Hero
posted May 13, 2012 01:37 AM

Thanks, but where is the number of Strongholds a player has?

Maybe I should explain the idea more thoroughly.

If you have 1 Stronghold (and building 22 built) you get 100 gold per day.

If you have 2 Strongholds (and building 22 built) you get FROM EACH OF THEM 2x100 gold per day = 400 gold per day in total.

And so on. That's why I need the number of Strongholds that have the building built in a variable, so that I can have it multiplied by 100.
____________
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 May 13, 2012 01:45 AM
Edited by Salamandre at 02:59, 13 May 2012.

Replace with:


!?FU3000;
!!UN:Ux1/-1/-1/1;
!!CAv1/v2/v3:T?y1 O?y2;
!!FU&v2001<>y2:E;
!!FU&y1<>6:E;
!!CAv1/v2/v3:B3/22;
!!FU&-1:E;
!!VRv2000:+v2002;

to check if balista yard in. For your second request, it is not properly explained. You say need multiply number of strongholds by 100, but in your example, you give 400 gp for 2 of them (x200).

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


Famous Hero
posted May 13, 2012 09:03 AM

Hero Of Light wants something like this i think:

Income = X*(100*X) gold per day

X is the number of strongholds with building 22 built.

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


Responsible
Supreme Hero
posted May 13, 2012 11:20 AM
Edited by Hero_of_Light at 11:23, 13 May 2012.

Revolut1on got the idea.

@Salamandre

I tested the script and it kinda works (every Stronghold that has the building produces 100 gold daily). But it's not quite what I imagined.

I'll try to explain it better.

The basic idea is that the building becomes a Caravan and so (through trade) it offers an additional income to the city. However, as an additional feature, I wanted this income to be INCREASED IF there are more "Caravans" under your banner. That means that the income would be PROPORTIONAL to the number of Caravans built in Strongholds. The mathematical alogrith I had in mind is this:

Income per Stronghold = (Number of Caravans built) X 100.

Note that this is PER STRONGHOLD and not the total amount. To elaborate:

If you have 1 Caravan built the income would be 1x100=100 gold per day.

If you have 2 Caravans built the income OF EACH CARAVAN would be 2x100=200 gold per day. But since each Caravan produces now 200 gold per day (and not 100) you get a total of 200+200=400 per day.

If you have 3 Caravans built the income OF EACH CARAVAN would be 3x100=300 gold per day. But since each Caravan produces now 300 gold per day (and not 100 or 200) you get a total of 300+300+300=900 per day.

I hope this clarifies what my idea is about.

The mathematical equation is this:

If y=the total income and x=the number of caravans then:

y=100*x*x or y=100*x^2
____________
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 May 13, 2012 11:53 AM bonus applied by angelito on 18 Jul 2012.
Edited by Salamandre at 11:55, 13 May 2012.

Of course I got the idea too, but I wanted you to write it clearly. People often ask for scripts while giving vague informations, thus after spending time to write it, it turns it isn't "exactly" as envisioned.

ZVSE

!#TM20:S2/999/1/255;
!?TM20;
!!VRv2000:C0/0/0/0;
!!OW:C?v2000;
!!OW:Iv2000/?y1;
!!FU&y1<>0:E;
!!UN:U98/-1/?y-1;
!!VRv1:S-1;
!!DO3000/1/y-1/1:P98;  Run through
!!VRv2003:Sv2001*v2002;
!!OW:Rv2000/6/dv2003;


!?FU3000;
!!UN:Ux1/-1/-1/1;
!!CAv1/v2/v3:T?y1 O?y2;
!!FU&v2000<>y2:E;
!!FU&y1<>6:E;
!!CAv1/v2/v3:B3/22;
!!FU&-1:E;
!!VRv2001:+1;
!!VRv2002:+100;

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


Famous Hero
posted May 13, 2012 11:54 AM

I think 200 gold per caravan would be more significiant bonus, however im not sure if it wouldnt be overpowered. But 100 is imo not enough. On the other hand its a bonus feature so it shouldn't be very strong.

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


Responsible
Supreme Hero
posted May 13, 2012 04:01 PM

Thanks Salamandre it worked! Great job as always

@Revolut1on

I don't think that the bonus is low because of the x^2 factor. If you have 3 Strongholds then the bonus is nearly 1000 gold per day which is a really great bonus. If the original bonus would be 200 then in this case you would get 1800 gold per day (nearly the income of a whole new city).

And in any case, even 100 gold per day is a good bonus and it will pay for itself in a few weeks and you will start to have profit by it.



Thank you both for your support I think it's a nice feature and since the Ballista yard was rendered uselless in my mod I think it fits nicely (not to mention that I've made Nomads part of Stronghold and so it fits by that as well).
____________
Not idly do the leaves of Lorien fall.

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


Promising
Famous Hero
posted May 18, 2012 07:19 PM bonus applied by angelito on 18 Jul 2012.
Edited by solitaire345 at 19:22, 18 May 2012.

I found a table which holds setup of arrow towers. It is located at 0x63CF88 and stores the following values:

00000000 CreatureID      dd ?                    ; base 10
00000004 MainTowerX      dd ?                    ; base 10
00000008 MainTowerY      dd ?                    ; base 10
0000000C LowTowerX       dd ?                    ; base 10
00000010 LowTowerY       dd ?                    ; base 10
00000014 UpTowerX        dd ?                    ; base 10
00000018 UpTowerY        dd ?                    ; base 10
0000001C MissileName  dd ?                    ; offset (00000000)


Here's a function to change graphics of any town. The paremeters are:
x1 - town type; x2 - shooter ID; x3-x8 - X; Y coordinates for turrets (middle, lower, upper); x9 - pointer to missile def.

A value of -1 means "do not change"


!?FU1;
!!FU&x1<0|x1>8:E;
!!VRv1:S4*8*x1+6541192; 0x63CF88

!!if&x2<>-1;
 !!MA:Xx2/?v2;
 !!VRv2:&4;
 !!IF&v2<>4:M^Trying to set nonshoting creature as arrow tower. Exiting to avoid crash^;
 !!FU&v2<>4:E;
 !!UN:Cv1/4/x2;
!!en;
!!VRv1:+4; !!UN&x3<>-1:Cv1/4/x3;
!!VRv1:+4; !!UN&x4<>-1:Cv1/4/x4;
!!VRv1:+4; !!UN&x5<>-1:Cv1/4/x5;
!!VRv1:+4; !!UN&x6<>-1:Cv1/4/x6;
!!VRv1:+4; !!UN&x7<>-1:Cv1/4/x7;
!!VRv1:+4; !!UN&x8<>-1:Cv1/4/x8;
!!VRv1:+4; !!UN&x9<>-1:Cv1/4/x9;


The pointers to missile names (parameter 9) are these (use numbers from the first column):

6686972 (0x6608FC) titan's bolt
6686984 (0x660908) Ice elemental's shard
6686996 (ox660914) Mage's missile
6687008 (0x660920) Catapult's rock
6687020 (0x66092C) Ballista's bolt
6687032 (0x660938) lizardman's arrow
6687044 (0x660944) Cyclop's boulder
6687056 (0x660950) orc's axe
6687068 (0x66095C) Medusa's arrow
6687080 (0x660968) lich's missile
6687092 (0x660974) Gog's fireball
6687104 (0x660980) Halfling's stone
6687116 (0x66098C) Gremlin's ball
6687128 (0x660998) Elf's arrow
6687140 (0x6609A4) Zealot's missile
6687152 (0x6609B0) Crosbowman's arrow
8002324 (0x7A1B14) Dracolich's missile


Notes:
1. There is no backup, so once changed, the setup will remain until h3era.exe is restarted.
2. Changing creature does not affect the power of arrow towers.
3. Using this function after BA0 trigger will have no effect in battle, because that table is copied to temporary location for the duration of combat.
4. creature images are cropped, so some creatures will look wrong (like this).
____________

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


Honorable
Supreme Hero
posted May 18, 2012 07:44 PM

Thanks for valuable information.

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


Promising
Famous Hero
of infamy
posted May 19, 2012 08:16 AM

Is the table of arrows expandable? Let's say we want to fire a new arrow added with Amethyst for some creature number >196, possible? I know if you just set the creature in the tower to a new one (my town does #203) it fires its own missile correctly, so there should be a way.

Thanks though, good find!

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


Promising
Famous Hero
posted May 20, 2012 10:12 AM
Edited by solitaire345 at 10:33, 20 May 2012.

You just find where is the string's address and write it as a paremeter. I don't know how exactly amethyst works and whether it has some turret-related functions. If your missile changes as it should, then probably yes.

Here's a function to set any missile name for the function (no need to rely on static addresses in my previous post. Just find the name using MMarchive)

!!SN:M0/1/1/0; create memory slot that can hold 1 string
!!SN:M0/0/^{Missile Name goes here}^; Set the string to missile name
!!SN:M0/?v1/0; Get address of string
!!FU:P?/?/?/?/?/?/?/?/v1; {Replace question marks with the values you need}


NOTE: I did not test this code, just wrote it according to the manual.
____________

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


Responsible
Supreme Hero
posted May 21, 2012 11:54 PM

Is there a way to change the "Sylvan Centaurs" functionality? I think it is hardcoded but maybe is it possible to change the creature combinations? I would like to have creature 120 and 24 to become creature 25. If anyone knows how to do this please share.
____________
Not idly do the leaves of Lorien fall.

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


Promising
Famous Hero
of infamy
posted May 22, 2012 12:07 AM

Wait what? Make two creatures equal to a single creature? Do you just want to change numbers or what? I think what you want is easily doable, just not sure exactly what that is...

 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 ... 144 145 146 147 148 ... 150 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.5175 seconds