Register for your free account! | Forgot your password?

You last visited: Today at 09:52

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



LibM2 - A LibGame SDK

Discussion on LibM2 - A LibGame SDK within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old 08/12/2013, 16:04   #91
 
miguelmig's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 113
Received Thanks: 44
How do you get a CHARACTER's position? ( x, y )
miguelmig is offline  
Old 08/12/2013, 16:57   #92

 
elite*gold: 0
Join Date: Feb 2008
Posts: 2,754
Received Thanks: 1,748
Quote:
Originally Posted by Sphinx² View Post
Ne frage bezüglich compilen.

Ich hab probleme mit Uniwin und Codeblocks...
Es kommt öfters dazu das gssh einfach abstürzt. (Uniwin modul).

Ich wollte fragen wie es aussieht mit dem Befehl um das ganze zu compilen?


Ich hab es damit probiert aber irgendwie, passiert einfach nichts beim preloaden....

PHP Code:
g++48 -std=c++11 -shared -fPIC game/CHARACTER.cpp game/misc.cpp game/lua.cpp game/EVENT.cpp game/DESC.cpp game/CInputProcessor.cpp game/CInputMain.cpp game/CInputAuth.cpp game/quest/CQuestManager.cpp lib/dif.cpp lib/log.cpp IQuest.cpp LibM2.cpp Command.cpp src/ban.cpp src/main.cpp -/usr/home/metin2/metintest/server/share/bin/libgame_ext.so 
Edit: Hab es hingekriegt ...

Grüessli
Sphinx
Wäre schön, wenn du uns auch mitteilen würdest wie, da einige auf die selben Probleme stoßen könnten.
Computerfreek is offline  
Old 08/12/2013, 18:05   #93
 
Sphinx²'s Avatar
 
elite*gold: 1918
Join Date: Feb 2008
Posts: 1,368
Received Thanks: 1,287
Quote:
Originally Posted by Computerfreek View Post
Wäre schön, wenn du uns auch mitteilen würdest wie, da einige auf die selben Probleme stoßen könnten.
Erstellen von aliases server side (.shrc datei im root ordner):
alias gcc='gcc48 -std=c++11'
alias g++='g++48 -std=c++11'
- Denkt daran... Gcc48 muss installiert sein.

1. Uniwin einrichten:

2. Dir Mapping:


3. Alle files auf den Server laden + in den localen ordner

4. Codeblocks neues Projekt erstellen (empty project).

5. Links sollte das Management sein udn da sollten die Files sein.
Da gebt ihr oben den Pfad zu eurem Projekt ordner an und added dann alle Files mit rechtsklick in das Projekt. "Add to active Project" (Ordner gehen nicht).

6. Boost installieren (Die voraussgesetzte Version)

7. Compilen

Ich denke das hier die einen oder anderen das hinkriegen...
Hab es jetzt nicht so ausführlich erklärt.

Gruss
Sphinx
Sphinx² is offline  
Thanks
1 User
Old 08/13/2013, 15:41   #94
 
elite*gold: 0
Join Date: Mar 2009
Posts: 28
Received Thanks: 13
This tool i've made for iMer's SDK can help you guys to improve your lib writing efficiency.
As an optimization, it caches the .cpp's size and for the next build . If the file size match this "soft" will skip the file and link with the old .o file.
It also supports server close and start and build clean option.

How to use this file?
Place the compile.py and toCompile.txt in your libs folder
Enter compile.py and make the settings.
Run in your ssh client:| python compile.py | and wait.
To make clean build?| python compile.py -clean |

