Sunday, June 16, 2024

Player Run Cities Guide

 So you want to setup your own city some where.  To do this you will need certain skills
I would recommend getting to Master Politician.
 
 
With a politician who is also the mayer that has the skill of Civic Policy I can use the
command /installmissionterminal to install either one of the following mission 
terminals within the city limits.
 
You must have Martial Policy IV to place faction terminals. 

The different mission terminals you can place with in the city limits are

General Missions
Artisan Missions
Entertainer Missions
Scout Missions
Imperial Missions
Rebel Missions
 
Now when you get to Civic Policy II  on the politican tree you can use the command /recruitskilltrainer 
to place trainers within your city limits. 

Wednesday, June 5, 2024

Commands in SWGEMU for creating items

 So there was a file a long time ago on a Google Drive called "Commands V2 - Sorted.pdf" 
I still had a copy of this file on my hard drive now the version 2.  The links no longer worked on them so 
I have updated them and called this Commands V3 - Sorted. PDF.

The latest Commands file can be found at the link bellow

Now a back up of the Information found on the Google Spreadsheet for the Lair Template
can be found at the link bellow.
 
If you want to look at the TRE files or edit tree files 
Sytner's  IFF Editor (SIE) 3.7.0.95 can be found at the link bellow
 
 

This was orginally found at  https://modthegalaxy.com/index.php?resources/sie.1/

 

Disguise your character and other characters

 
If you want to disguise your character hit F1 to target yourself or select who or what
you want to disguise first.
 
The command is 
 
Darth Vader
/setPlayerAppearance object/mobile/shared_darth_vader.iff -target
 
Battle Droid
/setPlayerAppearance object/mobile/shared_death_watch_battle_droid.iff 
 
Dark Trooper
/setPlayerAppearance object/mobile/shared_dark_trooper.iff 

Battle Droid 2
/setPlayerAppearance object/mobile/shared_death_watch_s_battle_droid_01.iff

Dressed Rodian Male
/setPlayerAppearance object/mobile/shared_dressed_rebel_scout_rodian_male_01.iff

3CP0
/setPlayerAppearance object/mobile/shared_3po_protocol.iff

I have uploaded a list of the shared objects here that should work I won't guartee that
they all work.



 Now there are a few restrictions here as to what you can use this command on it MUST start 
with shared_ if it does not you can not use the /setPlayerApperance on it. 
 
Reset Apperance 
 
To reset yourself or whoever it is you have set as another item just target that player or if 
it yourself hit F1 and type in /setPlayerAppearance.
 
If you just type in /setPlayerAppearance with nothing after it then it resets the appearance. 
 

There is a really good website about some of the commands located at 
 
Warning: Some of this information on this site seems to be out of date. 

 

Creating Tanigable Objects 
 
So if you want to spawn an item say a Blue Frog to carry with you type the following. 

/object createitem object/tangible/terminal/terminal_character_builder.iff
 
Speeder Bike
/object createitem object/tangible/deed/vehicle_deed/speederbike_deed.iff

Here are some of the other Vechicles 

/object createitem object/tangible/deed/vehicle_deed/jetpack_deed.iff
/object createitem object/tangible/deed/vehicle_deed/landspeeder_av21_deed.iff
/object createitem object/tangible/deed/vehicle_deed/landspeeder_x31_deed.iff
/object createitem object/tangible/deed/vehicle_deed/landspeeder_x34_deed.iff
/object createitem object/tangible/deed/vehicle_deed/speederbike_deed.iff
/object createitem object/tangible/deed/vehicle_deed/speederbike_flash_deed.iff
/object createitem object/tangible/deed/vehicle_deed/speederbike_swoop_deed.iff
/object createitem object/tangible/deed/vehicle_deed/vehicle_deed_base.iff
/object createitem object/tangible/deed/vehicle_deed/vehicular_prototype_bike_deed.iff
/object createitem object/tangible/deed/vehicle_deed/vehicular_prototype_deed.iff


A list of the different tanigable objects can be seen at 
 
A list of create objects can be see at: SWGEmu object createitem Command Reference


Spawn a character builder AKA Blue Frog at your curent location

Now a bit of a different command if you want to spawn a Blue Frog at

your current location type in /object characterbuilder 

Warning:  This will spawn the Blue Frog terminal where ever you are standing in fron
of you so be sure you are standing in the right position prior to using this command.

If you need to move the Blue Frog or any item you can use the /move and /rotate command
IE: /move forward 25
 
