PDA

View Full Version : MOD for How many creatures will die ?


The Shadow of Death
07-23-2009, 12:41 PM
Hi :)
I was asking myself if we could add an information in the battles, when we want to attack a unit. You all know that when you damage an enemy unit during a battle, damages points are displayed. But could we also display how many creatures will die ?
Do you know which file I should edit (LUA ? txt ?) ?
Thanks from advance !

Keneth
07-23-2009, 03:48 PM
You mean like this? :roll:

http://img187.imageshack.us/img187/7783/wuty.th.jpg (http://img187.imageshack.us/i/wuty.jpg/)

The Shadow of Death
07-23-2009, 03:53 PM
Hum not really :s I was thinking at the number that run to the top of the screen after having attacked a unit. The moving number that have a red star-background when the strike is critical.
I watch everywhere in the KFS but I've never found where it was configured.

Keneth
07-23-2009, 05:10 PM
Oh, you wanna change the floating text. Why on earth would you want to do that when you have all the info in the popup and combat log? :?:

I don't know, go check arena.lua or maybe combat_log.lua but to be honest, I've never noticed that particular part of the script.

The Shadow of Death
07-24-2009, 02:05 PM
I'm really beginning in MODding King's Bounty. I have already made MODs and maps in LUA with Heroes of Might and Magic V, but I don't know the functions and methods called by the game. Like :
Attack.atom_spawn(0, 1, "effect_rampage")
What does the "atom_spawn(0, 1, "effect_rampage")" method do ? And the "Attack" class, is it a class regrouping all informations and methods of the attacker unit ?
According to you, what type of method should be called in the LUA files to display this floatting text ? I found a txt file where they fix the floating texts font, color etc. But nowhere I can find the method that call it... It should be like this, no ? Am I wrong ?
Game.ShowFlyer(damage)
(where "damage" is a string argument that could be changed to "killed", local variable having as value the number of killed creatures).

Any idea ?? :confused:

Keneth
07-24-2009, 06:27 PM
atom_spawn() function does what it says, it spawns an atom (in your case effect_rampage.atom, first two numbers are target and delay), these are usually animations, effects, or creatures. Unfortunately there is no comprehensive reference (not in english anyway) for the functions, so the best you can do is learn by example.

If I were to guess, I'd suggest that you try Attack.arena_text(string). It's as good a place as any to start. Here (http://kingsbounty.ru/forum/index.php?showtopic=1338) is a reasonably well detailed reference of the functions in russian if you're feeling brave enough to read it. Other than that, you'll just have to scour the LUA files.

The Shadow of Death
07-25-2009, 09:26 AM
Attack.arena_text(string) is the method used by the game to display the current round (On the top of the screen, the label "Round X" that fade in then fade out). I don't think it is the right one.
I found an interessant link thanks to yours :
http://kingsbounty.ru/docs/scripting
Yes its in russian, but with google translator, it is useful for modders. But it is not complete (i didn't find Attack.arena_text(string) method for example).

According to you, if I wanted to display an additional label with Attack.arena_text(string), where and in which file should I place this method ? At the end of the file ?

Keneth
07-25-2009, 11:31 AM
I'm not sure that arena_text() can display labels and you place the function where you want it to display, I don't really see what you're asking of me. If you want the function to display right after round counter, just place it after round counter. In any case, I don't have the game, so I can't help you with specific questions.

The Shadow of Death
07-25-2009, 02:58 PM
OK thanks :)
I'll try and I tell you if I can make it.

introitus
04-30-2011, 11:12 AM
You mean like this? :roll:

http://img187.imageshack.us/img187/7783/wuty.th.jpg (http://img187.imageshack.us/i/wuty.jpg/)
Sorry for bringing old post back, but I would like to have mod like that in your picture, mod that will show how many creatures will die.
Please point me to right direction.
Thank you in advance.

Vulture
05-01-2011, 04:40 PM
Use the current patch. KB:TL has been showing # of kills since forever.