Skip to content

Posts from Creating a random map generator for Heroes of Might and Magic II.

No ratings yet — be the first to rate!
User Avatar
Auto-translated
Monza - Regarding the random map generator, everything is quite simple! The existing generator needs to be modified to create maps where objects are not scattered so chaotically, making the maps more balanced and playable. This is practically all that is needed! You can take the map generation in Heroes of Might and Magic III as an example. If you can somehow make progress on this, you will immediately receive more detailed information about the "fun," "value," and the ratio of various objects to each other!
I hope that through our combined efforts, you will be able to breathe new life and interest into my favorite game for many years to come. :-)
Тот, кто борется - может проиграть, кто нет - проиграл уже (с)
В прошлом "Координатор турниров Лиги Героев" (www.heroesleague.ru)
User Avatar
Auto-translated
A map generator? Why not? Let's get started by gathering information about the map format. If anyone wants to help, please share information here (I already have information from the well-known FAQ).
In reply to AlexSpl
User Avatar
Auto-translated
AlexSpl;197098
A map generator? Why not?
Let's get started! We'll begin by gathering information about the map format. If anyone wants to help, please share information here (I already have information from the well-known FAQ).
If this works out, you'll be rewarded! :-)
What exactly do you need to know about the map format? I don't quite understand what's needed for programming.
Тот, кто борется - может проиграть, кто нет - проиграл уже (с)
В прошлом "Координатор турниров Лиги Героев" (www.heroesleague.ru)
User Avatar
Auto-translated
2Dust: Creating a map editor is not a trivial task, especially if you're writing it from scratch, which is what I want to try to do. I need "technical" information, specifically: where (addresses) and what the editor "writes" when saving a map, the format of a "minimal" map (so that it can be created manually in a hex editor), the size and format of the header, and where the service information is stored: defeat conditions, etc.

I downloaded several source codes from the internet, but I would like to get more detailed information, rather than spending time on my own "investigation" (I suspect it will take a lot of time).

The simplest and at the same time the most fantastic solution is to contact the former programmers of NWC. Just kidding :) But seriously, there must be people who have at least tried to do something similar. So, I need their work. An example is WoG. These guys have already "disassembled" the executable, but where is the information? :) I don't see anything other than ERM scripts. I understand that people have spent a lot of their own time and don't want to share their knowledge (which is quite reasonable). But maybe someone will still be willing to share "secret information"?
In reply to AlexSpl
User Avatar
Auto-translated
2 AlexSpl
We have vbn on our forum.

There's also the semi-legendary GreatGenius. I'll try to contact him and pass on your post.

Орден Фениксахаризматический :) лидер
User Avatar
Auto-translated
Colleagues, I think I've found something.
I'm trying to contact a person who seems to be trying to disassemble and reassemble the second game.
If anything comes of it, feel free to reach out...
Attachments 1
1 file attached • Total size: 225.6 KB

Орден Фениксахаризматический :) лидер
User Avatar
Auto-translated
So, the necessary information has been obtained! Thank you, Indigo! The second link is worth its weight in gold!

Well, I'll try to write a new map generator script. Hopefully, next year we'll be able to play "Heroes II" on random maps.

To all interested parties: We need specific requests regarding map generation. In other words, describe the map of your dreams :) But keep in mind that it will not be drawn by a human.
In reply to AlexSpl
User Avatar
Auto-translated
Purely IMHO: a land map, without teleports and barriers, map areas (respawn points) are separated from each other, and passages are guarded by fairly strong units. There is an option to set alliances during map generation (like in Heroes of Might and Magic III). I repeat: purely IMHO.

Орден Фениксахаризматический :) лидер
In reply to AlexSpl
User Avatar
Auto-translated
2Qwerty: I don't like island maps either :) And is water even needed (in terms of movement, not just as decoration)?
In reply to AlexSpl
User Avatar
Auto-translated
I would like to hear what PReDS, Captain, Kama, Brennan, and especially Dust have to say.
Here's how I see it. People play Heroes 3 without water. So, maybe we don't really need water either. Water adds strategic diversity, which is good, but on the other hand, experienced players have accumulated a lot of experience and play without water (and there are special magic spells and artifacts for that!). The same goes for barriers/tents. It's a very ambiguous thing, especially in random map generation. Sphinxes are also unnecessary. Also, we shouldn't allow burial mounds (where you can hire ghosts). Because finding a burial mound makes the rest of the game 95% meaningless. Now, regarding teleports. As you know, in Heroes 2 (unlike Heroes 3), there's a tactical trick called "teleport blocking." Plus, there's no way to control the teleport with the spacebar. Therefore, I would also reduce the number of teleports.
I repeat: all of this is just my IMHO (In My Humble Opinion).
We really need the opinions of experienced online players.

