AddingGameEntities

Version 47 (molator, 06/20/2011 05:49 pm)

1 1 aquiles
h1. Adding Game Entities (Armor, Spells etc.)
2 1 aquiles
3 1 aquiles
{{>toc}}
4 1 aquiles
5 1 aquiles
h2. Description
6 1 aquiles
7 47 molator
After hours and hours of staring at the xml files and browsing restless through the georges editor, i finally could shed some light into the mysteries of entity creation in "Ryzom Core":http://dev.ryzom.com/projects/ryzom/wiki. There is still much to learn but this is a good point to start to share my knowledge i gathered so far.
8 1 aquiles
9 1 aquiles
So what we're going to do is creating an armor item including an crafting plan and two spells (Heal & Dmg) plus some more spell credits. We're going to put them on the server and add them to some corresponding merchants & trainer.
10 1 aquiles
11 47 molator
> *Note 1*: For the sake of simplicity in this guide i oriented myself at the old spells and armor. Of Course, the goal of "Ryzom Core":http://dev.ryzom.com/projects/ryzom/wiki is *not* to rebuild the original Ryzom. But in my opinion it will take some time till we have e.g. some truly new spells as this also relies heavily on source code additions. Until then it should be ok if we create some more samples to get to known with the whole process.
12 1 aquiles
13 1 aquiles
> *Note 2*: Personally i think the current georges editor has much potential, but most times im kind of overwhelmed by the masses of editable informations.
14 1 aquiles
> So i switched to just open the actual xml files and edit them. I decided to do it for this guide as well which also saves me from making a lot of screenshots :) But of course you are welcome to do it all in the offical Nel tool!
15 1 aquiles
16 1 aquiles
h2. Prerequisites
17 1 aquiles
18 1 aquiles
Here is a small list with stuff you should have ready for things to work.
19 1 aquiles
* *Get the source*
20 1 aquiles
[[Getting_Source|Look here for more]]
21 1 aquiles
> *Note*: For windows there are some prebuild binaries for everything (client, server, nel tools, ryzom tools). Look [[WindowsBinaries|here]] to find out more.
22 1 aquiles
23 1 aquiles
* *Client / Server*
24 1 aquiles
Well this should be clear but of course you need a working client to test the additions and a working server with access to it as we have to add files on it. There are a bunch of tutorials in the wiki for the plattform of your choice. E.g.:
25 1 aquiles
** [[BuildForLinuxCMake| Linux]]
26 1 aquiles
** [[BuildForMacCmake| Mac OS X]]
27 1 aquiles
** [[EverythingWindows| Windows]]
28 1 aquiles
29 1 aquiles
* *Char with admin rights*
30 1 aquiles
Create a character on your server and grant it some privileges. 
31 6 Langerz
This can be done by using the EGS ([[ServiceArchitecture|Entity Game Service]] - part of the server) command "@setPriv 1 :DEV:@" when the corresponding user is logged into the Client, or by directly altering the corresponding table entry for your character in the mysql database on the server.
32 1 aquiles
> *Note*: If you have more than one character on your server you need to change the EGS command to "@setPriv x :DEV:@" where x is the id of the char found in the mysql database
33 1 aquiles
* *NeL tool "make_sheet_id"* 
34 1 aquiles
This tool is needed to create the *sheet_id.bin* file which is residing in *$RYZOM_HOME$/code/ryzom/common/data_leveldesign/leveldesign/Game_elem*. Therefore build it and make it ready for use. It can be found in *$RYZOM_HOME$/code/nel/tools/misc/make_sheet_id*.
35 8 Geringer
Use it with the following syntax to build your sheet_id.bin:
36 24 kaetemi
> @ make_sheet_id_r -oL:/leveldesign/game_elem/sheet_id.bin L:/leveldesign/game_elem L:/leveldesign/game_element L:/leveldesign/world@
37 8 Geringer
38 8 Geringer
> *Note*: To get working make_sheet_id tool you need set allowed extensions or simply just delete or comment _ExtensionsAllowed = { "sample_config" };_ line in *$RYZOM_HOME$/code/nel/tools/misc/make_sheet_id.cfg*
39 1 aquiles
40 1 aquiles
* *Ryzom tool "sheets_packer"*
41 1 aquiles
This tool is needed to build the *.packed_sheets* files from the contents in your leveldesign directory. It can be found *$RYZOM_HOME$"/code/ryzom/tools/sheets_packer*. Build it and make it ready for use. When executing, it will default create the .packed_sheets in *$RYZOM_HOME$"/code/ryzom/client/data*.
42 1 aquiles
43 1 aquiles
* *Ryzom assets*
44 1 aquiles
Its really nice to have the ryzom media assets available. E.g. the Interfaces directory contains all the icons for spells and stuff. You could search for them online at http://media.ryzom.com/ but having them locally is much faster. Bear in mind that all assets, if extracted, are like 11GB in 26k files
45 1 aquiles
46 1 aquiles
* *bnps*
47 1 aquiles
For creating armor its nice to have some of the bnps available unpacked to look for nice shapes you want to use. Download the "Open Ryzom Client":http://sourceforge.net/projects/ryzom/ extract it and look into the data directory. There you will find all the .bnp files. Use the NeL tool *bnp_make* to unpack the files. The easiest way to do so is to copy the desired bnp and the executable in a directory and using following command. This will create a directory with the name of the file and unpack all contents there.
48 1 aquiles
> @bnp_make /u desired_bnp.bnp@
49 1 aquiles
50 1 aquiles
* *sbrick_words_en.txt / skill_words_en.txt / item_words_en.txt / sheets.txt*
51 1 aquiles
It comes in handy if you have these files open. The first three can be found in the *$RYZOM_HOME$/code/ryzom/server/data_shard/language* directory. They are needed later to find the correct skill families and item names (more on that below).
52 9 molator
The fourth file gets created if you repack your sheets with the mentioned sheets_packer tool. It contains a human readable overview of the contents of the sheets_id.bin and can be used to find out correct file naming as we're orienting on the original ryzom file scheme. It lies in the same directory as the sheets_id.bin.
53 1 aquiles
54 1 aquiles
h2. Adding Armor
55 1 aquiles
56 1 aquiles
h3. General
57 1 aquiles
58 1 aquiles
Each craftable item needs a .sitem file which defines the characteristics of the item and a .sbrick file which defines the crafting plan for the item (eg which material is used). As kaetemi already stated in his [[AddArmorPartSitem|armor example]]: "Craftable items MUST be prefixed with "ic", bricks for crafting MUST be prefixed with "bc"". As we orient ourselves to the ryzom naming scheme there are some more rules to learn. But more on this in the next paragraph
59 1 aquiles
 