/move forward 1-500
/move back 1-500
/move up 1-500
/move down 1-500
/rotate left 1-180
/rotate right 1-180  

/movefurniture up 10
/movefurniture down 10
/movefurniture up 5
/movefurniture down 5
/movefurniture up 1
/movefurniture down 1 

Creating Items from the loot table. 


To create an object from the loot table you can see a full list of loot table items bellow

The command to create and object from the loot table is 

/object createloot krayt_tissue_rare 500

/object createloot krayt_dragon_pearl 500

/object createloot power_crystals 500

/object createloot color_crystals 500

Ok so how do you get the name of the items you can create? 

It is actually pretty easy I will use the krayt dragon pearl as an example. 

 So you look at the lua file  for example at this location 

https://git.swgemu.com/swgemu/Core3/src/branch/unstable/MMOCoreORB/bin/scripts/loot/groups/creature/krayt_pearls.lua

You will see a line that says something like this 

{itemTemplate = "krayt_dragon_pearl", weight = 10000000}

So your item name is  krayt_dragon_pearl 

And to create the item type in the following: 

/object createloot krayt_dragon_pearl 500

 

Or on some of the items you will see a name something like this I will use the Gurk King hide

as an example here.

https://git.swgemu.com/swgemu/Core3/src/branch/unstable/MMOCoreORB/bin/scripts/loot/items/creature/gurk_king_hide.lua

addLootItemTemplate("gurk_king_hide", gurk_king_hide) 

so you would use the following command to get the hide

/object createloot gurk_king_hide 500

 
Generating crafted Items
 
 
So if you want to generate a crafted item you can do it in the following way.
 
/generateCraftedItem <server script path> [quantity] [template number]
 
For example to generate a  refined crystal pack you would use the following command:

/generateCraftedItem object/draft_schematic/weapon/lightsaber/lightsaber_refined_crystal_pack 1 500

For a full list of the server script paths and what can be generated look at 
 

Sunday, June 2, 2024

Getting Started

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.

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
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. 
 
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 
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 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
 
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 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

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 
/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.


 

Sunday, August 16, 2020

Make Private Citys have no citizen requirements

So if you are on a small server or just a private test server
you may not want your citizen run cities to have a citizen
requirement because your city hall and building will go away
if you don't meet the required time to get that many citizens
in the city. (By default this is 24 hours)
So in order to change this so that your city has no citizen requirements
as they rank up you do the follow.

First off make sure the swgemu server is properly shut down
before doing any of these changes.

Now go into your source code and look for the file
Core3/MMOCoreORB/bin/scripts/managers/city_manager.lua
and open it with your favourite text editor if you are linux
this will be something like pico, vi etc.

Now search for this line

CitizensPerRank = {2, 4, 6, 8, 10}
What this line is telling you the number of people you have
to have in your city for each rank so by the time it reaches
metropolis you have a reuquirement to have 10 people in your city
to keep your city going.
The ranks in order and the number of people you have to have in
the city in order are
Outpost (2), Village(4), Township(6), City(8), Metropolis(10)

Comment it out so it looks like this
-- CitizensPerRank = {2, 4, 6, 8, 10}

Then copy the old line and paste it and make it look like
this

CitizensPerRank = {0, 0, 0, 0, 0}

Volia! No more citizen requirements at any city rank and
your city hall won't disappear any more.

You may have to recompile your server again to reflect
the changes I did it even if I didn't have to.
Oh and if you want to change the grace period that is given
for cities to get these citizens at each rank instead of totally
disabling them you can give yourself move time by editing the same
file and look for the following line.
--The amount of time in minutes a new city has to gain enough citizens to remain a city.
NewCityGracePeriod = 1440


The time is in seconds so 1440 is 24 hours if you want to increase the amount of
time cities have to gain their new citizens then just increase this number and
recomplile your server again.

I hope this information helps!

Saturday, July 13, 2019

Granting Skills

If you are running your own private swgemu server then once
you get it up and running you will want to give your character
some of the skills here is a list of the skills to give him master
in each one. This is by no means a full list of all the boxes but
if you are looking to gain only certain boxes
on a skill tree I would take a look at this site
SWGEMU Skill boxes for each tree

Social

/grantSkill social_entertainer_master;
/grantSkill social_imagedesigner_master;
/grantSkill social_dancer_master;
/grantSkill social_musician_master;
/grantSkill social_politician_master;



Crafting


/grantSkill crafting_artisan_master;
/grantSkill crafting_armorsmith_master;
/grantSkill crafting_weaponsmith_master;
/grantSkill crafting_chef _master;
/grantSkill crafting_tailor_master;
/grantSkill crafting_merchant_master;
/grantSkill crafting_architect_master;
/grantSkill crafting_droidengineer_master;
/grantSkill crafting_shipwright_master;



Science

/grantskill science_medic_master;
/grantskill science_combatmedic_master;
/grantskill science_doctor_master;



Outdoors

/grantskill outdoors_scout_master;
/grantskill outdoors_bio_engineer_master;
/grantskill outdoors_creaturehandler_master;
/grantskill outdoors_squadleader_master;
/grantskill outdoors_ranger_master;


Combat

/grantSkill combat_brawler_master;
/grantSkill combat_marksman_master;
/grantSkill combat_rifleman_master;
/grantSkill combat_pistol_master;
/grantSkill combat_carbine_master;
/grantSkill combat_unarmed_master;
/grantSkill combat_1hsword_master;
/grantSkill combat_2hsword_master;
/grantSkill combat_bountyhunter_master;
/grantSkill combat_commando_master;
/grantSkill combat_smuggler_master;
/grantSkill combat_polearm_master;


Jedi

Light Master: /gmJediState 4;
Dark Master: /gmJediState 8;
/grantPadawanTrialsEligibility;
/grantSkill force_rank_light_master;
/grantSkill force_rank_dark_master;
/grantSkill force_sensitive_heightened_senses_master;
/grantSkill force_sensitive_enhanced_reflexes_master;
/grantSkill force_discipline_light_saber_master;
/grantSkill force_discipline_powers_master;
/grantSkill force_discipline_defender_master;
/grantSkill force_discipline_healing_master;
/grantSkill force_discipline_enhancements_master;
/grantSkill force_sensitive_combat_prowess_master;
/grantSkill force_sensitive_crafting_mastery_master;

Robes for Jedi

/object createitem object/tangible/wearables/robe/aakuan_robe.iff
/object createitem object/tangible/wearables/robe/robe_inquisitor.iff
/object createitem object/tangible/wearables/robe/robe_jedi_dark_s01.iff
/object createitem object/tangible/wearables/robe/robe_jedi_dark_s02.iff
/object createitem object/tangible/wearables/robe/robe_jedi_dark_s03.iff
/object createitem object/tangible/wearables/robe/robe_jedi_dark_s04.iff
/object createitem object/tangible/wearables/robe/robe_jedi_dark_s05.iff
/object createitem object/tangible/wearables/robe/robe_jedi_light_s01.iff
/object createitem object/tangible/wearables/robe/robe_jedi_light_s02.iff
/object createitem object/tangible/wearables/robe/robe_jedi_light_s03.iff
/object createitem object/tangible/wearables/robe/robe_jedi_light_s04.iff
/object createitem object/tangible/wearables/robe/robe_jedi_light_s05.iff
/object createitem object/tangible/wearables/robe/robe_jedi_padawan.iff
/object createitem object/tangible/wearables/robe/robe_jedi_test.iff


Languages

/grantskill social_language_zabrak_speak;
/grantskill social_language_zabrak_comprehend;
/grantskill social_language_zabrak;
/grantskill social_language_wookiee_speak;
/grantskill social_language_wookiee_comprehend;
/grantskill social_language_wookiee;
/grantskill social_language_twilek_speak;
/grantskill social_language_twilek_comprehend;
/grantskill social_language_twilek;
/grantskill social_language_trandoshan_speak;
/grantskill social_language_trandoshan_comprehend;
/grantskill social_language_trandoshan;
/grantskill social_language_sullustan_speak;
/grantskill social_language_sullustan_comprehend;
/grantskill social_language_sullustan;
/grantskill social_language_rodian_speak;
/grantskill social_language_rodian_comprehend;
/grantskill social_language_rodian;
/grantskill social_language_moncalamari_speak;
/grantskill social_language_moncalamari_comprehend;
/grantskill social_language_moncalamari;
/grantskill social_language_lekku_speak;
/grantskill social_language_lekku_comprehend;
/grantskill social_language_lekku;
/grantskill social_language_ithorian_speak;
/grantskill social_language_ithorian_comprehend;
/grantskill social_language_ithorian;
/grantskill social_language_bothan_speak;
/grantskill social_language_bothan_comprehend;
/grantskill social_language_bothan;