Орден Фениксахаризматический :) лидер
In reply to AlexSpl
Auto-translated
A friendly resource is currently developing an add-on for Heroes III – HOTA. As part of this project, a new map editor and a new map generator are being developed; it would be worth taking a look. For now, everything is still quite raw, but I've already seen what's available. The editor allows you to view the map. We could also try to create a generator for Heroes II at the same time; I have the contacts.
In reply to Qwerty
User Avatar
Auto-translated
Qwerty
I would like PReDS, Captain, Kama, Brennan, and of course, Dust to share their valuable opinions.

The opinions of experienced online players are extremely needed.

You asked – I’ll say – I haven’t read everything; there’s a lot written here, a lot of letters :)
Sorry.
But as I understand it, the conversation is about a random map generator for online play in Heroes 2.

I don’t know – that’s my opinion. I have one problem – finding a player for online play in Heroes 2… you can count them on your fingers now… and whoever you find, they agree to fixes. That’s my opinion.
Дипломатия - искусство говорить собаке "хорошая собачка" до тех пор пока не найдешь подходящую палку.
In reply to AlexSpl
User Avatar
Auto-translated
I'm also copying the post here.
AlexSpl
I don't really understand the principle behind how the generator works in G2; it seems to me that it just "draws" things randomly... :-)
There's no need to come up with anything particularly new! I would like the maps in G2 to be generated using a similar principle to G3. That is, based on certain templates, each of which has its own meaning and structure, the arrangement of zones, important objects, etc. Are you familiar with this principle in G3?
On a random map, I would like to see the most equal positions, i.e., starting zones. They should be located approximately at the same distance from each other and filled with objects of the same class. The objects should be guarded by monsters of corresponding strength. I think we can discuss these ratios later. The main thing is to get a map from the generator that is more or less symmetrical in terms of positions. Give the ability to classify zones "by importance," by the "richness" of their contents, and then use these to create a map according to a specific principle, a specific idea.
I hope you succeed! Keep me updated! :-)
Тот, кто борется - может проиграть, кто нет - проиграл уже (с)
В прошлом "Координатор турниров Лиги Героев" (www.heroesleague.ru)
In reply to AlexSpl
User Avatar
Auto-translated
To unpack the heroes2.agg file, you need this program=
Dragon UnPACKer 5.0.0
It allows you to extract textures, animations, and music from specialized resource files. The main distinguishing feature of this utility is support for a large number of modern games (over 100). Among the games supported by the utility, GTA Vice City, Hitman 2: Silent Assassin, Quake 3 Arena, Age of Empires 2: Age of Kings, The Sims and many others can be highlighted. The program has the ability to connect external modules, which increases its functionality. In the settings, you can set associations for all supported file formats. Additionally, you can change the interface language there (language modules are downloaded separately). This version fixes errors regarding incorrect support for some file types.
OS: Windows 98/NT/ME/2000/XP/2003 | Multilingual interface | Free.
Download here=

http://sourceforge.net/project/downloading.php?groupname=dragonunpacker&filename=dup500-setup.exe&use_mirror=ovh