60 1 aquiles
h3. File Naming, Skill Families, Icons etc.
61 1 aquiles
62 1 aquiles
* To get correct .sitem file naming we are looking into the item_words_en.txt
63 1 aquiles
* To get correct .sbrick file naming we are looking into the sbrick_words_en.txt
64 1 aquiles
* We can double check with the sheets.txt if the file names are appearing there
65 1 aquiles
66 1 aquiles
Below is a table with some examples for the naming scheme for matis armor .sitems and there corresponding .sbricks . There is a lot more to discover if you skim through these files but this should be sufficent to get the idea.
67 1 aquiles
68 1 aquiles
|_.SItem| | | | | |
69 1 aquiles
|=. _filename_ |=. _description_ |=. _filename_ |=. _description_ |=. _filename_ |=. _description_ |
70 1 aquiles
|icmalb|item craftable matis light boots|icmamb|item craftable matis medium boots|icmahb|item craftable matis heavy boots|
71 1 aquiles
|icmalv|item craftable matis light vest|icmamv|item craftable matis medium vest|icmahv|item craftable matis heavy vest|
72 1 aquiles
|icmalg|item craftable matis light gloves|icmamg|item craftable matis medium gloves|icmahg|item craftable matis heavy gloves|
73 1 aquiles
|icmalp|item craftable matis light pants|icmamp|item craftable matis medium pants|icmahp|item craftable matis heavy pants|
74 1 aquiles
|icmals|item craftable matis light sleeves|icmams|item craftable matis medium sleeves|icmahs|item craftable matis heavy sleeves|
75 1 aquiles
| | | | |icmahh|item craftable matis heavy head|
76 1 aquiles
|_.SBrick| | | | | |
77 1 aquiles
|=. _filename_ |=. _description_ |=. _filename_ |=. _description_ |=. _filename_ |=. _description_ |
78 1 aquiles
|bcmaea01|Heavy Boots - Basic Quality|bcmaea07|Light Boots - Basic Quality|bcmaea12|Medium Boots - Basic Quality|
79 1 aquiles
|bcmaea02|Heavy Gloves - Basic Quality|bcmaea08|Light Gloves - Basic Quality|bcmaea13|Medium Gloves - Basic Quality|
80 1 aquiles
|bcmaea03|Heavy Helmet - Basic Quality|bcmaea09|Light Pants - Basic Quality|bcmaea14|Medium Pants - Basic Quality|
81 1 aquiles
|bcmaea04|Heavy Pants - Basic Quality|bcmaea10|Light Sleeves - Basic Quality|bcmaea15|Medium Sleeves - Basic Quality|
82 1 aquiles
|bcmaea05|Heavy Sleeves - Basic Quality|bcmaea11|Light Vest - Basic Quality|bcmaea16|Medium Vest - Basic Quality|
83 1 aquiles
|bcmaea06|Heavy Vest - Basic Quality|||||
84 1 aquiles
85 1 aquiles
> *Note*: The character combination in front is equal to the FamilyId defined in each .sbrick file
86 1 aquiles
87 1 aquiles
For the crafting plans we need to know the corresponding skills involved
88 1 aquiles
89 1 aquiles
* To get the correct skill family we are looking into skill_words_en.txt
90 1 aquiles
91 1 aquiles
Below is a table with some example skills we are going to use and there skill family. This should give you an sufficent idea.
92 1 aquiles
93 1 aquiles
|=. _skill familyId_ |=. _skill description_ |=. _filename_ |=. _description_ |=. _filename_ |=. _description_ |
94 1 aquiles
|SCALBEM|Master Light Boots Crafting|SCAMBEM|Master Medium Boots Crafting|SCAHBEM|Master Heavy Boots Crafting|
95 1 aquiles
|SCALGEM|Master Light Gloves Crafting|SCAMGEM|Master Medium Gloves Crafting|SCAHGEM|Master Heavy Gloves Crafting|
96 1 aquiles
|SCALPEM|Master Light Pants Crafting|SCAMPEM|Master Medium Pants Crafting|SCAHHEM|Master Heavy Helmet Crafting|
97 1 aquiles
|SCALSEM|Master Light Sleeves Crafting|SCAMSEM|Master Medium Sleeves Crafting|SCAHPEM|Master Heavy Pants Crafting|
98 1 aquiles
|SCALVEM|Master Light Vest Crafting|SCAMVEM|Master Medium Vest Crafting|SCAHSEM|Master Heavy Sleeves Crafting|
99 1 aquiles
|||||SCAHVEM|Master Heavy Vest Crafting|
100 1 aquiles
101 1 aquiles
Throughout the existing .sbricks i found they always used the master skill, although there are familyIds for e.g. the expert skill. Im adapting this remembering that even in original ryzom they got this strange info message that you can`t gain any more XP in the master skill lvl when killing low mobs even though you not yet reached that master skill.
102 1 aquiles
103 1 aquiles
All items, skills and plans etc. need an icon to show ingame. Here is a short list, find others in the ryzom_assets:
104 1 aquiles
105 1 aquiles
|=. _icon_ |=. _description_ |=. _icon_ |=. _description_ |
106 11 molator
|AR_botte.tga|icon for boots|BK_matis.tga|matis background|
107 1 aquiles
|AR_hand.tga|icon for gloves|BK_fyros.tga|fyros background|
108 1 aquiles
|AR_pantabotte.tga|icon for pants|BK_tryker.tga|tryker background|
109 1 aquiles
|AR_armpad.tga|icon for sleeves|BK_zorai.tga|zorai background|
110 1 aquiles
|AR_gilet.tga|icon for vest|||
111 11 molator
|AR_helmet.tga|icon for helmet|||
112 1 aquiles
113 1 aquiles
h3. Creating Armor SItem
114 1 aquiles
115 1 aquiles
So first we are looking for some nice armor to add. For this step you need to unpack the @characters_shapes.bnp@. Now skim through the .shape files with the Nel object viewer or the new "object_viewer_qt":http://code.google.com/p/object-viewer-qt until you find a pleasing one. If you want the shape to have textures provide them from the ryzom assets. They can be found in e.g. *PathToAssets/Stuff/Matis/Agents/_textures/Actors*
116 1 aquiles
117 2 aquiles
!>shape.png!
118 2 aquiles
119 1 aquiles
As my toon is matis and female im choosing @MA_HOF_armor00_gilet.shape@ (MA = Matis; HOF = Homin Female). The male shape would be @MA_HOM_armor00_gilet.shape@
120 1 aquiles
121 1 aquiles
Ok so now its time to actually write the georges files.
122 1 aquiles
123 1 aquiles
Switch over to your leveldesign directory to the corresponding sitem armor folder. In my case this is 
124 1 aquiles
125 1 aquiles
@$RYZOM_HOME$/code/ryzom/client/common/data_leveldesign/leveldesign/game_element/sitem/armor/matis/light_armor@
126 1 aquiles
127 1 aquiles
There you'll find the already provided matis light armor boots file
128 1 aquiles
129 1 aquiles
@icmalb.sitem@
130 1 aquiles
131 1 aquiles
We are lazy and just copy this file. Now rename it according to your desired item (see filenaming above). As i want to have a matis light vest i'll name it @icmalv.sitem@
132 1 aquiles
133 1 aquiles
Open it and you should see something like this:
134 1 aquiles
135 43 molator
<pre><code class="XML">
136 1 aquiles
<?xml version="1.0"?>
137 1 aquiles
<FORM Revision="$Revision: 1.4 $" State="modified">
138 1 aquiles
  <PARENT Filename="_gma_l.sitem"/>
139 1 aquiles
  <STRUCT>
140 1 aquiles
    <STRUCT Name="basics">
141 1 aquiles
      <ATOM Name="name" Value="matis light boots"/>
142 1 aquiles
      <ATOM Name="ItemType" Value="Light boots"/>
143 1 aquiles
      <STRUCT Name="EquipmentInfo">
144 1 aquiles
        <ARRAY Name="EquipmentSlots">
145 1 aquiles
          <ATOM Value="Feet"/>
146 1 aquiles
        </ARRAY>
147 1 aquiles
      </STRUCT>
148 1 aquiles
      <ATOM Name="CraftPlan" Value="bcmaea07.sbrick"/>
149 1 aquiles
    </STRUCT>
150 1 aquiles
    <STRUCT Name="3d">
151 1 aquiles
      <ATOM Name="shape" Value="MA_HOM_civil01_bottes.shape"/>
152 1 aquiles
      <ATOM Name="shape_female" Value="MA_HOF_civil01_bottes.shape"/>
153 1 aquiles
      <ATOM Name="map_variant" Value="Low Quality"/>
154 1 aquiles
      <ATOM Name="icon" Value="AR_botte.tga"/>
155 1 aquiles
      <ATOM Name="icon background" Value="BK_matis.tga"/>
156 1 aquiles
    </STRUCT>
157 1 aquiles
    <STRUCT Name="faber">
158 1 aquiles
      <ATOM Name="Tool type" Value="ArmorTool"/>
159 1 aquiles
    </STRUCT>
160 1 aquiles
  </STRUCT>
161 1 aquiles
  <LOG/></FORM>
162 1 aquiles
</code></pre>
163 1 aquiles
164 1 aquiles
As you can see there's also a parent defined which declares some standard matis armor values. We dont need it at the moment but if you want to have a look at it you'll find the file at @leveldesign/game_element/sitem/armor/_parent/matis@
165 1 aquiles
166 1 aquiles
So now we need to change the values to match a vest:
167 1 aquiles
* change the "@EquipmentSlot@" from @Value="Feet"@ to @Value="Chest"@
168 1 aquiles
* change the "@CraftPlan@" to "@bcmaea11.sbrick@". This is the needed corresponding sbrick file i mentioned earlier. We will create it later.
169 1 aquiles
* change "@shape@" and "@shape_female@" to the shape names we found out earlier (@MA_HOM_armor00_gilet.shape@ and @MA_HOF_armor00_gilet.shape@)
170 1 aquiles
* change "@icon@" to "@AR_gilet.tga@" (see icons above)
171 1 aquiles
* if you like you can add another "@ATOM@" below "@icon background@" in the "@3D@" "@STRUCT@". Name it "@color@" and give it the value "@White@" (Black, Beige, Green, Red, Turquoise, Blue, Violet are also available).
172 1 aquiles
* save the file which should now look something like this:
173 1 aquiles
174 43 molator
<pre><code class="XML">
175 1 aquiles
<?xml version="1.0"?>
176 1 aquiles
<FORM Revision="$Revision: 1.0 $" State="modified">
177 1 aquiles
  <PARENT Filename="_gma_l.sitem"/>
178 1 aquiles
  <STRUCT>
179 1 aquiles
    <STRUCT Name="basics">
180 1 aquiles
      <ATOM Name="name" Value="matis light vest"/>
181 1 aquiles
      <ATOM Name="ItemType" Value="Light vest"/>
182 1 aquiles
      <STRUCT Name="EquipmentInfo">
183 1 aquiles
        <ARRAY Name="EquipmentSlots">
184 1 aquiles
          <ATOM Value="Chest"/>
185 1 aquiles
        </ARRAY>
186 1 aquiles
      </STRUCT>
187 1 aquiles
      <ATOM Name="CraftPlan" Value="bcmaea11.sbrick"/>
188 1 aquiles
    </STRUCT>
189 1 aquiles
    <STRUCT Name="3d">
190 1 aquiles
      <ATOM Name="shape" Value="MA_HOM_armor00_gilet.shape"/>
191 1 aquiles
      <ATOM Name="shape_female" Value="MA_HOF_armor00_gilet.shape"/>
192 1 aquiles
      <ATOM Name="map_variant" Value="Low Quality"/>
193 1 aquiles
      <ATOM Name="icon" Value="AR_gilet.tga"/>
194 1 aquiles
      <ATOM Name="icon background" Value="BK_matis.tga"/>
195 1 aquiles
      <ATOM Name="color" Value="White"/>
196 1 aquiles
    </STRUCT>
197 1 aquiles
    <STRUCT Name="faber">
198 1 aquiles
      <ATOM Name="Tool type" Value="ArmorTool"/>
199 1 aquiles
    </STRUCT>
200 1 aquiles
  </STRUCT>
201 1 aquiles
  <LOG>created by aquiles</LOG>
202 1 aquiles
</FORM>
203 1 aquiles
</code></pre>
204 1 aquiles
205 1 aquiles
h3. Creating Armor SBrick
206 1 aquiles
207 1 aquiles
So far so good! Now we need to add the brick for crafting. Have a look into the sbrick folder 
208 1 aquiles
* @leveldesign/game_element/sbrick@). 
209 1 aquiles
There you will find the @bcmaea07.sbrick@ file which was mentioned in the .sitem file for the light boots as "CraftPlan".
210 1 aquiles
Make a copy of @bcmaea07.sbrick@ and name it "bcmaea11.sbrick". It should look like this:
211 1 aquiles
212 43 molator
<pre><code class="XML">
213 1 aquiles
<?xml version="1.0"?>
214 1 aquiles
<FORM Revision="$Revision: 1.22 $" State="modified">
215 1 aquiles
  <STRUCT>
216 1 aquiles
    <STRUCT Name="Basics">
217 1 aquiles
      <ATOM Name="FamilyId" Value="BCMAEA"/>
218 1 aquiles
      <ATOM Name="IndexInFamily" Value="1"/>
219 1 aquiles
      <ATOM Name="SPCost" Value="30"/>
220 1 aquiles
      <ATOM Name="LearnRequiresOneOfSkills" Value="SC 0"/>
221 1 aquiles
      <ATOM Name="Action Nature" Value="CRAFT"/>
222 1 aquiles
      <ATOM Name="Skill" Value="SCALBEM"/>
223 1 aquiles
      <ATOM Name="LearnRequiresBricks" Value="bcpa10.sbrick"/>
224 1 aquiles
      <ATOM Name="CivRestriction" Value="matis"/>
225 1 aquiles
    </STRUCT>
226 1 aquiles
    <STRUCT Name="Client">
227 1 aquiles
      <ATOM Name="Icon" Value="AR_botte.tga"/>
228 1 aquiles
      <ATOM Name="IconBack" Value="BK_matis_brick.tga"/>
229 1 aquiles
      <ATOM Name="IconOver" Value="FP_over.tga"/>
230 1 aquiles
      <ATOM Name="IconOver2"/>
231 1 aquiles
    </STRUCT>
232 1 aquiles
    <STRUCT Name="faber">
233 1 aquiles
      <ATOM Name="Tool type" Value="ArmorTool"/>
234 1 aquiles
      <ATOM Name="Item Max Level" Value="100"/>
235 1 aquiles
      <STRUCT Name="Create">
236 1 aquiles
        <ATOM Name="Crafted Item" Value="icmalb.sitem"/>
237 1 aquiles
        <ATOM Name="Nb built items" Value="1"/>
238 1 aquiles
        <ATOM Name="MP 1" Value="Raw Material for Clothes"/>
239 1 aquiles
        <ATOM Name="Quantity 1" Value="2"/>
240 1 aquiles
        <ATOM Name="MP 2" Value="Raw Material for Armor interior coating"/>
241 1 aquiles
        <ATOM Name="Quantity 2" Value="2"/>
242 1 aquiles
        <ATOM Name="MP 3" Value="Raw Material for Armor interior stuffing"/>
243 1 aquiles
        <ATOM Name="Quantity 3" Value="1"/>
244 1 aquiles
        <ATOM Name="MP 4" Value="Raw Material for Armor clip"/>
245 1 aquiles
        <ATOM Name="Quantity 4" Value="1"/>
246 1 aquiles
        <ATOM Name="MP 5"/>
247 1 aquiles
        <ATOM Name="Quantity 5" Value="0"/>
248 1 aquiles
      </STRUCT>
249 1 aquiles
    </STRUCT>
250 1 aquiles
  </STRUCT>
251 1 aquiles
<LOG/></FORM>
252 1 aquiles
</code></pre>
253 1 aquiles
254 1 aquiles
Again we are going to change it now to resemble a vest craft plan
255 1 aquiles
* change IndexInFamily to 11 as this is the 11th item in the BCMAEA family
256 1 aquiles
* change Skill to SCALVEM (Master Light Vest Crafting)
257 1 aquiles
* change icon to AR_gilet.tga
258 1 aquiles
* change "Crafted Item" to icmalv.sitem (the one which we created earlier)
259 1 aquiles
* for simplicity i shortened the raw material list :)
260 1 aquiles
261 1 aquiles
Finally your file should look something like this:
262 1 aquiles
263 43 molator
<pre><code class="XML">
264 1 aquiles
<?xml version="1.0"?>
265 1 aquiles
<FORM Revision="$Revision: 1.0 $" State="modified">
266 1 aquiles
  <STRUCT>
267 1 aquiles
    <STRUCT Name="Basics">
268 1 aquiles
      <ATOM Name="FamilyId" Value="BCMAEA"/>
269 1 aquiles
      <ATOM Name="IndexInFamily" Value="11"/>
270 1 aquiles
      <ATOM Name="SPCost" Value="30"/>
271 1 aquiles
      <ATOM Name="LearnRequiresOneOfSkills" Value="SC 0"/>
272 1 aquiles
      <ATOM Name="Action Nature" Value="CRAFT"/>
273 1 aquiles
      <ATOM Name="Skill" Value="SCALVEM"/>
274 1 aquiles
      <ATOM Name="LearnRequiresBricks" Value="bcpa10.sbrick"/>
275 1 aquiles
      <ATOM Name="CivRestriction" Value="matis"/>
276 1 aquiles
    </STRUCT>
277 1 aquiles
    <STRUCT Name="Client">
278 1 aquiles
      <ATOM Name="Icon" Value="AR_gilet.tga"/>
279 1 aquiles
      <ATOM Name="IconBack" Value="BK_matis_brick.tga"/>
280 1 aquiles
      <ATOM Name="IconOver" Value="FP_over.tga"/>
281 1 aquiles
      <ATOM Name="IconOver2"/>
282 1 aquiles
    </STRUCT>
283 1 aquiles
    <STRUCT Name="faber">
284 1 aquiles
      <ATOM Name="Tool type" Value="ArmorTool"/>
285 1 aquiles
      <ATOM Name="Item Max Level" Value="100"/>
286 1 aquiles
      <STRUCT Name="Create">
287 1 aquiles
        <ATOM Name="Crafted Item" Value="icmalv.sitem"/>
288 1 aquiles
        <ATOM Name="Nb built items" Value="1"/>
289 1 aquiles
        <ATOM Name="MP 1" Value= "Raw Material for Clothes"/>
290 1 aquiles
        <ATOM Name="Quantity 1" Value="2"/>
291 1 aquiles
      </STRUCT>
292 1 aquiles
    </STRUCT>
293 1 aquiles
  </STRUCT>
294 1 aquiles
  <LOG>created by aquiles</LOG>
295 1 aquiles
</FORM>
296 1 aquiles
297 1 aquiles
</code></pre>
298 1 aquiles
299 1 aquiles
h3. Make it available on server and client
300 2 aquiles
301 2 aquiles
!>light_armor_set.png!
302 1 aquiles
303 1 aquiles
Well, we have come a long way :) Now its time to test it!
304 1 aquiles
305 1 aquiles
* Build the sheets_id.bin with the make_sheet_id tool and copy it to the user dir in your game client dir
306 1 aquiles
* Build the .packed_sheets with the sheets_packer and copy it to the same location
307 30 molator
* Copy your newly created sheets on the server and delete all .packed_sheets from the server/data_shard and server/src/entities_game_service folders if existing
308 10 molator
If it works, the server will recreate the .packed_sheets in server/data_shard
309 1 aquiles
* Make sure the two files we created are existing in the correct dir in your leveldesign dir and that they contain the content i explained before
310 1 aquiles
* Start your server
311 1 aquiles
* start your client and let him connect to your server
312 1 aquiles
* when ingame select your char and type the following command into the chat
313 1 aquiles
> /a createItemInBag icmalv.sitem 1 25
314 1 aquiles
* you should now have the new item in your inventory, congratz :D
315 35 samm
316 40 molator
h3. *Tutorial Videos:*
317 36 samm
318 37 samm
Part 1: http://www.youtube.com/watch?v=xNoBDkQfR3Y
319 37 samm
Part 2: http://www.youtube.com/watch?v=pCjZeiVR3ao
320 37 samm
Part 3: http://www.youtube.com/watch?v=g83L1unNEA8
321 1 aquiles
322 40 molator
h3. Add armor to merchant
323 28 molator
324 28 molator
Let's say we want to add our previously created vest to the existing light armor mechant.
325 28 molator
326 28 molator
Edit @code/ryzom/common/data_leveldesign/primitives/newbieland/urban_newbieland.primitive@ and search for:
327 28 molator
328 43 molator
<pre><code class="XML">
329 28 molator
<PROPERTY TYPE="string_array">
330 28 molator
  <NAME>chat_parameters</NAME>
331 28 molator
  <STRING>shop : NEWBIELAND_LARMOR_ALL</STRING>
332 28 molator
  <STRING>item : icmalb.sitem 10</STRING>
333 28 molator
  <STRING>item : icmalb.sitem 20</STRING>
334 28 molator
  <STRING>item : icmalb.sitem 50</STRING>
335 28 molator
  <STRING>item : icfalb.sitem 10</STRING>
336 28 molator
  <STRING>item : icfalb.sitem 20</STRING>
337 28 molator
  <STRING>item : icfalb.sitem 50</STRING>
338 28 molator
  <STRING>item : ictalb.sitem 10</STRING>
339 28 molator
  <STRING>item : ictalb.sitem 20</STRING>
340 28 molator
  <STRING>item : ictalb.sitem 50</STRING>
341 28 molator
  <STRING>item : iczalb.sitem 10</STRING>
342 28 molator
  <STRING>item : iczalb.sitem 20</STRING>
343 28 molator
  <STRING>item : iczalb.sitem 50</STRING>
344 28 molator
</PROPERTY>
345 28 molator
</code></pre>
346 28 molator
347 28 molator
That's the list of items, the merchant is already selling.
348 28 molator
349 29 molator
We will add our vest to the end of the list:
350 28 molator
351 28 molator
> <STRING>item : icmalv.sitem 10</STRING>
352 28 molator
353 28 molator
The number following the sitem is the level of the item.
354 28 molator
355 1 aquiles
* Save the file and place it on your server
356 1 aquiles
* Start your server
357 1 aquiles
* Your vest should be available in the light armor merchant list
358 1 aquiles
359 39 samm
h3.  *Tutorial Videos:*
360 38 samm
361 39 samm
Full Video: http://www.youtube.com/watch?v=cZ_mkTkQPgo
362 28 molator
363 40 molator
h3. Add crafting plan to trainer (todo)
364 28 molator
365 28 molator
Toto
366 1 aquiles
367 1 aquiles
h2. Adding Spells
368 1 aquiles
369 3 aquiles
!>edit_acid1.png!
370 1 aquiles
371 1 aquiles
As for the current system a spell consists of different components:
372 1 aquiles
* The general type (heal, damage, affliction etc.)
373 1 aquiles
* An effect type for that general type (e.g. cold and acid are dmg spell effects)
374 1 aquiles
* The explicit spell level component (eventually while leveling you can e.g. replace your old boring acid damage spell lvl 4 with the brand new lvl 5)
375 1 aquiles
* Options for the spell like area damage or ricochet
376 1 aquiles
* Credits to equal the costs of the spell (common credits are Mana (SAP as with ryzom ;) ) or cast time etc.)
377 1 aquiles
378 1 aquiles
h3. Add cold spell
379 1 aquiles
380 1 aquiles
So lets start with something easy. Fortunately WinchGate provided us with an example acid spell which we will take as guideance.
381 1 aquiles
382 1 aquiles
So first head over to your sbrick dir.
383 1 aquiles
384 1 aquiles
We already have the general damage spell component which is defined in the @bmpa01.sbrick@ file but as we are going to do another damage spell, we can ignore it for now.
385 1 aquiles
386 1 aquiles
*Creating the cold damage spell effect*
387 1 aquiles
388 1 aquiles
The acid spell effect is defined in the @bmoetea01.sbrick@ file. Copy it, name it @bmoetea02.sbrick@ and open it so we can change it accordingly to the cold effect. You should see something like this:
389 1 aquiles
390 43 molator
<pre><code class="XML">
391 1 aquiles
<?xml version="1.0"?>
392 1 aquiles
<FORM Revision="$Revision: 1.3 $" State="modified">
393 1 aquiles
  <STRUCT>
394 1 aquiles
    <STRUCT Name="Basics">
395 1 aquiles
      <ATOM Name="FamilyId" Value="BMOETEA"/>
396 1 aquiles
      <ATOM Name="SabrinaCost" Value="0"/>
397 1 aquiles
      <ATOM Name="SPCost" Value="37"/>
398 1 aquiles
      <ATOM Name="LearnRequiresOneOfSkills" Value="SM 0"/>
399 1 aquiles
      <ATOM Name="Action Nature" Value="OFFENSIVE_MAGIC"/>
400 1 aquiles
      <ATOM Name="Skill" Value="SMOEAEM"/>
401 1 aquiles
    </STRUCT>
402 1 aquiles
    <STRUCT Name="Client">
403 1 aquiles
      <ATOM Name="Icon" Value="ICO_Acid.tga"/>
404 1 aquiles
      <ATOM Name="IconBack" Value="EF_Back.tga"/>
405 1 aquiles
    </STRUCT>
406 1 aquiles
    <STRUCT Name="Parameter">
407 1 aquiles
      <ATOM Name="f0" Value="BMOETMA"/>
408 1 aquiles
    </STRUCT>
409 1 aquiles
  </STRUCT>
410 1 aquiles
</FORM>
411 1 aquiles
</code></pre>
412 1 aquiles
413 5 aquiles
* Change Icon to @ICO_Cold.tga@
414 5 aquiles
* Change the @f0 Parameter@ to BMOETMC family since this is going to be a cold spell effect
415 1 aquiles
416 12 molator
<pre>Note: Offensive Magic Damage families in ryzom so far are 
417 1 aquiles
* BMOETMA	Acid Damage
418 1 aquiles
* BMOETMC	Cold Damage
419 1 aquiles
* BMOETMR	Rot Damage
420 1 aquiles
* BMOETME	Electricity Damage
421 1 aquiles
* BMOETMF	Fire Damage
422 1 aquiles
* BMOETMP	Poison Damage
423 1 aquiles
* BMOETMS	Shockwave Damage
424 1 aquiles
</pre>
425 1 aquiles
426 1 aquiles
*Creating the cold damage component*
427 1 aquiles
428 1 aquiles
The provided acid spell damage is defined in the @bmoetma00003.sbrick@ file. Copy it, name it @bmoetmc00005.sbrick@ and open it so we change it accordingly to the cold damage. You should see something like this:
429 1 aquiles
430 43 molator
<pre><code class="XML">
431 1 aquiles
<?xml version="1.0"?>
432 1 aquiles
<FORM Revision="$Revision: 1.12 $" State="modified">
433 1 aquiles
  <STRUCT>
434 1 aquiles
    <STRUCT Name="Basics">
435 1 aquiles
      <ATOM Name="FamilyId" Value="BMOETMA"/>
436 1 aquiles
      <ATOM Name="IndexInFamily" Value="1"/>
437 1 aquiles
      <ATOM Name="SabrinaCost" Value="3"/>
438 1 aquiles
      <ATOM Name="SPCost" Value="7"/>
439 1 aquiles
      <ATOM Name="Property 0" Value="MA: moet"/>
440 1 aquiles
      <ATOM Name="Property 1" Value="MA_DMG: 15: 0: 0"/>
441 1 aquiles
      <ATOM Name="Property 2" Value="MA_DMG_TYPE: acid"/>
442 1 aquiles
      <ATOM Name="Property 4" Value="SET_BEHAVIOUR:CAST_ACID"/>
443 1 aquiles
      <ATOM Name="Property 5" Value="MA_END"/>
444 1 aquiles
      <ATOM Name="LearnRequiresOneOfSkills" Value="SM 0"/>
445 1 aquiles
      <ATOM Name="Action Nature" Value="OFFENSIVE_MAGIC"/>
446 1 aquiles
    </STRUCT>
447 1 aquiles
    <STRUCT Name="Client">
448 1 aquiles
      <ATOM Name="Icon" Value="ICO_Power.tga"/>
449 1 aquiles
      <ATOM Name="IconBack" Value="PA_Back.tga"/>
450 1 aquiles
    </STRUCT>
451 1 aquiles
  </STRUCT>
452 1 aquiles
</FORM>
453 1 aquiles
</code></pre>
454 1 aquiles
455 4 aquiles
!>edit_cold1.png!
456 4 aquiles
457 5 aquiles
* Change the @FamilyId@ to the cold family which is BMOETMC
458 5 aquiles
* Since this is the first level of our new cold spell leave the familyIndex at 1. If you add more later remember to increment this number
459 5 aquiles
* Change the sabrina costs as you like, ill leave it at 3 so i can create the spell with the existing spell credits
460 1 aquiles
* @Property 1@ defines how much damage the spell does to which value. The order is hp:sap:sta
461 5 aquiles
* Change @Property 2@ to MA_DMG_TYPE: cold
462 5 aquiles
* Change @Property 4@ to SET_BEHAVIOUR:CAST_COLD
463 1 aquiles
464 1 aquiles
Time to test it!
465 4 aquiles
466 4 aquiles
!>cast_cold1.png!
467 1 aquiles
468 1 aquiles
* Build the sheets_id.bin with the make_sheet_id tool and copy it to the user dir in your game client dir
469 1 aquiles
* Build the .packed_sheets with the sheets_packer and copy it to the same location
470 30 molator
* Copy your newly created sheets on the server and delete all .packed_sheets from the server/data_shard dir if existing
471 1 aquiles
* Make sure the two files we created are existing in the correct dir in your leveldesign dir and that they contain the content i explained before
472 1 aquiles
* Start your server
473 5 aquiles
* Start your client and let him connect to your server
474 5 aquiles
* When ingame select your char and type the following command into the chat
475 1 aquiles
> /a learnBrick bmoetea02.sbrick
476 1 aquiles
477 1 aquiles
> /a learnBrick bmoetmc00005.sbrick
478 5 aquiles
* You should now be able to create a cold damage spell, congratz :D
479 1 aquiles
480 5 aquiles
h3. Add heal spell
481 1 aquiles
482 5 aquiles
So now we are going to add something more complex. For the heal spell we need to define a new generic spell type, the new spell effect and the actual spell level.
483 5 aquiles
484 5 aquiles
Switch to your sbrick folder and find the @bmpa01.sbrick@ file, copy it and rename it to @bmpa04.brick@. This file will define the new generic type for heal spells. Open it and it should look something like this:
485 5 aquiles
486 43 molator
<pre><code class="XML">
487 5 aquiles
<?xml version="1.0"?>
488 5 aquiles
<FORM Revision="$Revision: 1.0 $" State="modified">
489 5 aquiles
  <STRUCT>
490 5 aquiles
    <STRUCT Name="Basics">
491 5 aquiles
      <ATOM Name="FamilyId" Value="BMPA"/>
492 5 aquiles
      <ATOM Name="SabrinaCost" Value="0"/>
493 5 aquiles
      <ATOM Name="LearnRequiresOneOfSkills" Value="SM 0"/>
494 5 aquiles
      <ATOM Name="Action Nature" Value="OFFENSIVE_MAGIC"/>
495 5 aquiles
      <ATOM Name="MinCastTime" Value="28"/>
496 5 aquiles
    </STRUCT>
497 5 aquiles
    <STRUCT Name="Client">
498 5 aquiles
      <ATOM Name="Icon" Value="ICO_Atysian.tga"/>
499 5 aquiles
      <ATOM Name="IconBack" Value="MP_Back_Offensive.tga"/>
500 5 aquiles
    </STRUCT>
501 5 aquiles
    <STRUCT Name="Mandatory">
502 5 aquiles
      <ATOM Name="f0" Value="BMOETEA"/>
503 5 aquiles
    </STRUCT>
504 5 aquiles
    <STRUCT Name="Optional">
505 5 aquiles
      <ATOM Name="f0" Value="BMOF"/>
506 5 aquiles
      <ATOM Name="f1" Value="BMOG"/>
507 5 aquiles
      <ATOM Name="f2" Value="BMOH"/>
508 5 aquiles
      <ATOM Name="f3" Value="BMOV"/>
509 5 aquiles
	    <ATOM Name="f4" Value="BMOR"/>
510 5 aquiles
    </STRUCT>
511 5 aquiles
    <STRUCT Name="Credit">
512 5 aquiles
      <ATOM Name="f0" Value="BMCA"/>
513 5 aquiles
      <ATOM Name="f1" Value="BMCR"/>
514 5 aquiles
      <ATOM Name="f2" Value="BMCC"/>
515 5 aquiles
      <ATOM Name="f3" Value="BMCP"/>
516 5 aquiles
    </STRUCT>
517 5 aquiles
  </STRUCT>
518 5 aquiles
  <LOG/></FORM>
519 5 aquiles
</code></pre>
520 5 aquiles
521 5 aquiles
* Change the @Action Nature@ to @CURATIVE_MAGIC@ which is the coded family for heal spells. 
522 5 aquiles
* If you want you can change the @MinCastTime@. The old value @28@ means it will take 2.8s to cast this spell. A value of @20@ would mean 2.0s cast time.
523 5 aquiles
* Change the @Icon@ to @ICO_Celestial.tga@
524 5 aquiles
* Change @IconBack@ to @MP_Back_Curative.tga@
525 5 aquiles
* Change the @f0@ atom from @Mandatory@ to @BMDHTEA@ which is the heal effect family
526 5 aquiles
* I did remove the @f3@ atom from @Optional@ because it is the Vampirism efecct which doesnt make sense for a heal spell; i think this was said somewhere in the source code too
527 5 aquiles
528 5 aquiles
*Creating the heal spell effect*
529 5 aquiles
530 5 aquiles
Now find the @bmoetea01.sbrick@ file, copy and rename it to @bmdhtea01.sbrick@. The content of this file which previously defined the acid spell effect will now be adjusted to define a heal hp spell effect. Open it and it should look something like this:
531 5 aquiles
532 43 molator
<pre><code class="XML">
533 5 aquiles
<?xml version="1.0"?>
534 5 aquiles
<FORM Revision="$Revision: 1.0 $" State="modified">
535 5 aquiles
  <STRUCT>
536 5 aquiles
    <STRUCT Name="Basics">
537 5 aquiles
      <ATOM Name="FamilyId" Value="BMOETEA"/>
538 5 aquiles
      <ATOM Name="SabrinaCost" Value="0"/>
539 5 aquiles
      <ATOM Name="SPCost" Value="37"/>
540 5 aquiles
      <ATOM Name="LearnRequiresOneOfSkills" Value="SM 0"/>
541 5 aquiles
      <ATOM Name="Action Nature" Value="OFFENSIVE_MAGIC"/>
542 5 aquiles
      <ATOM Name="Skill" Value="SMOEAEM"/>
543 5 aquiles
    </STRUCT>
544 5 aquiles
    <STRUCT Name="Client">
545 5 aquiles
      <ATOM Name="Icon" Value="ICO_Acid.tga"/>
546 5 aquiles
      <ATOM Name="IconBack" Value="EF_Back.tga"/>
547 5 aquiles
    </STRUCT>
548 5 aquiles
    <STRUCT Name="Parameter">
549 5 aquiles
      <ATOM Name="f0" Value="BMOETMA"/>
550 5 aquiles
    </STRUCT>
551 5 aquiles
  </STRUCT>
552 5 aquiles
</FORM>
553 5 aquiles
</code></pre>
554 5 aquiles
555 5 aquiles
* Change the @FamilyId@ to @BMDHTEA@
556 5 aquiles
* Change the @Action Nature@ to @CURATIVE_MAGIC@ 
557 5 aquiles
* Change the @Skill@ to @SMDHAEM@
558 5 aquiles
* Change the @Icon@ to @ICO_Heal.tga@
559 5 aquiles
* Change the @f0@ Parameter to @BMDHTMP@
560 5 aquiles
561 5 aquiles
*Creating the heal level component*
562 5 aquiles
563 5 aquiles
Now find the @bmoetma00003.sbrick@ file, copy and rename it to @bmdhtmp00005.sbrick@. The content of this file which previously defined the acid spell level will now be adjusted to define the heal hp spell level. Open it and it should look something like this:
564 5 aquiles
565 43 molator
<pre><code class="XML">
566 5 aquiles
<?xml version="1.0"?>
567 5 aquiles
<FORM Revision="$Revision: 1.0 $" State="modified">
568 5 aquiles
  <STRUCT>
569 5 aquiles
    <STRUCT Name="Basics">
570 5 aquiles
      <ATOM Name="FamilyId" Value="BMOETMA"/>
571 5 aquiles
      <ATOM Name="IndexInFamily" Value="1"/>
572 5 aquiles
      <ATOM Name="SabrinaCost" Value="3"/>
573 5 aquiles
      <ATOM Name="SPCost" Value="7"/>
574 5 aquiles
      <ATOM Name="Property 0" Value="MA: moet"/>
575 5 aquiles
      <ATOM Name="Property 1" Value="MA_DMG: 15: 0: 0"/>
576 5 aquiles
      <ATOM Name="Property 2" Value="MA_DMG_TYPE: acid"/>
577 5 aquiles
      <ATOM Name="Property 4" Value="SET_BEHAVIOUR:CAST_ACID"/>
578 5 aquiles
      <ATOM Name="Property 5" Value="MA_END"/>
579 5 aquiles
      <ATOM Name="LearnRequiresOneOfSkills" Value="SM 0"/>
580 5 aquiles
      <ATOM Name="Action Nature" Value="OFFENSIVE_MAGIC"/>
581 5 aquiles
      <ATOM Name="MinCastTime" Value="30"/>
582 5 aquiles
      <ATOM Name="MaxCastTime" Value="130"/>
583 5 aquiles
    </STRUCT>
584 5 aquiles
    <STRUCT Name="Client">
585 5 aquiles
      <ATOM Name="Icon" Value="ICO_Power.tga"/>
586 5 aquiles
      <ATOM Name="IconBack" Value="PA_Back.tga"/>
587 5 aquiles
    </STRUCT>
588 5 aquiles
  </STRUCT>
589 5 aquiles
</FORM>
590 5 aquiles
</code></pre>
591 5 aquiles
592 5 aquiles
* Change the @FamilyId@ to @BMDHTMP@
593 5 aquiles
* Change the @Property 0@ to @MA: mdht@
594 5 aquiles
* Change the @Property 1@ to @MA_HEAL: 15: 0: 0@
595 5 aquiles
* Delete the @Property 2@, we dont need a dmg type
596 5 aquiles
* Change the @Property 4@ to @SET_BEHAVIOUR:CAST_HEALHP@
597 5 aquiles
* Change the @Action Nature@ to @CURATIVE_MAGIC@
598 5 aquiles
599 5 aquiles
Time to test it!
600 5 aquiles
601 5 aquiles
* Build the sheets_id.bin with the make_sheet_id tool and copy it to the user dir in your game client dir
602 5 aquiles
* Build the .packed_sheets with the sheets_packer and copy it to the same location
603 30 molator
* Copy your newly created sheets on the server and delete all .packed_sheets from the server/data_shard dir if existing
604 5 aquiles
* Make sure the three files we created are existing in the correct dir in your leveldesign dir and that they contain the content i explained before
605 5 aquiles
* Start your server
606 5 aquiles
* Start your client and let him connect to your server
607 5 aquiles
* When ingame select your char and type the following command into the chat
608 5 aquiles
> /a learnBrick bmpa04.sbrick
609 5 aquiles
610 5 aquiles
> /a learnBrick bmdhtea01.sbrick
611 5 aquiles
612 5 aquiles
> /a learnBrick bmdhtmp00005.sbrick
613 5 aquiles
* You should now be able to create a heal spell, congratz :D
614 1 aquiles
615 13 molator
h3. Add sap credit
616 1 aquiles
617 15 molator
Ryzom Core provides a sap credit 2 defined in @bmca00002.sbrick@.
618 15 molator
Let's create a sap credit 5.
619 13 molator
620 13 molator
Copy the previous file and name it @bmca00005.sbrick@.
621 13 molator
Then open it to create the desire sap credit.
622 13 molator
623 13 molator
You should see something like this:
624 13 molator
625 43 molator
<pre><code class="XML">
626 13 molator
<?xml version="1.0"?>
627 13 molator
<FORM Revision="$Revision: 1.17 $" State="modified">
628 13 molator
  <STRUCT>
629 13 molator
    <STRUCT Name="Basics">
630 13 molator
      <ATOM Name="FamilyId" Value="BMCA"/>
631 13 molator
      <ATOM Name="IndexInFamily" Value="2"/>
632 13 molator
      <ATOM Name="SabrinaCost" Value="-2"/>
633 13 molator
      <ATOM Name="SPCost" Value="3"/>
634 13 molator
      <ATOM Name="Property 1" Value="SAP: 7"/>
635 13 molator
      <ATOM Name="LearnRequiresOneOfSkills" Value="SM 0"/>
636 13 molator
      <ATOM Name="Action Nature" Value="UNKNOWN"/>
637 13 molator
    </STRUCT>
638 13 molator
    <STRUCT Name="Client">
639 13 molator
      <ATOM Name="Icon" Value="ICO_Sap.tga"/>
640 13 molator
      <ATOM Name="IconBack" Value="CP_Back.tga"/>
641 13 molator
      <ATOM Name="IconOver" Value="CP_Over_More.tga"/>
642 13 molator
    </STRUCT>
643 13 molator
  </STRUCT>
644 13 molator
</FORM>
645 13 molator
</code></pre>
646 13 molator
647 13 molator
!>sap_credit.png!
648 13 molator
649 16 molator
* Change the @IndexInFamily@ to @5@, that's the 5th credit in the family
650 16 molator
* Change the @SabrinaCost@ to @-5@, the value of the credit
651 13 molator
* Change the @Property 1@ to @SAP: 10@, the sap cost of the credit
652 13 molator
653 13 molator
Time to test it!
654 13 molator
655 13 molator
* Build the sheets_id.bin with make_sheet_id, copy it to your client user folder
656 13 molator
* Build the .packed_sheets with sheets_packer, copy everything in the same folder
657 30 molator
* Copy your newly created sheets on the server and delete all .packed_sheets from code/ryzom/server/data_shard
658 13 molator
* Place the new brick in your server
659 13 molator
* Start your server
660 13 molator
* Connect your client to your server
661 13 molator
662 14 molator
* Type the following command in your client
663 13 molator
> /a learnBrick bmca00005.sbrick
664 13 molator
665 13 molator
* You should have a new sap credit available now.
666 1 aquiles
667 17 molator
h3. Add bomb effect
668 1 aquiles
669 17 molator
The bomb effect allows us to hit multiple targets.
670 17 molator
671 17 molator
Let's create our own file this time.
672 17 molator
673 17 molator
We will use an existing sheet name.
674 17 molator
Create a new file and name it @bmof00040.sbrick@.
675 17 molator
676 17 molator
Then paste the following content:
677 17 molator
678 43 molator
<pre><code class="XML">
679 17 molator
<?xml version="1.0"?>
680 17 molator
<FORM Revision="$Revision: 1.0 $" State="modified">
681 17 molator
  <STRUCT>
682 17 molator
    <STRUCT Name="Basics">
683 17 molator
      <ATOM Name="FamilyId" Value="BMOF"/>
684 17 molator
      <ATOM Name="IndexInFamily" Value="1"/>
685 17 molator
      <ATOM Name="SabrinaCost" Value="0"/>
686 17 molator
      <ATOM Name="SPCost" Value="7"/>
687 17 molator
      <ATOM Name="Property 0" Value="AREA_BOMB: 20: 0.9: 5"/>
688 17 molator
      <ATOM Name="Property 1" Value="AREA_TARGETS: 0.9: 5"/>
689 17 molator
      <ATOM Name="LearnRequiresOneOfSkills" Value="SM 0"/>
690 17 molator
      <ATOM Name="Action Nature" Value="UNKNOWN"/>
691 17 molator
    </STRUCT>
692 17 molator
    <STRUCT Name="Client">
693 17 molator
      <ATOM Name="Icon" Value="ICO_Bomb.tga"/>
694 17 molator
      <ATOM Name="IconBack" Value="OP_Back.tga"/>
695 17 molator
    </STRUCT>
696 17 molator
  </STRUCT>
697 17 molator
</FORM>
698 17 molator
</code></pre>
699 17 molator
700 17 molator
!>bomb_effect.png!
701 17 molator
702 17 molator
Let's try to understand the syntax.
703 17 molator
704 19 molator
* Set the @FamilyId@ to @BMOF@, that's the base name of the sheet family
705 19 molator
* Set the @IndexInFamily@ to @1@, it's the 1st effect in the family
706 20 molator
* Set the @SabrinaCost@ to @0@,
707 20 molator
we are setting the sap cost of the effect to @0@, that way we don't need more sap credits
708 19 molator
* Set the @Property 0@ to @AREA_BOMB: 20: 0.9: 5@,
709 21 molator
the syntax @AREA_BOMB: Radius: MinFactor: MaxTargets@
710 1 aquiles
* Set the @Property 1@ to @AREA_TARGETS: 0.9: 5@,
711 1 aquiles
the syntax @AREA_TARGETS: TargetFactor: MaxTargets@
712 20 molator
* Set the @Action Nature@ to @UNKNOWN@,
713 20 molator
the bomb effect can be use with both the acid spell and the healing spell
714 19 molator
* Set the @Icon@ to @ICO_Bomb.tga@, the foreground icon
715 19 molator
* Set the @IconBack@ to @OP_Back.tga@, the background icon
716 17 molator
717 22 molator
!>bomb_effect2.png!
718 22 molator
719 17 molator
Time to test it!
720 1 aquiles
721 23 molator
* Build the sheets_id.bin with make_sheet_id,
722 23 molator
copy it to your client user folder
723 23 molator
* Build the .packed_sheets with sheets_packer,
724 23 molator
copy everything in the same folder
725 30 molator
* Copy your newly created sheets on the server and delete all .packed_sheets from
726 23 molator
code/ryzom/server/data_shard
727 17 molator
* Place the new brick in your server
728 17 molator
* Start your server
729 17 molator
* Connect your client to your server
730 17 molator
731 17 molator
* Type the following command in your client
732 17 molator
> /a learnBrick bmof00040.sbrick
733 17 molator
734 17 molator
* You should have a bomb effect available now.
735 1 aquiles
736 25 molator
737 25 molator
h3. Add removal brick
738 25 molator
739 27 molator
We need a brick to remove the stanzas in our actions.
740 25 molator
741 25 molator
We will create a dummy brick for that purpose.
742 25 molator
Create a new file and name it @big_remove.sbrick@.
743 25 molator
744 25 molator
Then paste the following content:
745 25 molator
746 43 molator
<pre><code class="XML">
747 25 molator
<?xml version="1.0"?>
748 25 molator
<FORM Revision="$Revision: 1.0 $" State="modified">
749 25 molator
  <STRUCT>
750 25 molator
    <STRUCT Name="Client">
751 25 molator
      <ATOM Name="Icon" Value="No_Action.tga"/>
752 25 molator
    </STRUCT>
753 25 molator
  </STRUCT>
754 25 molator
</FORM>
755 25 molator
</code></pre>
756 25 molator
757 25 molator
!>removal_brick.png!
758 25 molator
759 25 molator
* Set the @Icon@ to @No_Action.tga@, the icon of our dummy brick
760 25 molator
761 25 molator
Time to test it!
762 25 molator
763 25 molator
* Build the sheets_id.bin with make_sheet_id,
764 25 molator
copy it to your client user folder
765 25 molator
* Build the .packed_sheets with sheets_packer,
766 25 molator
copy everything in the same folder
767 30 molator
* Copy your newly created sheets on the server and delete all .packed_sheets from
768 25 molator
code/ryzom/server/data_shard
769 25 molator
* Place the new brick in your server
770 25 molator
* Start your server
771 25 molator
* Connect your client to your server
772 1 aquiles
773 1 aquiles
* Type the following command in your client
774 1 aquiles
> /a learnBrick big_remove.sbrick
775 1 aquiles
776 1 aquiles
* Now you've got a removal brick.
777 1 aquiles
778 40 molator
h3. Add spell to trainer
779 40 molator
780 40 molator
Let's add the cold spell (previously defined) to a trainer.
781 40 molator
782 40 molator
First, we will create a new sphrase.
783 40 molator
Create a new file and name it @abm_mt_cold_00005.sphrase@.
784 40 molator
785 40 molator
Then paste the following content:
786 40 molator
787 43 molator
<pre><code class="XML">
788 42 molator
<?xml version="1.0"?>
789 40 molator
<FORM Revision="$Revision: 1.0 $" State="modified">
790 40 molator
  <STRUCT>
791 40 molator
    <ATOM Name="brick 0" Value="bmpa01.sbrick"/>
792 40 molator
    <ATOM Name="brick 1" Value="bmoetea02.sbrick"/>
793 40 molator
    <ATOM Name="brick 2" Value="bmoetmc00005.sbrick"/>
794 40 molator
    <ATOM Name="brick 3" Value="bmcr00001.sbrick"/>
795 1 aquiles
    <ATOM Name="brick 4" Value="bmca00002.sbrick"/>
796 1 aquiles
  </STRUCT>
797 42 molator
</FORM>
798 42 molator
</code></pre>
799 40 molator
800 40 molator
Let's try to understand the sphrase format.
801 40 molator
802 40 molator
A sphrase is a list of sbrick.
803 40 molator
We will list all the sbrick (spell, credit, effect, etc) that we need.
804 40 molator
805 40 molator
We will learn all of them at once:
806 40 molator
* bmpa01.sbrick       General damage spell component
807 40 molator
* bmoetea02.sbrick    Cold spell effect
808 40 molator
* bmoetmc00005.sbrick Cold spell damage
809 40 molator
* bmcr00001.sbrick    Range credit
810 40 molator
* bmca00002.sbrick    Sap credit
811 40 molator
812 40 molator
Now that we have something to learn, let's add the trainer.
813 40 molator
814 1 aquiles
You can use either the World Editor or edit the primitive yourself.
815 1 aquiles
816 42 molator
If you don't know how to use the World Editor, have a look here:
817 47 molator
> http://dev.ryzom.com/projects/ryzom/wiki/UseWorldEditor
818 42 molator
819 40 molator
With the World Editor, open code/ryzom/common/data_leveldesign/primitives/newbieland/urban_newbieland.primitive.
820 40 molator
Add a npc_group and call it @nb_trainers@.
821 40 molator
822 1 aquiles
In that groupe, add a @npc_bot@ and enter the following properties:
823 1 aquiles
!trainer.png!
824 42 molator
825 42 molator
In chat_parameters, we will list all the sphrase we want.
826 42 molator
827 46 molator
You can move your trainer wherever you want.
828 46 molator
829 42 molator
Save the primitive.
830 42 molator
831 42 molator
Alternatively, if you don't want to use the World Editor.
832 42 molator
833 42 molator
Open code/ryzom/common/data_leveldesign/primitives/newbieland/urban_newbieland.primitive and add the following content:
834 43 molator
<pre><code class="XML">
835 42 molator
        <CHILD TYPE="CPrimNode">
836 42 molator
          <PROPERTY TYPE="string">
837 42 molator
            <NAME>class</NAME>
838 42 molator
            <STRING>npc_group</STRING>
839 42 molator
          </PROPERTY>
840 42 molator
          <PROPERTY TYPE="string">
841 42 molator
            <NAME>name</NAME>
842 42 molator
            <STRING>nb_trainers</STRING>
843 42 molator
          </PROPERTY>
844 42 molator
          <CHILD TYPE="CPrimNode">
845 42 molator
            <PROPERTY TYPE="string">
846 42 molator
              <NAME>class</NAME>
847 42 molator
              <STRING>npc_group_parameters</STRING>
848 42 molator
            </PROPERTY>
849 42 molator
            <PROPERTY TYPE="string">
850 42 molator
              <NAME>name</NAME>
851 42 molator
              <STRING>parameters</STRING>
852 42 molator
            </PROPERTY>
853 42 molator
          </CHILD>
854 42 molator
          <CHILD TYPE="CPrimAlias">
855 42 molator
            <ALIAS VALUE="1260"/>
856 42 molator
            <PROPERTY TYPE="string">
857 42 molator
              <NAME>class</NAME>
858 42 molator
              <STRING>alias</STRING>
859 42 molator
            </PROPERTY>
860 42 molator
            <PROPERTY TYPE="string">
861 42 molator
              <NAME>name</NAME>
862 42 molator
              <STRING>alias</STRING>
863 42 molator
            </PROPERTY>
864 42 molator
          </CHILD>
865 42 molator
          <CHILD TYPE="CPrimPoint">
866 42 molator
            <PT X="10313.020508" Y="-11731.011719" Z="0.000000"/>
867 42 molator
            <PROPERTY TYPE="string_array">
868 42 molator
              <NAME>chat_parameters</NAME>
869 42 molator
              <STRING>phrase : abm_mt_cold_00005.sphrase</STRING>
870 42 molator
            </PROPERTY>
871 42 molator
            <PROPERTY TYPE="string">
872 42 molator
              <NAME>class</NAME>
873 42 molator
              <STRING>npc_bot</STRING>
874 42 molator
            </PROPERTY>
875 42 molator
            <PROPERTY TYPE="string_array">
876 42 molator
              <NAME>equipment</NAME>
877 42 molator
              <STRING>CHANDS : 1</STRING>
878 42 molator
              <STRING>CBODY : 3</STRING>
879 42 molator
              <STRING>CLEGS : 3</STRING>
880 42 molator
              <STRING>CFEETS : 3</STRING>
881 42 molator
              <STRING>CARMS : 1</STRING>
882 42 molator
            </PROPERTY>
883 42 molator
            <PROPERTY TYPE="string">
884 42 molator
              <NAME>is_stuck</NAME>
885 42 molator
              <STRING>true</STRING>
886 42 molator
            </PROPERTY>
887 42 molator
            <PROPERTY TYPE="string">
888 42 molator
              <NAME>name</NAME>
889 42 molator
              <STRING>nbland_trainer_magic$fct_m_trainer$</STRING>
890 42 molator
            </PROPERTY>
891 42 molator
            <PROPERTY TYPE="string">
892 42 molator
              <NAME>sheet_client</NAME>
893 42 molator
              <STRING>company_of_the_drill_loge_master_z_h_b1</STRING>
894 42 molator
            </PROPERTY>
895 42 molator
            <CHILD TYPE="CPrimAlias">
896 42 molator
              <ALIAS VALUE="1261"/>
897 42 molator
              <PROPERTY TYPE="string">
898 42 molator
                <NAME>class</NAME>
899 42 molator
                <STRING>alias</STRING>
900 42 molator
              </PROPERTY>
901 42 molator
              <PROPERTY TYPE="string">
902 42 molator
                <NAME>name</NAME>
903 42 molator
                <STRING>alias</STRING>
904 42 molator
              </PROPERTY>
905 42 molator
            </CHILD>
906 42 molator
          </CHILD>
907 42 molator
        </CHILD>
908 42 molator
</code></pre>
909 42 molator
910 44 molator
after the following lines (the merchant group):
911 44 molator
<pre><code class="XML">
912 44 molator
              <ALIAS VALUE="146"/>
913 44 molator
              <PROPERTY TYPE="string">
914 44 molator
                <NAME>class</NAME>
915 44 molator
                <STRING>alias</STRING>
916 44 molator
              </PROPERTY>
917 44 molator
              <PROPERTY TYPE="string">
918 44 molator
                <NAME>name</NAME>
919 44 molator
                <STRING>alias</STRING>
920 44 molator
              </PROPERTY>
921 44 molator
            </CHILD>
922 44 molator
          </CHILD>
923 44 molator
        </CHILD>
924 44 molator
</code></pre>
925 40 molator
926 40 molator
Time to test it!
927 40 molator
928 45 molator
* Place the new sphrase in your server somewhere in code/ryzom/common/data_leveldesign/leveldesign/game_element/sphrase
929 45 molator
* Update code/ryzom/common/data_leveldesign/primitives/newbieland/urban_newbieland.primitive on your server
930 40 molator
* Start your server
931 40 molator
* Connect your client to your server
932 40 molator
933 40 molator
* Your trainer should appear next to the tower.
934 40 molator
935 40 molator
h3. Making spells visible in skill tree (todo)
936 1 aquiles
937 1 aquiles
Todo
938 1 aquiles
939 1 aquiles
h2. Troubleshooting
940 1 aquiles
941 1 aquiles
If not everything is working as expected enable debug infos for the EGS service on your server. Set the following parameters in EGS. Now when trying to create a armor or learn some bricks you should get some more infos in the EGS output to find the error. Of course you can also ask me in irc.
942 1 aquiles
943 1 aquiles
* EGS commands
944 1 aquiles
** VerboseBrickManagerInfo 1
945 1 aquiles
** VerboseBrickManagerDbg 1
946 1 aquiles
** DisableNLDebug 0