Difference between revisions of "Updating Ages"

(Region (Logic) Changes)
(Region (Logic) Changes)
Line 58: Line 58:
 
    - farthest
 
    - farthest
  
* Climbing regions now require an [[AlcScript]] to function, and the "easy" climbable regions are not recognized. Follow the tutorial [http://alcugs.almlys.org/wiki/index.php/AgeLadders here] to place climbing regions but use this AlcScript to set their properties.
+
* Climbing regions now require an [[AlcScript]] to function, and the "easy" climbable regions are not recognized. Follow the tutorial [[Creating a Ladder|here]] to learn more about new ladders.
  
 
  '''<name of top ladder region>''':
 
  '''<name of top ladder region>''':

Revision as of 03:05, 20 January 2008

The new plugin release significantly changes many of the age building conventions and properties used in older versions to the point that older ages exported with the new plugin may simply fail to operate properly.

I will list the changes most likely to break existing ages, and detail how to update them for use with the new plugin.

Drawable (Graphics) Changes

  • The plugin now reads the "Map Input" settings. This means that the texture coordinates applied to the mesh will be the same as the ones that would be applied by the blender raytracer. In order to make your uv mapped materials compatible, you must set the UV button for each texture layer of your material that uses a uvmapped image texture. (the only exception is environment maps)
  • The plugin now automatically assigns all lights in a scene to each object in the scene, meaning that all your objects will be dynamically lit by plasma. In order to stop all lights from affecting an object you must set the "Shadeless" button in the material panel of the material settings. If you had very specific light settings before, and want to preserve them, you can use lightgroups. First, select the lights you want to affect your object, and press ctrl-g to add them to a group. You can change the group name in the objects panel (F7) under "objects and links". Now select the object you want to be affected by this group and enter the name of the group in the GR: field in the shaders panel under Shading Tools (F9).
  • The plugin now reads the specular color of the material. This defaults to white on new blender materials, meaning your objects will probably appear excessively shiny if they are dynamically lit. You can change the specular color by selecting "Spe" and changing the color sliders.
  • It is also worth noting that the plugin has always read the "Amb" slider in the "shaders" panel of the material settings. If you are using vertex colors, this should be set to 1. (it defaults to .5)
  • The plugin now reads the "Double sided" button in the Mesh settings. This is on by default, which will make all your materials double sided. Note that while the setting is in the mesh options in blender, it is tied to a material in blender, so if any of your objects share materials (you can check by pressing shift-L and selecting Material, which will select all objects using the same blender material as the currently selected object) you will need to make sure this mesh setting is the same for all of them.
  • You can now assign multiple materials to a single object mesh. To do this you must use the Material controls in the "link and materials" panel of the mesh options. (new, select, assign, delete, deselect) "1 Mat 1" refers to the number of materials on the mesh, where the currently active material is 1 out of a total of 1 materials.

While this is not entirely neccesary to use this to update existing ages, it may be useful in case you already had multi-materials and suddenly have strange results in plasma because of it. In order to correctly assign multiple materials to a mesh:

First, in UV mode, apply textures to all the faces you want. This will be your UV mapping. (you can use multiple textures here by selecting individual faces before changing the uv image) Once you've got that done, and everything looks dandy in the textured view, go to the materials settings for the object. Set the texture in the material to one of the textures you used while uv mapping. Set map input to UV. Now go to the Editing tools (F9) and hit "new" under 1 Mat 1. It will change to 2 Mat 2. Go back to the materials controls (F5) and look at the texture in your material. Click the number 2 to the right of the texture name in the texture view, and click "single user" in the popup. This will unlink the texture so that you aren't changing your old material's texture too. Now set the material texture image to the second texture you used. Now go back to the Editing tools (F9) and take your object into edit mode. (tab) Select the faces that you want to have this second material assigned to. Now click "Assign". Now those faces will use the second material. If you want to assign the first material to some faces, click the arrow next to 2 Mat 2 to change it to 2 Mat 1. Now clicking assign will assign the first material to the selected faces in edit mode. You can repeat this process (new mat, unlink texture, change texture, assign faces) to add as many materials as you want to the same mesh. You can check your materials by doing a Render, as the material settings are used by the raytracer.

Collision (Physics) Changes

  • All objects now use the "Bounds" options in the logic settings to set collision, rather than the col_type property. The conversion wizard will not write this property, so you will have to set it manually. The types available are:
  1. Box (equivalent of col_type 1)
  2. Sphere (equivalent of col_type 2)
  3. Cylinder
  4. Cone
  5. Convex Hull PolyType (equivalent of col_type 3)
  6. Static TriangleMesh (equivalent of col_type 4)

Static TriangleMesh is the equivalent of col_type 4. To help in resetting your collision properties, a wizard has been added to mass set the Static TriangleMesh bounds option. Scripts > Wizards > PyPRP Wizards > Assign Default Bounds to Selected Objects will set the bound type for all of the currently selected objects.

Region (Logic) Changes

  • AlcScript is implemented and used extensively for nearly all simple logic actions.
  • Footstep regions now use the "surface" string property to set the sound rather than the "footstepsound" integer property. The surface strings and their equivalent integer values can be found here.
  • Camera regions now require an AlcScript to function. An example script:
<camera region name>:
	region:
		type: camera
		camera:
			messages:
			  - newcam: <camera object name>
			
<camera object name>:
	camera:
		brain:
			type: <Camera type (fixed, circle, avatar)>
			xpanlimit: 0.8 (amount the user can pan the camera with right mouse button)
			zpanlimit: 0.8 (values range from 0 to 1)
			poa: 0,0,6 (This is the Point on Avatar)
			offset: 0,6,6 (For avatar cameras only, location relative to avatar feet)
			flags:
			  - followlocalavatar
			  - maintainLOS
			circleflags: (only neccesary for circle cameras)
			  - farthest
  • Climbing regions now require an AlcScript to function, and the "easy" climbable regions are not recognized. Follow the tutorial here to learn more about new ladders.
<name of top ladder region>:
	type: region
	region:
		type: ladder
		ladder:
			direction: down
			style: twofeet
			loops: <climbing height, as calculated>

<name of bottom ladder region>:
	type: region
	region:
		type: ladder
		ladder:
			direction: up
			style: twofeet
			loops: <climbing height, as calculated>

Ladder regions must also have the blender text properties:

string type region
string regiontype climbing