Here is the list of files contained within it (will be useful)*=
heroes2/readme.txt (0 mb)
heroes2/sound/mssdrvr.lst (0.02 mb)
heroes2/sound/dig.ini (0 mb)
heroes2/sound/mdi.ini (0 mb)
heroes2/help/heroes2.hlp (0.52 mb)
heroes2/xxx.com (0 mb)
heroes2/xxx2.com (0 mb)
heroes2/editor2.exe (0.91 mb)
heroes2/editor2w.exe (0.56 mb)
heroes2/heroes2.exe (1.42 mb)
heroes2/heroes2w.exe (1.47 mb)
heroes2/install.exe (0.5 mb)
heroes2/sound/mssw95.exe (0.01 mb)
heroes2/uptodate.exe (0.06 mb)
heroes2/anim/zerofile.exe (0.02 mb)
heroes2/mss32.dll (0.15 mb)
heroes2/smackw32.dll (0.08 mb)
heroes2/wing/wing32.dll (0.01 mb)
heroes2/sound/fatman.ad (0 mb)
heroes2/sound/sample.ad (0 mb)
heroes2/data/heroes2.agg (41.35 mb)
heroes2/data/heroes2x.agg (2.48 mb)
heroes2/heroes2.cfg (0 mb)
heroes2/help/heroes2.cnt (0 mb)
heroes2/data/netlodr.dat (0 mb)
heroes2/sound/audiodrv.dig (0.01 mb)
heroes2/sound/iwav.dig (0 mb)
heroes2/sound/jammer.dig (0 mb)
heroes2/sound/nvdig.dig (0 mb)
heroes2/sound/proaudio.dig (0 mb)
heroes2/sound/rap10.dig (0 mb)
heroes2/sound/sb16.dig (0 mb)
heroes2/sound/sblaster.dig (0 mb)
heroes2/sound/sbpro.dig (0 mb)
heroes2/sound/sndscape.dig (0 mb)
heroes2/sound/sndsys.dig (0 mb)
heroes2/sound/ultra.dig (0.01 mb)
heroes2/help/heroes2.gid (0.03 mb)
heroes2/games/1.gmc (0.11 mb)
heroes2/games/2.gmc (0.11 mb)
heroes2/games/3.gmc (0.05 mb)
heroes2/games/4.gmc (0.11 mb)
heroes2/games/autosave.gmc (0.11 mb)
heroes2/games/end.gmc (0.11 mb)
heroes2/games/win_g_01.gmc (0.11 mb)
heroes2/maps/campe01.h2c (0.14 mb)
heroes2/maps/campe02.h2c (0.04 mb)
heroes2/maps/campe03.h2c (0.2 mb)
heroes2/maps/campe04.h2c (0.15 mb)
heroes2/maps/campe05.h2c (0.04 mb)
heroes2/maps/campe05b.h2c (0.04 mb)
heroes2/maps/campe06.h2c (0.13 mb)
heroes2/maps/campe07.h2c (0.15 mb)
heroes2/maps/campe08.h2c (0.14 mb)
heroes2/maps/campe09.h2c (0.13 mb)
heroes2/maps/campe10.h2c (0.19 mb)
heroes2/maps/campe11.h2c (0.42 mb)
heroes2/maps/campg01.h2c (0.16 mb)
heroes2/maps/campg02.h2c (0.04 mb)
heroes2/maps/campg03.h2c (0.15 mb)
heroes2/maps/campg04.h2c (0.14 mb)
heroes2/maps/campg05.h2c (0.04 mb)
heroes2/maps/campg05b.h2c (0.04 mb)
heroes2/maps/campg06.h2c (0.12 mb)
heroes2/maps/campg07.h2c (0.19 mb)
heroes2/maps/campg08.h2c (0.13 mb)
heroes2/maps/campg09.h2c (0.15 mb)
heroes2/maps/campg10.h2c (0.4 mb)
heroes2/data/campaign.hs (0 mb)
heroes2/data/standard.hs (0 mb)
heroes2/maps/camp1_01.hxc (0.05 mb)
heroes2/maps/camp1_02.hxc (0.15 mb)
heroes2/maps/camp1_03.hxc (0.14 mb)
heroes2/maps/camp1_04.hxc (0.05 mb)
heroes2/maps/camp1_05.hxc (0.04 mb)
heroes2/maps/camp1_06.hxc (0.12 mb)
heroes2/maps/camp1_07.hxc (0.17 mb)
heroes2/maps/camp1_08.hxc (0.3 mb)
heroes2/maps/camp2_01.hxc (0.04 mb)
heroes2/maps/camp2_02.hxc (0.14 mb)
heroes2/maps/camp2_03.hxc (0.12 mb)
heroes2/maps/camp2_04.hxc (0.14 mb)
heroes2/maps/camp2_05.hxc (0.32 mb)
heroes2/maps/camp2_06.hxc (0.16 mb)
heroes2/maps/camp2_07.hxc (0.16 mb)
heroes2/maps/camp2_08.hxc (0.31 mb)
heroes2/maps/camp3_01.hxc (0.13 mb)
heroes2/maps/camp3_02.hxc (0.14 mb)
heroes2/maps/camp3_03.hxc (0.21 mb)
heroes2/maps/camp3_04.hxc (0.31 mb)
heroes2/maps/camp4_01.hxc (0.04 mb)
heroes2/maps/camp4_02.hxc (0.24 mb)
heroes2/maps/camp4_03.hxc (0.3 mb)
heroes2/maps/camp4_04.hxc (0.31 mb)
heroes2/deisl1.isu (0 mb)
heroes2/deisl2.isu (0 mb)
heroes2/sound/adlib.mdi (0.01 mb)
heroes2/sound/adlibg.mdi (0.02 mb)
heroes2/sound/esfm.mdi (0.02 mb)
heroes2/sound/iwav.mdi (0 mb)
heroes2/sound/mpu401.mdi (0 mb)
heroes2/sound/mt32mpu.mdi (0.01 mb)
heroes2/sound/null.mdi (0 mb)
heroes2/sound/nvmpu.mdi (0 mb)
heroes2/sound/opl3.mdi (0.02 mb)
heroes2/sound/pas.mdi (0.01 mb)
heroes2/sound/pasplus.mdi (0.02 mb)
heroes2/sound/pcspkr.mdi (0 mb)
heroes2/sound/sbawe32.mdi (0.03 mb)
heroes2/sound/sblaster.mdi (0.01 mb)
heroes2/sound/sbpro1.mdi (0.01 mb)
heroes2/sound/sbpro2.mdi (0.02 mb)
heroes2/sound/sndscape.mdi (0 mb)
heroes2/sound/tandy.mdi (0 mb)
heroes2/sound/ultra.mdi (0.05 mb)
heroes2/maps/beltway.mp2 (0.14 mb)
heroes2/maps/brokena.mp2 (0.13 mb)
heroes2/maps/deathg.mp2 (0.14 mb)
heroes2/maps/dragonr.mp2 (0.16 mb)
heroes2/maps/dragonw.mp2 (0.63 mb)
heroes2/maps/enroth.mp2 (0.28 mb)
heroes2/maps/forsaken.mp2 (0.12 mb)
heroes2/maps/goodvs.mp2 (0.28 mb)
heroes2/maps/heroes.mp2 (0.36 mb)
heroes2/maps/hotspot.mp2 (0.13 mb)
heroes2/maps/lostcon.mp2 (0.46 mb)
heroes2/maps/lostreli.mp2 (0.16 mb)
heroes2/maps/mightv.mp2 (0.27 mb)
heroes2/maps/mineralw.mp2 (0.15 mb)
heroes2/maps/mount.mp2 (0.14 mb)
heroes2/maps/overlord.mp2 (0.14 mb)
heroes2/maps/pandamon.mp2 (0.05 mb)
heroes2/maps/pyramid.mp2 (0.13 mb)
heroes2/maps/revolu.mp2 (0.28 mb)
heroes2/maps/river.mp2 (0.04 mb)
heroes2/maps/scorch.mp2 (0.12 mb)
heroes2/maps/sevenl.mp2 (0.28 mb)
heroes2/maps/shipw.mp2 (0.13 mb)
heroes2/maps/slugfest.mp2 (0.04 mb)
heroes2/maps/spellc.mp2 (0.14 mb)
heroes2/maps/teleport.mp2 (0.26 mb)
heroes2/maps/terraf.mp2 (0.12 mb)
heroes2/maps/theclear.mp2 (0.04 mb)
heroes2/maps/theother.mp2 (0.04 mb)
heroes2/maps/undeada.mp2 (0.13 mb)
heroes2/maps/unholy.mp2 (0.15 mb)
heroes2/maps/vikings.mp2 (0.16 mb)
heroes2/maps/wariork.mp2 (0.26 mb)
heroes2/maps/wastl.mp2 (0.12 mb)
heroes2/maps/whoam.mp2 (0.16 mb)
heroes2/maps/winterl.mp2 (0.33 mb)
heroes2/maps/arrax.mx2 (0.05 mb)
heroes2/maps/carmine.mx2 (0.14 mb)
heroes2/maps/decision.mx2 (0.26 mb)
heroes2/maps/dominion.mx2 (0.56 mb)
heroes2/maps/dragon.mx2 (0.13 mb)
heroes2/maps/foolgold.mx2 (0.13 mb)
heroes2/maps/forhonor.mx2 (0.13 mb)
heroes2/maps/fortress.mx2 (0.27 mb)
heroes2/maps/fullhse.mx2 (0.52 mb)
heroes2/maps/greed.mx2 (0.14 mb)
heroes2/maps/groundze.mx2 (0.14 mb)
heroes2/maps/guardwar.mx2 (0.12 mb)
heroes2/maps/hunicorn.mx2 (0.15 mb)
heroes2/maps/islemaze.mx2 (0.12 mb)
heroes2/maps/kingdth.mx2 (0.04 mb)
heroes2/maps/magic3.mx2 (0.13 mb)
heroes2/maps/newenemy.mx2 (0.14 mb)
heroes2/maps/nvss.mx2 (0.13 mb)
heroes2/maps/peasants.mx2 (0.15 mb)
heroes2/maps/pirate.mx2 (0.49 mb)
heroes2/maps/portals.mx2 (0.12 mb)
heroes2/maps/sandtime.mx2 (0.11 mb)
heroes2/maps/seasons.mx2 (0.13 mb)
heroes2/maps/shrkania.mx2 (0.13 mb)
heroes2/maps/skirmish.mx2 (0.03 mb)
heroes2/maps/surfturf.mx2 (0.42 mb)
heroes2/maps/terrain.mx2 (0.3 mb)
heroes2/maps/theback.mx2 (0.03 mb)
heroes2/maps/valley.mx2 (0.13 mb)
heroes2/maps/witchhnt.mx2 (0.27 mb)
heroes2/sound/fatman.opl (0 mb)
heroes2/sound/sample.opl (0 mb)
heroes2/heroes2.pif (0 mb)
heroes2/install.pif (0 mb)
heroes2/heroes2.reg (0 mb)
heroes2/data/h2xintro.smk (2.44 mb)
heroes2/anim/ivyback.smk (0.14 mb)
heroes2/anim/ivydes.smk (0.19 mb)
heroes2/data/ivydes.smk (0.19 mb)
heroes2/anim/ivypol.smk (0.18 mb)
heroes2/data/ivypol.smk (0.18 mb)
heroes2/anim/ivyvoy.smk (0.18 mb)
heroes2/data/ivyvoy.smk (0.18 mb)
heroes2/anim/ivywiz.smk (0.14 mb)
heroes2/data/ivywiz.smk (0.14 mb)
heroes2/data/sh2xintr.smk (1.57 mb)

