Campaign victory conditions

That’s why god invented the listener/observer pattern, you only propagate events that have listeners registered. The question is deciding which ones you want to provide as a API.

The ‘normal’ observer/eventbus pattern DOES have a problem of being far too ‘time agnostic’, where the user doesn’t have the notion of precedence of the events if he depends on that except if he does the timekeeping himself. A modification where the user could define a sequence (ex: visit city A then visit city B) and the game does the precedence bookkeeping and only present the ‘final’ event would be very helpful (being able to remove events/mark ‘only once’ is also a must).

Also the notion of user (modder) configurable events can be useful too. Imagine ‘send a event every 5 turns/steps/seconds(evil)’ (which i will use to check if the hero still has a bit of anti-venom and bottle–; it). Or ‘start a invasion +5 turns from now after picking up the sword of doom’, for a runtime modification example.

I was very impressed by heroes 3 modding diversity, as well as equally horrified by the means to get that (process direct memory editing… really?). So it would be a shame to deliver something less flexible for ‘years’, which will only make modders continue using those hacks and vcmi getting ‘ports’ (if any), not being the focus of development.

To make it clear:

  • Someone will need to implement this. Our project is quite small so finding someone who wants to work on this AND have free time may not be that easy.
  • Configurable win\lose conditions by itself are useless - we don’t have working map editor where this conditions could be set. Original format is binary so it is not easy to edit.
  • “Would be cool to have X” discussions are fine but don’t expect any of this to be implemented soon.

About the second point: nothing stops you from expanding the supported file formats (i guess you already are anyway, with all the json files). So another way to specify maps, that is text editable, seems like a good idea, once you get to the point you have things to edit.

See what ALSV(FD) means (I’ve written about it two posts above yours) before going into discussion any further. Much more simple and AI-friendly. I think it would be good for AI to understand victory and loss conditions.

Where is this file? It seems my installation doesn’t have good1a.smk.

Json files are there to configure game rules. Sometimes they fill missing original configs, sometimes they fill gaps and sometimes they may be used to replace old OH3 configs. Enhancing maps with json files is a horrible idea. We in VCMI do not circumvent limitations like WoG does. If we are concerned about certain limitations, we try to make them nonexistent from the beginning. And we are concerned about mapping. A new map editor is going to be made and on top of it new map format will be created.

I think those videos were on separate file on CD and may not be installed on hard drive. Same goes to voiced intros.

Check “game CD” for this files:
/heroes3/Data/Heroes3.vid
/heroes3/Data/Heroes3.snd

I have Heroes3.snd on my old installation, but no Heroes3.vid. GOG.com version of H3 doesn’t install Heroes3.vid (and there is no CD, of course), but it has much bigger video.vid file (seems to contain these campaign videos).

Yes, in GOG.com version, the videos are in the game directory, in Heroes3\Data, and in there, there are Heroes3.snd and Heroes3.vid. Are you planning on implementing them? Do you need anything else? Because I know most of the files in all of the archives.

Also, if it’s of any use to you right now, in SoD campaign Unholy Alliance, in Scenarios 9 and 10(I and J marked in editor), you have a victory condition of 3 artifacts, and a loss condition of 2 heroes.

Yes, I’d like to implement them. I’ll have to check the order of videos in campaign format, you could probably help me with it a bit.

Video indexes in h3c seems to match indexes in CMPMOVIE.txt. Same goes to music and CMPMUSIC.txt but there is no list for voiced intro.

OK, then I need matching between entries in cmpmovie.txt and filenames of videos corresponding to them. Campaign editor lists the movies with previews but alphabetically (names seem to match though).

Sorry it took me so much time, my internet was down.

The cmpmovie.txt puts them in an order of RoE, then AB, then SoD campaigns, I guess it’s some order in which they should be played. The only peculiarity there is that Spectre of power is shown before Unholy Alliance, and it’s the opposite order, you must complete Unholy Alliance to unlock the Spectre of Power. It seems there are other peculiarities with sorting.

It’s funny when you realize on some videos, what gibberish people say which is only heard when music and dialogue is off. xD

Some of them are used twice, there I put a question mark (?)in the end. And some of the entries in cmpmovie.txt actually have 2 videos put together. The first one being something longer that happens, and the second one being the one that’s repeating itself. There i put an exclamation mark (!).

Is it more useful to you to be here on the forums, or should I send it to you in a file?

The RoE campaigns have almost the exact same name with the entries in cmpmovie.txt.

Shadow of Death Campaigns


