Jump to content
  • 0
Patskie

[Guide] How to setup hercules

Question

There is an existing server installation guide made by Diconfrost VaNz on this topic but this is outdated. So let me give ample time to share my experience on how to install Hercules SVN on your local machine.

 

1. To obtain hercules, refer to Ind's topic

2. Go to conf/char-server.conf and look for the code below : 

// Server Communication username and password.userid: s1passwd: p1

 

Set s1 and p1 to anything you want but take note of them as you will use them later on when you move to SQL portion of this installation.

 

In my case, i will use patskie since it is my screen name.

// Server Communication username and password.userid: patskiepasswd: patskie

 

3. Set your server name? Find this line also on your conf/char-server.conf. Change it to whatever you want : 

// Server name, use alternative character such as ASCII 160 for spaces.// NOTE: Do not use spaces or any of these characters which are not allowed in //       Windows filenames /:*?"<>|//       ... or else guild emblems won't work client-side!server_name: Hercules

 

4. Remove // on the following code : 

//login_ip: 127.0.0.1

 

//char_ip: 127.0.0.1

Note : 127.0.0.1 means localhost, local machine.

 

5. Save and exit

6. Now go to conf/map-server.conf

7. Same to what you have did in conf/char-server.conf :

//--------------------------------------------------------------//                     Configuration Info//--------------------------------------------------------------// Interserver communication passwords, set in account.txt (or equiv.)userid: patskiepasswd: patskie

 

8. Remove // on the following code :

//char_ip: 127.0.0.1

 

//map_ip: 127.0.0.1

 

9. Once you're done. Save and exit.

10. Now go to conf/inter-server.conf

11. Set the following code :

// Global SQL settings// overriden by local settings when the hostname is defined there// (currently only the login-server reads/obeys these settings)sql.db_hostname: 127.0.0.1sql.db_port: 3306sql.db_username: rootsql.db_password: ragnaroksql.db_database: herculessql.codepage:// MySQL Character SQL serverchar_server_ip: 127.0.0.1char_server_port: 3306char_server_id: rootchar_server_pw: ragnarokchar_server_db: hercules// MySQL Map SQL Servermap_server_ip: 127.0.0.1map_server_port: 3306map_server_id: rootmap_server_pw: ragnarokmap_server_db: hercules// MySQL Log SQL Databaselog_db_ip: 127.0.0.1log_db_port: 3306log_db_id: rootlog_db_pw: ragnaroklog_db_db: loglog_codepage:log_login_db: loginlog

Note : Use 127.0.0.1 as ip because you will run these server on your local machine. Use root as the database id because by default MySQL workbench uses root as username. And finally ragnarok as database password which is configurable by users. Set map, char an sql database to hercules and set log database to loginlog 

 

12. Once done, Save and exit

13. Now go to src/common/mmo.h and find the following code :

#ifndef PACKETVER	#define PACKETVER 20120418#endif

Change to : 

#ifndef PACKETVER	#define PACKETVER 20100730#endif

Note : You can change 20120418 (2012-04-18) to whatever client-date you want. In my case i will use 2010-07-30 client (20100730).

 

14. Save and exit.

15. Now let's go to mysql part.

16. Download MySQL workbench here. Why workbench? More convenient to use.

17. Once you are finished downloading and installing. Download WAMP server here because workbench will not start functioning if you do not have WAMP server

18. Once you are finished downloading and installing wampserver. Run it

19. Open mysql workbench

20. Add user and password into it. Follow this guide. Make sure you set username as root and password as ragnarok because this is the credentials located on your conf/inter-server.conf

21. Create a server instance and connection. Just click New Connection for creating connection and click New Server Instance for creating a new server instance everything there are self explanatory

22. More likely you must have the following : ( Check image below )

post-449-0-53815600-1370176262_thumb.png

23. At the left portion of the application. You can see schemas. Right click on one of them (test schema) and click on create schema

24. Set the name of the schema to hercules because that is the credential we put in our inter-server

25. Create also a schema log 

26. Double click hercules schema

27. Under file located at the bottom of the home button ( upper left to be exact ) click Open SQL Script and locate sql script on sql-files/main.sql, open it and execute ( you can find execute button at the upper portion of the text editor of mysql workbench it looks like a thunder xD )

28. Double click log schema

29. Under file located at the bottom of the home button ( upper left to be exact ) click Open SQL Script and locate sql script on sql-files/logs.sql, open it and execute ( you can find execute button at the upper portion of the text editor of mysql workbench it looks like a thunder xD )

30. Once everything is set double click again hercules schema

31. Execute the following code 

SELECT * FROM login;

32. Change userid, user_pass to the credentials you have put on both char-server and map-server.conf

33. Click apply.

34. Once done, go back to your server files and compile everything using Microsoft Visual Studio 2009 or 2010 or 2012 

 

Note : 

Microsoft Visual Studio 2009 = Hercules-9

Microsoft Visual Studio 2010 = Hercules-10

Microsoft Visual Studio 2012 = Hercules-12

 

35. Open it via C++

36. In my case i am using MVS 2010, Highlight char-server, login-server, map-server, mapcache at the left portion of the application. Right click on it and click Build Selection

37. Check image for successful compilation, Once done exit the application

post-449-0-76531700-1370177311_thumb.png

38. Now you're done! Run run-server.bat on main folder

 

 

I hope this guide help other people who find it difficult to install hercules svn on your local machine. Actually this guide is not hard. I just divided the guide into small chunks so that people will understand more. If you think that any portion of installation is not included in my guide or maybe in some way not good or not correct then feel free to post it.

 

Additional Notes : 

- If you want other people to connect then you must port forward your router, or you can use other application like hamachi

- If any error occur feel free to post it here. Make sure you will post it in a detailed manner. Post screenshot if possible

- I include a diff client for 2010-07-30 since i use it in this guide

2010-07-30-DIFF.rar

Edited by Patskie

Share this post


Link to post
Share on other sites

107 answers to this question

Recommended Posts

  • 0

sir can i ask something? i'm new to hercules and i want to know what folder should i go with the SVN of hercules because there is 2 folder branches and trunk. i'm confused what should i edit. thanks

 

Patskie, what he means is that when you checkout/clone hercules, there are two folders in the hercules folder which is the branches folder and the trunk folder, his asking what folder contains the correct files to edit.

Share this post


Link to post
Share on other sites
  • 0

Thank you for your guide pats! But unfortunately I'm stuck at number 20. Adding user at workbench.

I can't seem to find that part, where to add the user and password.

 

Looks like Mysql Workbench 6.0.8 is different from what you used in this guide.

 

Sigh! When I try to connect to database i got error (see attached files). My WAMPSERVER is all running when I'm connecting to DB. 

 

I'm lost, please help. Anyone pls?

 

Thanks!

 

 

 

post-4596-0-23367300-1389097552_thumb.jpg

post-4596-0-03017500-1389097571_thumb.jpg

Share this post


Link to post
Share on other sites
  • 0

Thank you for your guide pats! But unfortunately I'm stuck at number 20. Adding user at workbench.

I can't seem to find that part, where to add the user and password.

 

Looks like Mysql Workbench 6.0.8 is different from what you used in this guide.

 

Sigh! When I try to connect to database i got error (see attached files). My WAMPSERVER is all running when I'm connecting to DB. 

 

I'm lost, please help. Anyone pls?

 

Thanks!

 

Now I'm getting this error when compiling Hercules 10 using MVS 2010.

 

[cbox]J:Ragnarok Server DevelopmentHerculesvcproj-10char-server.vcxproj : error : Cannot evaluate the property expression "$(Registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A@InstallationFolder)" found at "HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSBuildToolsVersions4.0@FrameworkSDKRoot". The registry expression "$(Registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A@InstallationFolder)" cannot be evaluated. Requested registry access is not allowed.

 

J:Ragnarok Server DevelopmentHerculesvcproj-10login-server.vcxproj : error : Cannot evaluate the property expression "$(Registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A@InstallationFolder)" found at "HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSBuildToolsVersions4.0@FrameworkSDKRoot". The registry expression "$(Registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A@InstallationFolder)" cannot be evaluated. Requested registry access is not allowed.

 

