This is a guide for if you are running a SWGEMU
development enviroment.
If you don't have a development enviroment
already running see the link bellow
SWG Development Enviroment Install Guide
This guide assumes that you already have the
enviroment compiled and up and running already.
To make yourself an admin your client must be
setup properly and your client must allow
you to also be admin.
The whole folder where I put all of the documents
can be seen at the following location.
SWGEMU Dev Help Files
In your SWGEMU directory in the user.cfg you
must put this in the user.cfg file under
[ClientGame]
[ClientGame]
0fd345d9 = true
A typical user.cfg can be found at the link bellow if
you are having a hard time with this.
development enviroment.
If you don't have a development enviroment
already running see the link bellow
SWG Development Enviroment Install Guide
This guide assumes that you already have the
enviroment compiled and up and running already.
To make yourself an admin your client must be
setup properly and your client must allow
you to also be admin.
The whole folder where I put all of the documents
can be seen at the following location.
SWGEMU Dev Help Files
In your SWGEMU directory in the user.cfg you
must put this in the user.cfg file under
[ClientGame]
[ClientGame]
0fd345d9 = true
A typical user.cfg can be found at the link bellow if
you are having a hard time with this.
user.cfg file
Now for the different admin levels for /setGodMode to set god mode
on another player you use this for the admin levels.
/setGodMode <name> <admin level> | on | off>
15 = Administrator
14 = Developer
13 = Quality assurance (QA)
12 = Community Support Representative (CSR)
11 = Event Coordinator (EC)
10 = Event Coordinator Intern (ECI)
9 = Community Support Intern (CSI)
8 = CT
7 = CC
6 = Tester
1 = Intern
0 = Non-privileged player (the default admin_level)
If this is a NEW server you need to create an account
first but NOT a character create the account log in
and create an account but NOT a a character again ONLY
create the ACCOUNT then log out and modify the account and
set it to 15 for administrator.
I would higly recommend using phpmyadmin
If you are on Debian 11 / 12 you can use the command
apt-get install phpmyadmin
If you can't and you really want to do this from the command
line this is how you will do it.
YOU WILL HAVE TO EDIT THE COMMANDS BELLOW this assumes
your username for the SWGEMU Database is swgemu if it is
not you will have to change that.
make sure you have mariadb already installed you should
have it installed already by this point.
If you don't install mariadb server and client
apt-get install mariadb-server mariadb-client
If you don't have a fully installed eviroment yet then
see SWG Development Enviroment Install Guide
at the command prompt type in the following to startup
mysql
mysql -u swgemu -p
Enter password: <MYSQL_PASSWORD>
Where it says <MYSQL_PASSWORD> put in your mysql
password for the database that you should already have
setup.
Now at the MYSQL prompt you will want to issue a command
like this. DO NOT RUN this! SOME OF THESE COMMANDS MAY
at the command prompt type in the following to startup
mysql
mysql -u swgemu -p
Enter password: <MYSQL_PASSWORD>
Where it says <MYSQL_PASSWORD> put in your mysql
password for the database that you should already have
setup.
Now at the MYSQL prompt you will want to issue a command
like this. DO NOT RUN this! SOME OF THESE COMMANDS MAY
NEED TO BE CHANGED to reflect the database name and your account name.
do not just blindly copy this.
You need to change the database to the correct database if you didn't use swgemu
for your database name.
show databases;
use swgemu;
select * from accounts;
update accounts set admin_level='15' where username='Your_account_name';
flush privileges;
exit
Now log back into your account and create a character if you create the
character before it will NOT get admin rights you had to do all of that
first.
show databases;
use swgemu;
select * from accounts;
update accounts set admin_level='15' where username='Your_account_name';
flush privileges;
exit
Now log back into your account and create a character if you create the
character before it will NOT get admin rights you had to do all of that
first.
You should see "GOD MODE" come across your screen when you log into
your server if everything was successfu when you log into your character on the
your server if everything was successfu when you log into your character on the
admin account.
Also if you ever need to generate a new encrypted password for a user you
can do the following. I would make sure the server is shut down prior to modifying
the database like this.
You need to have coreutils installed on debian 11 / 12 for this to work for sha256sum.
apt-get install coreutils
So in order to generate the new password you need a few pieces of information first.
you need your DBSECRET which is at the following location
~/workspace/Core3/MMOCoreORB/bin/conf/config.lua
It will look something like this you set this when you first installed the server or should have.
It will look like this
DBSecret = "TheBigSecret$$$Word666;", -- Change this! This value should be unique and of reasonable length.
You will need everhing between the "" in your config.lua
Copy this to a notepad or something.
Now the SALT is a randomly generated length of characters and is in your mysql database
to get that you will need to do the following.
You are going to have to change some of this to relect your database name and username this assumes your username is swgemu and your database is also called swgemu if this isn't the case change it.
mysql -u swgemu -p
Enter password: <MYSQL_PASSWORD>
Enter password: <MYSQL_PASSWORD>
Enter your password for your mysql user when it says for Enter password.
show databases;
use swgemu;
select * from accounts;
update accounts set password='password' where username='Account_Name';
flush privileges;
exit
use swgemu;
select * from accounts;
update accounts set password='password' where username='Account_Name';
flush privileges;
exit
at the very end it should show you the salt in the very last row.
copy that to the notepad again as well you will need the whole set
of characters from there under salt for the specific user you are trying
to set the password for.
Now you are finally ready to generate your new password.
echo -n '<DBSECRET><SWGEMU_USER_PASSWORD><SALT>' | sha256sum
DO NOT put in the <> it ends up running all 3 together so it is one big line
EXAMPLE:
echo -n 'TheBigSecret$$$Word666;MYNEWPASSWORDGOESHEREcb4534ad56D0055e8083a5dd2ea411fe' | sha256sum
It will give you the encrypted new password for whatever you entered copy
this to a notepad or some where you will need this later.
Then I use phpmyadmin and I can go into the accounts table and edit the
password in the accounts table Now if you want to do this from the command line do the following again this will
have to be changed do not just blindly copy this and expect it to work unless
you used all the same information as me. This assumes you used the username
of swgemu for the mysql username and your datbase is called mysql. mysql -u swgemu -p
Enter password: <MYSQL_PASSWORD>
Enter password: <MYSQL_PASSWORD>
Enter your password for your mysql user when it says for Enter password.
At the MYSQL prompt enter these commands subsituting in the correct Account_Name for
the user you want to reset and the password which was generated earlier that I told you to copy
to a note pad that gos where it says password.
show databases;
use swgemu;
select * from accounts;
update accounts set password='password' where username='Account_Name';
flush privileges;
exit
use swgemu;
select * from accounts;
update accounts set password='password' where username='Account_Name';
flush privileges;
exit
Starting Commands
To set another player to "God Mode" type /setgod with the player selected. You also have to already have god mod following the instructions above.
To set the OID or hide them type
You can toggle them off using this: /shownet 0
You can restore them using this: /shownet 1
Stop Your Character From Taking Damage type in /invul
Stop Enemies From Attacking You /aiIgnore
To warp to a planet
Stop Enemies From Attacking You /aiIgnore
To warp to a planet
/planetwarp <planet / zone> x y z Example: /planetWarp dathomir 2500 0 3750
Teleport Target
Syntax: /teleportTarget x y z Example: /teleportTarget phoenix 666 0 -666
This command will teleport the named character to the specific waypoint / co-ordinates.