Extending Partigen


Extending Partigen > Creating Emitter Libraries



Creating Emitter Libraries

The following section will go over the creation of Partigen Emitter Libraries. This requires knowledge of the .pel format found here.

To create a new Partigen Emitter Library:

  1. First open the text editor of your choice and create a new xml file. Save this as filename.pel
  2. Next, copy and past the template found here into your new file.
  3. Fill in as much information as you can at this stage: library name, author, version, pgversion, and require8.

    Your file should look something like the following: <?xml version="1.0" encoding="UTF-8" ?> <!-- Standard Emitter Library v1.0 Copyright (c) 2006 Desuade. All rights reserved. --> <library name="Test Library" author="Desuade" version="1.0" pgversion="1.0" require8="false"> <group name="Group Name"> <emitter name="Preset Name" source="_ps" config=""/> </group></library>
  4. Now open Flash and select the emitter with the configuration you want to save in the PEL file. Open the parameters for it and open the Config section, then click "Generate":

    config screenshot

  5. Right click in the text box and "Select All" then right click again and "Copy" or "Cut". You now have the entire configuration for that emitter in your clipboard. How easy is that!
  6. Now go back to your .pel file and paste the contents in the config attributes under emitter.
  7. Copy the source from the config line and paste it in the source attribute as well. Name your preset and group if you haven't already as well.
  8. Repeat as needed for groups and emitters.

    You should end up with a file that resembles the following: <?xml version="1.0" encoding="UTF-8" ?> <!-- Standard Emitter Library v1.0 Copyright (c) 2006 Desuade. All rights reserved. --> <library name="Test Library" author="Desuade" version="1.0" pgversion="1.0" require8="false"> <group name="Test 1"> <emitter name="Fake 1" source="particle_ps" config="_source=particle_ps&_mode_mode=tween&_mode_emission=point&_order=front&_emissiontarget=0&_lowestdepth=1&_eps=10&_burst=1&_startaligned=false&_orientation=90&_lineconfig_x=*100&_lineconfig_y=*0&_lineconfig_points=4&_boxconfig_x=*100&_boxconfig_y=*100&_life=1&_scalestart=100&_scaleend=disabled&_alphaend=0&_alphastart=100&_rotationstart=0&_rotationend=disabled&_colorstart=disabled&_colorend=disabled&_tween_x=*0&_tween_y=*-200&_tween_cx=disabled&_tween_cy=disabled&_tween_delay=0&_tween_duration=2&_tween_ease=linear&_physics_vx=2&_physics_vy=4&_physics_ax=0&_physics_ay=-0.1&_physics_fx=0&_physics_fy=0&_physics_angle=90"/> <emitter name="Fake 2" source="particle_ps" config="_source=particle_ps&_mode_mode=tween&_mode_emission=point&_order=front&_emissiontarget=0&_lowestdepth=1&_eps=10&_burst=1&_startaligned=false&_orientation=90&_lineconfig_x=*100&_lineconfig_y=*0&_lineconfig_points=4&_boxconfig_x=*100&_boxconfig_y=*100&_life=1&_scalestart=100&_scaleend=disabled&_alphaend=0&_alphastart=100&_rotationstart=0&_rotationend=disabled&_colorstart=disabled&_colorend=disabled&_tween_x=*0&_tween_y=*-200&_tween_cx=disabled&_tween_cy=disabled&_tween_delay=0&_tween_duration=2&_tween_ease=linear&_physics_vx=2&_physics_vy=4&_physics_ax=0&_physics_ay=-0.1&_physics_fx=0&_physics_fy=0&_physics_angle=90"/> </group> <group name="Test 2"> <emitter name="Fake 3" source="particle_ps" config="_source=particle_ps&_mode_mode=tween&_mode_emission=point&_order=front&_emissiontarget=0&_lowestdepth=1&_eps=10&_burst=1&_startaligned=false&_orientation=90&_lineconfig_x=*100&_lineconfig_y=*0&_lineconfig_points=4&_boxconfig_x=*100&_boxconfig_y=*100&_life=1&_scalestart=100&_scaleend=disabled&_alphaend=0&_alphastart=100&_rotationstart=0&_rotationend=disabled&_colorstart=disabled&_colorend=disabled&_tween_x=*0&_tween_y=*-200&_tween_cx=disabled&_tween_cy=disabled&_tween_delay=0&_tween_duration=2&_tween_ease=linear&_physics_vx=2&_physics_vy=4&_physics_ax=0&_physics_ay=-0.1&_physics_fx=0&_physics_fy=0&_physics_angle=90"/> <emitter name="Fake 4" source="particle_ps" config="_source=particle_ps&_mode_mode=tween&_mode_emission=point&_order=front&_emissiontarget=0&_lowestdepth=1&_eps=10&_burst=1&_startaligned=false&_orientation=90&_lineconfig_x=*100&_lineconfig_y=*0&_lineconfig_points=4&_boxconfig_x=*100&_boxconfig_y=*100&_life=1&_scalestart=100&_scaleend=disabled&_alphaend=0&_alphastart=100&_rotationstart=0&_rotationend=disabled&_colorstart=disabled&_colorend=disabled&_tween_x=*0&_tween_y=*-200&_tween_cx=disabled&_tween_cy=disabled&_tween_delay=0&_tween_duration=2&_tween_ease=linear&_physics_vx=2&_physics_vy=4&_physics_ax=0&_physics_ay=-0.1&_physics_fx=0&_physics_fy=0&_physics_angle=90"/> </group></library>
  9. If you have any custom particles, be sure to export those as well in order for proper function.

That's it for creating a Partigen Emitter Library. When distributing the library, be sure to include the .pel file, as well as both the .swf and the .swc files for each needed custom particle for it to work with the Partigen Library.

To include your custom library in the Partigen Library, you need to place the .ple file in the Partigen Emitter Library folder. This can be found in the configuration folder for Flash:

Once all required file are in place, all you have to do* is click "Reload" on the Partigen Library panel to load the new particles and presets. No need to restart Flash!

*In Flash MX2004, you have to manually reload the Components panel, but not in Flash 8 or higher.