Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   Mods (http://forum.fulqrumpublishing.com/forumdisplay.php?f=165)
-   -   Random Runes after a battle (http://forum.fulqrumpublishing.com/showthread.php?t=11822)

The Rider 12-15-2009 12:51 PM

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.

The Rider 12-15-2009 12:55 PM

1 Attachment(s)
here is the mod file

adecoy95 01-13-2010 03:54 PM

Quote:

Originally Posted by The Rider (Post 128619)
here is the mod file

this mod looks cool, where do i install it?

The Rider 01-14-2010 09:31 AM

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

adecoy95 01-14-2010 09:52 PM

thanks, will this work with an existing game?

SnowDream 01-15-2010 12:56 AM

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?

The Rider 01-15-2010 05:42 AM

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):)

SnowDream 01-15-2010 06:41 PM

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.

The Rider 01-16-2010 08:17 PM

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 :)

Mordris 01-17-2010 08:35 AM

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.

SnowDream 01-17-2010 04:51 PM

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.

The Rider 01-17-2010 05:52 PM

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

Mordris 01-18-2010 05:59 AM

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.

The Rider 01-18-2010 07:05 AM

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 :) )

Mordris 01-18-2010 12:19 PM

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.

The Rider 01-18-2010 04:46 PM

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:

Mordris 01-18-2010 05:49 PM

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.

adecoy95 01-18-2010 08:36 PM

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

The Rider 01-18-2010 09:11 PM

Quote:

Originally Posted by Mordris (Post 137303)
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.

Yes, it is possible to get more than one type of runes in one battle. The chances are like this: you have 300 battles on impossible level (dont know about the other difficulties, I play always on impossible), 4%*300=12*3 runes = 36 mind runes if you are warrior and around 60 magic runes (warrior again) for the whole game. I dont think it is too much (this are 4-5 more skills)

The Rider 01-18-2010 09:15 PM

Quote:

Originally Posted by adecoy95 (Post 137356)
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

dont know where the problem is, it works for me. you have to edit arena.lua in the scripts folder and it should work even if you dont have the mod file in the mods folder. are you sure you are not using other mods, that contain another arena.lua file?

cudskie 04-15-2010 09:14 PM

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

01neo01 04-27-2010 03:06 PM

Quote:

Originally Posted by The Rider (Post 136106)
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

WOW! Great mod!!
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 !!

cudskie 04-27-2010 07:37 PM

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

N3MES1S 04-28-2010 12:37 AM

Quote:

Originally Posted by cudskie (Post 156679)
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


mod_rune.kfs is compressed archive, u need to open it with winrar.

N3MES1S 04-28-2010 12:40 AM

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.

cudskie 04-28-2010 04:12 PM

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

DeRex 05-15-2010 06:57 PM

Great mod, i like it! These additional runes are so needed. :)

AncientSion 09-26-2010 10:34 AM

Thanks for this mod. I pasted the code into the arena.lua from the experience mod and it works fine. Thanks a lot.

Rhowen 09-27-2010 07:56 PM

I would like to know if the mod's author is willing to make this work with crossworlds. Thanks!

TheOne 09-28-2010 05:45 PM

Quote:

Originally Posted by Rhowen (Post 185178)
I would like to know if the mod's author is willing to make this work with crossworlds. Thanks!


Read this.


Quote:

Originally Posted by The Rider (Post 136958)
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



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.