![]() |
Random Runes after a battle
I created a mod that gives random runes after battles, it works perfectly with one exception if you get more than one kind runes after a battle, in the combat window the runes are shown but they overlap with the gold and the gold value that is shown is changed (i.e. instead of 200 gold it says 250, 000 gold, but you take 200 gold at the end, just the info shown is wrong, not the real value). the mod doesnt work with the KBmasterMod.
When you get a potion, it is not shown in the combat window, so check your inventory from time to time. |
1 Attachment(s)
here is the mod file
|
Quote:
|
Unzip the file, create a folder /mods in the /data folder and than put the mod_bonus_rune.kfs in the /data/mods folder. than run the game. it will give you:
for warrior -3% chance for 2 might runes -3% chance for 3 mind runes -5% chance for 4 magic runes -10%*rage skill level for 2 rage potions or 2 mana potions for paladin -4% chance for 3 might runes -3% chance for 3 mind runes -4% chance for 3 magic runes -10%*holy rage skill level for 2 rage potions or 2 mana potions for mage -5% chance for 4 might runes -3% chance for 3 mind runes -3% chance for 2 magic rune -10%*alchemist skill level for 2 rage potions or 2 mana potions |
thanks, will this work with an existing game?
|
Just out of curiosity, why game.random (1,1) for the runes? Why not game.random (1,100) since that would give 3% if the number is less than 3?
|
It is game random (1,100). Download again the file, I changed it (it was 1,1 at the beggining just to show how the mod works):)
|
Thanks. The mod is wonderful, however, occasionally I encountered situations where a fight is fought twice. For instance, when I fought a bear in Bola, I won, then the fight restarted with the rage and mana I accumulated from the bear fight. I am still fighting the same number of bears...
Is this an isolated error? I only encountered it once. |
I played the game three times (with the mod from the begining) and never encountered this one. But what the heck, more battles, more fun :)
|
I installed the mod as you said, but I've been in like 10 battles and so far I've seen no runes. I also use the giftbag mod, so maybe it doesn't work because of that?
I'd really like some extra runes, so I hope there is a way to fix this. |
Well, it is a 3 to 4% chance... To see whether it works or not, open the mod file with winrar, open the one file with notepad, then search for rune.add. Look for the part that says game.rand (1,100)<=3, change that to <=100. You will get rune 100% of time.
I personally prefer to set the percentages to a little higher during normal play, to 30% or so, but that is primarily because the game is giving me all lv 1 units in shops. |
it doesnt work with KBMasterMod, because there is another arena.lua file in that mod. I am not sure if I can do this, because the KBMasterMod is made by another, but if you want to make it work do this:
1. Open KBMaster_2.2.2 file with winzip/winrar (in your data/mods directory) 2. in prescript 2.2 directory in the .kfs file open arena.lua (open it with notepad) 3. ctrl+g (or the command go) go to line 345 4. after function calc_bonus( fake_win ) --ftag:bonus insert this local hero_class=Game.HSP_class() if hero_class == 0 then if (Game.Random(1,100) <= 3) then Bonus.add("rune_might",2) end if (Game.Random(1,100) <= 3) then Bonus.add("rune_mind",3) end if (Game.Random(1,100) <= 5) then Bonus.add("rune_magic",4) end if (Game.Random(1,100) <= tonumber(Logic.hero_lu_skill("rage_control"))*10) then if (Game.Random(1,100)<=50) then Logic.hero_add_item("mana_potion",2) else Logic.hero_add_item("rage_potion",2) end end elseif hero_class==2 then if (Game.Random(1,100) <= 5) then Bonus.add("rune_might",4) end if (Game.Random(1,100) <= 3) then Bonus.add("rune_mind",3) end if (Game.Random(1,100) <= 3) then Bonus.add("rune_magic",2) end if (Game.Random(1,100) <= tonumber(Logic.hero_lu_skill("alchemist"))*10) then if (Game.Random(1,100)<=50) then Logic.hero_add_item("mana_potion",2) else Logic.hero_add_item("rage_potion",2) end end elseif hero_class== 1 then if (Game.Random(1,100) <= 4) then Bonus.add("rune_might",3) end if (Game.Random(1,100) <= 3) then Bonus.add("rune_mind",3) end if (Game.Random(1,100) <= 4) then Bonus.add("rune_magic",3) end if (Game.Random(1,100) <= tonumber(Logic.hero_lu_skill("holy_rage"))*10) then if (Game.Random(1,100)<=50) then Logic.hero_add_item("mana_potion",2) else Logic.hero_add_item("rage_potion",2) end end end 5. save file and enjoy |
Thanks for your help guys, but I still have something to ask.
As I stated earlier, I use the giftbag mod/addon, and the arena.lua file is located in king's bounty folder---->sessions---->items_pack---->new_items--->scripts--->arena Does is still interfere with the bonus rune mod? If so, I will do what you said, The Rider. |
Can you post a link to download this mod? I have to check it. (Dont worry about the language of the link, I speak plenty of languages :) )
|
Yea sure, it took me a couple of minutes to find the link, but here it is
http://forum.1cpublishing.eu/showthread.php?t=12174 It doesn't say what item/sets have been added, but I guess you will discover them yourself. I found a pair of gloves in Debir, at the two houses that sell priests near the mage tower that add a stat ( can't remember which one) and 10 rage when you use a teleportation or a <I can't remember> spell. Keep in mind that you have to start a new game to have a chance at discovering the new stuff. |
It looks amusing :) I checked it, follow the instructions I posted, go to line 345 and insert the code in the new arena file (in the mod) and it will work :grin:
|
I did that thing and, ironically, after my first battle I got two might runes, which were overlapping with the gold amount :P. So, 3% chance for each rune to pop up, or 3% chance for a type of rune?
I like the mod because of the extra runes, but I don't want this to make the game too easy, you know. |
i cant get this mod to work with the bonus pack, when i copy the text into the arena.lua in the item pack/new items/scripts folder, do i still need to have the original file in the mods folder? i did not have it in there.
also, i set the chance to 100% using the instructions above, and i could not get a single rune on a new game, an old game or anything EDIT: DERP DE DERP function calc_bonus( fake_win ) and function calc_bonus simple( fake_win ) are two different things! my mistake |
Quote:
|
Quote:
|
Sir i tried to open the .kfs file inside the zipped file with a notepad but it's written in a different language so i can't change the chance from 3% to 100%. I just wanted to try if the mod works
|
Quote:
But I have played some combats and no runes appear :( I'm on level 5, and i have only found 1 rune in the map, and received 3 magic runes in one casttle. ¡¡I can't evolve on habilities !! How can we change the percentajes? Somebody said that he usually uses the 30% of chance to get runes. he said that: Open the mod file with winrar, open the one file with notepad, then search for rune.add. Look for the part that says game.rand (1,100)<=3, change that to <=100. You will get rune 100% of time. And the other percentajes? I mean the 4% chance for 3 might runes, 3% chance for 3 mind runes, 4% chance for 3 magic runes and the 10% *holy rage skill level for 2 rage potions or 2 mana potions with the paladin. How can we change them? ¡¡ THANKS !! |
Can anyone help me? I tried to open the mod_rune.kfs into a notepad but i can't understand the language and i can't seem to find game_rand that you're saying in the previous posts
|
Quote:
mod_rune.kfs is compressed archive, u need to open it with winrar. |
I think people doesnt even read the posts... people, u dont even need to use the mod itself, just use the instructions The Rider wrote few posts ago, modifying the file Arena.lua
in the right code line. |
Oh sorry about that, i just got confused. Now i got it. I changed mod_bonus_rune.kfs into mod_bonus_rune.rar then i extracted it's contents then opening it at notepad.
Thanks for the help |
Great mod, i like it! These additional runes are so needed. :)
|
Thanks for this mod. I pasted the code into the arena.lua from the experience mod and it works fine. Thanks a lot.
|
I would like to know if the mod's author is willing to make this work with crossworlds. Thanks!
|
Quote:
Read this. Quote:
|
All times are GMT. The time now is 11:32 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.