Making Chants work in a new map (and misc. tips)

This tutorial covers the basics of getting Chants working in a new map, including making a working incantation shrine, enabling chants for characters (in the lore book settings), testing a chant, and even a few extra bonus tips (including one for fixing a missing node texture error). Smile

Not included in this tutorial: Retanking your work for distribution.

Requirements:
- Siege Editor 2
- DS2Mod
- Tank Viewer 2
- Basic Windows skills, working with files.
- Basic Node placement and basic SE skills (SU 100 level knowledge is helpful).

Note: most of the larger images are thumbnails... click them to enlarge.

1. Start up SE2 and create a New Map... Name = chant_tutorial

2. Create a New Region...
Select Starting Terrain Node: Generic\Natural\Floor\Base\t_xxx_ntrl_flr_base_08x08-a

3. Click OK and SE2 will load the new region.

4. Insert the base node of an Incantation Shrine (Favorites tab): Terrain\ds2_customs\ds2_shrines\shrine_incant\ntrl-shrine-a
Set the Source Door (you can leave it at 1 for this tutorial) before choosing the Destination Door and remember when you place the node to put the steps up into the shrine in the direction you want... the orientation of the steps doesn't change the function, only the appearance (I put them on the right in the picture here).

If you receive a texture error here, click Ignore Once, and then continue with the next step.

