Jump to content

Mind Rapist

Active Member
  • Posts

    548
  • Joined

  • Last visited

  • Days Won

    6
  • Feedback

    0%

Posts posted by Mind Rapist

  1. 4 hours ago, Giovanni Emanuele Cannavo said:

    Hello i need to transfer on my server dedicated.

    And i need to know the lib how to install.

    Or need to install lib32 only?

    If you're not gonna be compiling and you will just be running the game you need:

    • /usr/ports/lang/python27
    • /usr/posts/databases/mysqlXX-server
    • /usr/ports/databases/mysqlXX-client

    where XX = the latest compatible version with your source.

    There are a few posts in this forum about setting up a dedicated server.

    Your machine needs to be an x32 OS build unless you've made certain modifications to the source to run on x64 or you can install all necessary libs and ports in their x32 version on your x64 machine.

    If you are gonna be compiling in your dedicated machine you're gonna be needing a lot more tools than that such as gmake, gdb, llvm, llvm-devel, devil, boost-all, cryptopp and more. Do your research in this forum depending on your preferences and requirements of your server, there is an answer for everything about this topic in here.

  2. 37 minutes ago, m2Ciaran said:

    Look for bAnotherWindow in pythonapplication

    Thanks! If anyone else needs this here is a working bool CPythonApplication::Create in UserInterface/PythonApplication.cpp:

    Find:

    else
    {
    	AdjustSize(m_pySystem.GetWidth(), m_pySystem.GetHeight());
    
    	if (Windowed)
    	{
    		m_isWindowed = true;
          ...
        }
      ...
    }

    Adjust like this:

    else
    {
    	AdjustSize(m_pySystem.GetWidth(), m_pySystem.GetHeight());
    
    	if (Windowed)
    	{
    		m_isWindowed = true;
    
    		if (bAnotherWindow)
    		{
    			RECT rc;
    
    			GetClientRect(&rc);
    
    			int windowWidth = rc.right - rc.left;
    			int windowHeight = (rc.bottom - rc.top);
    
    			CMSApplication::SetPosition(GetScreenWidth() - 8 - windowWidth, GetScreenHeight() - 78 - windowHeight);
    		}
    		else
    		{
    			SetPosition(-8, 0);
    		}
    	}
    	else
    	{
    		m_isWindowed = false;
    		SetPosition(0, 0);
    	}
    }

     

  3. Amazing! Thanks for this.

    I made a translated locale_list.txt in case someone may want it:

    English 1252 en
    العربية 1256 ae
    Français 1252 fr
    Deutsch 1252 de
    Dansk 1252 dk
    Ελληνικά 1253 gr
    Español 1252 es
    Italiano 1252 it
    Nederlands 1252 nl
    Magyar 1250 hu
    Polski 1250 pl
    Português 1252 pt
    Română 1250 ro
    Русский 1251 ru
    Türkçe 1254 tr
    Čeština 1250 cz

    I tested it and it works like a charm without any changes

  4. I've seen some clients doing this but I don't have their source plus I'm sure a lot of new devs like me would like an answer to that.

    Most clients start in a specific position (0, 0), therefore when a second instance of the client starts, it goes right on top of the first one and you need to move it (if running on small dimensions such as 800x600) in order to see both of them.

    There are some clients though that start the second instance in the other side of the screen and that's convenient on small dimension settings.

    I know that there is a block of code that can set the position of the client in EterLib/MSWindow.cpp:

    bool CMSWindow::Create(const char* c_szName, int brush, DWORD cs, DWORD ws, HICON hIcon, int iCursorResource)
    {
    	//assert(ms_hInstance != NULL);
    	Destroy();
    		
    	const char* c_szClassName = RegisterWindowClass(cs, brush, MSWindowProcedure, hIcon, iCursorResource);
    
    	m_hWnd = CreateWindow(
    						c_szClassName,
    						c_szName,
    						ws, 
    						0, 0, 0, 0, // <==== Here we can set the first 2 numbers as the position of the window (x, y, width, height)
    						NULL,
    						NULL, 
    						ms_hInstance,
    						NULL);

    but how is it possible to know if there are other client instances open so we can round around this for example?

    1. 0, 0
    2. End of screen width - window width, 0
    3. 0, End of screen height - window height
    4. End of screen width - window width, End of screen height - window height
    5. 0, 0
    6. ...

    Thanks in advance

  5. 1 minute ago, edem0202 said:

    FreeBSD 13.1 amd64

    Well that explains a lot. I haven't looked into how to compile sources in amd64 environments but I strongly suggest either to do your research on that or create a new VM in x32 (x386).

    I would also recommend to use the VDI provided by the creator of the SF until you can find your way around FreeBSD and create your own environment. Then you can copy the files from your old VM to the new one with the knowledge to go through unexpected errors.

    • Metin2 Dev 1
  6. 1 minute ago, edem0202 said:

    Ports Collection support for your FreeBSD version has ended, and no ports are
    guaranteed to build on this system. Please upgrade to a supported release.

    What FreeBSD version are you using?

  7. 33 minutes ago, edem0202 said:

    root@:~ # pkg install devil
    Updating FreeBSD repository catalogue...
    FreeBSD repository is up to date.
    All repositories are up to date.
    Checking integrity... done (0 conflicting)
    The most recent versions of packages are already installed
    root@:~ # cd /usr/ports/graphics/devil
    root@:/usr/ports/graphics/devil # make install clean
    ===> Building/installing portconfig as it is required for the config dialog
    ===>  Cleaning for portconfig-0.6.1
    /!\ ERROR: /!\

    Ports Collection support for your FreeBSD version has ended, and no ports are
    guaranteed to build on this system. Please upgrade to a supported release.

    No support will be provided if you silence this message by defining
    ALLOW_UNSUPPORTED_SYSTEM.

    *** Error code 1

    Stop.
    make[3]: stopped in /usr/ports/ports-mgmt/portconfig
    *** Error code 1

    Stop.
    make[2]: stopped in /usr/ports/ports-mgmt/portconfig

    ===> Options unchanged
    /!\ ERROR: /!\

    Ports Collection support for your FreeBSD version has ended, and no ports are
    guaranteed to build on this system. Please upgrade to a supported release.

    No support will be provided if you silence this message by defining
    ALLOW_UNSUPPORTED_SYSTEM.

    *** Error code 1

    Stop.
    make[1]: stopped in /usr/ports/graphics/devil
    *** Error code 1

    Stop.
    make: stopped in /usr/ports/graphics/devil
    root@:/usr/ports/graphics/devil # 
     

     

    Try using ports. Run the following commands one by one:

    portsnap fetch update
    [WAIT TO FINISH]
    cd /usr/ports/graphics/devil
    make deinstall clean
    [WAIT TO FINISH]
    make install clean
    [WAIT TO FINISH]

     

  8. 35 minutes ago, edem0202 said:

    Hello. Could you help me with this?

    ld-elf32.so.1: Shared object "libIL.so.1" not found, required by "game"

    Devil installed.

    Thanks in advance.😉

    Is the file "libIL.so.1" present in /usr/local/lib? It could be a regular file or a shortcut leading to "libIL.so.1.1.0"

    If not:

    reinstall it in the terminal by pkg:

    pkg install devil

    or ports:

    cd /usr/ports/graphics/devil
    make install clean

    If the file exists add this to your game/src/Makefile if not present:
     

    LIBDIR += -L/usr/local/lib
    LIBS += -lIL

     

  9. I know I'm bumping an old issue but someone may actually need a solution and after finding the needle in the haystack I'm willing to share it:

    The code is self-explanatory:

    		if 0 == player.GetPlayTime():
    			helpButton.Show()
    		else:
    			helpButton.Hide()

    which means that if you see the button the player has no play time.

    The fix? There should be 2 instances of SetPlayTime(number of minutes) in your root python files.

    1. interfaceModule.py:
      	def __OnClickHelpButton(self):
      		player.SetPlayTime(1)
      		self.CheckGameButton()
      		self.OpenHelpWindow()
    2. introSelect.py:
      This was my thing. I installed the new character/empire select/create system and I was missing this part of the code.

      In def OnUpdate(self) find this (should be at the bottom of the def):
      		if -1 != self.startIndex:

      and make sure that it ends like this:
       

      		if -1 != self.startIndex:
      			if app.GetTime() - self.startReservingTime > 3.0:
      				if False == self.openLoadingFlag:
      					chrSlot = self.stream.GetCharacterSlot()
      					net.DirectEnter(chrSlot)
      					self.openLoadingFlag = True
      
      					# Start of Help button fix (assigning play time to the character)
      					playTime = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_PLAYTIME)
      
      					import player
      					player.SetPlayTime(playTime)
      					# End of Help button fix
      					
      					import chat
      					chat.Clear()

      That's it! The problem was that the selected player was never assigned play time and now they have with player.SetPlayTime(playTime) just like in the original introSelect.

    • Love 1
  10. Same issue here (different armor, skill and job) but a skill is not displayed correctly due to one armor (tested with all other armors and works perfect except 20500).

    I've been trying to find how to solve this but I have no idea where the error could be. I checked python, msm and msa files and couldn't find anything. Anyone has a fix or a lead what to look at?

  11. Relog bugs fixes (2)

    Bugs:

    1. Relog with active AFFECT_EUNHYEONG and the character will be visible again after 2 seconds
    2. Relog with an active effect like poison or bleeding and AFFECT_EUNHYEONG and when you come visible again the debuffs will not be visible.

    FIX:

    In InstanceBaseEffect.cpp:

    Find void CInstanceBase::__SetReviveInvisibilityAffect(bool isVisible) and modify as follows
    (or add above void CInstanceBase::__Assassin_SetEunhyeongAffect(bool isVisible) if you don't have it at all)
     

    Spoiler
    void CInstanceBase::__SetReviveInvisibilityAffect(bool isVisible)
    {
    	if (isVisible)
    	{
    		// NOTE : Dress Έ¦ ΐΤ°ν ΐΦΐΈΈι Alpha Έ¦ ³ΦΑφ ΎΚ΄Β΄Ω.
    		if (IsWearingDress())
    			return;
    
    		if (__IsMainInstance() || __MainCanSeeHiddenThing())
    		{
    			m_GraphicThingInstance.BlendAlphaValue(0.5f, 1.0f);
    		}
    		else
    		{
    			// 2004.10.16.myevan.ΐΊΗόΉύ ΏΟΐό ΕυΈν
    			m_GraphicThingInstance.BlendAlphaValue(0.0f, 1.0f);
    #if !defined(__BL_GRAPHIC_ON_OFF__)
    			m_GraphicThingInstance.HideAllAttachingEffect();
    #endif
    		}
    	}
    	else
    	{
    		if (!IsAffect(AFFECT_EUNHYEONG))
    		{
    			m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f);
    			m_GraphicThingInstance.ShowAllAttachingEffect();
    		}
    	}
    }

     

     

    In void CInstanceBase::__Assassin_SetEunhyeongAffect(bool isVisible) add the ShowAllAttachingEffects() command in the else statement like this:
     

    Spoiler
    void CInstanceBase::__Assassin_SetEunhyeongAffect(bool isVisible)
    {
    	if (isVisible)
    	{
    		// NOTE : Dress Έ¦ ΐΤ°ν ΐΦΐΈΈι Alpha Έ¦ ³ΦΑφ ΎΚ΄Β΄Ω.
    		if (IsWearingDress())
    			return;
    
    		if (__IsMainInstance() || __MainCanSeeHiddenThing())
    		{
    			m_GraphicThingInstance.BlendAlphaValue(0.5f, 1.0f);
    		}
    		else
    		{
    			// 2004.10.16.myevan.ΐΊΗόΉύ ΏΟΐό ΕυΈν
    			m_GraphicThingInstance.BlendAlphaValue(0.0f, 1.0f);
    #if !defined(__BL_GRAPHIC_ON_OFF__)
    			m_GraphicThingInstance.HideAllAttachingEffect();
    #endif
    		}
    	}
    	else
    	{
    		m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f);
    		m_GraphicThingInstance.ShowAllAttachingEffect();
    	}
    }

     

     

    Last but not least go to the switch statement in void CInstanceBase::__SetAffect(UINT eAffect, bool isVisible) and change the AFFECT_REVIVE_INVISIBILITY case like this:
     

    Spoiler
    ...
    case AFFECT_REVIVE_INVISIBILITY:
    	__SetReviveInvisibilityAffect(isVisible);
    	break;
    case AFFECT_EUNHYEONG:
    	__Assassin_SetEunhyeongAffect(isVisible);
    	break;
    ...

     

     

    I believe all that's left is figure out how to show the make effect visible to other players like this:
     

    On 12/20/2018 at 11:12 AM, xUniverse said:

    This is what you want?

    2mu7KQx.gif

    (the delay is because I've tested in a online sv and my conection is bad)

     

  12. Taskbar issue FIX

    I would like to show my appreciation once again to every single one of you who asked and answered questions so we can have a complete solution for skill slots in this post. I am posting below the simple solution to the taskbar problem (active effect multiplying when changing a toggled skill/item's position) so we can have all solutions in one place.

    In uiTaskbar.py find:

    	## QuickSlot
    	def RefreshQuickSlot(self):
    	...
    					## NOTE : Activate µΗΎξ ΐΦ΄ΩΈι ΎΖΐΜΔάµµ Ύχµ¥ΐΜΖ®
    			=======>	if player.IsSkillActive(Position):	<========
    						slot.ActivateSlot(slotNumber)
    
    				elif player.SLOT_TYPE_EMOTION == Type:
    					...
    				...
    
    	def canAddQuickSlot(self, Type, slotNumber):

    and add the else statement below like so:

    	## QuickSlot
    	def RefreshQuickSlot(self):
    	...
    					## NOTE : Activate µΗΎξ ΐΦ΄ΩΈι ΎΖΐΜΔάµµ Ύχµ¥ΐΜΖ®
    					if player.IsSkillActive(Position):
    						slot.ActivateSlot(slotNumber)
    					else:
    						slot.DeactivateSlot(slotNumber)
    
    				elif player.SLOT_TYPE_EMOTION == Type:
    					...
    				...
    
    	def canAddQuickSlot(self, Type, slotNumber):
  13. 28 minutes ago, Shang said:

     

    I imagine you installed this version instead of the one from the first post, am I right?

    If the bug of the taskbar is still present you can take the code from the character skills' window, it uses almost the same syntax, you will be able to adapt it.

    Actually yes I saw the message for a v2 coming up but I (wrongly) assumed the link in the main thread will be updated. I ran the update with the new

    Quote

    TransferSlotCoolTime

    and the skill page works peachy on togglables On/Off, death, page change, mastery upgrade and point up.

    Thanks everyone for your questions/answers/support and if u are trying to implement this system make sure you download this link (should say v2😞

    This is the hidden content, please

    and don't forget the includes:

    PythonSlotWindow.cpp

    Quote

    #include "../UserInterface/PythonSkill.h"

    and GameLib/ItemData.h:
     

    Quote

    #include "GameType.h"

     

    • Metin2 Dev 8
  14. 2 hours ago, Shang said:

    What bugs are you experiencing?

    Thanks for the response. I was able to fix everything by making a clean reinstallation of the code (apparently I left something behind the 1st time) so the only thing I couldn't fix was this:

    On 12/16/2021 at 1:29 AM, MEKA said:

    visual bug i just have this problem

    and the one in the taskbar that changing position of the active skill adds the effect to the second slot

  15. I have been struggling with all the bugs after trying everything in this post. I have been searching for answers several days now so if anyone can help me and any other person trying to fix those bugs we would be very grateful to you.

    Here is my code:

    PythonSlotWindow.cpp:
    https://pastebin.com/vZEueRRt

    PythonSlotWindow.h:
    https://pastebin.com/B0viTpCD

    PythonWindowManagerModule.cpp:
    https://pastebin.com/PEa1Aqsa

    ui.py:
    https://pastebin.com/ueSW9N4h

    uiCharacter.py:
    https://pastebin.com/KtkYu1zw

  16. 1 hour ago, samboy said:
    VM Name: asdasdasd
    
    Failed to open image 'C:\ulthar_sf_13.1.vdi' for writing due to wrong permissions (VERR_VD_IMAGE_READ_ONLY).
    PIIX3 cannot attach drive to the Primary Master (VERR_VD_IMAGE_READ_ONLY).
    Result Code:
    E_FAIL (0X80004005)
    Component:
    ConsoleWrap
    Interface:
    IConsole {6ac83d89-6ee7-4e33-8ae6-b257b2e81be8}

    does anyone know what's wrong? win11 asus tuf gaming. Thank you

    Not sure I know what to do here but try to go to Settings => System => "Processor" tab and toggle the checkbox that says Activate PAE/NX. Also check your memory (no more than 4GB of RAM) and the number of processors should be 4 or less

    Hope this helped you bro

  17. I implemented 6 new skills and I'm having this issue:

    https://metin2.download/picture/N3u7xF2b6ea5qBGO82NYmsPI3yLqRhEo/.png

    As you can see all skills work fine except 173 and I have no idea where to look for the error. Could it be in the DB, the texts or some c++/python issue?

    Navicat record:

    Spoiler

    173    κ°€μ†�ν™”    7    1    1    0    HP    -(3*atk+(0.8*atk+str*6+dex*2+con)*k)    40+100*k            12    -(3*atk+(0.8*atk+str*6+dex*2+con)*k)        ATTACK,USE_MELEE_DAMAGE        DEF_GRADE    -30*k    5                    40+100*k    0    0    MELEE    10    1    800    100

     

    Skilltable.txt

    Spoiler

    173    ΖΔΌβ    7    1    1    0    HP    -(3*atk+(0.8*atk+str*6+dex*2+con)*k)    40+100*k            12            ATTACK,USE_MELEE_DAMAGE        DEF_GRADE    -30*k    5    63    0    0    MELEE    10    1    800    100

     

    Skilldesc.txt

    Spoiler

    173    WOLFMAN    Wolf's Claw    Wolf's Bite    Blood Lust    Shred your enemy's armour.    Physical ranged attack    Reduces opponent's defence    Reduces opponent's movement speed    Strengthened by STR, DEX, VIT    ATTACK_SKILL|NEED_TARGET|WEAPON_LIMITATION    CLAW    wreckage    4    4            Total attack power: %.0f-%.0f    3*MinATK + (0.8*MinATK + STR*6 + DEX*2 + CON) * SkillPoint    3*MaxATK + (0.8*MaxATK + STR*6 + DEX*2 + CON) * SkillPoint    Chance of critical attack: %.0f%%    20        Opponent's defence: -%.0f     -30*k        Opponent's movement speed: -%.0f    -(1+9*k)    

     

    If someone could at least point me in the right direction or give me a variable to look for could be a lot of help. Thank you community

     

    SOLVED:

    After being able to find another file to compare it the problem was tabs in skilldesc.txt. If you come across the same issue please check for double tabs between values:

    Quote

    -%.0f[TAB][TAB]-30*k

    should be:

    Quote

    -%.0f[TAB]-30*k


     

  18. I know it's been a while since this post came out but does anyone else have name_warrior/assassin/... missing from create character page? Not the small ones the regular ones above the characters board

     

    SOLVED:

    Find def __SelectSlot(self, slot) in introCreate.py

    Spoiler
    		self.__MakeCharacter(slot)
    		self.__SelectGender(0)
    		self.__SelectShape(0)

     

    add the missing code above like this:

    Spoiler
    		for i in xrange(SLOT_COUNT):
    			self.destNameAlpha[i] = 0.0
    			
    		if slot >= 0 and slot < SLOT_COUNT:
    			self.destNameAlpha[slot] = 1.0
    		
    		self.__MakeCharacter(slot)
    		self.__SelectGender(0)
    		self.__SelectShape(0)

     

     

  19. 22 minutes ago, samboy said:

    Hi. how can I change the "quest" and the client to Hungarian?

    To change language in server:

    1. /usr/metin2/server/share/conf/item_names.txt ==> item_names_en.txt AND item_names_hu.txt ==> item_names.txt
    2. /usr/metin2/server/share/conf/mob_names.txt ==> mob_names_en.txt AND mob_names_hu.txt ==> mob_names.txt
    3. /usr/metin2/server/share/locale/english ==> Rename this folder to 'hungary'
    4. /usr/metin2/server/share/locale/hungary/locale_string.txt ==> locale_string_en.txt AND locale_string_hu.txt ==> locale_string.txt
    5. /usr/metin2/server/share/locale/hungary/translate.lua ==> translate_EN.lua AND translate_HU.lua ==> translate.lua
    6. terminal ==> close
    7. terminal ==> start > number of channels you wanna start

    To change language in client:

    locale.cfg file: change '10002 1252 en' ==> '[Hungarian encoding] hu'

    Start the client

  20. 11 hours ago, trawismontana said:

    I don't understand, I only configured the client

    SYSSER

     

    SYSERR: Nov 21 19:06:48 :: pid_init: 
    Start of pid: 986

    SYSERR: Nov 21 19:06:48 :: socket_connect: HOST 127.0.0.1:15000, could not connect.
    SYSERR: Nov 21 19:06:51 :: socket_connect: HOST 127.0.0.1:15000, could not connect.
    SYSERR: Nov 21 19:06:54 :: socket_connect: HOST 127.0.0.1:15000, could not connect.
    SYSERR: Nov 21 19:06:57 :: socket_connect: HOST 127.0.0.1:15000, could not connect.
    SYSERR: Nov 21 19:07:00 :: socket_connect: HOST 127.0.0.1:15000, could not connect.
    SYSERR: Nov 21 19:07:03 :: socket_connect: HOST 127.0.0.1:15000, could not connect.
    SYSERR: Nov 21 19:07:06 :: socket_connect: HOST 127.0.0.1:15000, could not connect.
    SYSERR: Nov 21 19:07:09 :: socket_connect: HOST 127.0.0.1:15000, could not connect.
    SYSERR: Nov 21 19:07:12 :: socket_connect: HOST 127.0.0.1:15000, could not connect.
    SYSERR: Nov 21 19:07:13 :: hupsig: SIGHUP, SIGINT, SIGTERM signal has been received. shutting down.
    SYSERR: Nov 21 19:07:13 :: pid_deinit: 
    End of pid

    This happened to me after adding a system that required changes to the db code, tables and protos. It would be useful to know what you did and how you fixed it so we can get some clarity in future cases through your experience.

    My experience was adding the wolfman and importing a skill_proto table from another SF into my system. I never found out what the problem was (encoding or something) but once I rolled back and added the 5 skills manually to my existing table I had no issue.

    If you happen to run on this error please check any table/proto changes and always prefer to add new stuff manually rather than replacing a whole table with a new one.

    I'm glad you worked your error through!

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.