If you decide that you don't want a skill any more
you use the command /surrenderskill


IE: /surrenderskill outdoors_bio_engineer_tissue_02;

Now the only thing missing here are the pilot skills because as of
the time when this was created space is not functioning yet.

SWGEMU change resource stack size to more than 100K

Before you start this please make sure your server is completely
shut down. Because you will have to recompile the sourcecode
at the end of this tutorial.


So one of the annoying things with the swgemu sever is the stack size being
limited to only 100,000 of any resource in one stack.


Now this can be changed

This is located in the directory
Core3/MMOCoreORB/src/server/zone/objects/resource

And you want to open up the file ResourceContainer.idl

Now the first instance of this is pretty close to the top of
file around line 20. This is subject to change as the code
changes but you should start looking around there.

Look for this line:

        public static final int MAXSIZE = 100000;

Now I change mine to a 1 million stack size so it
looks something like this.

        public static final int MAXSIZE = 100000;

Now after you do this you will have to recompile your source code again
in  Core3/MMOCoreORB

Now for me I do a make -j4 because I only have 4 cores
on this server if you have more cores then you will have to change
this.

Friday, July 12, 2019

Creating custom resources on swgemu

So once you get your server up and running you may want to create
your own custom resources and this is how you do it!

In case anyone else has this issue when you are running your
own server and trying to generate your own resources on the
server and it isn't letting you use the stats that you want it
is probably because the stat name is wrong. It seems
to be very picky about resource stat name format.

/gmcreatespecificresource radioactive res_potential_energy,1000
will spawn a radioactive of random type with 1000 PE (normal attribute
caps are ignored).

/gmcreateclassresource hide_leathery_lok res_quality,200 res_shock_resistance,800
will spawn a lokian leathery hide with 200 OQ and 800 SR

Now a really good list of all the resource names can be found at
Resource Tree


To find the correct name for all the stats I had to go digging
though the source code I found this in

Core3/MMOCoreORB/src/server/zone/objects/resource/ResourceSpawnImplementation.cpp

Here is a list of all the stats names off of resources and
the correct format to use.

res_cold_resist
res_conductivity
res_decay_resist
res_heat_resist
res_flavor
res_malleability
res_potential_energy
res_quality
res_shock_resistance
res_toughness


I hope this helps everyone else out that is running their own SWGEMU server currently and saves
you some time from having to dig though the source code.

 

Then when you want to give yourself the new resource it should have said on your screen
when you created the resource before the name of that.. Remember that because you are going
to need it now.
 
To give yourself some of that resource type in 
 
/resource create <name>  <amount>
 
So in this example I created a new steel_duralloy so it told me the name was Kihimi 
so for me to get some of that resource I type in  the following: 
 
/resource create Khimi 1000000

 
Some other commands you will need while creating new resources are bellow.

/resource <option> [params] Debug command to perform some type of raw 
                                               command with the resource manager.

/resource list <planet> Lists resources on specified planet

/resource info <resource name> Lists Info about a specific resource

/resource find <class> <attribute> <gt|lt> <value> [<and|or>
                       <attribute> <gt|lt> <value> [...]] FInds specific resouce

/resource create <name> [quantity] Spawns resource in inventory
 
/gmCreateClassResource <resourceClass> Creates a new resource based on the specified class. 
                                                                     Resource Tree

/gmCreateSpecificResource <specifiedResource> [amount] Creates a resource spawn of a 
                                                                                                 specific resource.

 

More than 250 Skill points on a swgemu private server

How to Make your Character have more than 250 Skill Points on your own server:

make sure the swgemu server is shut down properly before doing this.

This file that you will be looking for is located in

Core3/MMOCoreORB/src/server/zone/managers/skill

Look for SkillManager.cpp and open it.

look for 250 change it to 11250, then look for 250 again, change it again to 11250


The first instance of this for me was around line 333 but this is subject
to change as the code changes.

int totalSkillPointsWasted = 250;

And then the next one was down around line 490

int totalSkillPointsWasted = 250;

This does require a rebuild of the source code so go do
a make -j8 or how many cores you have in

Core3/MMOCoreORB

IE: since i have 4 cores I do a make -j4

Once everything has compiled OK then restart your server and
the changes will take effect.

Player Run Cities Guide

 So you want to setup your own city some where.  To do this you will need certain skills I would recommend getting to Master Politician.    ...