mafianekcek 15 Posted April 4, 2015 Share Posted April 4, 2015 Hi all.Today i work and tested how to add new alignments Now i finish it and create instructions for you. Now how do it: 1. edit game source open char_battle.cpp and find: int iAlignIndex; and edit for example: if (GetRealAlignment() == 300000) iAlignIndex = 0; else if (GetRealAlignment() >= 200000) iAlignIndex = 1; else if (GetRealAlignment() >= 120000) iAlignIndex = 2; else if (GetRealAlignment() >= 80000) iAlignIndex = 3; else if (GetRealAlignment() >= 40000) iAlignIndex = 4; else if (GetRealAlignment() >= 10000) iAlignIndex = 5; else if (GetRealAlignment() >= 0) iAlignIndex = 6; else if (GetRealAlignment() > -40000) iAlignIndex = 7; else if (GetRealAlignment() > -80000) iAlignIndex = 8; else if (GetRealAlignment() > -120000) iAlignIndex = 9; else if (GetRealAlignment() > -200000) iAlignIndex = 10; else if (GetRealAlignment() > -250000) iAlignIndex = 11; else iAlignIndex = 12; now find FPartyAlignmentCompute f(-20000, pkKiller->GetX(), pkKiller->GetY()); pkKiller->GetParty()->ForEachOnlineMember(f); if (f.m_iCount == 0) pkKiller->UpdateAlignment(-20000); else { sys_log(0, "ALIGNMENT PARTY count %d amount %d", f.m_iCount, f.m_iAmount); f.m_iStep = 1; pkKiller->GetParty()->ForEachOnlineMember(f); } } else pkKiller->UpdateAlignment(-20000); and replace with this: FPartyAlignmentCompute f(-30000, pkKiller->GetX(), pkKiller->GetY()); pkKiller->GetParty()->ForEachOnlineMember(f); if (f.m_iCount == 0) pkKiller->UpdateAlignment(-30000); else { sys_log(0, "ALIGNMENT PARTY count %d amount %d", f.m_iCount, f.m_iAmount); f.m_iStep = 1; pkKiller->GetParty()->ForEachOnlineMember(f); } } else pkKiller->UpdateAlignment(-30000); now find m_iRealAlignment = MINMAX(-200000, m_iRealAlignment + iAmount, 200000); and replace with this: m_iRealAlignment = MINMAX(-300000, m_iRealAlignment + iAmount, 300000); now you can compile game! 2. edit binary: open InstanceBase.h and find: TITLE_NUM = 9, TITLE_NONE = 4, and replace this: TITLE_NUM = 13, TITLE_NUM = 6, Now you can save and close InstanceBase.h. Now open InstanceBase.cpp and find: UINT CInstanceBase::GetAlignmentGrade() and edit for example this: UINT CInstanceBase::GetAlignmentGrade() { if (m_sAlignment == 30000) return 0; else if (m_sAlignment >= 20000) return 1; else if (m_sAlignment >= 12000) return 2; else if (m_sAlignment >= 8000) return 3; else if (m_sAlignment >= 4000) return 4; else if (m_sAlignment >= 1000) return 5; else if (m_sAlignment >= 0) return 6; else if (m_sAlignment > -4000) return 7; else if (m_sAlignment > -8000) return 8; else if (m_sAlignment > -12000) return 9; else if (m_sAlignment > -20000) return 10; else if (m_sAlignment > -25000) return 11; return 12; } now find int CInstanceBase::GetAlignmentType() and edit for example this: int CInstanceBase::GetAlignmentType() { switch (GetAlignmentGrade()) { case 0: case 1: case 2: case 3: case 4: case 5: { return ALIGNMENT_TYPE_WHITE; break; } case 7: case 8: case 9: case 10: case 11: case 12: { return ALIGNMENT_TYPE_DARK; break; } case 6: { return ALIGNMENT_TYPE_NORMAL; break; } } } now you can save and close InstanceBase.cpp and Build binari. 3. edit client Extract root files and open locale.py now find this: TITLE_NAME_LIST = ( PVP_LEVEL0, PVP_LEVEL1, PVP_LEVEL2, PVP_LEVEL3, PVP_LEVEL4, PVP_LEVEL5, PVP_LEVEL6, PVP_LEVEL7, PVP_LEVEL8, ) and replace with this: TITLE_NAME_LIST = ( PVP_LEVEL0, PVP_LEVEL1, PVP_LEVEL2, PVP_LEVEL3, PVP_LEVEL4, PVP_LEVEL5, PVP_LEVEL6, PVP_LEVEL7, PVP_LEVEL8, PVP_LEVEL9, PVP_LEVEL10, PVP_LEVEL11, PVP_LEVEL12, ) now you can save locale.py and open introloading.py find this: TITLE_COLOR_DICT and edit this: TITLE_COLOR_DICT = ( colorInfo.TITLE_RGB_GOOD_6, colorInfo.TITLE_RGB_GOOD_5, colorInfo.TITLE_RGB_GOOD_4, colorInfo.TITLE_RGB_GOOD_3, colorInfo.TITLE_RGB_GOOD_2, colorInfo.TITLE_RGB_GOOD_1, colorInfo.TITLE_RGB_NORMAL, colorInfo.TITLE_RGB_EVIL_1, colorInfo.TITLE_RGB_EVIL_2, colorInfo.TITLE_RGB_EVIL_3, colorInfo.TITLE_RGB_EVIL_4, colorInfo.TITLE_RGB_EVIL_5, colorInfo.TITLE_RGB_EVIL_6, ) now you can save introloading.py and open uicharacter.py find this: COLOR_DICT and edit this: COLOR_DICT = { 0 : colorInfo.TITLE_RGB_GOOD_6, 1 : colorInfo.TITLE_RGB_GOOD_5, 2 : colorInfo.TITLE_RGB_GOOD_4, 3 : colorInfo.TITLE_RGB_GOOD_3, 4 : colorInfo.TITLE_RGB_GOOD_2, 5 : colorInfo.TITLE_RGB_GOOD_1, 6 : colorInfo.TITLE_RGB_NORMAL, 7 : colorInfo.TITLE_RGB_EVIL_1, 8 : colorInfo.TITLE_RGB_EVIL_2, 9 : colorInfo.TITLE_RGB_EVIL_3, 10 : colorInfo.TITLE_RGB_EVIL_4, 11 : colorInfo.TITLE_RGB_EVIL_5, 12 : colorInfo.TITLE_RGB_EVIL_6, } now you can save uicharacter.py and open colorinfo.py and add this: TITLE_RGB_GOOD_6 = (255, 215, 0) TITLE_RGB_GOOD_5 = ( 0, 159, 0) TITLE_RGB_EVIL_5 = (127, 32, 0) TITLE_RGB_EVIL_6 = ( 48, 0, 0) save and you can compile root. now you extract locale and open locale_game.txt find: PVP_LEVEL0 and edit PVP levels for example this: PVP_LEVEL0 King PVP_LEVEL1 Machr PVP_LEVEL2 Rytířský PVP_LEVEL3 Vznešený PVP_LEVEL4 Dobrý PVP_LEVEL5 Přátelský PVP_LEVEL6 Neutrální PVP_LEVEL7 Agresivní PVP_LEVEL8 Úskočný PVP_LEVEL9 Zlomyslný PVP_LEVEL10 Krutý PVP_LEVEL11 Chudák PVP_LEVEL12 Ubožák save and compile locale. This is all. GOOD LUCK! PS: sorry for my bad english. 1 6 Link to comment Share on other sites More sharing options...
fenixplayscz 16 Posted April 4, 2015 Share Posted April 4, 2015 Its easy, but i think its posted tutorial for alignment on this forum Link to comment Share on other sites More sharing options...
mafianekcek 15 Posted April 4, 2015 Author Share Posted April 4, 2015 I not find then i create . sorry Link to comment Share on other sites More sharing options...
Premium Sirio 254 Posted April 5, 2015 Premium Share Posted April 5, 2015 in InstanceBase.h you put two TITLE_NUM it gives a compilation error Link to comment Share on other sites More sharing options...
iRemain 17 Posted April 5, 2015 Share Posted April 5, 2015 He ment : TITLE_NUM = 13, TITLE_NONE = 6, Use some logic Link to comment Share on other sites More sharing options...
Premium Sirio 254 Posted April 5, 2015 Premium Share Posted April 5, 2015 I know, I meant modify it to avoid problems Link to comment Share on other sites More sharing options...
JinHan 190 Posted April 22, 2015 Share Posted April 22, 2015 you should edit the alignment of fruit of life in char_item.cpp too and replace 20000 with 30000 Link to comment Share on other sites More sharing options...
metin2team 766 Posted April 22, 2015 Share Posted April 22, 2015 you should check this here. 2 Link to comment Share on other sites More sharing options...
Seby. 6 Posted July 14, 2015 Share Posted July 14, 2015 Hi dev , I align with this new problem , we tried to shove , but have not really succeeded , and now NPCs and align looks like so : Who knows how can I fix ? Sorry for my english. Link to comment Share on other sites More sharing options...
Aerrow 41 Posted July 14, 2015 Share Posted July 14, 2015 And if I want more, 2^15+ alignment? Where to rewrite the data types? Link to comment Share on other sites More sharing options...
mafianekcek 15 Posted July 15, 2015 Author Share Posted July 15, 2015 Hi dev , I align with this new problem , we tried to shove , but have not really succeeded , and now NPCs and align looks like so : Who knows how can I fix ? Sorry for my english. You must edit binary: TITLE_NONE = 6, Link to comment Share on other sites More sharing options...
Seby. 6 Posted July 18, 2015 Share Posted July 18, 2015 Problem solved. Link to comment Share on other sites More sharing options...
Aerrow 41 Posted July 22, 2015 Share Posted July 22, 2015 And if I want more, 2^15+ alignment? Where to rewrite the data types? Link to comment Share on other sites More sharing options...
TheSLZ 107 Posted September 6, 2015 Share Posted September 6, 2015 (edited) Thanks works fine Edited September 6, 2015 by TheSLZ Link to comment Share on other sites More sharing options...
fenixplayscz 16 Posted September 17, 2015 Share Posted September 17, 2015 (edited) Hello i all edited, i have max alignment 100 000, yea i changed data type, but there is one problem, when i change TITLE_NAME_LIST in localeinfo.py, from 8 to 26 (my PVP_LEVEL is 26 max) , and pack root, my client give me this error FIXED!!! Edited September 18, 2015 by fenixplayscz Fixed Link to comment Share on other sites More sharing options...
fenixplayscz 16 Posted September 18, 2015 Share Posted September 18, 2015 bump Link to comment Share on other sites More sharing options...
Kaba 67 Posted March 14, 2016 Share Posted March 14, 2016 int->bigint???? o.O Link to comment Share on other sites More sharing options...
asterix2 350 Posted May 1, 2016 Share Posted May 1, 2016 char_item.cpp: search: if (GetAlignment() == 200000) change with: if (GetAlignment() == 300000) search: if (200000 - GetAlignment() < val * 10) change with: if (300000 - GetAlignment() < val * 10) search: val = (200000 - GetAlignment()) / 10; change with: val = (300000 - GetAlignment()) / 10; Link to comment Share on other sites More sharing options...
Kaba 67 Posted August 5, 2016 Share Posted August 5, 2016 On 5/1/2016 at 7:09 PM, asterix2 said: char_item.cpp: search: if (GetAlignment() == 200000) change with: if (GetAlignment() == 300000) search: if (200000 - GetAlignment() < val * 10) change with: if (300000 - GetAlignment() < val * 10) search: val = (200000 - GetAlignment()) / 10; change with: val = (300000 - GetAlignment()) / 10; And what will you do when you need more than 33k or 1kk alignment? Link to comment Share on other sites More sharing options...
Esquire 6 Posted February 17, 2017 Share Posted February 17, 2017 who can i do for man/girl? change the alinments name for man and women? Link to comment Share on other sites More sharing options...
Forum Moderator Raylee 658 Posted January 12, 2020 Forum Moderator Share Posted January 12, 2020 #moved Best regards Raylee Link to comment Share on other sites More sharing options...
Recommended Posts