New Beginning
NewBeginning_a - H3x2_NBa.smk
NewBeginning_b - H3x2_NBb.smk
NewBeginning_c - H3x2_Nbc.smk
NewBeginning_d - H3x2_Nbd.smk
NewBeginning_end - H3x2_Nbe.smk
Elixir of Life
ElixirOfLife_a - H3x2_Ela.smk
ElixirOfLife_b - H3x2_Elb.smk
ElixirOfLife_c - H3x2_Elc.smk
ElixirOfLife_d - H3x2_Eld.smk
ElixirOfLife_end - H3x2_Ele.smk
Hack and Slash
HackAndSlash_a - H3x2_HSa.smk
HackAndSlash_b - EVIL2C.SMK ?
HackAndSlash_c - H3x2_HSc.smk
HackAndSlash_d - H3x2_HSd.smk
HackAndSlash_end - H3x2_HSe.smk
Birth of a Barbarian
BirthOfABarbarian_a - H3x2_BBa.smk
BirthOfABarbarian_b - H3x2_BBb.smk
BirthOfABarbarian_c - H3x2_BBc.smk
BirthOfABarbarian_d - H3x2_BBd.smk
BirthOfABarbarian_e - H3x2_BBe.smk
BirthOfABarbarian_end - H3x2_BBf.smk
Rise of the Necromancer
RiseOfTheNecromancer_a - H3x2_RNa.smk
RiseOfTheNecromancer_b - H3x2_RNb.smk
RiseOfTheNecromancer_c - H3x2_RNc.smk
RiseOfTheNecromancer_d - H3x2_RNd.smk
RiseOfTheNecromancer_end - H3x2_RNe1.smk + H3x2_RNe2.smk !
Unholy Alliance
UnholyAlliance_a - H3x2_UAa.smk
UnholyAlliance_b - H3x2_UAb.smk
UnholyAlliance_c - H3x2_UAc.smk
UnholyAlliance_d - H3x2_UAd.smk
UnholyAlliance_e - H3x2_UAe.smk
UnholyAlliance_f - H3x2_UAf.smk
UnholyAlliance_g - H3x2_UAg.smk
UnholyAlliance_h - H3x2_UAh.smk
UnholyAlliance_I - H3x2_UAi.smk
UnholyAlliance_j - H3x2_UAj.smk
UnholyAlliance_k - H3x2_UAk.smk
UnholyAlliance_l - H3x2_UAl.smk
UnholyAlliance_end - H3x2_UAm.bik + H3x2_UAm.smk
Spectre of Power
SpectreOfPower_a - H3x2_SPa.smk
SpectreOfPower_b - H3x2_SPb.smk
SpectreOfPower_c - H3x2_SPc.smk
SpectreOfPower_d - H3x2_SPd.smk
SpectreOfPower_end - H3x2_SPe.smk

Restoration of Erathia


Long live the Queen
Good1_a - GOOD1A.SMK
Good1_b - GOOD1B.SMK
Good1_c - GOOD1C.SMK
Dungeons and devils
Evil1_a - EVIL1A.SMK
Evil1_b - EVIL1B.SMK
Evil1_c - EVIL1C.SMK
Spoils of War
Neutral1_a - NEUTRALA.SMK
Neutral1_b - NEUTRALB.SMK
Neutral1_c - NEUTRALC.SMK
Liberation
Good2_a - GOOD2A.SMK
Good2_b - GOOD2B.SMK
Good2_c - GOOD2C.SMK
Good2_d - GOOD2D.SMK
Long Live the King
Evil2_a - EVIL2A.SMK
Evil2ap1 - EVIL2AP1.SMK + EVIL2AP2.SMK !
Evil2_b - EVIL2B.SMK
Evil2_c - EVIL2C.SMK
Evil2_d - EVIL2D.SMK
Song for the Father
Good3_a - GOOD3A.SMK
Good3_b - GOOD3B.SMK
Good3_c - GOOD3C.SMK
Seeds Of Discontent
Secret_a - SECRETA.SMK
Secret_b - SECRETB.SMK
Secret_c - SECRETC.SMK

Armageddon's Blade 


