Contributing to Eden

Software Requirements

This section is written for people that are new to software development on 64-bit Windows. If you already have this or alternative software you can skip ahead to the next section--otherwise download and install the following software:

Git for Windows
You can use all default options except pick "Checkout as-is, commit Unix-style endings" when you get to that option.
MySQL 5.7
  • For the server type choose "Server Only"
  • On the next page, if there are missing dependencies press "Execute"
  • You can use default options for everything else
  • Use all lowercase letters "root" without quotations for your password
Visual Studio 2019 Community
In the Workloads tab scroll down to the Windows section and check the Desktop Development with C++ box. Then click install.


Follow the instructions here exactly. Do not skip ahead or miss a step if you are unsure what you are doing.

  • Restart your computer. You should have already installed all of the required software by this point. If you don't restart your PC at this stage the following steps will likely have no effect or fail.
  • Open notepad and copy the following script into it. Save it as install.bat and then run it as adminstrator by right clicking it.

    Notes: Make sure that you select "All Files" as the save as type. Otherwise you will save it as a text document and the script will not work.

    This assumes you installed to your C: drive. It also assumes that you used the password "root" for your MySQL username.

    cd %USERPROFILE%\Desktop
    mkdir edendsp
    cd edendsp
    git init
    git checkout -b master
    git remote add --track master origin
    git pull origin master
    git reset --hard 8f1bf33c63007c68eccc24925c893fe8540981ff
    cd sql
    "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqladmin" -h localhost -u root -proot DROP dspdb -f
    "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqladmin" -h localhost -u root -proot CREATE dspdb -f
    FOR %%X IN (*.sql) DO ECHO Importing %%X & "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" dspdb -h localhost -u root -proot -f < %%X
    "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" dspdb -h localhost -u root -proot -f -e "INSERT INTO accounts (`id`,`login`,`password`) VALUES (1,'dev',PASSWORD('dev'));"
    "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" dspdb -h localhost -u root -proot -f -e "INSERT INTO chars(charid,accid,charname,pos_zone,nation,gmlevel) VALUES(1,1,'Developer',139,0,5);"
    "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" dspdb -h localhost -u root -proot -f -e "INSERT INTO char_look(charid,face,race,size) VALUES(1,1,1,1);"
    "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" dspdb -h localhost -u root -proot -f -e "INSERT INTO char_stats(charid,mjob,mlvl,sjob,slvl) VALUES(1,4,75,3,37);"
    "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" dspdb -h localhost -u root -proot -f -e "UPDATE char_jobs SET blm = 75, whm = 37 WHERE charid = 1;"
  • Navigate to the project folder that was just created, open the win32 folder then open darkstar.sln in Visual Studio
  • You will probably get a notice saying Retarget Projects. Accept the default options to upgrade the targets. If you don't get this prompt or accidentally close it you can Retarget each project in the Solution Explorer.
  • On the menu at the top of the screen click Build and then click the Build Solution button. This will take several minutes and you will be able to see the progress in your output window.
  • Ensure that when the build is complete it says "========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========". You can view the output by selecting the View menu and then clicking on Output
  • Run the Play on Eden shortcut that came with your normal Eden installation.
  • Press the + button at the bottom to create a new configuration. If it doesn't show options to edit it then right click the new configuration and then click Edit Configuration
  • Set the window configurations to the same that you have on normal Eden and then click the boot tab. Only edit the following in the boot tab:
  • Configuration name: Developer
  • File: .\\ffxi-bootmod\\pol.exe
  • Command: --server --user dev --pass dev

Running the server

The technical part is over. Now you just need to run the servers and boot up Ashita.

  • Navigate to your code directory again and run the following three programs: DSConnect-server, DSGame-server and DSSearch-server.
  • DSGame-server will take the longest to boot. It is not uncommon for it to take 6 minutes or longer to load. It will be ready to log-in when it says "The map-server is ready to work".
  • Run the Play on Eden shortcut and then click on the Developer configuration to connect to your local development server.
  • You may get stuck on downloading data when you first log-in. In this case just reboot the three servers and load Ashita again.

Suggested Tools

Visual Studio Code
Text Editor
This is not the same program as Visual Studio Community. Although Visual Studio Community is also a text editor, I like Code the most. You'll likely spend most of your time coding using a text editor so pick one you are comfortable with.
Heidi SQL
SQL viewer/editor
While you can use the mysql executable to run SQL queries a GUI is much easier to navigate.


Here are a list of files that you'll need to review/edit in order to create a BCNM. I'll break down what needs to be done for each file section by section below. These files are listed by their relative path.

Note: These are probably not the only files you'll need to review/edit. You'll also probably need to edit mobs, magic, skills, et. cetera. Editing mobs, magic, skills, and so on is beyond the scope of this tutorial. For an example I will be reviewing the BCNM "Under Observation".

  • scripts/globals/bcnm.lua
  • scripts/zones/{zonename}/bcnms/{bcnmname}
  • sql/mob_spawn_points.sql
  • sql/bcnm_battlefield.sql
  • sql/bcnm_info.sql
  • sql/bcnm_loot.sql
  • sql/bcnm_treasure_chests.sql