In toCompile.txt you will add the new files that you will use in the project.
PS: Maybe i will add an real time scaner for project files, but i'm 0 to python and i need time.
Ps2: I renamed utils/hde/hde32.c to utils/hde/hde32.cpp for 100% compatibility.
Ps3: The file order from toCompile.txt can affect the c++ linker and the final result. (I'm not so sure.)
Edit:
Just use python compile.py -clean bcoz caching is an bad idea (my logic fault) - I will make cache to work only with files that are not edited everytime (classes from game, files from utils/lib).
Attached Files
File Type: rar EasyM2LibSdkCompiler.rar (1.8 KB, 67 views)
ionutxp is offline  
Thanks
2 Users
Old 08/14/2013, 10:27   #95

 
iMer's Avatar
 
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
You should check for the modified time of the file - that's safer
iMer is offline  
Old 08/18/2013, 21:02   #96
 
elite*gold: 0
Join Date: Mar 2009
Posts: 28
Received Thanks: 13
BUMP & updated python project compiler whit the new cache feature.

- Also, you can post a little sample about how to acces or edit the guild/char exp tables ?
- And another question ? Is there a way to modify the db cache lib to fetch the item/mob name according to an account collum in the sql ? (account -> account -> lang or player -> player -> lang)
For example the item proto may have additional collums like: en, de, pl, ro an so on (where we can store the item/mob name in different langs) making possible a 100% multinational server.

All the best.
Attached Files
File Type: rar EasySDKcompiler.rar (1.6 KB, 42 views)
ionutxp is offline  
Old 08/18/2013, 22:02   #97

 
iMer's Avatar
 
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
Quote:
Originally Posted by ionutxp View Post
BUMP & updated python project compiler whit the new cache feature.

- Also, you can post a little sample about how to acces or edit the guild/char exp tables ?
I havent looked at it yet, but you should be able to just take the pointer to the table, find outs it's type and then do something like this:
datatype = the type of data
0x123 = the address
datatype* guild_exp_table=(datatype*)0x123;
and then use it like you would normally.

Quote:
Originally Posted by ionutxp View Post
- And another question ? Is there a way to modify the db cache lib to fetch the item/mob name according to an account collum in the sql ? (account -> account -> lang or player -> player -> lang)
For example the item proto may have additional collums like: en, de, pl, ro an so on (where we can store the item/mob name in different langs) making possible a 100% multinational server.
You'd have to edit the code for sending/recieving the proto structures db->game for that, so it'll be a shitton of work.

It might be faster to just load the names for each game and edit all the functions where the item name is shown to pick a name based on the characters language (basically only item pickup?)


iMer
iMer is offline  
Old 08/21/2013, 12:11   #98
 
Howaner's Avatar
 
elite*gold: 132
Join Date: Apr 2010
Posts: 2,864
Received Thanks: 2,009
Danke, funktioniert super.
Jetzt sind es 6 Befehle mehr auf meinem Testserver
Howaner is offline  
Old 09/05/2013, 09:53   #99
 
elite*gold: 0
Join Date: Aug 2011
Posts: 61
Received Thanks: 13
Is this the full source of the gamefile? or it has to be loaded from the gamefile as a library??
Seems to be great good job.
koullis1 is offline  
Old 09/05/2013, 10:01   #100

 
elite*gold: 0
Join Date: Jul 2009
Posts: 2,471
Received Thanks: 5,622
Quote:
Originally Posted by koullis1 View Post
Is this the full source of the gamefile? or it has to be loaded from the gamefile as a library??
Seems to be great good job.
No, it isn't. It's a Developement Kit you can use to build a libary

Quote:
Originally Posted by miguelmig View Post
How do you get a CHARACTER's position? ( x, y )
Let's say you have a CHARACTER* pkCh;

pkCh->m_pos.x
pkCh->m_pos.y

CHARACTER inherits CEntity and some others
.Alpha. is offline  
Old 09/05/2013, 11:40   #101
 
elite*gold: 0
Join Date: Oct 2011
Posts: 32
Received Thanks: 37
Guys i'm with a problem compiling with EasySDKcompiler.rar from ionutxp. It compiles everthing well less this file "/utils/hde/hde32.cpp" i already renamed the hd32.c to cpp then a lot of errors appears.

Thanks...
zeromentu is offline  
Old 09/05/2013, 11:43   #102

 
iMer's Avatar
 
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
Quote:
Originally Posted by .Nova. View Post
No, it isn't. It's a Developement Kit you can use to build a libary



Let's say you have a CHARACTER* pkCh;

pkCh->m_pos.x
pkCh->m_pos.y

CHARACTER inherits CEntity and some others
protected properties
use
pkCh->GetX()
pkCh->GetY()

Edit:
Video tutorial on Setting up added (see main post)
iMer is offline  
Old 09/06/2013, 19:55   #103
 
Sphinx²'s Avatar
 
elite*gold: 1918
Join Date: Feb 2008
Posts: 1,368
Received Thanks: 1,287
Ich krieg jedes mal einen Error beim Compilen.
Das auch erst seit dem ich meinen Server neu aufgesetzt hab.

PHP Code:
g++.exe  -o bin/Debug/LibM2.exe obj/Debug/src/libm2/Command.o obj/Debug/src/libm2/game/CEntity.o obj/Debug/src/libm2/game/CFSM.o obj/Debug/src/libm2/game/CGuild.o obj/Debug/src/libm2/game/CGuildManager.o obj/Debug/src/libm2/game/CHARACTER.o obj/Debug/src/libm2/game/CHARACTER_MANAGER.o obj/Debug/src/libm2/game/CHorseRider.o obj/Debug/src/libm2/game/CInputAuth.o obj/Debug/src/libm2/game/CInputClose.o obj/Debug/src/libm2/game/CInputDead.o obj/Debug/src/libm2/game/CInputLogin.o obj/Debug/src/libm2/game/CInputMain.o obj/Debug/src/libm2/game/CInputProcessor.o obj/Debug/src/libm2/game/CItem.o obj/Debug/src/libm2/game/CShopManager.o obj/Debug/src/libm2/game/CState.o obj/Debug/src/libm2/game/DBManager.o obj/Debug/src/libm2/game/DESC.o obj/Debug/src/libm2/game/DESC_MANAGER.o obj/Debug/src/libm2/game/EVENT.o obj/Debug/src/libm2/game/ITEM_MANAGER.o obj/Debug/src/libm2/game/LogManager.o obj/Debug/src/libm2/game/lua.o obj/Debug/src/libm2/game/misc.o obj/Debug/src/libm2/game/P2P_MANAGER.o obj/Debug/src/libm2/game/quest/CQuestManager.o obj/Debug/src/libm2/game/quest/PC.o obj/Debug/src/libm2/game/SECTREE_MANAGER.o obj/Debug/src/libm2/game/SECTREE_MAP.o obj/Debug/src/libm2/game/SQLMsg.o obj/Debug/src/libm2/game/SQLResult.o obj/Debug/src/libm2/game/TAffectFlag.o obj/Debug/src/libm2/game/TEMP_BUFFER.o obj/Debug/src/libm2/game/VID.o obj/Debug/src/libm2/IQuest.o obj/Debug/src/libm2/lib/dif.o obj/Debug/src/libm2/lib/log.o obj/Debug/src/libm2/LibM2.o obj/Debug/src/libm2/utils/hde/hde32.o obj/Debug/src/main.o obj/Debug/src/MyCommand.o   -shared -lpthread -Wl, -soname=libgame.so  
/usr/local/bin/ldcannot find No such file or directory
collect2
errorld returned 1 exit status 
Hab ich irgendwas vergessen?

Gruss
Sphinx
Sphinx² is offline  
Old 09/08/2013, 00:24   #104

 
iMer's Avatar
 
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
Quote:
Originally Posted by Sphinx² View Post
Ich krieg jedes mal einen Error beim Compilen.
Das auch erst seit dem ich meinen Server neu aufgesetzt hab.

PHP Code:
g++.exe  -o bin/Debug/LibM2.exe obj/Debug/src/libm2/Command.o obj/Debug/src/libm2/game/CEntity.o obj/Debug/src/libm2/game/CFSM.o obj/Debug/src/libm2/game/CGuild.o obj/Debug/src/libm2/game/CGuildManager.o obj/Debug/src/libm2/game/CHARACTER.o obj/Debug/src/libm2/game/CHARACTER_MANAGER.o obj/Debug/src/libm2/game/CHorseRider.o obj/Debug/src/libm2/game/CInputAuth.o obj/Debug/src/libm2/game/CInputClose.o obj/Debug/src/libm2/game/CInputDead.o obj/Debug/src/libm2/game/CInputLogin.o obj/Debug/src/libm2/game/CInputMain.o obj/Debug/src/libm2/game/CInputProcessor.o obj/Debug/src/libm2/game/CItem.o obj/Debug/src/libm2/game/CShopManager.o obj/Debug/src/libm2/game/CState.o obj/Debug/src/libm2/game/DBManager.o obj/Debug/src/libm2/game/DESC.o obj/Debug/src/libm2/game/DESC_MANAGER.o obj/Debug/src/libm2/game/EVENT.o obj/Debug/src/libm2/game/ITEM_MANAGER.o obj/Debug/src/libm2/game/LogManager.o obj/Debug/src/libm2/game/lua.o obj/Debug/src/libm2/game/misc.o obj/Debug/src/libm2/game/P2P_MANAGER.o obj/Debug/src/libm2/game/quest/CQuestManager.o obj/Debug/src/libm2/game/quest/PC.o obj/Debug/src/libm2/game/SECTREE_MANAGER.o obj/Debug/src/libm2/game/SECTREE_MAP.o obj/Debug/src/libm2/game/SQLMsg.o obj/Debug/src/libm2/game/SQLResult.o obj/Debug/src/libm2/game/TAffectFlag.o obj/Debug/src/libm2/game/TEMP_BUFFER.o obj/Debug/src/libm2/game/VID.o obj/Debug/src/libm2/IQuest.o obj/Debug/src/libm2/lib/dif.o obj/Debug/src/libm2/lib/log.o obj/Debug/src/libm2/LibM2.o obj/Debug/src/libm2/utils/hde/hde32.o obj/Debug/src/main.o obj/Debug/src/MyCommand.o   -shared -lpthread -Wl, -soname=libgame.so  
/usr/local/bin/ldcannot find No such file or directory
collect2
errorld returned 1 exit status 
Hab ich irgendwas vergessen?

Gruss
Sphinx
/usr/local/bin/ld: cannot find : No such file or directory

kp was du da angestellt hast
iMer is offline  
Old 09/08/2013, 01:13   #105
 
Sphinx²'s Avatar
 
elite*gold: 1918
Join Date: Feb 2008
Posts: 1,368
Received Thanks: 1,287
Quote:
Originally Posted by iMer View Post
/usr/local/bin/ld: cannot find : No such file or directory

kp was du da angestellt hast
-Wl, -soname=libgame.so

Ohne diese Parameter funktioniert es.
Sphinx² is offline  
Reply

Tags
c++, code, lib, libgame, sdk




All times are GMT +2. The time now is 09:52.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.