PDA

View Full Version : How to make mods and extensions.


Browser
12-06-2008, 08:54 PM
I'm sure there's quite a few people who would like to make mods for King's Bounty, whether it's just for themselves or to share, I know I would and have some spare time for it lately. Though there doesn't seem to be anything included to make them but obviously there are ways since there are a (very) few mods.

Perhaps those that have made some mods could detail how they did it and what they used, more people making mods for the game can only be a good thing after all (if you don't like a certain mod ignore it).

Or even better, maybe the developers/publishers could release something to aid in making mods or at least some documentation.

The community making mods really adds to a games value and lifespan, a perfect example is Neverwinter Nights 1, it wouldn't have been nearly as popular if it wasn't for the people making mods and extensions.

Keneth
12-06-2008, 11:22 PM
NwN1 (and 2) was made with modding as one of its prime features and included both a toolset as well as detailed instructions and file definitions. That said, you obviously can't expect that kind of support for games that only offer modding as a viable option for those who like to fiddle around with game files. If someone decides to write a guide that's fine and all but it seems like a large waste of time since most of the things are easy enough to understand if you just take the time.

Here are some facts:
Most of the files are archives (opened with an archiver like WinRAR), text files (opened with any text editor), or image files (Photoshop or similar software should be able to open most of them).
Script files are written in Lua, a simple programming language that is compiled by the game when run
Developers are a Russian group, so while they do offer help with modding, it's mostly limited to people who speak Russian
There are already plenty of mods floating around and the best way to learn is by example, mod files are just unprotected archives
If you don't get something, you can always talk to a modder that does, most of us don't bite

Lestas
12-08-2008, 08:05 AM
Here are some facts:
Most of the files are archives (opened with an archiver like WinRAR), text files (opened with any text editor), or image files (Photoshop or similar software should be able to open most of them).
Script files are written in Lua, a simple programming language that is compiled by the game when run
Developers are a Russian group, so while they do offer help with modding, it's mostly limited to people who speak Russian
There are already plenty of mods floating around and the best way to learn is by example, mod files are just unprotected archives
If you don't get something, you can always talk to a modder that does, most of us don't bite



There are some files and their parts (.chat files and loooong numeric strings in files) which are compiled texts. If u need a decompiler for them..we can provide it :)
yup ^_^
I speak russian so u can ask me any question U want to ask developers.
I'll translate some more of our mods to english...sou U'll have more examples.
I have huge teeth ^,..,^ but I don't bite

Gatts
12-09-2008, 11:46 AM
1.) I have no clue how to create *.KFS files - so I leached one - I am not an author, so the credits goes to creator of "mod_164_camera.kfs" by spamm MOD's (I have just renamed the mod, removed the camera.txt)

2.) I had no clue about advanced modding - so I just copied "wifes.txt" file (which was found by [B]Keneth - thanx)

3.) I "notepad" edited the wifes.txt - found Rina / Zombie part - and added ",weapon" in slot 9 and 11 and ",regalia" to slot 10 - so now Rina has the same artefact options, but can ALSO have 2 weapons and one regalia items instead armor, belt and boots...(your choice)

4.) this looks quite non-balanced :) - but now you know how do it - so you can change it yourself...

5.) it should not intervere with Mirabella MOD, but it may strongly interfare with the "Next Generation" MOD - so I believe (did not test it)

I hope this can help other players to create it's own MODs as well it may show my gratitude to MODders whose work I used for my MOD, THANX!

Also Thanx to Lestas, whos great AoD MOD motivated me to pursue MODdin in KB

NOTE: .kfs Files will cause "Invalid File" when you try upload them... zip or rar it prior uploading it on this forum:)
Note 2: It works only on ZOMBIE RINA - not on human Rina :)
Note 3: It works on existing save games - but this is not thanx to me, but thanx to game devs - GREAT JOB!
Note 4: the usage of this "fan mod" is on your own risk - even if I totally believe nothing can get damaged, if it does - I told you that it was used on your own risk

Lestas
12-09-2008, 12:15 PM
Creating .kfs files:
Step 1. Pack your files with any archiver to .zip format.
Step 2. Rename your .zip archive to .kfs
Step 3. Enjoy your mod.