5. Hmmmmm. Those grass textures don't match up very well. Let's fix that (if you don't want to fix the texture, just skip to step 11).

Select the new node's Node Set (using the menu option Node - Current Node Set, with the Incantation Shrine node selected): Grass Dry 01

You will receive an error when you apply this Node Set...

Click "Ignore Once" and your newly placed node will look rather odd...

6. Save your region. After it is saved, close SE2. We are going to fix the error by finding the missing texture (I suspect the error is caused by an NNK problem... I just guessed at the following fix, which seems to work for me). Wink

7. Open Tank Viewer 2, and extract these two files into your \My Documents\My Games\Dungeon Siege 2 Mod\Bits\:
Terrain.ds2res\art\bitmaps\terrain\0dry_grass01\natural\misc\b_t_0dry-grass01_ntrl_misc_shrine_a.dds
Terrain.ds2res\art\bitmaps\terrain\0dry_grass01\natural\misc\b_t_0dry-grass01_ntrl_misc_shrine_a.gas

8. Using Windows explorer, rename these two files to:
b_t_0drygrs01_ntrl_misc_shrine_a.dds
and
b_t_0drygrs01_ntrl_misc_shrine_a.gas
respectively.

9. Now you need to edit the gas file. Right-click it and choose the "Open With" option, selecting Notepad (or your favorite text editor). You will need to change two values:
Change the first line to this: [t:tsd,n:b_t_0drygrs01_ntrl_misc_shrine-a]
And the following value needs to be edited too: layer1texture1 = b_t_0drygrs01_ntrl_misc_shrine-a;

Save your changes and exit Notepad.

10. Open SE2 again, and open your region.

If everything went OK, then you should have no errors, and the missing texture will have been found! Laughing out loud

11. Next we need to change a setting so that the camera behaves the way we want it to within the shrine. Select the shrine's base node and access the "Node - Properties". Uncheck the "Bounds Camera" option and click OK.

12. Now we start to work on the shrine's roof.
You need to attach this node (Favorites tab): Terrain\ds2customs\ds2_shrines\shrine_incant\ntrl-shrine-a-top
...to the shrine base node's Source Door #9. If you get another texture error, click Ignore once, and we can fix that quite quickly.

Click to select the shrine's roof node you just inserted, and then access its "Node - Properties".
TIP: if you can't tell whether you have the base node or the roof node selected, just look at the door numbers. The shrine's base has nine (9) and the shrine's roof has one (1).

On the Node Set tab, select "Generic", apply the change and click OK.

The texture for the shrine's roof should now appear properly.

You should be saving your work regularly... (don't wait for me to tell you to). As a reminder, save now.

13. On to the roof's fade settings. These can get quite tricky, and I am not going to repeat SU here, only give you the basics.
Back in the "Node - Properties" dialog, on the General tab, check the Group Camera Fade option, uncheck the Occludes Camera option and uncheck the Bounds Camera option. Apply the change.

On the Fade Settings tab, change all three values to 2 (Note: there's nothing special about "2"... according to SU the combination just needs to be unique in the region for what we want to do).

Click Apply and then OK.

14. The shrine's roof is now ready to fade, but we need a trigger to tell it when. First, make sure you have Placement Mode turned on.

TIP: You'll probably want to disable this option after we've inserted the trigger (to prevent the accidental insertion of objects with each click), but we need it on for a minute.
On the Unsorted Items tab, select this item: \Game Objects\special\trigger\trigger_fade_ceiling_box
Left click to place this object into the center of the shrine's base platform. Left-click and drag it to adjust the placement if you need to (don't forget to turn off Placement Mode after you've inserted the trigger).

15. We've inserted the trigger, but it currently doesn't do anything. Let's change that. We will need a setting ID # for the Region, so open Settings - Region, and copy the Region GUID into the windows clipboard (highlight it, and then press CTRL + c).

With the trigger selected, open the "Object Properties" (or right-click and select properties) and go to the "Trigger Properties" tab.
TIP: If you can't select the trigger, make sure you are in Gizmo Editing Mode (there's a toolbar button for toggling this setting).
For some reason, this trigger has extra actions inserted automatically. On the Trigger Properties page, "Remove" the second and fourth actions
(group 1, fade group 2, out:black)

and (group 2, fade group 2, in)

In the remaining two Actions, paste the Region GUID value into the Region ID fields, then change the Section, Level and Object settings all to "2" (remember step 13? These three values for each action must match what you want to fade out and in... as we set in the roof node).

We just did a bunch of work, so now is a good time to save...

If you want to test these fade settings, just open DS2Mod and start a new SP game using a new character, choosing the Map name you entered in Step 1.
TIP: Did you notice how restrictive the camera settings were? To change them, in SE2 with a region of your map open, open "Settings - Map". The settings I like to change are: Minimum Distance = 1 (from 3) and Minimum Azimuth = -45 (from 42).

The next step continues in SE2, with your region loaded.

16. If you tested your new shrine in DS2Mod you may have noticed that there wasn't a glowing floor (nor did you receive the message you are used to seeing when you step up on a working shrine). To enable the shrine's enchanting abilities we need to add in another object.
Make sure you have Placement Mode turned on, and then still on the Unsorted Items tab, we'll be inserting this item: \Game Objects\special\incantation_shrine
If you left-click on the center of the shrine (where we want this object to be) you will only select the fade trigger (not insert the incantation_shrine object). Instead left-click to insert the new object onto the shrine floor (just off center to avoid highlighting the fade trigger), and then left-click-and-drag to center the new object in the shrine (very important).

17. Now we need to set up the new incantation_shrine object with a trigger to enable the chanting ability. With the new object selected, open the "Object - Properties" and on the "Trigger Properties" tab, insert a "New" trigger and then select it (trigger_0).
Add a new Condition choosing the party_member_within_sphere condition.

Set the Radius to 3, Boundary Check to "on_every_first_enter".
Add another new Condition, again choosing the party_member_within_sphere condition. Set the Radius to 3 again, but this time set the Boundary Check to "on_every_last_leave", and change the "Group" to 1.
Add two new Actions, both with the send_world_message action.

Click on to the "Template Properties" tab, and copy the Scid value. Back on the "Trigger Properties" tab, paste this value into the "Send to Object" field for both new Actions (your object's SCID might be different than the one in the picture).
In the second Action, set the Group to 1 and change the Message Type to we_req_deactivate.
Check the "No Save TrigBits" option and then OK.

Again, now's a good time to save. If you want to test these new trigger settings, just open DS2Mod and start a new SP game using a new character, choosing the Map name you entered in Step 1. You'll know if everything is set up properly if you get the message "The location where you now stand seems to resonate with a magical harmonic echo."
The next step continues in SE2, with your region loaded.

18. Let's put a chant Lectern onto the map so that you can have one for testing. On the Favorites tab, lets go with \Items\region_specific_content\lecterns\Lectern of Dexterity
Insert the lectern anywhere you want... (although I would avoid putting one actually on the shrine).

19. Think we're done? Guess again. If you saved and tested things after step 18 you will notice that you couldn't actually get the chant into your character, nor would typing the chant text (Elevato Agilum) at the chat prompt activate the chant. The last steps of this long process are in setting up your map's lorebook. You can save your region in SE2 and exit the program (we won't need to do any more map changes with SE2).
Using Windows Explorer, navigate to \My Documents\My Games\Dungeon Siege 2 Mod\Bits\world\maps\chant_tutorial\info\
Create a new text file and name it "lorebook_info.gas". TIP: If you have your operating system set up to hide file extensions you may have to change that setting on the Tools - Folder Options' - View tab (uncheck the "Hide extensions for known file types" option).

Now open this new gas file with Notepad (or your favorite text editor). Copy and Paste in the following text (see the lorebook_info.gas file in World.ds2map\world\maps\ds2_world\info\ for a complete list of chants):

[t:table,n:lore_table]
{
    schema = entry_schema;
    [*]
    {
	// Chant of Dexterity
	entry_type		= chant;
	template		= chant_dex_boost_2;
	icon			= "b_gui_ig_m_i_jnl_chants_offense";
	title			= "Chant of Dexterity\n(Elevato Agilum)";
	summary			= "Gives a moderate boost to the dexterity of all party members.";
	description_0	= "Elevato Agilum";
	description_1	= "Chanting this at an incantation shrine will temporarily boost the dexterity of any nearby party members.";
	description_2	= "Chant of Dexterity";
	page_type		= "page_scroll";
    }
}

Save the file and close your text editor.

20. Create questbook_info.gas in the same location used in step 19: \My Documents\My Games\Dungeon Siege 2 Mod\Bits\world\maps\chant_tutorial\info\
Using Notepad, Copy and Paste the following text into the new file:

[questbook_info]
{
}

(For some reason chants don't seem to work without this... discovered by trial and error).

21. Open DS2Mod, create a new character, select your new map and test your chant.

Done! Laughing out loud

/Sharkull

tutorials: