Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > King's Bounty > King's Bounty: Crossworlds > Mods

Mods King's Bounty: Crossworlds Mods

Reply
 
Thread Tools Display Modes
  #231  
Old 03-31-2012, 02:24 PM
MattCaspermeyer MattCaspermeyer is offline
Approved Member
 
Join Date: Aug 2010
Posts: 553
Exclamation Easy Fix

@Fatt_Shade:

As it turns out, it is implemented as Percent of Base in both TL and AP so the developers intended for it to work this way, I guess.

Nonetheless, the change is easy:
  1. Search for special_battle_mage_attack in SPECIAL_ATTACKS.LUA.
  2. Look for the lines that start with Attack.act_apply_dmg... there will be too of them within this function, one for min and one for max. Note that the line goes like this: Attack.act_apply_dmgmin_spell( "magic", 0, power, 0, duration, false ), for min damage.
  3. Change both min and max like this: Attack.act_apply_dmgmin_spell( "magic", 0, 0, power, duration, false ), note how power has essentially swapped with the 0 to the right of it in the original code. Do the same thing to max and save and close and you'll get want you want.

By the way, for most functions that work on a statistic, the order is absolute percent increase, percent of base, and then percent of current. See http://translate.googleusercontent.c...LwAowdEODmh0mw as a reference for the King's Bounty LUA Attack library.

Good luck!

/C\/C\

Quote:
Originally Posted by Fatt_Shade View Post
I noticed this problem before, but now in Red sands mod it`s even more
If you use archmage and get him to higher lvl, and some bonus dmg on stats in battle during battle trance he will get 100% dmg but only from his basic 5-8, not including bonus from lvlup. If you get some archmage_staff (or 2, i tried using 3 with warrior just to check) my archmage had 3x20% bonus dmg from staff and +18% from lvl`s so in battle dmg was 9-14. When i use battle trance he should get +100% dmg from but instead 18-28, i got 14-22, so +(5-8 ) got only his basic dmg without any item/lvlup bonuses.
On other side if you use ogre and get his attack from 47 basic, to 100 with lvlup/frenzy/items and use ogre rage, he`ll get 100% bonus attack from his current, not basic attack.
My question for you ppl is, how to make archmage get same bonus as ogre, based on his actual dmg in game, not basic from archmage.txt Same prob happens if you use some +dmg item (poison dagger/whip of ishara) archmage will get dmg from those items, but in battle trance will get bonus from his basic dmg 5-8
Try checking in scripts special_attacks.lua file and compare Battle mage, and Ogre rage part of file, to figure out how to give same bonus to archmage as ogre have.
Reply With Quote
  #232  
Old 04-02-2012, 07:57 PM
Fatt_Shade Fatt_Shade is offline
Approved Member
 
Join Date: Nov 2010
Location: Serbia
Posts: 837
Default Not so easy fix

Not working
Code:
 Attack.act_apply_dmgmin_spell( "magic",  0, 0, power, duration, false)
        Attack.act_apply_dmgmax_spell( "magic", 0, 0, power, duration, false)
        Attack.act_apply_par_spell( "defense", 0, 0, -penalty, duration, false)
I try it already when checked ogre`s rage skill. Maybe because mage`s dmg is melee physical, and magic on range , or ... i have on idea. Same problem is with -50% for his defense during battle trance, no matter how much defense unit have 24 basic and stone skin, and magic spring and all bonuses form items, when in trance he`ll lose only 12 (half of his basic) which is wrong i think. If right bonus is 100% on current dmg and crit% , then -50% of current defense should be OK.
Reply With Quote
  #233  
Old 04-03-2012, 04:19 AM
MattCaspermeyer MattCaspermeyer is offline
Approved Member
 