Armageddon's Blade
ArmageddonsBlade_a - H3ABab1.smk
ArmageddonsBlade_b - H3ABab2.smk
ArmageddonsBlade_c - H3ABab3.smk
ArmageddonsBlade_d - H3ABab4.smk
ArmageddonsBlade_e - H3ABab5.smk
ArmageddonsBlade_f - H3ABab6.smk
ArmageddonsBlade_g - H3ABab7.smk
ArmageddonsBlade_h - H3ABab8.smk
ArmageddonsBlade_end - H3ABab9.smk
Dragon's Blood
DragonsBlood_a - H3ABdb1.smk
DragonsBlood_b - H3ABdb2.smk
DragonsBlood_c - H3ABdb3.smk
DragonsBlood_d - H3ABdb4.smk + H3ABdb4b.smk !
DragonsBlood_end - H3ABdb5.smk
Dragon Slayer
DragonSlayer_a - H3ABds1.smk
DragonSlayer_b - H3ABds2.smk
DragonSlayer_c - H3ABds3.smk
DragonSlayer_d - H3ABds4.smk
DragonSlayer_end - H3ABds5.smk
Festival of Life
FestivalOfLife_a - H3ABfl1.smk
FestivalOfLife_b - H3ABfl2.smk
FestivalOfLife_c - H3ABfl3.smk
FestivalOfLife_d - H3ABfl4.smk
FestivalOfLife_end - H3ABfl5.smk
Foolhardy Waywardness
FoolhardyWaywardness_a - H3ABfw1.smk
FoolhardyWaywardness_b - H3ABfw2.smk
FoolhardyWaywardness_c - H3ABfw3.smk
FoolhardyWaywardness_d - H3ABfw4.smk
FoolhardyWaywardness_end - H3ABfw5.smk
Playing with Fire
PlayingWithFire_a - H3ABpf1.smk
PlayingWithFire_b - H3ABpf2.smk
PlayingWithFire_c - H3ABpf3.smk
PlayingWithFire_end - H3ABpf4.smk

Great work, Randjan. I’ll integrate it in VCMI soon.

Oh, I forgot to say, do you need dialogue files listed or something like that? They are going to need narrators that talk, right?

If you could make it, it would be great. BTW, if you could write it like:

"H3x2_NBa.smk", //NewBeginning_a

instead of

NewBeginning_a - H3x2_NBa.smk

it could be directly pasted info VCMI’s config. I’m almost finished converting your video list :).

So it’s like a comment, just so you know what are you using? And I should write voiceovers like that too?
My only question with writing like that is the levels that have 2 videos together, as I told you, there are 3 such videos, each 1 in RoE, SoD, and AB. I’m not sure if it’s a coincidence or on purpose. Do I need to fix my videos list, or is this fine?

I’m going to make the list for sounds, but how should I write it, since nobody found a list for voiced intros? I’m going to write file names, and something that will remind me to know where it should be. Though it might be a little long.

EDIT:
Here they are, maybe it’s not too good. I don’t know what do you need it for and how do you need it. Does it need some connection with the videos?
And also, sorry if it bothers you that the filenames are scrambled, it’s the alphabetical order, as it is in the .snd archive.

"ABvoAB1.wav", //Armageddon's Blade 1
"ABvoAB2.wav", //Armageddon's Blade 2
"ABvoAB3.wav", //Armageddon's blade 3
"ABvoAB4.wav", //Armageddon's blade 4
"ABvoAB5.wav", //Armageddon's blade 5
"ABvoAB6.wav", //Armageddon's blade 6
"ABvoAB7.wav", //Armageddon's blade 7
"ABvoAB8.wav", //Armageddon's blade 8
"ABvoAB9.wav", //Armageddon's blade 8end

"ABvoDB1.wav", //Dragon's Blood 1
"ABvoDB2.wav", //Dragon's Blood 2
"ABvoDB3.wav", //Dragon's Blood 3
"ABvoDB4.wav", //Dragon's Blood 4
"ABvoDB5.wav", //Dragon's Blood 4end

"ABvoDS1.wav", //Dragon Slayer 1
"ABvoDS2.wav", //Dragon Slayer 2
"ABvoDS3.wav", //Dragon Slayer 3
"ABvoDS4.wav", //Dragon Slayer 4
"ABvoDS5.wav", //Dragon Slayer 4end

"ABvoFL1.wav", //Festival of Life 1
"ABvoFL2.wav", //Festival of Life 2
"ABvoFL3.wav", //Festival of Life 3
"ABvoFL4.wav", //Festival of Life 4
"ABvoFL5.wav", //Festival of Life 4end

"ABvoFW1.wav", //Foolhardy Waywardness 1
"ABvoFW2.wav", //Foolhardy Waywardness 2
"ABvoFW3.wav", //Foolhardy Waywardness 3
"ABvoFW4.wav", //Foolhardy Waywardness 4
"ABvoFW5.wav", //Foolhardy Waywardness 4end

"ABvoPF1.wav", //Playing with Fire 1
"ABvoPF2.wav", //Playing with Fire 2
"ABvoPF3.wav", //Playing with Fire 3
"ABvoPF4.wav", //Playing with Fire 3end


"E1A.wav", //Dungeons and Dragons 1
"E1B.wav", //Dungeons and Dragons 2
"E1C.wav", //Dungeons and Dragons 3

"E2A.wav", //Long live the King 1
"E2AE.wav", //Long live the King 1end
"E2B.wav", //Long live the King 2
"E2C.wav", //Long live the King 3
"E2D.wav", //Long live the King 4

"G1A", //Long live the Queen 1
"G1B", //Long live the Queen 2
"G1C", //Long live the Queen 3

