|
King's Bounty Famous series of Fantasy Real-time RPG with turn-based battles. |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Modding Darkside / WotN without the Editor
I've been asked how I modded the game.
Here is the tool you need: KB_DB_EDIT You should be able to search these forums to get it and it should still be available. If not, let me know and I'll post it here. What you need to do with KB_DB_EDIT is read the README.TXT file and learn how to decompile and compile the binary game files. You will need to decompile the LOC files (these are basically the map data files) if you want to change stuff that appears on the maps / shops, etc. Once the file is decompiled, you need to use your favorite text editor to make changes to the file. The files have sections like this: Code:
{Y}{embs}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 2 elements { {Y}{els}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 13 elements { {Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 9 elements { {U}{rndid} = {2701106889} {A}{n} = {Aguzik_Big_Axe} {A}{aa} = {npc_dying_aguzak} {U}{f} = {33} {U}{cnt} = {1} {Y}{ii0}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 5 elements { {X}{p} = {66660842DC1A8044CDCC2A420000803F} {F}{a} = {6.04} {F}{s} = {1.00} {U}{u} = {1964} {Y}{vp}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 2 elements { {Y}{hint}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 2 elements { {U}{flags} = {0} {W}{strg} = {itext_m_tristrem_start_1964_hint} } {Y}{msg}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 2 elements { {U}{flags} = {0} {W}{strg} = {itext_m_tristrem_start_1964_msg} } } Code:
{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 8 elements { {U}{rndid} = {1784720102} {A}{n} = {embryo_4} {A}{aa} = {army_shaman} {U}{f} = {33} {U}{cnt} = {1} {Y}{ii0}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 5 elements { {X}{p} = {CDCC6441AB1480449A99DC420000803F} {F}{a} = {-0.84} {F}{s} = {1.00} {U}{u} = {1986} {Y}{vp}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 0 elements { } } {Y}{aov}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 0 elements { } {Y}{e}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 8 elements { {W}{name} = {} {I}{jnt} = {-1} {U}{tdf} = {0} {Y}{choice}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements { {Y}{10}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 10 elements { {W}{name} = {??????} {U}{bod} = {1} {U}{hero} = {0} {U}{lead1} = {1000} {U}{lead2} = {2000} {A}{script} = {} {U}{disp} = {1} {U}{arra} = {1} {A}{beh} = {Joining} {Y}{troops}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 1 elements { {Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 8 elements { {A}{races} = {} {A}{units} = {shaman} {A}{level} = {} {A}{perc} = {100} {A}{kolvo} = {1} {U}{prob} = {10} {I}{ext} = {-1} {U}{fillt} = {0} } } } } {U}{chance} = {100} {U}{uid} = {6} {U}{wuid} = {153791718} {A}{class} = {army} } } Code:
{ {A}{races} = {} {A}{units} = {shaman} {A}{level} = {} {A}{perc} = {100} {A}{kolvo} = {1} {U}{prob} = {10} {I}{ext} = {-1} {U}{fillt} = {0} } I can't stress the testing part enough because if you mess up the TXT file and recompile it and run the game with it, it will probably crash. There is a steep learning curve for doing this, but I had to figure it out when I was creating my H3B mod for TL in order to make some of the changes I made to the game. You can also use KB_DB_EDIT in combination with the AP / CW editor and then decompile simple maps you create, then make a slight change, and note the differences (use a file compare tool like WinMerge) in the two files.You can also learn the syntax used to do unit ranges / probabilities and other types of things via this type of method. With KB_DB_EDIT you can mod the entire game without the editor plus there are certain things that I never figured out (for example you'll see rndid or uid and other codes that I have no idea how to generate), but you can always perform a trial and error change and see if it works. I did this a lot with TL and discovered that some of the ID's you can ignore while others you cannot. See this post for an example of where to put the files you change: http://forum.1cpublishing.eu/showpos...1&postcount=21 Experimentation is key! By the way, I haven't modded the game in about two years and so I had to go mostly off of memory (which is quite fuzzy) and I also don't frequent the forum much any more, but if you have questions, post them here and hopefully I'll swing by to answer them in the near future. Good luck with trying to mod the game! Matt |
#2
|
|||
|
|||
Thanks for the guide.
Link of KB_DB_EDIT is dead. Please upload current version. In prologue campaign of demoness in DarkSide, last stack is positioned very badly that we can't fight it! How to correct it? Also how to load DarkSide maps in editor? I copied "darkside" folder from "sessions" folder of darkside's main directory to "sessions" folder of crossworlds's main directory, then started editor and chose "darkside", but all I got after choosing one of maps, was a crash! Last edited by jahes64; 09-29-2016 at 08:38 AM. |
#3
|
|||
|
|||
Quote:
Quote:
Here is what I have for embryo_2 (I changed to give you female vampires): Code:
{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 8 elements { {U}{rndid} = {2709136742} {A}{n} = {embryo_2} {A}{aa} = {army_vampire_woman} {U}{f} = {33} {U}{cnt} = {1} {Y}{ii0}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 5 elements { {X}{p} = {6666904200008044333388420000803F} {F}{a} = {0.72} {F}{s} = {1.00} {U}{u} = {50} {Y}{vp}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 0 elements { } } {Y}{aov}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 0 elements { } {Y}{e}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 8 elements { {W}{name} = {} {I}{jnt} = {-1} {U}{tdf} = {0} {Y}{choice}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements { {Y}{10}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 10 elements { {W}{name} = {??????} {U}{bod} = {1} {U}{hero} = {0} {U}{lead1} = {1000} {U}{lead2} = {2000} {A}{script} = {} {U}{disp} = {1} {U}{arra} = {1} {A}{beh} = {Joining} {Y}{troops}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 1 elements { {Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 8 elements { {A}{races} = {} {A}{units} = {vampire_woman} {A}{level} = {} {A}{perc} = {100} {A}{kolvo} = {2} {U}{prob} = {10} {I}{ext} = {-1} {U}{fillt} = {0} } } } } {U}{chance} = {100} {U}{uid} = {3} {U}{wuid} = {1384780455} {A}{class} = {army} } } Code:
{X}{p} = {6666904200008044333388420000803F} {F}{a} = {0.72} {F}{s} = {1.00} {U}{u} = {50} {Y}{vp}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 0 elements { } I'm guessing that these two deal with position: {F}{a} and {F}{s}? I'm not certain, but you'll have to experiment to find out. If those don't do anything, then I have no idea where they'd be - you'll have to use the editor to add a unit, save the session, copy the LOC, move the unit, save the session, and do a file compare of the old and new decompiled LOC text files. Quote:
Once you find it, then you can load LOC files from there, but the editor does crash a lot so you have to have a lot of patience with it. All be sure to read all posts in the King's Bounty Editor Forum if you haven't done so already. Good luck! Matt |
#4
|
|||
|
|||
Thanks for reuploading KB_DB_EDIT and guiding me in using it but README.TXT file that you mentioned does not exist in it! Please upload README.TXT too.
Btw I went for KBscaner for scanning saves to choose the best save before I start a new game, then I noticed that KB_DB_EDIT_0.75_eng.zip exist in my KBScaner archive! After comparing the file that I found with the one that you uploaded, I noticed that the file that I found in KBScanner archive is twice larger and its time stamp is newer than yours but its icon is of lower quality even though version number of both are the same. Still README.TXT is missing. Not sure but I think what I found is newer, so I attached it here. Quote:
At best I managed to load LOC file from Misc/view storage file... just for viewing purpose. And what is more, after loading LOC map was not loaded, I just got a list! How to load Darkside maps in it? Quote:
|
#5
|
|||
|
|||
Quote:
Quote:
Quote:
I can see I'm going to have to go find the folder for you where it stores the sessions you're working on... Matt |
#6
|
|||
|
|||
Editor Data Is Here
Okay, here is where the King's Bounty Editor game data is located if you're going to use it:
<WINDOWS DRIVE>:\Users\<USER NAME>AppData\Local\VirtualStore\Program Files (x86)\1C Company\King's Bounty. Armored Princess\sessions On my system, mine is located here: C:\Users\Matt\AppData\Local\VirtualStore\Program Files (x86)\1C Company\King's Bounty. Armored Princess\sessions So you should be able to find your King's Bounty Editor sessions under there that will include any new data you create (maps, etc.). I made a new session and called it "sunset" so there is a sunset folder under there... Good luck and keep posting questions here... Matt |
#7
|
||||
|
||||
Quote:
Quote:
Quote:
Quote:
<WINDOWS DRIVE>:\Users\<USER NAME>AppData\Local\VirtualStore\Program Files (x86)\ I made another session and saved it, but again it saved in the folder that I had given its address to the editor first time that I ran the editor. (I chose a folder outside windows drive because damned "windows" folder of win7 grows up as time passes.) That session is saved here for me (a single .strg file): D:\_games\kbaddon\sourcemedia\terrain\in_progress\ map202 Anyway, I copied m_atrixus folder from D:\GOG Games\King's Bounty - Dark Side\sessions\darkside\locations to D:\_games\kbaddon\sourcemedia\terrain\in_progress and ran the editor, this time its name was in the list for me to choose for loading it in the editor.I loaded the map, found that bad positioned stack, corrected its location and saved it. But none of those files were updated (all had same checksums), instead a new file was created with .strg extension! I put it in mods folder, ran the game and went to fight that stack but nothing was changed!!! Then I closed the game, moved that file from mods folder to m_atrixus folder beside the files that it corrects, and ran the game again, but still position of that stack was not changed. Should I put .strg files elsewhere to work??? |
#8
|
|||
|
|||
After not getting desired change, I said to my self: Updated file might be somewhere in editor's directory and so went to find it. Fortunately enough, I was right!
And found updated files here: D:\GOG Games\Kings Bounty Crossworlds GOTY\sessions\orcs\locations\m_atrixus I was surprised when I saw more than one file has been updated for a simple position change! Here is their names: m_atrixus.atoms.loc m_atrixus.embryos.loc m_atrixus.land.loc m_atrixus.lus.loc I copied those updated files to mods folder and ran the game. Fortunately now position of that stack is corrected, but some textures such as Texture of the bridge before that stack are missing. Do you know how can I fix this problem? |
#9
|
|||
|
|||
Quote:
Yes and no - you can use it to edit save game files, but there is a checksum that I don't know where it is stored and so if you edit it, recompile, and continue, when you finish the game it will label you a cheater when you get your final score. However, you can use it to create cheater save games if you want to try out stuff! Quote:
By the way, the STRG files I could never get to work properly with KB_DB_EDIT - they seemed to hang it so be wary of that if you try to mess with them. Quote:
But now that you have a new LOC file, you can do a file compare by decompiling both the old one and new one with KB_DB_EDIT (hopefully the file doesn't change massively, but if it does, just find the stack and compare the data). You should then manually be able to edit the decompiled LOC TXT file and then recompile it and you shouldn't have to worry about the texture problem. By the way, the fact that more than one LOC file is generated could mean that the position of the unit is stored in a different file - that EMBRYOS file has info on the game's "embryos", but I don't know if it stores their position. One thing you can do, though, when you find the stack in the decompiled LOC file is note the various ID's associated with it and you can search on those (typically) and find that ID in the other decompiled text file(s). Well, it sounds like you're starting to get dangerous and figuring stuff out on your own! Keep plugging away at it and you'll be a pro in no time! Then you can school us! Matt |
#10
|
||||
|
||||
Quote:
Quote:
Quote:
Quote:
After some testing I figured out that {X}{p} is dealing with position of stacks! Probably x,y and z along with their decimals make that number. So a simple replacement of that number did the job and now everything is alright. Now I am off to read modding forum and play previous installment a few times before trying to mod the game. Developer really have abandoned the game midway! Warriors of the north along with its expansion was the best in series (though companion part of it was its biggest flaw). Read my post here: http://forum.1cpublishing.eu/showthread.php?t=229563 |
|
|