Join Date: Aug 2010
Posts: 553
Thumbs down Bummer :-(

Quote:
Originally Posted by Fatt_Shade View Post
Not working
Code:
 Attack.act_apply_dmgmin_spell( "magic",  0, 0, power, duration, false)
        Attack.act_apply_dmgmax_spell( "magic", 0, 0, power, duration, false)
        Attack.act_apply_par_spell( "defense", 0, 0, -penalty, duration, false)
I try it already when checked ogre`s rage skill. Maybe because mage`s dmg is melee physical, and magic on range , or ... i have on idea. Same problem is with -50% for his defense during battle trance, no matter how much defense unit have 24 basic and stone skin, and magic spring and all bonuses form items, when in trance he`ll lose only 12 (half of his basic) which is wrong i think. If right bonus is 100% on current dmg and crit% , then -50% of current defense should be OK.
Sounds like a bug, you know, I was never really sure why they didn't just use dmg:

So change dmgmin and dmgmax to just one line:

Code:
Attack.act_apply_dmg_spell( "magic",  0, 0, power, duration, false)
See what that does. If that doesn't work, there's another way to do it - look at what I did in my TL HOMM3 Babies mod in ARENA.LUA lines 549 - 574:

Code:
  for i = 1, table.getn( resistances ) do
    local min_damage_current, min_damage_base = Attack.act_get_dmg_min( target, resistances[ i ] )
    if min_damage_base > 0 then
      local max_damage_current, max_damage_base = Attack.act_get_dmg_max( target, resistances[ i ] )
      local min_damage_inc = math.max( math.floor( math.abs( min_damage_base * diff_k ) ), min_stat_inc ) * sign_diff_k
      local max_damage_inc = math.max( math.floor( math.abs( max_damage_base * diff_k ) ), min_stat_inc ) * sign_diff_k
      local new_min_damage = min_damage_current + min_damage_inc
      local new_max_damage = max_damage_current + max_damage_inc
  
      if new_min_damage < 1 then
        new_min_damage = min_damage_current
      end

      if new_max_damage < 1 then
        new_max_damage = max_damage_current
      end

      if new_min_damage ~= min_damage_current then
        Attack.act_apply_dmgmin_spell( resistances[ i ], min_damage_inc, 0, 0, -100, false )
      end
  
      if new_max_damage ~= max_damage_current then
        Attack.act_apply_dmgmax_spell( resistances[ i ], max_damage_inc, 0, 0, -100, false )
      end
    end
  end
Let me explain this code:

Code:
  for i = 1, table.getn( resistances ) do
.
.
.
  end
The for loop just loops through all the damage types (i.e. fire, magic, etc.)

Code:
.
.
.
    local min_damage_current, min_damage_base = Attack.act_get_dmg_min( target, resistances[ i ] )
    if min_damage_base > 0 then
.
.
.
    end
Next I get the current and base damages for that damage type and if the base damage is greater than 0 then I do something if not then there is nothing to do.

Code:
.
.
.
      local max_damage_current, max_damage_base = Attack.act_get_dmg_max( target, resistances[ i ] )
      local min_damage_inc = math.max( math.floor( math.abs( min_damage_base * diff_k ) ), min_stat_inc ) * sign_diff_k
      local max_damage_inc = math.max( math.floor( math.abs( max_damage_base * diff_k ) ), min_stat_inc ) * sign_diff_k
      local new_min_damage = min_damage_current + min_damage_inc
      local new_max_damage = max_damage_current + max_damage_inc
.
.
.
If min_damage_base is > 0 then I go and do some more stuff: 1) I get the max damage current and base to go along with the mins I got earlier and 2) I compute the min and max damage increase based off the difficulty level and pick the max between the min stat increase and the computed increase. The sign_diff_k is used for decreasing stats if you play Easy level. I then compute the new min and max damage.

Code:
.
.
.
      if new_min_damage < 1 then
        new_min_damage = min_damage_current
      end

      if new_max_damage < 1 then
        new_max_damage = max_damage_current
      end
.
.
.
These next two checks are just making sure if the damage is reduced that it doesn't go below 1. I guess I should set those damages to 1 instead of current so that they are at least reduced instead of staying the same.

Code:
.
.
.
      if new_min_damage ~= min_damage_current then
        Attack.act_apply_dmgmin_spell( resistances[ i ], min_damage_inc, 0, 0, -100, false )
      end
  
      if new_max_damage ~= max_damage_current then
        Attack.act_apply_dmgmax_spell( resistances[ i ], max_damage_inc, 0, 0, -100, false )
      end
.
.
.
Lastly, If there is an actual change in the damage, then I go do something, note how I just change the absolute value of the damage. I checked the Ogre's Rage ability and that's how they did their attack. You know, I'm trying to think if I had problems like you're having and then implemented it this way instead. There certainly is a lot of trial and error when making changes like this. You probably don't need to be so thorough for the Archmage, just look in his ATOM and confirm his damage types and work with them directly, no need to cycle through like I did (but this was for all units so that's why I did it the way I did it).

Good luck!

/C\/C\

Last edited by MattCaspermeyer; 04-03-2012 at 05:48 AM.
Reply With Quote
  #234  
Old 04-07-2012, 09:27 PM
fillyra fillyra is offline
Approved Member
 
Join Date: Dec 2010
Posts: 49
Default

Oops, I thought I posted this but I hadn't.

I'm going to be moving homes in several weeks and I haven't had time to work on the translation.

I'll be able to continue the translation in around late next month and hopefully have something out by then, but I haven't gotten anything done during March and can't this month because of moving and work so not much progress.
Reply With Quote
  #235  
Old 04-14-2012, 09:01 AM
alsakari alsakari is offline
Approved Member
 
Join Date: Jun 2009
Posts: 22
Default

Hi everyone.I'm new here,and I just installed red sands 1.6 full.exe file,without installing anything else.I'm only at the first island,and everything is in english so far.Does this file include the translation,or do I have to install anything else?
Great work to everyone who translated this great mod from russian,especially fillyra
Reply With Quote
  #236  
Old 04-20-2012, 10:14 AM
maoshuai01 maoshuai01 is offline
Registered Member
 
Join Date: Apr 2012
Posts: 1
Default

I just wanna say a word.
Reply With Quote
  #237  
Old 04-24-2012, 08:34 AM
zini4_tha_grunt zini4_tha_grunt is offline
Approved Member
 
Join Date: Dec 2009
Posts: 83
Default

Hie, every1!

New patch is on the way, it's gona be awesome, but...
I need an artist to draw few icons and make simple retexture for few units ^_^

If interested - drop by.
Reply With Quote
  #238  
Old 04-24-2012, 03:20 PM
Krzysiek Krzysiek is offline
Approved Member
 
Join Date: Sep 2011
Posts: 24
Default

Quote:
Originally Posted by zini4_tha_grunt View Post
Hie, every1!

New patch is on the way, it's gona be awesome, but...
I need an artist to draw few icons and make simple retexture for few units ^_^

If interested - drop by.
Hello!
From this place I want to thank with all which they worked near creating "red sands".
I finished translating on Polish some 2 weeks ago and as yet testing and doing correction in my translating. Critical error as yet it hasn't.
I found the only small the mistakes graphic (for example the ice thorn - Ледяная Терния) and this, that after choice of new skill the Asmadeo when we choose the option "finish the conversation" conversation is not finish.
I thank once again and I wish persistence near creating new patch.
I enjoy that Russian forum already up.

I have a problem. Dragon's skill from file "rus_!!!exp_pet_hint":
spmi_thr_ball_txt=^int_pet_tH0^Дракончик демонстрирует чудеса магии, призывая шаровую молнию на поле боя. Молния преследует и атакует врагов, нанося урон магией, равный [damage2] общего здоровья отряда. Есть шанс [shoсk] шокировать цель. Зарядов: [charges].[rest][rage]<gen=gen_pet_exp_hint>
In game don't display chance to shock probability, number of charges and turn rest. Only damage is correctly show. How it fix?

When I remove "Есть шанс [shoсk] шокировать цель." with file remaining parameters be displayed correctly. Problem is with parameter [shock].

Last edited by Krzysiek; 04-28-2012 at 01:01 PM.
Reply With Quote
  #239  
Old 05-06-2012, 09:30 PM
Krzysiek Krzysiek is offline
Approved Member
 
Join Date: Sep 2011
Posts: 24
Default

Hi everybody.
I would like to add to Red Sands creatures from legendary warriors mod. I translated files from localization folder on Polish language and I canceled unwanted changes from the version RSE.
I don't know how to add new creatures to shops and to army for defeating. I know that files responsible for it are in the folder locs, but I don't know how to change them.Whether it is possible to do it with the help notepad? What are numbers responsible by creatures in these files for?

Other question: are there appearing in the English version Crossworlds errors with showing statistics of the pet dragon's ability "lightning_ball "?

How to change the maximum level reached by the pet dragon (> 60) so he can to a maximum develop all his abilities? Is it any mod or does somebody know how to change it?

From above I am thanking for help
Reply With Quote
  #240  
Old 05-06-2012, 11:15 PM
Fatt_Shade Fatt_Shade is offline
Approved Member
 
Join Date: Nov 2010
Location: Serbia
Posts: 837
Default

@Krzysiek
1) first for adding new creatures in mod i cant help you because i tried to add champion from `adventure mod` but failed since you need to copy unit files 4-5 of them, but also need to edit some other files and add text strings so new game include those units in it.
2) lightning ball works from early lvls with no problem, when you get that skill there are no errors in it`s text description. But after lvling it to some point it just start showing skill text without numeric value for dmg/shock/rest/rage but exp gain from skill is correct all time. So it`s bug , but i have idea how to fix it. Open winrar folder game\sessions\addon\loc_ses.kfs find eng_pet.lng file and set
Code:
// ball
lvu_ball_name=^pet_tM^[ball]
lvu_ball_level1_info=^int_pet_levelup_t^[new]Dragon calls lightning, attacking the enemy! <br>[d][kill] [s][dmgMMinNew]-[dmgMMaxNew]% [/s][troop] [shock] [s][shockNew]%[/s].
lvu_ball_attack1_info=^int_pet_levelup_t^[attackCap][kill] [dmgMMinNew]-[dmgMMaxNew]%. [shock] [shockNew]%. [rage] [rageNew]^[kill] [dmgMMinOld]-[dmgMMaxOld]%. [shock] [shockOld]%. [rage] [rageOld].
lvu_ball_attack2_info=^int_pet_levelup_t^[attackCap][kill] [dmgMMinNew]-[dmgMMaxNew]%. [shock] [shockNew]%. [rage] [rageNew]^[addrest]^[kill] [dmgMMinOld]-[dmgMMaxOld]%. [shock] [shockOld]%. [rage] [rageOld].
lvu_ball_attack3_info=^int_pet_levelup_t^[attackCap][kill] [dmgMMinNew]-[dmgMMaxNew]%. [shock] [shockNew]%. [rage] [rageNew]^[kill] [dmgMMinOld]-[dmgMMaxOld]%. [shock] [shockOld]%. [rage] [rageOld].
lvu_ball_attack4_info=^int_pet_levelup_t^[attackCap][kill] [dmgMMinNew]-[dmgMMaxNew]%. [shock] [shockNew]%. [rage] [rageNew]^[addrest]^[kill] [dmgMMinOld]-[dmgMMaxOld]%. [shock] [shockOld]%. [rage] [rageOld].
lvu_ball_paralyse1_info=^int_pet_levelup_t^[shockCap][kill] [dmgMMinNew]-[dmgMMaxNew]%. [shock] [shockNew]%. [rage] [rageNew]^[kill] [dmgMMinOld]-[dmgMMaxOld]%. [shock] [shockOld]%. [rage] [rageOld].
lvu_ball_paralyse2_info=^int_pet_levelup_t^[shockCap][kill] [dmgMMinNew]-[dmgMMaxNew]%. [shock] [shockNew]%. [rage] [rageNew]^[addrest]^[kill] [dmgMMinOld]-[dmgMMaxOld]%. [shock] [shockOld]%. [rage] [rageOld].
lvu_ball_paralyse3_info=^int_pet_levelup_t^[shockCap][kill] [dmgMMinNew]-[dmgMMaxNew]%. [shock] [shockNew]%. [rage] [rageNew]^[kill] [dmgMMinOld]-[dmgMMaxOld]%. [shock] [shockOld]%. [rage] [rageOld]. 
lvu_ball_paralyse4_info=^int_pet_levelup_t^[shockCap][kill] [dmgMMinNew]-[dmgMMaxNew]%. [shock] [shockNew]%. [rage] [rageNew]^[addrest]^[kill] [dmgMMinOld]-[dmgMMaxOld]%. [shock] [shockOld]%. [rage] [rageOld].
So you need to add 1 more attack string, and 1 more paralyse string so lightning ball can take values from those lvl`s. I think this should work. You need to set number ofo lvl`s for each ksill with it`s part in this file. Expl : you cant take more then 5 lvl`s for treasure digging skill, since it`s not explained what would those lvl do in this file.
3) for adding more lvl`s for pet you need couple things - find arena.txt file in config folder of red sands mod and in string :
Code:
exptable=30,60,100,160,230,310,410,530,660,810,980,1170,1380,1610,1860,2140,2440,2770,3120,3500,3910,4350,4820,5320,5850,6410,7010,7640,8310,9010,9750,10530,11350,12200,13100,14040,15020,16040,17110,18220,19380,20580,21830,23130,24480,25880,27330,28840,30400,32010,34070,37000,40000,43000,47000,52000,57000,63000,70000
Add more values for lvl`s above 60, for example add 79000,90000,103000, 118000,135000 . . . and so on. Consider that if you play on hard/impossible values for lvlup pet is 15/30% higher then on normal so for my example 135000 exp(65lvl), you`ll need 185000 exp for 65th lvl on impossible difficulty. Also find adventure mod http://forum.1cpublishing.eu/showthr...=22725&page=11 , and check pet.atom file in it to see how to add more lvl`s for every pet skill. So for lvlup exp values add more numbers in arena.txt, and for skill lvlup find pet.atom file in adventure mod.
Good luck

Last edited by Fatt_Shade; 05-06-2012 at 11:26 PM.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:40 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.