If that's your home computer, I'd reccommend installing that one as a Development machine for obvious reasons (since it won't use up a big piece of your available memory and processing time).
Go to 'src/common/mmo.h'
Find :
#define MAX_GUILD 16+10*6 // Increased max guild members +6 per 1 extension levels [Lupus]
This means : 16 + 10(guild extenstion level) x6
So Total of : 16 + 60 = 76 Guild Members.
to Make it 40 :
Change it to :
#define MAX_GUILD 10+5*6
or simply
#define MAX_GUILD 40
Everything is working now, I corrected my other post as well adding those changes in the knight snippet, the first one was very poorly coded, I did it in a hurry...
Regards
Haven't tested those mods, but they built without any errors.
Regarding adding one soul skill to blacksmiths you can only mod your databases and it should work, but of course KN_CHARGEATK will stop being a quest skill and'll only work when a character is linked even when he is a knight... I've tried making some changes in the source-code to bypass this issue, but it seems that if the skill is not sent to the client with 0x8 as info it won't be activated when someone is linked. So I bypassed using a quite "unorthodox" way, it's not neat code as I don't like to force the client to do anything, but it works. I think the other modifications worked as they are fairly simple to make, so I haven't tested them in-game just the one that's complex.
Open src/map/status.c and find:
case SC_RAISINGDRAGON: sce->val2 = st->max_hp / 100;// Officially tested its 1%hp drain. [Jobbie] break;Add below: case SC_SOULLINK: // This is _not_ the best way to do that ): if( (sd->class_&MAPID_UPPERMASK) == MAPID_BLACKSMITH ) pc->skill(sd, KN_CHARGEATK, 1, 0); break;Find: case ITEMID_ORC_LOAD_CARD: clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_ORCLORD); break; } } break;Add below: case SC_SOULLINK: // This is _not_ the best way to do that ): if(/* pc->checkskill(sd, KN_CHARGEATK) && */(sd->class_&MAPID_UPPERMASK) == MAPID_BLACKSMITH) pc->skill(sd, KN_CHARGEATK, 0, 0); break;Open src/map/skill.c and find:Search for:
if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0); return 0; }Replace it with: // If linked, knights are able to use parrying with one handed swords (type 2) if( require.weapon && !pc_check_weapontype(sd,require.weapon) && !( skill_id == LK_PARRYING && sd->sc.data[SC_SOULLINK] && pc_check_weapontype(sd,1<<2) )) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0); return 0; }Find (again): if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0); return 0; }Replace with: if( require.weapon && !pc_check_weapontype(sd,require.weapon) && !( skill_id == LK_PARRYING && sd->sc.data[SC_SOULLINK] && pc_check_weapontype(sd,1<<2) )) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0); return 0; }Open src/map/battle.c and search for: case SM_BASH: case MS_BASH: skillratio += 30 * skill_lv;Add below: // If linked, super novices will have SM_BASH's ratio increased by 50% if( sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_SUPERNOVICE ) skillratio += 50;Search for: case MO_FINGEROFFENSIVE: skillratio+= 50 * skill_lv;Add below: // If linked, monks will have MO_FINGEROFFENSIVE's ratio increased by 15% if( sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_MONK ) skillratio += 15;Search for: case CG_ARROWVULCAN: skillratio += 100 + 100 * skill_lv;Add below: // If linked, bards/dancers will have CG_ARROWVULCAN's damage increased by 15% if( sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_BARDDANCER ) skillratio += 15;Finally find: if (md.damage < 0 || md.damage > INT_MAX>>1) //Overflow prevention, will anyone whine if I cap it to a few billion? //Not capped to INT_MAX to give some room for further damage increase.Add above: // If linked, alchemists will have 15% increase in CR_ACIDDEMONSTRATION's damage if( sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_ALCHEMIST ) md.damage += md.damage*15/100;Open src/map/pc.c and search for: for (i = 0; i < ARRAYLENGTH(scw_list); i++) { // Skills requiring specific weapon types if( scw_list[i] == SC_DANCING && !battle_config.dancing_weaponswitch_fix ) continue;Add below: // If linked, knights are able to use parrying with one handed swords (type 2) if( scw_list[i] == SC_PARRYING && sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_KNIGHT && (!pc_check_weapontype(sd,skill->get_weapontype(status->sc2skill(scw_list[i]))) && !pc_check_weapontype(sd,2) ) ) { status_change_end(&sd->bl, scw_list[i], INVALID_TIMER); continue; // We don't want to fall under the next check }Save all files and build your map-server, test in-game and if you're having any trouble just post and I'll try to answer as quickly as possible c:
Regards.
EDIT:
Corrected mistake in knight related snippet
EDIT2:
Corrected error as reported in: http://herc.ws/board/topic/4360-custom-link-mods/
yes, this is possible.
go to db/re(pre-re)/map_zone_db.conf
search for : name: "Towns"
under it you will see : disabled_skills: {
add storm gust in there.
The issue was because of the extra spaces you had in your lines. I added support for that situation, since the server used to load those correctly even if the spaces weren't supposed to be there.
Thanks for the report. It's fixed in https://github.com/HerculesWS/Hercules/commit/d1a635a06f5152b51d0879176f011b5c6e45431c (and if you use the online version, it was updated as well)