J:Ragnarok Server DevelopmentHerculesvcproj-10map-server.vcxproj : error : Cannot evaluate the property expression "$(Registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A@InstallationFolder)" found at "HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSBuildToolsVersions4.0@FrameworkSDKRoot". The registry expression "$(Registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A@InstallationFolder)" cannot be evaluated. Requested registry access is not allowed.

 

J:Ragnarok Server DevelopmentHerculesvcproj-10mapcache.vcxproj : error : Cannot evaluate the property expression "$(Registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A@InstallationFolder)" found at "HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSBuildToolsVersions4.0@FrameworkSDKRoot". The registry expression "$(Registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A@InstallationFolder)" cannot be evaluated. Requested registry access is not allowed.

 

J:Ragnarok Server DevelopmentHerculesvcproj-10plugin-sample.vcxproj : error : Cannot evaluate the property expression "$(Registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A@InstallationFolder)" found at "HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSBuildToolsVersions4.0@FrameworkSDKRoot". The registry expression "$(Registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A@InstallationFolder)" cannot be evaluated. Requested registry access is not allowed.

 

J:Ragnarok Server DevelopmentHerculesvcproj-10plugin-HPMHooking.vcxproj : error : Cannot evaluate the property expression "$(Registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A@InstallationFolder)" found at "HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSBuildToolsVersions4.0@FrameworkSDKRoot". The registry expression "$(Registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A@InstallationFolder)" cannot be evaluated. Requested registry access is not allowed.

[/cbox]

Share this post


Link to post
Share on other sites
  • 0

did you know this?

 

use ms 2010 for hercules-9.sln

use ms 2011 for hercules-10.sln

use ms 2012 for hercules-11.sln

use ms 2013 for hercules-12.sln

 

hope i help you.

Share this post


Link to post
Share on other sites
  • 0

did you know this?

 

use ms 2010 for hercules-9.sln

use ms 2011 for hercules-10.sln

use ms 2012 for hercules-11.sln

use ms 2013 for hercules-12.sln

 

hope i help you.

 

Thanks for the info. I will try this out later.

 

BTW, Patskie note to use MVS 2010 for Hercules-10

 

Note : 

Microsoft Visual Studio 2009 = Hercules-9

Microsoft Visual Studio 2010 = Hercules-10

Microsoft Visual Studio 2012 = Hercules-12

Share this post


Link to post
Share on other sites
  • 0

Microsoft Visual Studio 2009 = Hercules-9

Microsoft Visual Studio 2010 = Hercules-10

Microsoft Visual Studio 2012 = Hercules-12

Hello Hadeszeus,

 

For you to be clear.

 

Hercules 11 = VS 2012 

Hecrulse 12 = VS 2013

Share this post


Link to post
Share on other sites
  • 0
Thanks for your help.
 
I was able to BUILD/REBUILD Hercules-10. But when I try to RUN run-server.bat, all 3 servers are getting error message "char-server.bat is not recognized as an internal or external command operable program or batch file."
 
Can you help me find the problem? Maybe I missed something. 
 
BTW, I'm using Workbench 6.0.8 it's completely different from what Patskie used in the tutorial. So maybe I made a mistake.
 
Kindly see the SCREENSHOT http://idworxph.com/myhercuerror.png   (sorry I can't upload the image my network blocked the uploading)
 
Thank you.
Edited by Hadeszeus

Share this post


Link to post
Share on other sites
  • 0

 

just wanna ask, this method can already connect other players thru online? or this is just for lan/offline? like server testing...

LAN only. If you want to make other players connect with this. You need to port forward your router.

 

Now if I have a static IP on a server (like not at a home router etc.) I can just replace all the localhost / 127.0.0.1 to my IP correct?

Share this post


Link to post
Share on other sites
  • 0

You can use anything that sets you up a MySQL server, but some steps would be different. We are just walking through the easiest way at our point of view.

Share this post


Link to post
Share on other sites
  • 0

is this stiLL working??

 

as I can see on the first topic, nothing has changed, you may try it and if you got any question just ask :)

Share this post


Link to post
Share on other sites
  • 0

I used MySQL 5.6 + workbench 6.1 prior changed it to MariaDB.

The graphical interface is different but that shouldn't be a problem.

After you installed Workbench you should have a connection named "root", it can be seen in first interface.

