It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Based on the Russian patch on steam, I have made some modification on the GOG English version of the game executable, Konung3.exe.

I'll try to write up my mods in the coming days.
It is a WIP, but you can download a working version here:
https://easyupload.io/e49c5x
https://fastupload.io/Z4rrZWaaqK4Mu9C/file

See attached images.
1. I still have an issue with fog that isn't there in the Russian version, when the camera goes high.
Many hours later, still no idea.
2. Also, if you zoom out to much, there are some artifacts, same as in the Russian version.
They come and go with camera movement.
Also don't know how to fix.
3. If you zoom out, the NPCs at the edges of the screen start to slide instead of walking normally.
Fires also go out.
This is working as it should in the rus version.
4. Because you can zoom out a lot more than before, there is a distance from which everything is clipped.
Same as the rus version.
(This may not be that big of an issue.)

Steam post translated with google:
• Maximum camera distance increased by 2 times
• Fixed pixelation and cubicity of fire
• Supported versions: Steam version Collector's Edition
• Supported resolutions: 1024x768 1280x768 1280x800 1280x960 1280x1024 1360x768 1366x768 1400x1050 1440x900 1600x900 1680x945 1680x1050 1920x1080 1920x1200 2048x1152 2560x1080 2560x1440 2560x1600 3440x1440 3840x2160

• The new game and options menus use a 1024x768 or 1280x1024 viewport (depending on the resolution), outside of it there is an image of the main menu and traces of the cursor, you will see this only once, so nothing critical, again not a wave please.

• There is a possibility of problems with water textures, but this is a matter of luck, since there is no reason for the water texture to become loopy. Personally, the author had no problems. Have a good game!
Attachments:
k3_p_opt.jpg (388 Kb)
k3_p_top2.jpg (498 Kb)
Post edited October 23, 2023 by bszoke88
The journey starts with a Konung3_Widescreen.7z zip file.
I don't remember where I got it from, in January 2022, when I was still playing Konung 2.
It is very likely identical to the steam patch.
(edit: it is)
As you can see in the attached image, the patch has separate folders for different resolutions, starting with what I believe to be the original Russian version.
These folders each have one Konung3.exe, which are modded for that resolution.

-----

I have tried the shadow map files, but not sure what I should see...
rus original vs. 8192_Shadow_Map patched rus original
1 mod

rus:
004225ca PUSH 0x400 -> 0x2000

4096_Shadow_Map sets it to 0x1000
2048_Shadow_Map sets it to 0x0800
2048_Shadow_Map sets it to 0x0400

eng:
004225aa
I set it to 0x1000

-----

The unlock camera file patches the game executable to set the camera free.
That is, you can set the angle and zoom without the original restrictions.
You can even go below the map.
See pics.
Note the visual artifacts.
Attachments:
Post edited October 23, 2023 by bszoke88
Comparing the Russian original ('rus' from here on) (patch/1024x768_1280x960_1280x1024/Konung3.exe) to the modded fullhd version (patch/1920x1080/Konung3.exe) with vbindiff and ghidra I have found the following differences:

NOTE: because I don't know how to preserve my whitespace in this editor, I have included pictures, so that it is easier to see.
NOTE: most addresses are from ghidra, so if you want to use a normal hex editor, you have to subtract 0x400000.