Keneth
12-09-2008, 12:28 PM
TNG is not compatible with any other mod that changes wifes.txt, I don't think it can be made compatible with KBMaster either since afaik you can only add new lines to txt files with that, replacing existing ones is limited to script files.

So yeah, if you want to combine the mods you will have to edit the wifes.txt from TNG instead of the original and repackage it.

bman654
12-11-2008, 04:52 PM
I didn't make the camera mod. I made the battle camera mod :)

Csimbi
12-28-2008, 10:26 PM
Creating .kfs files:
Step 1. Pack your files with any archiver to .zip format.
Step 2. Rename your .zip archive to .kfs
Step 3. Enjoy your mod.
That's over-simplification. There is more to it than meets the eye...
KFS files are ordinary ZIP files - just with a different file extension.
So, create a ZIP file (using any application capable to do so).
When done, change the file extension to KFS.
Also, make sure that file name begins with "mod_" (without the quotes) - otherwise the game will not recognize it.
When done, put your KFS file anywhere in the game directory; \sessions\base\, \data\, etc. The game will scan the subdirectories for KFS files, so it will find them no matter where you put them. However, I recommend creating a directory just for the mods though (so you won't have trouble with find them later) - say \data\mods\ - you will see that several mods recommend putting the files there.


There are some files and their parts (.chat files and loooong numeric strings in files) which are compiled texts. If u need a decompiler for them..we can provide it :)


Compiler/decompiler would be nice for the .act, .chat, .hero, .loc, .lu, .qst files.
Are these tools available somewhere?
Thank you!

Keneth
12-29-2008, 12:43 AM
Actually that's an overcomplication on your part, mods folder is the default folder for mod files and there's no need for a "mod_" prefix. The game will look for files elsewhere but I don't really see what's the point, everyone should follow suit to make things easier for themselves and the modding community as a whole. :-P

Both Lestas and I have the [de]compiler, you can get it if you really want to, and you know how to edit and write code. It's in Russian but there's only a handful of options anyway and they are more or less self-explanatory.

Csimbi
12-29-2008, 05:55 PM
Keneth,
I called my KFS file CSIMBI.KFS. It did not work, no matter where I put it.
Then, I noticed that the file off all mod files that you can download from this very forums are starting with MOD_ - so I thought I would give it a go and I name my file MOD_CSIMBI.KFS. It began working right away - no matter where I put the file.
That's why I posted the message above. Anyway, I learnt a lesson here - others might find it useful as well.

Yes, I would like to get those tools. How can I get them? Should I PM my email addy to either one of you?

One more question.
I looked into the text files, some of them contain HEX-coded pieces. Here is an example of what I mean from the wives.txt:

onuse=100000001000000020000000C000000424547494E5F4 449414C4F470200000005000000030000000100000075239C9 877010000007306000000736E61705F30

Do you have a tool to (de)compile these as well (additionally to the act, .chat, .hero, .loc, .lu, .qst files)?
Thank you.

Keneth
12-29-2008, 06:51 PM
Using kfs archives that don't start with mod_ works fine for me, don't know what the problem on your box is. And yes, the tool can also decompile the blocks of hexcode, or at least most of them anyway, I can email it to you if you wish.

Csimbi
12-29-2008, 09:05 PM
Hmmm. I tried again, and you're right: it does work without that tag in the file name. I am not sure why it was not working in the first place.

Anyway, please mail me those tools. Thank you. Sent my email address in a PM.

Csimbi
01-05-2009, 01:22 PM
Hi there,
thanks for the link.
I thought this tool was something "special" - it's the KB DataBase Editor from the Russian forums: http://kingsbounty.ru/forum/index.php?showtopic=2732

The latest version is always here:
http://alexander.sannybuilder.com/Files/KINGS_BOUNTY/KB_DB_EDIT.rar

Anyway, is there some info/FAQ/documentation somewhere about the meaning of the fields in .act and .chat files?
I mean these: {A}{st}, {U}{p}, {U}{f}, {X}{p}, etc?
I could not figure out how exactly a dialog is composed. Sure, I can make minor changes to existing ones, but I would like to create my own.

I tried searching even the Russian forum (using Google translate), but I did not get anywhere.
Could someone shed light on these mysterious entries, please?
Thank you.