You can open it by double clicking it, then you can make "hercules" & "log" schema, and follow the rest of the guide.

Share this post


Link to post
Share on other sites
  • 0

sound like your server failed to connect to mysql database.

 

Check these :

 

1. Patskie's step 2-4 :

 

  in confchar-server.conf :

 

// Server Communication username and password.
userid: patskie
passwd: patskie

 

 

in confmap-server.conf :

 

// Interserver communication passwords, set in account.txt (or equiv.)
userid: patskie
passwd: patskie

 

 

Those userid & password must be match with the one in login database

(Patskie's step 31, you should change s1 & p1 to whatever in your char-server.conf & map-server.conf)

 

2.  from Patskie's step 11 :

 

 

// Global SQL settings
// overriden by local settings when the hostname is defined there
// (currently only the login-server reads/obeys these settings)
sql.db_hostname: 127.0.0.1
sql.db_port: 3306
sql.db_username: root
sql.db_password: ragnarok

sql.db_database: hercules
sql.codepage:


// MySQL Character SQL server
char_server_ip: 127.0.0.1
char_server_port: 3306
char_server_id: root
char_server_pw: ragnarok

char_server_db: hercules


// MySQL Map SQL Server
map_server_ip: 127.0.0.1
map_server_port: 3306
map_server_id: root
map_server_pw: ragnarok

map_server_db: hercules


// MySQL Log SQL Database
log_db_ip: 127.0.0.1
log_db_port: 3306
log_db_id: root
log_db_pw: ragnarok

log_db_db: log
log_codepage:
log_login_db: loginlog

 

 

make sure in MySQL Workbench you have user with same name and password with those part from your confinter-server.conf (which written in bold)

Share this post


Link to post
Share on other sites
  • 0

can somebody help me?i followed everything this tutorial tells..but im using workbench 6.1 and i used the hercules 10 with the microsoft visual 2010..help.jpg

Share this post


Link to post
Share on other sites
  • 0

31. Execute the following code 

SELECT * FROM login;

32. Change userid, user_pass to the credentials you have put on both char-server and map-server.conf

33. Click apply.

 

i think i dont get this..

Share this post


Link to post
Share on other sites
  • 0

You are doing some mistake when creating database, your database are not created.

 

This is copied from patskie guide above (I add some hint for workbench 6.1 in bold note):

 

 

9. Open mysql workbench

20. Add user and password into it. Follow this guide. Make sure you set username as root and password as ragnarok because this is the credentials located on your conf/inter-server.conf

21. Create a server instance and connection. Just click New Connection for creating connection and click New Server Instance for creating a new server instance everything there are self explanatory
Note : This is in the first interface (interface with mostly black color), usually you have root connection by default, you can use it.

22. More likely you must have the following : (different interface)

23. At the left portion of the application.
Note : at left bottom of the application, usually with mysql, information_schema, performance_schema, test (if you install sample and example will have Sakila and World as addition).
You can see schemas.
Right click on one of them (test schema) and click on create schema

24. Set the name of the schema to hercules because that is the credential we put in our inter-server

25. Create also a schema log

26. Double click hercules schema
Note : make sure hercules schema in bold

27. Under file located at the bottom of the home button ( upper left to be exact ) click Open SQL Script and locate sql script on sql-files/main.sql,
open it and execute ( you can find execute button at the upper portion
of the text editor of mysql workbench it looks like a thunder xD )
Note : button position can be different, but they have same name.
NB : At this point you should have all table needed in hercules schema, check it in mysql data directory (hercules folder). It should have some file with frm, MYD, MYI extension


28. Double click log schema
Note : make sure log schema in bold

29. Under file located at the bottom of the home button ( upper left to be exact ) click Open SQL Script and locate sql script on sql-files/logs.sql,
open it and execute ( you can find execute button at the upper portion
of the text editor of mysql workbench it looks like a thunder xD )
Note : Same way with step 27
NB : At this point you should have all table needed in log schema, check it in mysql data directory (log folder).


30. Once everything is set double click again hercules schema

31. Execute the following code

SELECT * FROM login;

32. Change userid, user_pass to the credentials you have put on both char-server and map-server.conf

33. Click apply.

 

 

I hope this can help.

Edited by arisgamers

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.