Added 2 minutes later
And here is a script for Image Hacker, this might also be useful)=

Code var count,Image_W,Image_H,x,y,n,i,j,chislox,byte,out_byte,Shadow_counter:integer;
showmessage('Please specify the file containing the palette');
openfileas('*.pal');
for i:=0 to 255 do
begin
r:=read(1);
g:=read(1);
b:=read(1);
setcolortable(i,rgb(r*4,g*4,b*4));
end;
closefile;
showmessage('Please specify the file containing the image');
openfileas('*.icn');
count:=read(1);
setpos(10);
width:=read(3);
height:=read(3);
showmessage('Images found in file: '+tostr(count)+'['+tostr(width)+'*'+tostr(height)+']');
setpos(15);
offset:=read(3);
showmessage(tostr(offset));
setpos(offset+6);
setsize(width,height,8);
x:=0;
y:=0;
byte:=read(1);
chislox:=byte;
repeat
if chislox=0 then
begin
x:=0;
n:=y;
y:=n+1;
end;
if chislox<=127 then
begin
for i:=1 to chislox do
begin
byte:=read(1);
setpixel(x,y,byte);
n:=x;
x:=n+1;
end;
end
else
begin
if (chislox>=128)and(chislox<=191) then
begin
for i:=1 to (chislox-128) do
begin
setpixel(x,y,0);
n:=x;
x:=n+1;
end;
end else
if chislox>=192 then
begin
if chislox=192 then
begin
byte:=read(1);
if (byte mod 4)=0 then
begin
out_byte:=byte;
Shadow_counter:=read(1);
end
else
begin
Shadow_counter:=(byte mod 4);
n:=(byte mod 4);
out_byte:=byte-n;
end;
byte:=read(1);
end
else
if chislox=193 then
begin
byte:=read(1);
out_byte:=read(1);
for i:=1 to byte do
begin
setpixel(x,y,out_byte);
n:=x;
x:=n+1;
end;
end
else
begin
byte:=read(1);
for i:=1 to (chislox-192) do
begin
setpixel(x,y,byte);
n:=x;
x:=n+1;
end;
end;
end;
end;
chislox:=read(1);
until (chislox=128);
savefileas;
closefile;
Евангелие от Иоанна, 1.5: Lux in tenebris lucet, et tenebrae eam non comprehenderunt. Свет во тьме светит, и тьма не объяла его.

Statistics

Welcome our newest member: Emil