GiftBox
-
Posts
9 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by GiftBox
-
-
Btw I found this, do you understand these? I was thinking to edit this but idk im afraid it will make the system error.
Like for example copy all the Renewal scripts to the pre-renewal scripts....?Quote/*====================================
* Calc defense damage reduction
*------------------------------------
* Credits:
* Original coder Skotlex
* Initial refactoring by Baalberith
* Refined and optimized by helvetica
*/
static void battle_calc_defense_reduction(struct Damage* wd, struct block_list *src,struct block_list *target, uint16 skill_id, uint16 skill_lv)
{
struct map_session_data *sd = BL_CAST(BL_PC, src);
struct map_session_data *tsd = BL_CAST(BL_PC, target);
struct status_change *sc = status_get_sc(src);
struct status_change *tsc = status_get_sc(target);
struct status_data *sstatus = status_get_status_data(src);
struct status_data *tstatus = status_get_status_data(target);//Defense reduction
short vit_def;
defType def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
short def2 = tstatus->def2;if (sd) {
int i = sd->indexed_bonus.ignore_def_by_race[tstatus->race] + sd->indexed_bonus.ignore_def_by_race[RC_ALL];
i += sd->indexed_bonus.ignore_def_by_class[tstatus->class_] + sd->indexed_bonus.ignore_def_by_class[CLASS_ALL];
if (i) {
i = min(i,100); //cap it to 100 for 0 def min
def1 -= def1 * i / 100;
def2 -= def2 * i / 100;
}//Kagerou/Oboro Earth Charm effect +10% eDEF
if(sd->spiritcharm_type == CHARM_TYPE_LAND && sd->spiritcharm > 0) {
short si = 10 * sd->spiritcharm;
def1 = (def1 * (100 + si)) / 100;
}
}if (sc && sc->data[SC_EXPIATIO]) {
short i = 5 * sc->data[SC_EXPIATIO]->val1; // 5% per leveli = min(i,100); //cap it to 100 for 0 def min
def1 = (def1*(100-i))/100;
def2 = (def2*(100-i))/100;
}if (tsc) {
if (tsc->data[SC_FORCEOFVANGUARD]) {
short i = 2 * tsc->data[SC_FORCEOFVANGUARD]->val1;def1 = (def1 * (100 + i)) / 100;
}if( tsc->data[SC_CAMOUFLAGE] ){
short i = 5 * tsc->data[SC_CAMOUFLAGE]->val3; //5% per secondi = min(i,100); //cap it to 100 for 0 def min
def1 = (def1*(100-i))/100;
def2 = (def2*(100-i))/100;
}if (tsc->data[SC_GT_REVITALIZE])
def1 += tsc->data[SC_GT_REVITALIZE]->val4;if (tsc->data[SC_OVERED_BOOST] && target->type == BL_PC)
def1 = (def1 * tsc->data[SC_OVERED_BOOST]->val4) / 100;
}if( battle_config.vit_penalty_type && battle_config.vit_penalty_target&target->type ) {
unsigned char target_count; //256 max targets should be a sane max//Official servers limit the count to 22 targets
target_count = min(unit_counttargeted(target), (100 / battle_config.vit_penalty_num) + (battle_config.vit_penalty_count - 1));
if(target_count >= battle_config.vit_penalty_count) {
if(battle_config.vit_penalty_type == 1) {
if( !tsc || !tsc->data[SC_STEELBODY] )
def1 = (def1 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100;
def2 = (def2 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100;
} else { //Assume type 2
if( !tsc || !tsc->data[SC_STEELBODY] )
def1 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num;
def2 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num;
}
}
if (skill_id == AM_ACIDTERROR)
#ifdef RENEWAL
def2 = 0; //Ignore only status defense. [FatalEror]
#else
def1 = 0; //Ignores only armor defense. [Skotlex]
#endif
if(def2 < 1)
def2 = 1;
}//Vitality reduction from rodatazone: http://rodatazone.simgaming.net/mechanics/substats.php#def
if (tsd) { //Sd vit-eq
int skill;
#ifndef RENEWAL
//[VIT*0.5] + rnd([VIT*0.3], max([VIT*0.3],[VIT^2/150]-1))
vit_def = def2*(def2-15)/150;
vit_def = def2/2 + (vit_def>0?rnd()%vit_def:0);
#else
vit_def = def2;
#endif
if( src->type == BL_MOB && (battle_check_undead(sstatus->race,sstatus->def_ele) || sstatus->race==RC_DEMON) && //This bonus already doesn't work vs players
(skill=pc_checkskill(tsd,AL_DP)) > 0 )
vit_def += skill*(int)(3 +(tsd->status.base_level+1)*0.04); // submitted by orn
if( src->type == BL_MOB && (skill=pc_checkskill(tsd,RA_RANGERMAIN))>0 &&
(sstatus->race == RC_BRUTE || sstatus->race == RC_PLAYER_DORAM || sstatus->race == RC_FISH || sstatus->race == RC_PLANT) )
vit_def += skill*5;
if( src->type == BL_MOB && (skill = pc_checkskill(tsd, NC_RESEARCHFE)) > 0 &&
(sstatus->def_ele == ELE_FIRE || sstatus->def_ele == ELE_EARTH) )
vit_def += skill * 10;
} else { //Mob-Pet vit-eq
#ifndef RENEWAL
//VIT + rnd(0,[VIT/20]^2-1)
vit_def = (def2/20)*(def2/20);
if (tsc && tsc->data[SC_SKA])
vit_def += 100; //Eska increases the random part of the formula by 100
vit_def = def2 + (vit_def>0?rnd()%vit_def:0);
#else
//SoftDEF of monsters is floor((BaseLevel+Vit)/2)
vit_def = def2;
#endif
}if (battle_config.weapon_defense_type) {
vit_def += def1*battle_config.weapon_defense_type;
def1 = 0;
}#ifdef RENEWAL
/**
* RE DEF Reduction
* Damage = Attack * (4000+eDEF)/(4000+eDEF*10) - sDEF
* Pierce defence gains 1 atk per def/2
*/
if( def1 == -400 ) /* -400 creates a division by 0 and subsequently crashes */
def1 = -399;
ATK_ADD2(wd->damage, wd->damage2,
is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_R) ? (def1*battle_calc_attack_skill_ratio(wd, src, target, skill_id, skill_lv))/200 : 0,
is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_L) ? (def1*battle_calc_attack_skill_ratio(wd, src, target, skill_id, skill_lv))/200 : 0
);
if( !attack_ignores_def(wd, src, target, skill_id, skill_lv, EQI_HAND_R) && !is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_R) )
wd->damage = wd->damage * (4000+def1) / (4000+10*def1) - vit_def;
if( is_attack_left_handed(src, skill_id) && !attack_ignores_def(wd, src, target, skill_id, skill_lv, EQI_HAND_L) && !is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_L) )
wd->damage2 = wd->damage2 * (4000+def1) / (4000+10*def1) - vit_def;#else
if (def1 > 100) def1 = 100;
ATK_RATE2(wd->damage, wd->damage2,
attack_ignores_def(wd, src, target, skill_id, skill_lv, EQI_HAND_R) ?100:(is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_R) ? (int64)is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_R)*(def1+vit_def) : (100-def1)),
attack_ignores_def(wd, src, target, skill_id, skill_lv, EQI_HAND_L) ?100:(is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_L) ? (int64)is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_L)*(def1+vit_def) : (100-def1))
);
ATK_ADD2(wd->damage, wd->damage2,
attack_ignores_def(wd, src, target, skill_id, skill_lv, EQI_HAND_R) || is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_R) ?0:-vit_def,
attack_ignores_def(wd, src, target, skill_id, skill_lv, EQI_HAND_L) || is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_L) ?0:-vit_def
);
#endif
-
18 minutes ago, Jesky said:
I'm not sure if this would work but you can try to change the source code in /src/config/const.h
#ifdef RENEWAL typedef signed char defType; #define DEFTYPE_MIN CHAR_MIN #define DEFTYPE_MAX CHAR_MAX #else typedef signed char defType; #define DEFTYPE_MIN CHAR_MIN #define DEFTYPE_MAX CHAR_MAX #endif
I actually already did try that, but the defense still goes to minus... And I tried when the def is 99 its still 99%
And btw my server is pre-renewal, and I just want to take the renewal system, so I guess the one below is okay ..?
Quote#ifdef RENEWAL
typedef short defType;
#define DEFTYPE_MIN SHRT_MIN
#define DEFTYPE_MAX SHRT_MAX
#else
typedef signed char defType;
#define DEFTYPE_MIN SHRT_MIN
#define DEFTYPE_MAX SHRT_MAX
// #define DEFTYPE_MIN CHAR_MIN
// #define DEFTYPE_MAX CHAR_MAX
#endifChanging this also doesnt work either...
Quote// Max armor def/mdef
// NOTE: This setting have no effect if server is run on Renewal Mode (RENEWAL)
// NOTE: does not affects skills and status effects like Mental Strength
// If weapon_defense_type is non-zero, it won't apply to max def.
// If magic_defense_type is non-zero, it won't apply to max mdef.
max_def: 500// Def to Def2 conversion bonus. If the armor def/mdef exceeds max_def,
// the remaining is converted to vit def/int mdef using this multiplier
// (eg: if set to 10, every armor point above the max becomes 10 vit defense points)
over_def_bonus: 1 -
38 minutes ago, Jesky said:
I don't see there is any other way except changing it manually one by one for each item you copied from renewal item_db.
I'm not sure even if disabling the renewal system from /src/config/renewal.h will change the defense on each renewal equips. Same thing goes for the item description. I've experienced similiar thing like this before where i want to use some renewal items, the only solution i came up with was duplicate the item from renewal item_db, put it on import/item_db and then create the item description for those items one by one. It took a lot of time but it'll be cleaner for your db, good to prevent bugs/error and easier to debug in the future.
Oufh... Or maybe is there any way to change the formula ?
Like not x/100 = def%
but for example = x/300 = def% ?
-
On 3/4/2021 at 8:51 PM, botka4aet said:
So you can warp to 1@infi ?
Yes I can warp to those maps without any problems thats why I was having confusions with the error...
Do you might know any other problems ?
-
Hi, I am currently running a pre-renewal server with renewal items, and since the main problem is with defense,
Once I go over 99 it goes to minus, and even so getting 99 def would be so easy,
Since changing all single renewal's equip defense and item descriptions etc,
Would be unrealistic, I would like to just change the defense system only to Renewal.Can someone please help me with this please...?
-
I got problem of InfiniteSpace and SkyFortress instance... I already added the instance_cb, double checked on the map_index, map config everything is there but I will always get this error... I could normally @warp to these maps, can someone help on this?
The script I was using was Alaynes script...
Quote[Debug]: (map_mapname2mapid) mapindex_name2id: Map "" not found in index list!
[Error]: instance_create: Unknown instance Infinite Space creation was attempted.
[Debug]: (map_mapname2mapid) mapindex_name2id: Map "" not found in index list!
[Debug]: (map_mapname2mapid) mapindex_name2id: Map "" not found in index list!
[Debug]: (map_mapname2mapid) mapindex_name2id: Map "" not found in index list!
[Error]: instance_create: Unknown instance Sky Fortress creation was attempted.InfiniteSpace.txt SkyFortress.txt map_index.txt maps_athena.conf
-
-
Hi does anyone have the mob_db, mob_skill_db, item_db for monsters in:
- Illusion of Labyrinth
- Illusion of Teddy Bear
- Illusion of Luanda
- Illusion of UnderwaterAlso these monsters:
//20572,MD_C_HEMEL
//20573,MD_C_AMDARAIS
//20574,MD_C_WHITEKNIGHT
//20575,MD_C_CORRUPTION_ROOT
//20576,MD_C_KHALITZBURG
//20577,MD_C_RAYDRIC
//20578,MD_C_RAYDRIC_ARCHER
//20579,MD_C_ZOMBIE
//20580,MD_C_GHOUL
//20581,MD_C_THORN
//20582,MD_MANHOLE4
//20583,MD_C_WHITEKNIGHT_G
//20584,MD_C_KHALITZBURG_G
//20585,MD_C_RAY_ARCHER_GAlso the mobs. warps, mob_db, mob_skill_db, item_db, for these maps?:
ba_maison
ba_lost
ba_lib
ba_in01
ba_go
ba_chess
ba_bath
ba_2whs01
ba_2whs02I guess these are the monsters...?
//20385,MD_GH_KING_SCHMIDT
//20386,MD_GH_KING_SCHMIDT_N
//20387,MD_GH_KING_SCHMIDT_H
//20388,MD_GH_KHALITZBURG
//20389,MD_GH_KHALITZBURG_H
//20390,MD_GH_WHITEKNIGHT
//20391,MD_GH_WHITEKNIGHT_H
/20392,MD_GH_ALICE_G
//20393,MD_GH_ROOT_G
//20394,MD_GH_BLOODY_KNIGHTI don't need the Instance NPC, just the mobs and items is enough,
So if anyone have it and didn't mind to share it, I can't thank enough
Pre-renewal server with renewal defense system.
in Source Support
Posted
Thank you taking the time to try!!! <-- This alone is very helpful
The reason I dont change it to renewal is, I only want to take the item and change the def system..
other than that I don't really like the system, like the attack etc the way the stats affect the status and delay system etc.
I actually tried to change the pre-re formula to renewal formula but when I recompile an error comes out...
So your best suggestion is to change the equip manually...?