"G2A", //Liberation 1
"G2B", //Liberation 2
"G2C", //Liberation 3
"G2D", //Liberation 4

"G3A", //Song for the Father 1
"G3B", //Song for the Father 2
"G3C", //Song for the Father 3

"H3x2BBa", //Birth of a Barbarian 1
"H3x2BBb", //Birth of a Barbarian 2
"H3x2BBc", //Birth of a Barbarian 3
"H3x2BBd", //Birth of a Barbarian 4
"H3x2BBe", //Birth of a Barbarian 5
"H3x2BBf", //Birth of a Barbarian 5end

"H3x2ELa", //Elixir of life 1
"H3x2ELb", //Elixir of life 2
"H3x2ELc", //Elixir of life 3
"H3x2ELd", //Elixir of life 4
"H3x2ELe", //Elixir of life 4end

"H3x2HSa", //Hack and Slash 1
"H3x2HSb", //Hack and Slash 2
"H3x2HSc", //Hack and Slash 3
"H3x2HSd", //Hack and Slash 4
"H3x2HSe", //Hack and Slash 4end

"H3x2NBa", //New Beginning 1
"H3x2NBb", //New Beginning 2
"H3x2NBc", //New Beginning 3
"H3x2NBd", //New Beginning 4
"H3x2NBe", //New Beginning 4end

"H3x2RNa", //Rise of the Necromancer 1
"H3x2RNb", //Rise of the Necromancer 2
"H3x2RNc", //Rise of the Necromancer 3
"H3x2RNd", //Rise of the Necromancer 4
"H3x2RNe", //Rise of the Necromancer 4end

"H3x2SPa", //Spectre of Power 1
"H3x2Spb", //Spectre of Power 2
"H3x2Spc", //Spectre of Power 3
"H3x2Spd", //Spectre of Power 4
"H3x2Spe", //Spectre of Power 4end

"H3x2UAa", //Unholy alliance 1
"H3x2UAb", //Unholy alliance 2
"H3x2UAc", //Unholy alliance 3
"H3x2UAd", //Unholy alliance 4
"H3x2UAe", //Unholy alliance 5
"H3x2UAf", //Unholy alliance 6
"H3x2UAg", //Unholy alliance 7
"H3x2UAh", //Unholy alliance 8
"H3x2UAi", //Unholy alliance 9
"H3x2UAj", //Unholy alliance 10
"H3x2UAk", //Unholy alliance 11
"H3x2UAl", //Unholy alliance 12
"H3x2UAm", //Unholy alliance 12end


"N1A", //Spoils of War 1
"N1B", //Spoils of War 2
"N1C_D", //Spoils of War 3

"S1A", //Seeds of discontent 1
"S1B", //Seeds of discontent 2
"S1C", //Seeds of discontent 3

It seems that the second one should loop once the first one ends.

Thanks, it’s OK.

It seems that campaigns are fully implemented now?

I wanted to play heroes chronicles right now, but it seems it doesn’t work on Windows 7 64bit. Are you planning on implementing Heroes Chronicles?

No, they’re not. I still haven’t implemented those victory conditions (I’d like to make that customizable system for victory/loss conditions first). Custom campaigns (that don’t use them) should be more or less playable up to bugs. There are minor things missing too like saves between campaigns.

I don’t have Heroes Chronicles. I think it would be nice to support them but right now it seems no developer wants to do it.

BTW, GOG’s version of Heroes Chronicles is reported to work on Win7 x64: gogwiki.com/wiki/Heroes_Chro … l_Chapters .

In this case I got a bug - start Long Live the Queen and use vcmisilmaril to advance to 2nd scenario - game hangs on loading. Very likely due to fact that on that map player don’t have any heroes or towns - only placeholders.

And on Chronicles - they would need support for custom scenario selection menu instead of using one of H3 maps. As well as some mechanism to distinguish Tarnums from different Chronicles - different class, starting skills, army while uses same numeric ID.

How are you going to implement those? Are they going to be available later when you make the VCMI editor?

I wanted to test the castle siege now, I was playing Birth of a Barbarian. I attacked the town. It seemed as my catapult never broke any walls in 3 turns, then I moved golems onto the spot where the mine should be and the golem died, there was no info in the battle log, so I’m not sure if the mines do that much damage. Also, there was no mine animation, just golems dying, then I moved nagas to the place where there should be no mine since golems destroyed it, but my Naga died too. I lost Yog, which is the loss condition, but I could still play. Then when I chose another hero and wanted to do something, the game crashed. Sorry for the long bugs explanation.

Also, the heroes chronicles seem to work somehow now, it’s just that it occasionally crashes, same happens on my regular H3, without the use of HD mod or WoG/ERA.

Do you mean this? s18.postimage.org/mjk0mhsh1/Heroes_Chronicles.jpg