PDA

View Full Version : Mod for randomizing creatures for hire


Metathron
12-06-2009, 07:04 PM
This is something I wished for in KB:TL, but I don't know if it's possible. Wouldn't it make the game even more random and therefore replayable to randomize the creatures in most places, so that you could have access to some other races early on without having to "kite".

Don't get me wrong, I wouldn't want this to be part of the core game, or any of the next ones, but I would love to have it as a feature that could be turned on and off at will to make the game more colourful, likely after several regular playthroughs.

rancor26
12-07-2009, 01:07 PM
I'm sure it can be done but i guess it would take some time and i don't know if there's anyone on this forum that actually knows so much about modding ^^

EDIT: I think all chances and all random things are located at embryos.txt file in ses.kfs

DGDobrev
12-07-2009, 01:25 PM
I would also enjoy something like this as well, because the game gets way too repetitive after a bunch of plythroughs and the only thing one can do is to kite some map guards and get the units he wants to start with the hard way.

rancor26
12-07-2009, 01:28 PM
I would also enjoy something like this as well, because the game gets way too repetitive after a bunch of plythroughs and the only thing one can do is to kite some map guards and get the units he wants to start with the hard way.

Well if u really want some unit u can use dev mode commands that let's you get armies, it's kinda cheating but adds some replayablity to the game

DGDobrev
12-07-2009, 01:31 PM
Well, I prefer the old-fashioned map kiting way, but I believe that it may be possible to mod the units that show up in Debir castle. I'll have to do some more searching through the game files.

rancor26
12-07-2009, 01:33 PM
Well, I prefer the old-fashioned map kiting way, but I believe that it may be possible to mod the units that show up in Debir castle. I'll have to do some more searching through the game files.

As far as i know they're all located in embryos.txt located in ses.kfs, now if someone could just make a tutorial to show what to edit in there :confused:

blacklegionary
12-10-2009, 08:15 AM
After some reading in the Russian forum i have figured how to make such mod. However some ppl may consider it as cheating because to really get rid of human/neutral troop avaiable at the start i have to increase the level of the troop avaiable. Perhap you all know most of crap units are human/neutral and we are supposed to use them at the beginning :confused:

rancor26
12-10-2009, 08:37 AM
After some reading in the Russian forum i have figured how to make such mod. However some ppl may consider it as cheating because to really get rid of human/neutral troop avaiable at the start i have to increase the level of the troop avaiable. Perhap you all know most of crap units are human/neutral and we are supposed to use them at the beginning :confused:

Well imo paladins, knights, inquisitors and archmages for example are very good units so i don't think human units are crap and if you figured out how to make the mod pm me plz :-)

zubovsergei
12-10-2009, 03:13 PM
Hey I would love a mod like this as well. I'd love to play with some orc or elf units in the beginning. It adds A LOT of replay value. I don't want to replay the game and have to start the game with the same units all the time.

Direwolf
12-10-2009, 05:30 PM
i gotta agree with all the other sentiments expressed here.

In fact...having other units available in the beginning might be really cool, because then i might use units that i otherwise never do.

You know what would be really cool...a mod that allows you to pick your race at the beginning of the game and that races units are what are populated at Debir.

DW

DGDobrev
12-10-2009, 05:35 PM
Well... I'm not certain that can be programmed. However, I think that it may be possible to have a separate mod file that can change the race of the units that can spawn in Debir. However, that will mean that in each playthrough you will be required to change it.

zubovsergei
12-10-2009, 06:21 PM
i gotta agree with all the other sentiments expressed here.

In fact...having other units available in the beginning might be really cool, because then i might use units that i otherwise never do.

You know what would be really cool...a mod that allows you to pick your race at the beginning of the game and that races units are what are populated at Debir.

DW

Yea that would be even better but probably too hard to make as a mod. Yea basically, by the time you get any elves or orcs, you have better units so you never play an elf or orc army. Lizardman, forget it. This way you could actually have some fun on replays.

blacklegionary
12-11-2009, 01:57 AM
If you guys want to edit the unit avaiable in shop you need a tool called KB database editor. It decode the game files databases, namely *. act, *. chat, *. hero, *. loc, *. lu and *. qst. To edit the shop you need to edit the file *.embryos.loc for each region, ie: debir.embryos.loc, shatterra.embryos.loc. After the file has been decoded to text file, open it and search for the phrase "{A}{class} = {castle}" and look up, it's the key word to end a shop data. I'm sure from now you will figure how to do it because it's quite simple. If you have any trouble just ask here, i may help but don't expect much because i'm also new to it :-P. I have uploaded the mod i made as an example, I also reup the tool or you can find it in this link http://translate.google.ru/translate?prev=hp&hl=ru&js=y&u=http%3A%2F%2Fkingsbounty.ru%2Fforum%2Findex.php% 3Fshowtopic%3D3669&sl=ru&tl=en&history_state0=

