Jump to content

Jonathan

Advanced members
  • Content Count

    25
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by Jonathan


  1. On 8/26/2022 at 11:34 AM, Graf said:

    Hi. Preview not found.

    Am not seeing the same issue, can see the video fine. Maybe there is a silent country restriction?

     

    Video mirror for resolution of 557 x 360: https://mega.nz/file/AAkywD4a#EcUqDRfgRJ3RemOfPAXkkMuqOVaCLw9aLRnYt3tBJUo

    Video mirror for 1280 x 828: https://mega.nz/file/MMMEFKoS#P0dv0aFirFZWxOQz8ZSrtysQ_yneKFzQcoydhjndV9M

     

    If you ever run into the same problem again, I just used streamabledl (https://streamabledl.com/) and I doubt there are any silent restrictions downloading videos through that site. It is possible I'm wrong and there are, but it could at least be worth a try.

    • Thanks 2

  2. I would encourage you to use the search function at the top right of each forum page.

     

    A quick search yielded the following result:

     

    On 2/11/2017 at 12:24 PM, V3ct0r said:

    Hello!

    What the problem? Just open Notepad.exe, put "start system\game.exe startgame table_bin" and save as "compile.bat" to folder with client. Then put .txt's (ItemInfo.txt, for example) to Client\scripts\table\ and run compile.bat. 

     

     

     

    • Thanks 1

  3. If you are just trying to determine the parameter so that you can use a startgame batch file...

    Open the game using whatever launcher, then open a command line prompt. Enter “WMIC /OUTPUT:ProcessList.txt PROCESS get Caption,Commandline,Processid”. View command line options used to open each open program inside ProcessList.txt - specifically, look for the command line options used to open Game.exe. Then write your batch file using those command line options instead of startgame.

    • Like 1
    • Thanks 1

  4. @barselon8

     

    It is interesting math - I could be entirely wrong, but I would guess the reason for dividing by 1000 is to avoid using floats / doubles until absolutely necessary. This will have a positive impact on evaluating final values accurately, and also - more importantly - will reduce computational time. I'd imagine the performance differences were far more noticeable back when this game was first published. Looking at "GetChaAttr()" in the source, all values returned are whole numbers (either ints or longs) which further supports this idea.

     

    With regards to where the calculations are for "ATTR_ITEMC_MXHP"... "GetChaAttr() is in the source at "Source/Server/GameServer/src/Expand.h". This just points us to "nAttrVal = (long)pCCha->getAttr(sAttrIndex);". If we then follow the trail to "Source/Common/Common/include/ChaAttr.h" this points us to:

     

    inline LONG64 CChaAttr::GetAttr(long lNo)
    {T_B
      	if (lNo >= ATTR_MAX_NUM)
      		return -1;
     
     	return m_lAttribute[lNo];
     T_E}

     

    which begs the question of where "m_lAttribute" gets set. Navigating to "Source/Common/Common/src/ChaAttr.cpp" we find that the values in "m_lAttribute" are set based on the record retrieved via "CChaRecord *pCChaRecord = GetChaRecordInfo(lID);". In "Source/Common/Common/include/CharacterRecord.h" we find another inline function:

    inline CChaRecord* GetChaRecordInfo( int nTypeId )
    {
    	return (CChaRecord*)CChaRecordSet::I()->GetRawDataInfo(nTypeID);
    }

    and so on... that is the end of my sleuthing on this, but that should be fairly close to actually finding where the value gets set. Good luck!

    • Thanks 2

  5. @barselon8 The only variable there is the "a", which is the character's role. The rest are all function calls to functions you can find within "functions.lua". e.g.

     

    function MxhpIa(a)
    	--LuaPrint("Obtain character attribute mxhp_ia") 
    	local mxhpia=GetChaAttr(a, ATTR_ITEMC_MXHP)/ATTR_RADIX --[[取mxhp道具百分比]]--
    	return mxhpia 
    end 
    
    function MxhpIb(a)
    	--LuaPrint("Obtain character attribute mshp_ib") 
    	local mxhpib=GetChaAttr(a, ATTR_ITEMV_MXHP) --[[取mxhp道具常数]]--
    	return mxhpib 
    end 

    In these functions, the first variable in the call to "GetCharAttr()" is again the character's role, and the second variable in those calls is the attribute being retrieved as defined in "AttrType.lua".

     

    The "ATTR_RADIX" variable is the attribute coefficient as defined in "variable.lua".

    • Thanks 1

  6. @barselon8

     

    If I am understanding correctly, you want to investigate the functions "Mxhp_final()", "Mxsp_final()", "Mnatk_final()", etc. in "functions.lua". e.g.

     

    function Mxhp_final(a) 
    	local mxhp_final=(BSMxhp(a) * MxhpIa(a) + MxhpIb(a) ) * math.max(0, MxhpSa(a))  + MxhpSb(a) --[[取当时实际mxhp]]--
    	--LG("chaattr_set", " BSMxhp = " , BSMxhp(a) , "MxhpIa = " , MxhpIa(a) , " MxhpIb = " , MxhpIb(a) , "MxhpSa = " , MxhpSa(a) , "MxhpSb = ", MxhpSb(a) , "\n" ) 
    	--LG("chaattr_set", "mxhp_final = ", mxhp_final , "\n" ) 
    	return mxhp_final 
    end 

     

    These functions are where the final values are calculated, which account for any additional stats provided by items.

    • Like 1
    • Thanks 1

  7. No problem at all @kyleflow!

     

    Your understanding is correct. The default "Check_CG_HechengBS()" per the 1.38 files posted by V3ct0r at

     

     

    is

     

    function Check_CG_HechengBS ( Item_Lv , Item_Type , Sklv )
    	local a = 0
    	local b = 0
    	Item_Lv = Item_Lv - 1
    	if Item_Type == 49 then
    		a = math.max ( 0 , math.min ( 1 , ( 1 - Item_Lv * 0.10 + Sklv * 0.10 ) ) )
    		b = Percentage_Random ( a )
    		if Item_Lv < 3 then
    			b = 1
    		end
    		return b
    	elseif Item_Type == 50 then
    		a = math.max ( 0 , math.min ( 1 , ( 1 - Item_Lv * 0.05 + Sklv * 0.15 ) ) )
    		b = Percentage_Random ( a )
    		return b
    	else
    		LG( "Hecheng_BS","probability check determine item type is not a gem" )
    		return 0
    	end
    end

     

    So for this we would just need to work backwards. When "ItemType" is 49, for 100% success rate the calculation "1 - Item_Lv * 0.10 + Sklv * 0.10" needs to evaluate to 1, and when the "ItemType" is 50, for 100% success rate the calculation "1 - Item_Lv * 0.05 + Sklv * 0.15" needs to evaluate to 1. In both scenarios you just need to - as you correctly said - manipulate "STATE_HCGLJB" which will in turn manipulate "Sklv" in each of these calculations.

    • Like 1
    • Thanks 1

  8. Looking at the "Composition Catalyst" or "Red Combining Fruit" that ordinarily increase combining success, their item effect calls the function "ItemUse_HSDZG()" in "ItemEffect.lua".

     

    function ItemUse_HSDZG ( role , Item )
    	local statelv = 2
    	local statetime = 60
    	local Cha_Boat = 0
    	Cha_Boat = GetCtrlBoat ( role )
    --	SystemNotice( role , Cha_Boat )
    	if Cha_Boat ==  nil then
    		AddState( role , role , STATE_HCGLJB , statelv , statetime )
    	else
    		SystemNotice( role , "Cannot use while sailing" )
    		UseItemFailed ( role )
    		return
    	end
    end

     

    This function adds the state "STATE_HCGLJB" with a set state level ("statelv") - by default the state level is 2. The function to combine two gems is "begin_unite_item()" in "forge.lua". In this function, we call back on that same state to check the state level when calculating the success rate.

     

    function begin_unite_item (...)
    	-- ... --
      	-- snip --
    	
    	local Sklv = 1
    	local StateLv = GetChaStateLv ( role , STATE_HCGLJB )
    	
    	Sklv = Sklv + StateLv
    
    
    	local b = Check_CG_HechengBS ( Item2_Lv , ItemType2 , Sklv )
    	if b == 0 then
    		i = RemoveChaItem ( role , ItemID2 , 1 , 2 , BagItem2 , 2 , 1 , 0)		--移除宝石	
    		if i == 0 then
    			LG( "Hecheng_BS" , "Delete item failed" )
    		end
    		local cha_name = GetChaDefaultName ( role )
    		LG( "JingLian_ShiBai" , "Player"..cha_name.."Gem combining failed" )
    		SystemNotice( role , "Very sorry, combining has failed. Gem has vanished…")
    
    		return 2	
    	end
    	local cha_name = GetChaDefaultName ( role )
    	LG( "JingLian_ShiBai" , "Player"..cha_name.."Gem combining successful" )
    	return 1
    end

     

    Inside "begin_unite_item()" the function you have posted, "Check_CG_HechengBS()", is called to determine whether or not combining was successful. To calculate this, we pass in "Sklv" which is calculated as "1 + STATE_HCGLJB state level", so by default the value passed in is 3.

     

    Originally "Check_CG_HechengBS()" used a function of "Sklv" to determine whether or not combining was successful. In the function as you have posted it, "Sklv" goes completely unused. I will assume you are intentionally not using the original function, and will not refer to specific modifications of the original function.

     

    If you want to make combining 100% successful when the user has used a "Composition Catalyst" or "Red Combining Fruit", there are two places you could do it. Either

    a) Inside "begin_unite_item()", instead of calculating "b" you could first check the "Sklv", and if the user has used the appropriate fruit you could simply assume success already. This way we only use the function that includes randomness when no catalyst/fruit has been used. e.g.

     

    function begin_unite_item (...)
        -- ... --
        -- snip --
    	
        local Sklv = 1
        local StateLv = GetChaStateLv ( role , STATE_HCGLJB )
    	
        Sklv = Sklv + StateLv
    
    	
        if Sklv == 1 then
            local b = Check_CG_HechengBS ( Item2_Lv , ItemType2 , Sklv )
            if b == 0 then
              i = RemoveChaItem ( role , ItemID2 , 1 , 2 , BagItem2 , 2 , 1 , 0)		--移除宝石	
              if i == 0 then
                  LG( "Hecheng_BS" , "Delete item failed" )
              end
              local cha_name = GetChaDefaultName ( role )
              LG( "JingLian_ShiBai" , "Player"..cha_name.."Gem combining failed" )
              SystemNotice( role , "Very sorry, combining has failed. Gem has vanished…")
    
              return 2	
            end
        end
        local cha_name = GetChaDefaultName ( role )
        LG( "JingLian_ShiBai" , "Player"..cha_name.."Gem combining successful" )
        return 1
    end

     

    or

    b) Inside "Check_CG_HechengBS()" you change the function to actually make the calculation of "a" some function of "Sklv" again. That modification / function could be very simple. e.g. working from the function as it is in your post (and slightly refactoring it for the sake of simplicity)

     

    function Check_CG_HechengBS ( Item_Lv , Item_Type , Sklv )
    	     
            Item_Lv = Item_Lv - 1
            if Item_Type == 49 or Item_Type == 50 then
                    local a
                    local b
    
                    if Sklv == 3 then
                            a = 1
          
                    elseif Item_Lv < 3 then
                            a = 1
    
                    elseif Item_Lv == 3 then
                            a = 0.9
    
                    elseif Item_Lv == 4 then
                            a = 0.8
    
                    elseif Item_Lv == 5 then
                            a = 0.7
    
                    elseif Item_Lv == 6 then
                            a = 0.6
    
                    elseif Item_Lv == 7 then
                            a = 0.5
    
                    elseif Item_Lv == 8 then
                            a = 0.4
    
                    elseif Item_Lv == 9 then
                            a = 0.3
                    end
                    
        			b = Percentage_Random ( a )
                    return b
            else
                    LG( "Hecheng_BS","probability check determine item type is not a gem" )
                    return 0
            end
    end

     

    Whether or not that specific modification works depends whether of the rest of the functions involved have been modified on your server too, so try to follow the information and don't just copy and paste my solution.

     

    If you want to create a completely new fruit to make combining 100% successful, you will need to make the item call a different function than "ItemUse_HSDZG()" which in turn changes the state level of "STATE_HCGLJB" to a different state level, and then again modify how that state level gets used in either "begin_unite_item()" or "Check_CG_HechengBS()". As alluded to above though, your current iteration of "Check_CG_HechengBS()" means that neither the "Composition Catalyst" nor the "Red Combining Fruit" hold any effect on the combining success rate, so creating an entirely new catalyst / fruit may be unnecessary.

     

    Let me know if this explanation makes sense or if you have any further questions.

    • Thanks 1

  9. Since your files to decrypt are on the desktop, you won't need to run the bat file as administrator. However, the two dashes in front of decrypt_texture() mean that the line is commented out, so will not execute. There is a large block of commands at the of the file, and if you aren't going to put your method call there then you may want to check that nothing else is being called by accident. To have your method run, remove those two dashes; then, running the bat file normally (not as administrator) should be fine.

     

    In any case! My mistake for not catching this nuance running as admin - when you run a bat file as admin the current directory defaults to system32, as in your screenshot. To remedy this, you will need to:

    1. Open a command prompt as administrator;

    2. Change to the appropriate directory

    3. Run the batch file commands manually

     

    So, assuming your decompiler is located on the Desktop:

    1. Open a command prompt as administrator

    2. Run the following commands:

        i) cd "C:\Users\OldWise\Desktop\top-decompiler (1)"

        ii) luajit decompiler.lua

     

    Let me know how it goes, regardless whether you decide to do it by running as administrator or not.


  10. I would advise you first try downloading the decompiler from the Google Drive link and extract all of the contents to a separate, new directory. It looks like you have downloaded the decompiler from the source code repository and are trying to use it as a standalone version; if you wish to do this you should download the Google Drive link, extract the contents, then replace the decompiler.lua in the Google Drive release with the same file from the source code repository, per the original post:

    Quote

    To get it to work in standalone (like with the old version), download the old version first, and just replace the old "decompiler.lua" file with the new one. (so far no changes afaik)

     

    As it stands, you are missing some crucial files. Once you extract the contents from the Google Drive link, the folder should have the following contents:

     

    KcT0MPv.png

    (This directory structure is straight from the current Google Drive download link in the original post of this thread)

     

     

    Once you have:

    1. Re-downloaded and extracted the entirety of the contents to a fresh folder;

    2. Modified the user.lua file to:

        i) adjust the functions called (make sure you are decrypting textures and not decompiling bins)

        ii) adjust the target directory path

    3. Run decompile.bat again (in the same manner, by double clicking it) (note: if the target directory is protected / requires admin rights to make files, then you will need to run decompile.bat as admin)

     

    Let me know if it worked, what hurdle we need to cross next (include any error messages, etc.), or if you need clarification on anything I said. If it worked, then you can (but don't necessarily need to) replace the decompiler.lua with the same file from the source code repository, as previously instructed.


  11. 37 minutes ago, oldwise2 said:

    image.png.bcba462bd17d1b0656c08c3a195b32aa.png

     

     

    when i open the decompiler . bat this appears  ,,, luajit is not recognized as an internal or external command

    Could you post a screenshot of your folder structure for the decompiler please? And just to double check - you are running the bat file by double clicking it?


  12. 1 hour ago, oldwise2 said:

    some1 know how to decrypt texture with deguix ?

     

     

    All guidance on how to use this is contained in user.lua; notably, the guidance you are looking for:

     

    Quote

    --[[
        decrypt_texture(source_image_file[,target_image_file])
        Decrypts the specified source image file to target file. Does nothing but copy if file is already decrypted.
        Replaces itself if target_image_file is not specified.
        
        Parameters:
            source_binary_file: the full path to the source image file using foward slashes. Example: 'C:/Games/TOP/texture/terrain/abrick01.bmp'.
            (optional) target_decrypted_binary_file: the full path to the target decrypted image file using foward slashes. Example: 'C:/Games/TOP/texture/terrain/abrick01_decrypted.bmp'.
    --]]

    --[[
        decrypt_folder_texture(folder[,linux])
        Decrypts all image files in a folder if they're not decrypted already. Sub-folders are not followed (yet).
        
        Parameters:
            folder: path to the folder using foward slashes and no ending slash. Example: 'C:/Games/TOP/texture/terrain'.
            (optional) linux: set to true if using this in a linux system (cmdline program in linux is named differently). Example: true.
    --]]

     

    Does that answer your question? Else, what further guidance do you need and what have you tried so far?


  13. I see you found a prior help topic at 

    and stated that you did not understand the advanced discussion. Which parts of the discussion specifically did you not understand?

     

    Also, could you be more specific about what exactly you have tried so that we might help find where the process has gone wrong please? e.g.:

    Are you getting "DLL Loaded" at the top of the GameServer console?

    What GameServer version / specific GameServer are you trying to inject it to?

    Are you using the original downloaded from the LuaSQL thread, or are you using the subsequent update that was posted?

    And any other information about what you've tried that may be useful.


  14. [Release] Clean Tales of Pirates 2.00 Clients and Patch

     

    Hey all. These are the official Tales of Pirates installers for clean 2.00 clients, as well as a clean 2.00 patch; note that these are for TOP v2.00 and not TOP II. I have also added the archives of the installed files for each in case you don't want to run the installer.

     

    c3A6dKF.png

     

    zgyXXsp.png

     

     

    Installers

    Spoiler

    Clients

    2.00 08/25/2009 Full Client - Link: https://mega.nz/file/wRt1nKqA ; key: fWiN0RpKjc_RVfzd5FcdZYBx39fLCS54h9yGbNzZbZQ

    2.00 08/24/2010 Full Client - Link: https://mega.nz/file/tZEG2BDS ; key: NOEY4yNkHkG02hilq59hEtZDYHriC1xSzeBd3TLYeok

    2.00 04/29/2011 Full Client - Link: https://mega.nz/file/YIEyhYgZ ; key: csg_xLYnj-F0ya-Le-Ew5nt2bSfXN9xQr3z06r4H6ws

     

    Patch

    2.00 04/24/2009 Patch - Link: https://mega.nz/file/YZcxETTZ ; key: j99l1uDuVn0gY2c8hhKExdiJ-NJT1LqsZZL_tyJyzCQ

     

     

    Archives

    Spoiler

    Clients

    2.00 08/25/2009 Full Client - Link: https://mega.nz/file/8AURyYQQ ; key: ixtFgL6haI_6KEfaVX0YlfzA7hhxHiIPDVCRFBMf7JA

    2.00 08/24/2010 Full Client - Link: https://mega.nz/file/8Y13xLiK ; key: ROi3MKJPTdxSbgf0BiNLluM3Wq8bSGZVpTLNVjSbwy8

    2.00 04/29/2011 Full Client - Link: https://mega.nz/file/1MsFVSbK ; key: 3o_hk0eLyiuoFuDJ9UDI4rHMlYbqUn9YOqznFkGoyyQ

     

    Patch

    2.00 04/24/2009 Patch - Link: https://mega.nz/file/Vck1QKIA ; key: zi3KNm_NZLU5I0kS7_W5oFqg0yRzoDZSe0HxemWjlMo

     

    • Like 1
    • Thanks 1

  15. [Release] Clean Tales of Pirates 1.36 Client and Patch

     

    Hey all. This is the official Tales of Pirates installer for a clean 1.36 client, as well as a clean 1.36 patch; note that the only client and patch currently available are mismatched. I have also added the archives of the installed files for each in case you don't want to run the installer.

     

    PkU0t4W.png

     

    Vep9rJS.png

     

     

    Installers

    Spoiler

    Client

    1.36 08/15/2007 Full Client - Link: https://mega.nz/file/8IdCDQTR ; key: x62ry86tYET0LlMC6F59ElFnim98NCIz_SmLLkIDwJQ

     

    Patch

    1.36 12/17/2007 Patch - Link: https://mega.nz/file/gN13yQiQ ; key: 6iEFPs5nktP2R7YBkFRauj9JpQu-XxQFN2252x_Gogk

     

     

    Archives

    Spoiler

    Client

    1.36 08/15/2007 Full Client - Link: https://mega.nz/file/hZ0RXabC ; key: 8dX8gT0tqoFKTblSKlxhXe8-cCY_9dVWv3XXSKB1NuM

     

    Patch

    1.36 12/17/2007 Patch - Link: https://mega.nz/file/cNFSjJDb ; key: nXgwg-WKOU9jYIExZhY_jCX5ccRRqqvipXAmbmWqrfA

     

    • Like 3
    • Thanks 2

  16. Hey all. These are the official Tales of Pirates installers for clean 1.33 clients, as well as clean 1.33 patches. I have also added archives of the installed files for each in case you don't want to run the installer.

     

    xjQxqJb.png

     

    tyQaemD.png

     

     

    Installers

    Spoiler

    Clients

    1.33 Open Beta Full Client - Link: https://mega.nz/file/lAdxwYgL ; key: 8suuCXY-hpOZKNH1kTmsxpowZab7snZ_-5wvD8-Rf8U

    1.33 05/19/2007 Full Client - Link: https://mega.nz/file/QI9klBTB ; key: 6yQmjdG4sk_00DkbVMT3Ayl0XIdcgoVc6pJo-7BAdL0

    1.33 06/27/2007 Full Client - Link: https://mega.nz/file/1NkgHSZS ; key: GYM8w2DNFBhVFyjVIQ1VuU51dodatU5caTO6Ii-wDXY

     

    Patches

    1.33 Open Beta Patch - Link: https://mega.nz/file/sYUgGJKR ; key: Sq9QGFT7O-C2uQdtVDXViCJNjoyH-TTnCZ_3XMIJWlI

    1.33 04/19/2007 Patch - Link: https://mega.nz/file/tUkiTSTT ; key: anKMIYEQaEKWgIQ6gzYeM-yXu3qJ9PZBrKcutOia9dE

    1.33 05/17/2007 Patch - Link: https://mega.nz/file/dQ01Hb4S ; key: __T6iVLcwwq-NdOvz1QbHk5-YS2mZWVLCAqZrLuDGYA

     

     

    Archives

    Spoiler

    Clients

    1.33 Open Beta Full Client - Link: https://mega.nz/file/tcdySI5C ; key: 2rmY8RouQ374L17jhuwIcx-hRerBwgelJ69OAKv_X_4

    1.33 05/19/2007 Full Client - Link: https://mega.nz/file/YVEA1CjI ; key: V-sH-tilircBNcEplR10KckQ7MzNQvIsPH8vM9463v4

    1.33 06/27/2007 Full Client - Link: https://mega.nz/file/wBFWWLyb ; key: wcpVeFxO5apHhhYZqOOp7aKyVhSKREwVeiohouivkxA

     

    Patches

    1.33 Open Beta Patch - Link: https://mega.nz/file/Md1nGRQa ; key: lLVmAdJmWR-OoOZvTIpL4LJd8kSZpfMWUbkrSlvsBI0

    1.33 04/19/2007 Patch - Link: https://mega.nz/file/wJURkIQJ ; key: nxJU3kq8Cet95hjQCGSPff3g5-ApwWq51vBixOEk3RQ

    1.33 05/17/2007 Patch - Link: https://mega.nz/file/pUcgmIRY ; key: Fm0Zos5G42RsJv9nj5uL4Mv1L_aY3HylPoFy7h-75vw

     

    • Like 1
    • Thanks 2

  17. [Release] Clean Tales of Pirates 1.38 Client

     

    Hey all. This is the official Tales of Pirates installer for a clean 1.38 client. I have also added an archive of the installed files in case you don't want to run the installer.

     

     

    ELk1MgK.png

     

     

    Installer

    Spoiler

    Link: https://mega.nz/file/8EViRZIa ; key: cWRU0ymHYwv4DVjAJEWudIfBlQJaFKG3OgeucJH6R2E

     

     

    Archive

    Spoiler

    Link: https://mega.nz/file/cUN0WB4I ; key: j0mm5hRy-q4qWwP7cJQMG1mhTAY7zEwmxn1qTKXtwK8

     

    • Like 1
    • Thanks 3

  18. [Guide] How to force users to update clients (using your launcher or patch)

     

    Hey all. I have seen a number of servers simply change the startgame launch command in an effort to combat people simply using a startgame.bat file, but this is not an effective measure to ensure they will actually update their client. This is a very quick, simple guide on how to force users to update their clients using your launcher or patch.

     

    The official method to check for a version difference happens courtesy of the GateServer upon login. If the version check fails, the user is given the following prompt to update their client:

     

    OcVuUIJ.png

     

     

    Configuring the launcher and patch link

    1. Update the game's launcher

    Spoiler

    In order to change which launcher is used when the user clicks 'Confirm', we must modify what is set in Game.exe. In Game.exe the launcher to use is set at address 0x200F3C; the seven bytes at this address determine which launcher to use.

     

    spacer.png

     

    As you can see, the default value is kop.exe; you can also see that there is no space to use a launcher that is longer than 7 characters! Change this value to the name of your launcher; the launcher itself must be placed in the game's root directory. You can change the value using your favourite hex editor, or I have made a tool to help you change it simply available here (https://github.com/jmkimbs/pko-launcher-editor). To use the provided tool, just clone the repository and use make run (on a system with bash, g++, and gnu make) and then follow the instructions. e.g. to change the launcher to kop.bat:

     

    spacer.png

     

    This will mean that when the user presses 'Confirm' in the version mismatch dialogue above, the launcher 'kop.bat' will be run from within the game's root directory.

     

    spacer.png

     

    Although I have used the example 'kop.bat', you can set the launcher to any (up to 7 character) value you want to.

     

     

    2. Update the game's patch link

    Spoiler

    Changing the launcher that opens when the user clicks 'Cancel' is very simple. You simply go into the client's root/scripts folder, and modify 'kop.cfg'. The 'HTTP' key in the '[Version]' section is what corresponds to the patch link. Important note: use backslashes (\) instead of forward slashes (/) in the URL you choose! Otherwise the game cannot determine which part is a comment and which part is not. e.g. if I were to change the patch link from the default to https://www.google.com/:

     

    (before)

    vyxTicv.png

     

    (after)

    O1rNoMS.png

     

    This will mean that when the user presses 'Cancel' in the version mismatch dialogue above, the link https://www.google.com/ will open in the user's default browser.

     

     

    Causing the version mismatch

    3. Update the game's version

    Spoiler

    In order to change the game's version, we must modify what is set in Game.exe. In Game.exe the version is set at address 0x24DA50; the four bytes at this address determine the game's version.

     

    TAiR86x.png

     

    Note that there is no decimal point, and it is just a straight integer conversion; the value is currently 136 which typically corresponds to version 1.36. Change this value to your new version (without the decimal point). You can change the value using your favourite hex editor, by using V3ct0r's Game.exe Info tool, or I have made a tool to help you change it simply available here (https://github.com/jmkimbs/pko-launcher-editor).

     

    To use V3ct0r's tool, refer to the relevant thread:

     

    To use the tool I provided, just clone the repository and use make run (on a system with bash, g++, and gnu make) and then follow the instructions. e.g. to change the version to 1.46:

     

    xJH7Ktt.png

     

    This means that, as far as the client and server are now concerned, the client's version is 1.46, and the client will not be able to login to any server that is not version 1.46.

     

     

    4. Update the server version

    chanasdasd

    Spoiler

    Changing the server version is another very simply task. In the servers GateServer configuration file, the 'Version' key in the '[Main]' section corresponds to the game's version. e.g. if I were to change the server version from 1.36 to 1.46:

     

    (before)

    bCTIsWJ.png

     

    (after)

    IoFHVAy.png

     

    This means that, as far as the server and any connecting clients are now concerned, the server's version is 1.46, and any client that is not version 1.46 will not be able to login.

     

    Now, any time you release a new patch just add an updated Game.exe to the patch with the new server version. Then, before launching the server, update the server version. Any client that has not updated will not be able to log in, and will be redirected to the relevant location in order to update their client!

     

    Feel free to ask any questions, or to add any notes you think might be useful. Thanks for reading!

    • Like 2
    • Thanks 1
×
×
  • Create New...