1.
The fist part of the patch is to override two value assignments in the read option file function.
One for the case if the config file exists, one when it doesn't.
A parameter is set to 2 instead of the original one.
((Not sure what the parameter actually does, but setting this back to 0 or 1 or 5 doesn't seem to do anything...))
(Turns out I have made a copy error. - Setting this to 2 means, you will get the fullhd resolution, regardless of what the options file has stored. Also you can't change the resolution from the game options menu. (To be more precise, the changed value gets saved, but the next time you start the game, it gets loaded, but will be overridden.)

My patch should preserve the functionality to be able to change resolution, but without the config file available it would choose the modified resolution. This means only one of the two overrides is used.)

Because there is no space for this hack in the code, the mod is to jump to an empty location, mod the value there and jump back to the file close function or to continue the read option file function.
See point 3. and 5. as well.

00001 DA20 jump below after closing file
0041d990 e8 9b 68 15 00 CALL _fclose
e8 35 6f 18 00 CALL FUN_005a495a - need to recalculate jump offset to new FUN_005a4d0a
start + 5 + offset = end, offset = 187375
new inst: e8 75 73 18 00

jump back to (options file read) _fclose function:
rus1920:
005a4964 e9 57 f9 fc ff JMP _fclose
st + offset + 5 = end
eng:
005a4d14 JMP _fclose (FUN_005744d0)
offset = FFFCF7B7
new inst: e9 b7 f7 fc ff

DA85 DAT_00cc48d8 = 2;
0041d9f5 a3 d8 38 cc 00 MOV [DAT_00cc38d8],EAX
e9 df 6e 18 00 JMP FUN_005a4969 - need to recalculate jump offset to new FUN_005a4d19
offset = 18731F
new inst: e8 1f 73 18 00

jump back to options file read function:
rus1920:
005a4973 e9 12 91 e7 ff JMP FUN_0041da8a
st + offset + 5 = end
eng:
005a4d23 JMP FUN_0041d9fa
offset = FFE78CD2
new inst: e9 d2 8c e7 ff

2.
2 constants are changed to 2 new constants, with new values
The new constants are located in the free space
The first one is the background image width for the new game and options menus, the second is the height.
They are set to the float values 1279.5 and 1023.5, corresponding to the overwritten resolution of 1280x1024.
(My patch should not need this, instead I would like to rework the new game and options screens to be able to scale just like the background image.)

00002 37de mov DAT_00c89ec8 ?? - mov DAT_005a4978 = 449FF000h 004237ae 8b 0d c8 8e c8 00 MOV ECX,dword ptr [DAT_00c88ec8] -> DAT_005a4978 equiv. 005a4d28

381a mov DAT_00889cb0 ?? - mov DAT_005a497c = 447FE000h 004237ea a1 b0 8c 88 00 MOV EAX,[DAT_00888cb0] -> DAT_005a497c equiv. 005a4d2c

00002 4453 mov DAT_00c89ec8 ?? - mov DAT_005a4978 = 449FF000h 00424423 8b 0d c8 8e c8 00 MOV ECX,dword ptr [DAT_00c88ec8] -> DAT_005a4978 equiv. 005a4d28

448f mov DAT_00889cb0 ?? - mov DAT_005a497c = 447FE000h 0042445f a1 b0 8c 88 00 MOV EAX,[DAT_00888cb0] -> DAT_005a497c equiv. 005a4d2c

3.
1A 495a fn to set DAT_00cc48d8 = 2; and close file
inserted in to 00 space
also another similar function FUN_005a4969 is defined
2 above constants
NOTE in the eng version DAT_00cc48d8 is DAT_00cc38d8 !!

4.
A set of 24, 4, 8 numbers which are likely setting the positions for UI / main menu elements.
A location which sets the resolution - though this works, the main menu falls apart.

34 8E50 as above 24 diff. numbers
main menu offsets (new game and options menu not included)

-----

36 8890 (e: 7890) as above 1280x2014 -> 1920x1080
this sets the resolution
rus: 00768890 eng: 00767890
(menu offsets are incorrect if this is the only change from original file)

NOTE: there are 3 possible resolutions, starting at eng: 00767880
0x400 0x300 - 1024x768
0x500 0x3C0 - 1280x960
0x780 0x438 - 1920x1080 - this is the one that is overwritten

-----

88b8 4 differing numbers ??
B6aa as above 8 differing numbers - they have an offset 50 and E
the above 2 fixes inventory offsets

5.
eng version zeros from
005a4d0a - 001a 4d0a
put the 1A 495a functions here
Attachments:
patch01.jpg (99 Kb)
patch02.jpg (136 Kb)
Post edited October 23, 2023 by bszoke88
rus original vs. unlock camera patched original
4 mods

rus:
00431f44 MOVSS XMM1,dword ptr [DAT_005a96d8] -> DAT_005a9788
41C80000 -> 43160000
eng:
00432004 MOVSS XMM1,dword ptr [DAT_005a59c8] -> DAT_005a95e8
why not 005a9538??
41100000 ?? -> 43160000

-----

rus:
00432281 75 22 JNZ LAB_004322a5
-> eb 22 JMP LAB_004322a5
eng:
00432341

this removes the restriction on camera angle
(reversed)

rus:
005ad668 3F10C3BDh float 0.5654867
lowest camera pos

005ad660 3FA78D36h float 1.308997
highest camera pos

eng:
005a5618 3F490FDBh float 0.78539819
THIS HAS TO STAY.
Other functions use this variable, so relocated to free space:
new var at 005a4d30
-> 3ECCCCCDh float 0.4

005ad180 3FA78D36h float 1.308997


eng:
rewrite line that loads lowest camera pos float
from
00432343 f3 0f 10 05 18 56 5a 00 MOVSS XMM0,dword ptr [FLOAT_005a5618]
to:
00432343 f3 0f 10 05 30 4d 5a 00 MOVSS XMM0,dword ptr [FLOAT_005a4d30]

-----

rus: UndefinedFunction_0044a860
sets a lot of string vars / options for camera and a lot of things
they have no effect???
0044ad28 PUSH 0x40100000 -> 0x41200000

eng:
0044aec8 PUSH 0x3f800000 -> 0x41200000

this changes the size of the green trapezoid on the minimap
that is showing where / how the camera is positioned
strange that this is before the string r_fog...

Okay, so setting this to 43160000h does decrease the fog, but I would like to get rid of it completely.

-----

rus:
005a9788 42100000h -> 43160000h

eng:
005a95e8 41900000h -> 43160000h
more sensible:
42A00000h

this sets how far you can zoom out
NOTE that there is a fog effect, the higher you go
Attachments:
patch03.jpg (75 Kb)
patch04.jpg (70 Kb)
Post edited October 10, 2023 by bszoke88
Other issues with the game:
1. Options menu label 'Options' at the top is still in Russian.
(See pic in first post.)
Not so easy to fix, as it is very likely in the background picture, not text.
2. Quest text untranslated or buggy. See pics.
3. There are 2 outro videos for male and female heroes in the Russian version, but only the male video is included for both genders in the English version...
Attachments:
q_nuggets.jpg (221 Kb)
q_odin.jpg (223 Kb)
Post edited October 25, 2023 by bszoke88
interesting functions:
FUN_004226c0 window creation, dll loads
FUN_00438a10 switch for state machine rus:FUN_004388d0
FUN_00437040 minimap / Landscape texture not found

FUN_0041d860 options file read
FUN_004305d0 options file write

FUN_00432960 .RES loader
FUN_004525e0("graph.res");

FUN_00421fd0 UI builder?

FUN_0041f9a0 lot of rendering
FUN_0041bcf0(DAT_00c88ee4,1); camera?
FUN_00411d20 D3DXMatrixRotationYawPitchRoll

FUN_004243f0 options menu building, rus: FUN_00424420

FUN_004236f0 new game menu building

It is important to understand that sprites in the game are places based on the resolution.
(At least for the new game and options menus.)
The 3 possible resolutions correspond to 0, 1 and 2 integer values.
These are multiplied with another number to produce an offset.
e.g. for a sprite when using resolution number zero the location for a parameter is calculated as:
base_memory_address + res_number * offset

From the options menu a parameter for a sprite placing function is:
(float)*(int *)(&DAT_00762e44 + DAT_00cc38d8 * 0x150)

Other INFO:
From the outro, it is probable that the game is running The Engine from Skyfallen Entertainment.
(Is or has this the Path Engine?)
I have found this:
https://github.com/dngulin/blender-skyfallen-import
It may work for this game as well.
Post edited October 25, 2023 by bszoke88
Hi bszoke88,
thank you very much for this!

Works like a charm for the English GOG Version from Konung!

For the Resolution part, its also working, its a little bit tricky :), but if you click a little bit higher over the Sound and Music volumes, you can change the resolution, after that the Option Settings are working fine (for example: in Full HD 1920x1080)

Waiting for the next patches.
Thanks again for your efford on this ;-)!
Post edited January 06, 2024 by ya-seen
Hey bszoke88,
would you be willing to take a look at the other games in the series? Russian community has also made patches for Konung 1 and 2, which can be downloaded here:

http://konung.topbb.ru/viewtopic.php?id=134

The english speaking community would love to be able to play in widescreen too :)
update:
After the last patch uploaded here, I tried to look into the 3D problems in the code, but I'm not sure where / how I should change things...
I have spent a lot of time thinking about the new game and options menu and how to programmatically replace the offsets of each graphical element, with one that is calculated for the set resolution.
However this isn't so easy to do either in assembly (in the game executable) or in python (in a patch program).

aaaand of course a lot of other things happened, so I haven't spent time on this patch for a while now.
Not sure if / when I can get back to it...

I'm happy though that many players have found it useful. :)