To do this you'll need to have the '''monsterId''' which you can find from the '''mobid''' column '''mob_spawn_points''' table/sql file.

To do this you'll need to have the '''monsterId''' which you can find from the '''mobid''' column '''mob_spawn_points''' table/sql file.

−

Add this into the bcnm_instance table/sql file so it looks like this (if it were for Rank 2 Mission)

+

Add this into the bcnm_battlefield table/sql file so it looks like this (if it were for Rank 2 Mission)

<pre>

<pre>

−

[ bcnmId | instanceNumber | monsterId | conditions ]

+

[ bcnmId | battlefieldNumber | monsterId | conditions ]

| 0 | 1 | 17346561 | 3 |

| 0 | 1 | 17346561 | 3 |

</pre>

</pre>

Line 124:

Line 124:

''NOTE:'' You'll need 3 chars, one to enter each instance and find the co-ordinates of that BCNM so you can add the pos for mobs in each instance. (mobids for BCNMs are usually grouped together in mob_spawn_points.sql)

''NOTE:'' You'll need 3 chars, one to enter each instance and find the co-ordinates of that BCNM so you can add the pos for mobs in each instance. (mobids for BCNMs are usually grouped together in mob_spawn_points.sql)

−

When all the information needed is added to bcnm_instance table/sql, re-import the sql file or save changes to table and reboot DSGameServer.

+

When all the information needed is added to bcnm_battlefield table/sql, re-import the sql file or save changes to table and reboot DSGameServer.

Make sure you've added all mobs that need to be in the BCNM and got the correct co-ordinates.

Make sure you've added all mobs that need to be in the BCNM and got the correct co-ordinates.

In our case, if the BCNM we were adding was for Rank 2 Final Mission in Balga's Dais, we could use the information from bcnm_info:

[bcnmid | zoneId | name ]
[ 96 | 146 | rank_2_mission ]

In bcnm.lua with 96 being bcnmid and 0 being the paramid.

bcnm_param_map = {
146,{96,0},
}

IMPORTANT: You do not need to create another line for an existing zone's bcnm, simply add the bcnmid and paramid at the end of the zone's array (don't include the -->'s, they're there simply to make things easier to understand)

Adding mobs to the BCNM

In this section we'll be adding mobs to the BCNM.
To do this you'll need to have the monsterId which you can find from the mobid column mob_spawn_points table/sql file.
Add this into the bcnm_battlefield table/sql file so it looks like this (if it were for Rank 2 Mission)

For the mob to show up, you'll need the mob's x,y,z,rotation pos in the mob_spawn_points table/sql file:
NOTE: The mob MUST have a value greater than 0 in pos_x, pos_y, pos_z and pos_rot! This can even be '0.001' just as long as it's not '0'

To set the pos you'll need access to a retail FFXI where you can pull the @pos co-ordinates.
If you don't have access to retail FFXI, you can find a video with the BCNM fight and estimate the pos for the bcnm mobs.

When attempting to estimate the co-ordinates (x,y,z,rotation) you'll first need to assign a mob to the bcnmid and then go to the BCNM.
Once you've entered the BCNM place your character at each of the mob's estimated spawn points and type @where.
The [ x,y,z,(rotation) ] co-ordinates shown from @where need to go in mob_spawn_points table/sql file.

NOTE: You'll need 3 chars, one to enter each instance and find the co-ordinates of that BCNM so you can add the pos for mobs in each instance. (mobids for BCNMs are usually grouped together in mob_spawn_points.sql)

When all the information needed is added to bcnm_battlefield table/sql, re-import the sql file or save changes to table and reboot DSGameServer.
Make sure you've added all mobs that need to be in the BCNM and got the correct co-ordinates.

Adding requirements to the BCNM

In this section we'll be adding requirements such as Key Item or Mission requirements to the BCNM.
This is the easiest and least time consuming part of adding a BCNM.
Simply add the condition you need in bcnm.lua under

function checkNonTradeBCNM(player,npc)

Here you can see the bcnm first checks the Zone, if the player has the Key Item required for it, sets the id, mask and sets the var needed.

Finishing off the BCNM

Now that our BCNM has mobs, can be entered and can be won; we need to tell it what to do upon winning the BCNM.
To make things simple, copy an existing script from scripts/zones/ZONE_NAME/bcnms (ZONE_NAME being the name of the zone you're scripting the bcnm for).
Make a copy of that script and rename it to the BCNM's name which can be found in the bcnm_info table/sql file.

For this part we'll make a copy of the rank_2_mission script (Balga's Dais).
When opening the script you'll see this:

To choose which cutscene to show it's pretty simple, all you have to do is get the paramid for the bcnm (in our case it's 0) and have that as the parameter before the 'skip' option parameter e.g. if the cutscene was for Mission 6-2, then this is what we'd see:
IMPORTANT: The csid(in our case 0x7d01) will ALWAYS be the same. To show the correct cutscene you change the second to last parameter for player:startEvent to the BCNMs paramid.

Now that we've got the BCNM showing the correct cutscene, we need to tell the BCNM what to do when that cutscene is finished.
All you have to do is scroll down to onEventFinish and do what you gotta do.
The csid will be the same as it was for the other BCNMs already in the zone e.g. for Balgas Dais the csid for the BCNM will always be 0x7d01.

Adding Treasure Chests

Fill in the required values in bcnm_loot table remembering to add the items needed to each group under lootGroupId.
Make sure there isn't an existing LootDropId with the same value as the one you're trying to add as you'll end up adding the drop to another BCNM which doesnt need this. In order to do this, simply add 1 to the highest LootDropId and set that as yours e.g. If you were adding a Treasure Chest to Horns of War (Horlais Peak) and there was already a BCNM with items with LootDropId's value of 10, you'd put:
bcnm_loot

Once all the required information is in the tables (including the Treasure Chests spawn co-ordinates in npc_list) the Treasure Chest should show upon wiping all enemies in that BCNM unless i screwed up in the guide somewhere.
TODO: (For demo) Explain winconditions in BCNM instance (pets / summons shouldnt be 3)