rancor26
12-11-2009, 10:14 AM
If you guys want to edit the unit avaiable in shop you need a tool called KB database editor. It decode the game files databases, namely *. act, *. chat, *. hero, *. loc, *. lu and *. qst. To edit the shop you need to edit the file *.embryos.loc for each region, ie: debir.embryos.loc, shatterra.embryos.loc. After the file has been decoded to text file, open it and search for the phrase "{A}{class} = {castle}" and look up, it's the key word to end a shop data. I'm sure from now you will figure how to do it because it's quite simple. If you have any trouble just ask here, i may help but don't expect much because i'm also new to it :-P. I have uploaded the mod i made as an example, I also reup the tool or you can find it in this link http://translate.google.ru/translate?prev=hp&hl=ru&js=y&u=http%3A%2F%2Fkingsbounty.ru%2Fforum%2Findex.php% 3Fshowtopic%3D3669&sl=ru&tl=en&history_state0=

Well i would like to have some explanation because when i open kb edit it shows this screen: http://i45.tinypic.com/34e54yw.jpg :confused:
EDIT: nvm i found out how to use it but i didn't quite get what to mod to change chances and all that (prob? percentage?) i'm sure someone will figure it out but just to let everyone know it'll take awhile to mod all those shops to be able to get all units randomly.

zubovsergei
12-11-2009, 03:11 PM
Well i would like to have some explanation because when i open kb edit it shows this screen: http://i45.tinypic.com/34e54yw.jpg :confused:
EDIT: nvm i found out how to use it but i didn't quite get what to mod to change chances and all that (prob? percentage?) i'm sure someone will figure it out but just to let everyone know it'll take awhile to mod all those shops to be able to get all units randomly.


I try to run the editor but it doesn't want to run for me. I don't think you need to edit everything just certain locations would be enough. I will try the editor again later on my laptop maybe I can figure some stuff out.

RYTEDR
12-11-2009, 06:25 PM
Alright, this may be an obvious question, but I've just tried this program and I have a little bit of a problem. I've changed the values to what I want, but it seems like KB doesn't register the "decoded" file I used to replace the old file. Everything simply isn't there in the game (As in, the buildings, chests, and enemies in the "embryos" file do not appear). What am I doing wrong and, if possible, how do you "undecode" it back after you're finished?

Thanks.

rancor26
12-11-2009, 06:47 PM
Alright, this may be an obvious question, but I've just tried this program and I have a little bit of a problem. I've changed the values to what I want, but it seems like KB doesn't register the "decoded" file I used to replace the old file. Everything simply isn't there in the game (As in, the buildings, chests, and enemies in the "embryos" file do not appear). What am I doing wrong and, if possible, how do you "undecode" it back after you're finished?

Thanks.

Well you don't have to replace anything just make a folder called "mods" to the data folder and put your mods there.

RYTEDR
12-11-2009, 07:57 PM
Well you don't have to replace anything just make a folder called "mods" to the data folder and put your mods there.

Thanks. I tried that instead but still nothing comes up. Everything involved in that file doesn't appear when you run it through the program.

I did a little test and made a whole new embryos file with the program without changing any values, put it in the mods folder, and started the game. Still, even without editing anything, the game won't show any of the structures/units/chests.

So it definiately needs to be "re-decoded" back to normal for it to function right. At least...I think? Am I totally off here? Any ideas? :P

blacklegionary
12-11-2009, 11:39 PM
You are right, you need to convert it back to *.loc for the game to recognize it :-). The 2nd line in the editor menu will do the job, and i don't think a new *.embryos.loc file will work, each of these file is used for certain location, ie: debir,embryos.loc is used for the upper ground area of Debir. Well as for the shop data let's have a look .
*The entire information for a shop's slot should look like this :

{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
{
{Y}{units}, 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} // 5 elements
{
{A}{races} = {}
{A}{units} = {beholder,100:5:300,beholder2,100:5:300,bear2,100: 5:300,graywolf,100:5:300}
{A}{level} = {}
{A}{kolvo} = {}
{U}{prob} = {10}
}
}
}

It means this slot can have 100-300 beholder, evil beholder (which codename is beholder2 if some1 don't know), ancient bear (codename bear2) and gray wolf. The number 5 put between them mean the number will always be able to divide for 5.If you see something like this:
{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
{
{Y}{units}, 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} // 5 elements
{
{A}{races} = {demon}
{A}{units} = {beholder,100:5:300,beholder2,100:5:300,bear2,100: 5:300,graywolf,100:5:300}
{A}{level} = {2:5}
{A}{kolvo} = {100:200}
{U}{prob} = {10}
}
}
}

