Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > King's Bounty

King's Bounty Famous series of Fantasy Real-time RPG with turn-based battles.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-28-2016, 04:51 AM
MattCaspermeyer MattCaspermeyer is offline
Approved Member
 
Join Date: Aug 2010
Posts: 553
Default 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}
					}
				}
These are typically large files and so you need to search for the ATOM's of the units you want to change, for example:

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}
			}
		}
Buried in here is the number of Shamans you'll get from a stack (army_shaman) of friendly shamans that appear on the map::

Code:
							{
								{A}{races} = {}
								{A}{units} = {shaman}
								{A}{level} = {}
								{A}{perc} = {100}
								{A}{kolvo} = {1}
								{U}{prob} = {10}
								{I}{ext} = {-1}
								{U}{fillt} = {0}
							}
{A}{units} = {shaman} refers to the ATOM file for that unit and {A}{kolvo} = {1} is the number you'll get. You can make simple changes, for example: {A}{kolvo} = {2 } will give you 2 shamans. You can save the TXT file and then compile it back into a LOC file with KB_DB_EDIT. Make very simple changes like that at first and then test it.

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
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:42 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.