LibM2 - A LibGame SDK

08/12/2013 16:04 miguelmig#91
How do you get a CHARACTER's position? ( x, y )
08/12/2013 16:57 Computerfreek#92
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.
08/12/2013 18:05 Sphinx²#93
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: [Only registered and activated users can see links. Click Here To Register...]

2. Dir Mapping:
[Only registered and activated users can see links. Click Here To Register...]

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
08/13/2013 15:41 ionutxp#94
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).
08/14/2013 10:27 iMer#95
You should check for the modified time of the file - that's safer
08/18/2013 21:02 ionutxp#96
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.
08/18/2013 22:02 iMer#97
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
08/21/2013 12:11 Howaner#98
Danke, funktioniert super.
Jetzt sind es 6 Befehle mehr auf meinem Testserver
09/05/2013 09:53 koullis1#99
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.
09/05/2013 10:01 .Alpha.#100
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
09/05/2013 11:40 zeromentu#101
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. [Only registered and activated users can see links. Click Here To Register...]

Thanks...
09/05/2013 11:43 iMer#102
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 :p
use
pkCh->GetX()
pkCh->GetY()

Edit:
Video tutorial on Setting up added (see main post)
09/06/2013 19:55 Sphinx²#103
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
09/08/2013 00:24 iMer#104
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 :o
09/08/2013 01:13 Sphinx²#105
Quote:
Originally Posted by iMer View Post
/usr/local/bin/ld: cannot find : No such file or directory

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

Ohne diese Parameter funktioniert es.