Changes

Jump to navigation Jump to search
2,788 bytes added ,  14:37, 4 May 2016
Line 511: Line 511:     
=== Meshes and materials ===
 
=== Meshes and materials ===
 +
Meshes will be loaded from the Models tag. The Models  tag should contain children tags that define meshes. Each mesh tag should have a File tag, with the relative path to an obj file, a Position, Rotation and Scale. Optionally, the mesh tag can have a Parent tag, to make it a child transform of the ith mesh loaded (Zero index), a ComponentName tag to name the mesh for later reference and a Material tag to give it a material.
 +
 +
If no material is defined the furniture will use the default material which is much better performance wise and allows the player to colorize the furniture. Meshes using the default material should be UV mapped as shown below.
 +
http://softwareinc.coredumping.com/wp-content/uploads/2016/04/FurnitureMap.png
 +
 +
If you decide to use your own materials, you should have a Materials XML file in your furniture package folder, in which you define your materials. The Materials.xml file should have a root tag with material tags as children. Each material will be named as its tag and should have up to three children: Textures, Floats and Colors. All materials use Unity’s default material. If you want to set the texture you would write <_MainTex>test.png</_MainTex>. All textures will be loaded in 256x256. If you want to see all the colors, floats and textures you can change, refer to Unity’s default shader, which can be downloaded here: http://unity3d.com/get-unity/download/archive . Some variables include:
 +
* _MainTex
 +
* _BumpMap
 +
* _OcclusionMap
 +
* _Metallic
 +
* _Glossiness
 +
* _BumpScale
 +
* _Color
    
=== Interaction points ===
 
=== Interaction points ===
 +
 +
Interaction points control how employees can interact with a piece of furniture.
 +
 +
If you have used the Base attribute, the furniture will inherit its interaction points from the base furniture, unless you add the “InteractionPoints” tag.
 +
 +
Interaction points should define a Name, which at this point in time includes “Use”, “Repair”, “Serve”, “Social” and “Visit” for the base game. They should also have Position and Rotation defined.
 +
You can define a ComponentName tag to name the interaction points for later reference.
 +
 +
Interaction points can also define Animation(main animation used when interacting, ignored for some interactions), SubAnimation(used for repairs, 0, 1 or 2 for repair height), MinimumNeeded(how many need to be reachable before the player gets a warning) and ReachCheck(whether we should warn the player at all).
 +
 +
Finally, it can define a Child, which is the ith interaction point defined (Zero index). If you want a number of interaction points to only be used by one employee at a time you should define children such that they form a dependency loop. When one interaction point gets reserved, the children will recursively get reserved as well.
    
=== Snap points ===
 
=== Snap points ===
Line 518: Line 542:  
=== Components ===
 
=== Components ===
   −
==== Furniture ====
+
==== Upgradable ====
 +
 
 +
==== TableScript ====
 +
 
 +
==== LampScript ====
 +
 
 +
==== Server ====
    
== Modding with DLLs ==
 
== Modding with DLLs ==

Navigation menu