It mean this slot may have 100-200 demon unit lv 2-5 as well as those troops listed before. If remove the info in the unit line then this slot can only have demon unit lv 2-5. The kolvo line is used to determine the number of troops may appear if it's not in the unit line. Now about this prob line, first let's have a look at this :
{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
{
{Y}{units}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 2 elements
{
{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 5 elements
{
{A}{races} = {undead}
{A}{units} = {thorn,1000:10:3000,thorn_warrior,1000:10:3000,kin gthorn,20:50,hyena,1000:10:3000}
{A}{level} = {1:2}
{A}{kolvo} = {200:500}
{U}{prob} = {10}
}
{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 5 elements
{
{A}{races} = {}
{A}{units} = {}
{A}{level} = {}
{A}{kolvo} = {}
{U}{prob} = {10}
}
}
}
It means this slot can have 1000-3000 thorn warrior, thorn hunter, hyena, 20-50 royal thorn OR it can be a blank slot. Let's look at another example:
{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
{
{Y}{units}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 3 elements
{
{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 5 elements
{
{A}{races} = {undead}
{A}{units} = {}
{A}{level} = {1:2}
{A}{kolvo} = {500:1000}
{U}{prob} = {10}
}
{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 5 elements
{
{A}{races} = {undead}
{A}{units} = {}
{A}{level} = {3}
{A}{kolvo} = {200:500}
{U}{prob} = {10}
}
{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 5 elements
{
{A}{races} = {undead}
{A}{units} = {}
{A}{level} = {4}
{A}{kolvo} = {10:30}
{U}{prob} = {10}
}
}
}

It means this slot can have 1000-2000 undead unit lv 1-2 or 200-500 lv 3 undead or 10-30 level 4 ones :( (this suck imo), not all of them. The prob line is used in these condition, the higher the prob value the higher the chance it will appear in a lot. If you want to add a new slot to the shop remember to check it carefully, it must end with 3 }, the embryos.loc file is often long so it's not easy to find the error and fix it. If you habe anymore questions just ask, I'll try to answer.
Note: rancor misunderstand me, I mean most of the crap units lv 1-2 are human/neutral (ie:bowman, swordsman, robber, dragon fly,hyena, spider...) not the entire human race is crap, those knight, paladin along with black knight on the other hand is too strong (although very expensive so they're worth the price) in player's hand while they can be easily isolated in the AI's command :-P.

jaylo101
12-13-2009, 03:29 AM
@blacklegionary
Your mod is exactly what i was planning to do, good job.
I have made a couple of changes in my game though. I don't know if it was a mistake but you left out the druid from the elven roster, so i added that & as it's a "use whatever race you want from the begining" mod i feel that you should be able to choose all units from that race so the 50\50 chance race units i made both 100% available.

rancor26
12-13-2009, 06:12 AM
So if i add all races to the race section does that basically mean that all units can be in that shop?

CurtisJasper
12-13-2009, 07:51 AM
Thanks blacklegionary. Is it also possible to change the quest triggers that add units to castles?

rancor26
12-13-2009, 11:30 AM
I was also wondering where's the file that contains army spawns? i would like to edit that one also ;)

EDIT: oh i see, they are in the same file :D

rancor26
12-13-2009, 12:41 PM
Alright this is really pissing me off now i edited debir.embryos file after changing it to .txt file for about one hour and then i tried to change it back to .loc file and it gave me this error: http://i47.tinypic.com/2u753t1.jpg

I have tried changing back to loc previously already and it worked without problems so why i get this error now? Someone help please i really don't want to spend another hour to edit the file again :evil:

mnorbi75
12-14-2009, 10:00 AM
guys, plz tell me how can i use this editor. i mean i just see ???????? as you write it before . You write you can use it . how possible this ? plz write (i use/installed russian language pack )

rancor26
12-14-2009, 10:07 AM
guys, plz tell me how can i use this editor. i mean i just see ???????? as you write it before . You write you can use it . how possible this ? plz write (i use/installed russian language pack )

http://i46.tinypic.com/2z6870k.jpg

EDIT: Convert to .loc can also be any other file type used on kb (like for example: .act, .lu, .chat etc.) and choose the left one of the "???" after choosing the first line of "???" (it's already chosed by default)

mnorbi75
12-15-2009, 07:55 AM
thx, itryed it , but after i modified and try to replace , just write range check error.. If i do correct , i load the upper slot to modified txt file , and after just chose savedata without extension ?

mnorbi75
12-15-2009, 09:23 AM
okey , i figured out, it is works now ! Can you plz write how can change items too ? i cant find any items on database

rancor26
12-15-2009, 10:00 AM
okey , i figured out, it is works now ! Can you plz write how can change items too ? i cant find any items on database

Items.txt located in ses.kfs, it's already in .txt format so you don't have to use kbeditor to it.

Lynxs1981
05-16-2010, 12:29 AM
Do changes made here only show up on new games? I've tried making changes but they don't show up when I'm playing.

rancor26
05-18-2010, 09:50 AM
Do changes made here only show up on new games? I've tried making changes but they don't show up when I'm playing.

Yes you need to start a new game to make them work.