*Descriere:
Acest tutorial iti arata cum sa faci codul din PlayerSettingModule.py mult mai clar si mai usor de inteles, folosind constante cu nume explicite in loc de cifre puse direct in RegisterEffect. Este un mic upgrade de organizare foarte util pentru sursele Metin2, mai ales daca lucrezi cu efecte pentru arme, armuri si Lycan.
Avantajul principal este ca vei sti imediat ce efect apartine fiecarei arme sau armuri, fara sa mai stai sa cauti ce inseamna fiecare numar din PlayerSettingModule.
*Poze / Video:
*Link download / Code:
Deschide PythonCharacterManagerModule.cpp si cauta finalul fisierului sau zona unde se adauga constantele in python:
Adauga sub:
Deschide PlayerSettingModule.py si cauta:
Inlocuieste cu:
Observatie:
Daca nu ai sistemul ENABLE_WOLFMAN in sursa ta, poti scoate fara probleme partea cu #ifdef ENABLE_WOLFMAN si blocul if app.ENABLE_WOLFMAN:.
Acest tutorial iti arata cum sa faci codul din PlayerSettingModule.py mult mai clar si mai usor de inteles, folosind constante cu nume explicite in loc de cifre puse direct in RegisterEffect. Este un mic upgrade de organizare foarte util pentru sursele Metin2, mai ales daca lucrezi cu efecte pentru arme, armuri si Lycan.
Avantajul principal este ca vei sti imediat ce efect apartine fiecarei arme sau armuri, fara sa mai stai sa cauti ce inseamna fiecare numar din PlayerSettingModule.
*Poze / Video:
- 04-18-2026, 16-04-06.png (75.19 KiB) Vizualizat de 477 ori
- 04-18-2026, 16-04-21.png (20.91 KiB) Vizualizat de 477 ori
Deschide PythonCharacterManagerModule.cpp si cauta finalul fisierului sau zona unde se adauga constantele in python:
Cod: Selectaţi tot
PyModule_AddIntConstant(poModule, "EFFECT_REFINED", CInstanceBase::EFFECT_REFINED);
Conținut: Ascuns
Reacționează
la acest mesaj și conținutul se va afișa automat.
la acest mesaj și conținutul se va afișa automat.Deschide PlayerSettingModule.py si cauta:
Cod: Selectaţi tot
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+1, "PART_WEAPON", "D:/ymir work/pc/common/effect/sword/sword_7.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+2, "PART_WEAPON", "D:/ymir work/pc/common/effect/sword/sword_8.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+3, "PART_WEAPON", "D:/ymir work/pc/common/effect/sword/sword_9.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+4, "PART_WEAPON_LEFT", "D:/ymir work/pc/common/effect/sword/sword_7_b.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+5, "PART_WEAPON_LEFT", "D:/ymir work/pc/common/effect/sword/sword_8_b.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+6, "PART_WEAPON_LEFT", "D:/ymir work/pc/common/effect/sword/sword_9_b.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+7, "PART_WEAPON", "D:/ymir work/pc/common/effect/sword/sword_7_f.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+8, "PART_WEAPON", "D:/ymir work/pc/common/effect/sword/sword_8_f.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+9, "PART_WEAPON", "D:/ymir work/pc/common/effect/sword/sword_9_f.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+10, "PART_WEAPON", "D:/ymir work/pc/common/effect/sword/sword_7_s.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+11, "PART_WEAPON", "D:/ymir work/pc/common/effect/sword/sword_8_s.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+12, "PART_WEAPON", "D:/ymir work/pc/common/effect/sword/sword_9_s.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+13, "PART_WEAPON_LEFT", "D:/ymir work/pc/common/effect/sword/sword_7_s.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+14, "PART_WEAPON_LEFT", "D:/ymir work/pc/common/effect/sword/sword_8_s.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+15, "PART_WEAPON_LEFT", "D:/ymir work/pc/common/effect/sword/sword_9_s.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+16, "Bip01", "D:/ymir work/pc/common/effect/armor/armor_7.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+17, "Bip01", "D:/ymir work/pc/common/effect/armor/armor_8.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+18, "Bip01", "D:/ymir work/pc/common/effect/armor/armor_9.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+19, "Bip01", "D:/ymir work/pc/common/effect/armor/armor-4-2-1.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+20, "Bip01", "D:/ymir work/pc/common/effect/armor/armor-4-2-2.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+21, "Bip01", "D:/ymir work/pc/common/effect/armor/armor-5-1.mse")
if app.ENABLE_WOLFMAN:
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+22, "PART_WEAPON", "D:/ymir work/pc/common/effect/sword/sword_7_f.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+23, "PART_WEAPON", "D:/ymir work/pc/common/effect/sword/sword_8_f.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+24, "PART_WEAPON", "D:/ymir work/pc/common/effect/sword/sword_9_f.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+25, "PART_WEAPON_LEFT", "D:/ymir work/pc/common/effect/sword/sword_7_f.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+26, "PART_WEAPON_LEFT", "D:/ymir work/pc/common/effect/sword/sword_8_f.mse")
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+27, "PART_WEAPON_LEFT", "D:/ymir work/pc/common/effect/sword/sword_9_f.mse")
Conținut: Ascuns
Reacționează
la acest mesaj și conținutul se va afișa automat.
la acest mesaj și conținutul se va afișa automat.Observatie:
Daca nu ai sistemul ENABLE_WOLFMAN in sursa ta, poti scoate fara probleme partea cu #ifdef ENABLE_WOLFMAN si blocul if app.ENABLE_WOLFMAN:.



