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 ]
New Server | HOMM1: info forum | HOMM2: info forum | HOMM3: info forum | HOMM4: info forum | HOMM5: info 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 352 pages long: 1 40 ... 80 81 82 83 84 ... 120 160 200 240 280 320 352 · «PREV / NEXT»
Bersy
Bersy


Responsible
Supreme Hero
posted July 14, 2011 01:21 AM

Do you use Era? Cause then Angel.dll => CopyMemory function is thousands times faster.

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

Disgraceful
Tavern Dweller
posted July 14, 2011 01:26 AM - penalty applied by angelito on 14 Jul 2011.
Edited by angelito at 08:09, 14 Jul 2011.

...

boring.
____________

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


Promising
Famous Hero
of infamy
posted July 14, 2011 03:09 AM

Quote:
I used to work this way, but with python it's waaay faster than finding numbers for each letter. Also, my ERM script doesn't work. Not much a surprise actually :). I'll try to fix it and upload the result.

By the way, could someone delete that big line of smiles above? It distorts the view a lot..

EDIT:
I made it!
This python script prints out an ERM script ready to be pasted to timed event.

StrToWrite = 'your string'
StrBeginAd = 6857500

print 'ZVSE'
i = 0
for char in StrToWrite:
  print '!#UN:C'+str(StrBeginAd+i)+'/1/'+str(ord(char))+';'+char
  i = i+1


I wanted to write an ERM function, so I could have my own library of functions to use, but I guess this way is still not very bad..



Hey cool, I wrote a similar thing it matlab (engineer:P) but I guess my real question is, what program do you use to find the right memory address? Perhaps we should starts a thread posting useful memory locations, or perhaps I am too noob to even know what I am talking about...

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


Promising
Famous Hero
posted July 14, 2011 11:30 AM
Edited by solitaire345 at 07:53, 15 Jul 2011.

Quote:
Do you use Era? Cause then Angel.dll => CopyMemory function is thousands times faster.


Yes, I use ERA, but I'm currently trying to refamiliarize with all that ERM. Last time I tried to script something in WoG was probably over a year ago. Sooner or later I'll get to the new functions and DLLs.

Quote:

Hey cool, I wrote a similar thing it matlab (engineer) but I guess my real question is, what program do you use to find the right memory address? Perhaps we should starts a thread posting useful memory locations, or perhaps I am too noob to even know what I am talking about...