In this file you'll just need to make sure that your BCNM exists and it's connected to the right zone and orb ID. On line 13 you'll see an object called itemid_bcnmid_map. You're going to scroll down to the see the zone you need listed in the comment on the right and then you're going to make sure that your BCNMID and ORBID are added there. For Under Observation, we will look at the following line:

139, {1177, 4, 1552, 10, 1553, 11, 1131, 12, 1175, 15, 1180, 17}, -- Horlais Peak
The zone id is 139, the orb id is 1131, and the bcnm id is 12. These are all provided here. However if we wanted to add the BCNM Tails of Woe we would change this line to:
139, {1131, 1, 1177, 4, 1552, 10, 1553, 11, 1131, 12, 1175, 15, 1180, 17}, -- Horlais Peak
Tails of Woe also uses orb id 1131 but its bcnm id is 1. To find an orb id you can query SQL for the name in the item_basic table. To find a bcnm id you can query SQL for the name in the bcnm_info table.


If this file doesn't exist you can pretty much copy and paste it from another file in the same zone. Just make sure to change the details in the top. If it does exist, then you're in luck! You probably won't need to edit it.


More than likely the mobs here are already in the correct position. However you'll need to verify that they have the right spawn points. In addition, if they are not behaving like they should, are not the correct mob or model, or are using the wrong skills or magic you'll probably need to edit the appropriate files/tables. (Editing mobs is beyond this tutorial.)


This table includes monsters that spawn inside the BCNM. All of these columns will need to be verified.

  • bcnmId: This is the id you've found in bcnm_info
  • battlefieldNumber: Usually there is 1, 2, and 3. Make sure not to assign the same monsterId to more than one battlefield.
  • monsterId: You can look up the monster ids in mob_spawn_points.
  • conditions: This one is a bit trickier. This is the condition for the monster to spawn. It's an integer that we refer to as a mask. 1 means it's spawned when you enter the BCNM and 2 means it's required to win. Usually this column will be 3.


This is the main table where you're going to get info of what you need for your code and other tables. The important rows to take note of are:

  • bcnmId: This is used to relate all of the other bcnm tables plus it will be important to add to the bcnm.lua
  • name: This is what you need to make sure your scripts/zones/{zonename}/bcnms/{bcnmname} script is named if it isn't already included.
  • fastestName, fastestTime: These are not needed to edit for BCNMs. Uou can disregard these columns.
  • levelCap: Self-explainatory. This is the level cap of the BCNM. If there is no cap put 0 here.
  • partySize: Self-explanatory. This is the maximum number of players that can enter the BCNM.
  • lootDropId: This is the id of the loot rows in bcnm_loot
  • rules: It is also a mask. You can view these masks in the BCRULES enum in battlefield.h but typically this number should be 15.
  • isMission: Just make sure this is set as 0 for consistency for orb BCNMs


BCNMs contain treasure! In order for it to drop when you open the chest you need to make sure that there is something in this table. Under bcnm_info you'll see the column "lootDropId" You will use that to query bcnm_loot. In our example for Under Observation the lootDropId is 16. So we would query like this to validate the treasure is correct. "SELECT * FROM bcnm_loot WHERE lootdropid = 16;"

You can have a group of items that only drops 1 item per group. This is identified by lootGroupId. The rolls column determines the likelyhood of getting the drop within that group. Max combined value is 1000. You'll review/edit/add this information to the bcnm_loot table.

Example 1: A group that should drop either a flowerpot or an arcane 100% of the time with equal chance to drop both.

INSERT INTO `bcnm_loot` VALUES ('300','152','500','0'); -- Flowerpot
INSERT INTO `bcnm_loot` VALUES ('300','221','500','0'); -- Arcane Flowerpot
Example 2: A group that should drop a item 30% of the time with equal chance for all items to drop.
INSERT INTO `bcnm_loot` VALUES ('300','1525','100','0'); -- Adamantoise Egg
INSERT INTO `bcnm_loot` VALUES ('300','1526','100','0'); -- Wyrm Beard
INSERT INTO `bcnm_loot` VALUES ('300','1527','100','0'); -- Behemoth Tongue
You'd also need to change the spawn points in npc_list for these npcs.


Each BCNM needs a treasure chest for each instance of the battlefield. Typically there are three instances per battlefield area. To find the BCNM chests for Under Observation you can run this query "SELECT * FROM bcnm_treasure_chests WHERE bcnmid = 12;" You'll notice that it has an npcid. This id is found in the table npc_list. You want to use a treasure chest that no other bcnm uses. If you were to add Tails of Woe here then you would add the following lines in the bcnm_treasure_chests.sql file. You can also run this in your SQL viewer of choice.

INSERT INTO `bcnm_treasure_chests` VALUES ('1', '1', '17346702');
INSERT INTO `bcnm_treasure_chests` VALUES ('1', '2', '17346709');
INSERT INTO `bcnm_treasure_chests` VALUES ('1', '3', '17346716');
You'd also need to change the spawn points in npc_list for these npcs.

This section is in progress. It will provide a list of function names, parameters, and expected output.