Yup, this isn't hard to write in any language - it's just a matter of taste . To find addresses where strings like filenames are stored, I use cheat engine. I also occasionaly read reverse engineering thread in DF2 forum (it's russian, but google translator can translate it to semi-readable english text. (although sometimes messes with examples). If you need, I can try to translate some entries for you.

EDIT: Is it possible to get address of a string of characters via ERM? I have found the table of all heroes' data and found some interesting possibilities (like changing hero class, owner's flag (if you change owner there, you can still control that hero, dismiss him, fight him (if you fight neutral stack, then the battle will be fought by AI) ), but unfortunately address of the table is different for each resolution..

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


Promising
Famous Hero
feanor on DF2.ru
posted July 14, 2011 08:25 PM

Quote:
but unfortunately address of the table is different for each resolution.


*(int*)0x699538 + 0x21620 + 0x492*hero_number

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


Promising
Famous Hero
posted July 15, 2011 08:05 AM

Uhh. I didn't check everything thoroughly. I have just checked that the hero table is same for each resolution, but it changes location because of DLL plugins for example it starts at 0x046D31EA with HD patch and some plugins that I have and 0x043B31EB with just HD patch.

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


Promising
Famous Hero
of infamy
posted July 16, 2011 08:35 PM

Quote:
Quote:
but unfortunately address of the table is different for each resolution.


*(int*)0x699538 + 0x21620 + 0x492*hero_number


Hey I'm doing well on ERM scripting, not so much on .exe searching
How could I find the memory address of the .pcx files for town backgrounds? Even better, can you tell me the address of the conflux background?

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


Promising
Famous Hero
posted July 16, 2011 10:10 PM

Quote:

Hey I'm doing well on ERM scripting, not so much on .exe searching
How could I find the memory address of the .pcx files for town backgrounds? Even better, can you tell me the address of the conflux background?


0x68A2DC
At this address begins list of town backgrounds. These are not full filenames, but only first four letters of each. the filename must be [TheseFourLetters]back.pcx

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


Adventuring Hero
posted July 17, 2011 03:54 PM

I'm looking for a script with balancing purposes, is it possible to write something in the mould of "if hero armies are CR1, CR2" -> "apply bonus 50% health to CR1, CR2" or "activate ability X1 for CR 1 on unused ability slot..."

I intend to utilize this in enhanced fractions, but the variety of units would need to be somehow restricted naturally by making it better for the player/computer to aim for certain lineups instead of just going for the best megamonsters available.

I'd also appreciate the opposite script - punishments if specific creatures are fielded together - this way I could introduce 3 or 4 different alternatives for say level 6 dungeon unit, but make the player pick one of them only and build his entire battlefield strategy with a lot more thought. Something like "if hero has mighty gorgon and thunderbird -> disable death stare; disable lightning strike."

Any suggestions?

I might have to open a specific thread soon as I have a lot of questions and will need some assistance, perhaps some cooperation if people like my ideas, reluctant to do it yet as I don't have enough to show.

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


Admirable
Omnipresent Hero
Wog refugee
posted July 17, 2011 04:01 PM

I think is extremely flawless and game breaking. You remember the ability of archimages and silver pegassi (decrease/increase mana cost)? Well, I see a lot of people bringing only one of them in the battle field (which will surely die on first turn) just to have the bonus for the whole battle. Now, with what you suggest, let's say mixing x and y will give to x 150% HP. So all I need is to bring one y to get the bonus for the whole battle. I see the fun, but also the gap.
____________
All my Era II mods

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


Promising
Famous Hero
of infamy
posted July 17, 2011 05:30 PM

Quote:
Quote:

Hey I'm doing well on ERM scripting, not so much on .exe searching
How could I find the memory address of the .pcx files for town backgrounds? Even better, can you tell me the address of the conflux background?


0x68A2DC
At this address begins list of town backgrounds. These are not full filenames, but only first four letters of each. the filename must be [TheseFourLetters]back.pcx


Hey what program did you use to find that? I have 010 Editor right now but no clue how to use it. I looked at that address but of course I haven't yet figured out which bytes correspond to which letters and such, any pointers?

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


Promising
Famous Hero
posted July 17, 2011 05:59 PM

I use CheatEngine (http://www.cheatengine.org/). The filenames are stored in plaintext. The address I wrote isn't the one in executable, but the one in memory. To find the corresponding address in executable, you must substract 0x400000 from it (so the actual address in exe file is 0x28A2DC)

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


Adventuring Hero
posted July 17, 2011 06:00 PM

Quote:
I think is extremely flawless and game breaking. You remember the ability of archimages and silver pegassi (decrease/increase mana cost)? Well, I see a lot of people bringing only one of them in the battle field (which will surely die on first turn) just to have the bonus for the whole battle. Now, with what you suggest, let's say mixing x and y will give to x 150% HP. So all I need is to bring one y to get the bonus for the whole battle. I see the fun, but also the gap.


It depends on how you use it. I don't intend to make any "ultramegagiant" bonuses because hey, wouldn't that be kewl. I'd like to have a tool which would open up strategic choices for the player without being the definitive choice.

An example: having the full 7-creature lineup of a town, you get say 150% health bonus. This would encourage a player to get accustomed to all units and use them not just to get a smashing no-brainer bonus. What's the point in bringing 1 dwarf instead off all your population if it will occupy a valuable slot?

I will try to balance the options accordingly so that the player would need to make a decision between a few viable options instead of the example you pointed - rather spot on though as it is a possible downside and I have it in mind.

I find that the most rational solution in introducing so many new units. I don't want to simply double the numbers for the sake of nothing.

Another potential problem would be the clash with the creature experience script and making them work together properly.

I'm also open for any suggestions to improve the game on that base.

Any idea if scripting it is possible?

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


Promising
Famous Hero
of infamy
posted July 18, 2011 05:29 AM

Quote:
I use CheatEngine (http://www.cheatengine.org/). The filenames are stored in plaintext. The address I wrote isn't the one in executable, but the one in memory. To find the corresponding address in executable, you must substract 0x400000 from it (so the actual address in exe file is 0x28A2DC)


Wow I must be really dense...so I tried going there in cheatEngine and it didn't work. I then searched for TBELback and it was at a different address. When I went somewhere else in the game (menu -> new game) it also changed. What exactly am I doing wrong, it's probably obvious and noobish I know

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


Promising
Famous Hero
feanor on DF2.ru
posted July 18, 2011 07:52 AM

Use any hex-editor, IDAPro+HexRays (some days ago version 6.1 was stolen) and OllyDebugger.

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


Promising
Legendary Hero
fallen artist
posted July 18, 2011 08:08 AM

Good god, what are you doing here... Programmer's nightmare

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


Promising
Famous Hero
feanor on DF2.ru
posted July 18, 2011 01:49 PM
Edited by OxFEA at 13:54, 18 Jul 2011.

Quote:
Good god, what are you doing here... Programmer's nightmare

About whom are you?

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


Promising
Famous Hero
posted July 18, 2011 07:03 PM

Quote:

Wow I must be really dense...so I tried going there in cheatEngine and it didn't work. I then searched for TBELback and it was at a different address. When I went somewhere else in the game (menu -> new game) it also changed. What exactly am I doing wrong, it's probably obvious and noobish I know


There's no string called TBElBack.pcx that corresponds to town background. Search for just TBEl. (this will also list all town building defs for conflux and some other stuff, so you'll have to search for background. If you are unsure of what you have found, try changing TBEl to TBCs/TBRm/TBTw or whatever town you like and check for the result ingame)

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


Promising
Famous Hero
of infamy
posted July 19, 2011 03:14 AM

Quote:
Quote:

Wow I must be really dense...so I tried going there in cheatEngine and it didn't work. I then searched for TBELback and it was at a different address. When I went somewhere else in the game (menu -> new game) it also changed. What exactly am I doing wrong, it's probably obvious and noobish I know


There's no string called TBElBack.pcx that corresponds to town background. Search for just TBEl. (this will also list all town building defs for conflux and some other stuff, so you'll have to search for background. If you are unsure of what you have found, try changing TBEl to TBCs/TBRm/TBTw or whatever town you like and check for the result ingame)


Yes I found it. I had found it already, my problem now is what to do with it. For the buildings and other town things using the script from the df2 forum link you sent me, I was able to ERM script changing all the town buildings/mouse/outlines/positions using UN:C. With the address you gave it lists the unsigned int as 16980, which I know is not right as all other UN:C numbers seem to be in the 60 millions. Basically, what's the right number to start at for UN:C to changed the El to other letters?

Thanks for all the great help btw!

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


Promising
Famous Hero
posted July 19, 2011 07:09 AM

0x28A2DC = 2663132.
16980 is value that's stored in memory and it corresponds to letters TB.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 352 pages long: 1 40 ... 80 81 82 83 84 ... 120 160 200 240 280 320 352 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0857 seconds