Difference between revisions of "Character Types and Prefabs"

From Off Grid Wiki
Jump to: navigation, search
Line 183: Line 183:
 
|align="center"|  
 
|align="center"|  
 
|align="center"| x
 
|align="center"| x
|align="center"|  
+
|align="center"| -- glitchy, no LUT
 
|align="center"|  
 
|align="center"|  
 
|  
 
|  
Line 191: Line 191:
 
|align="center"|  
 
|align="center"|  
 
|align="center"| x
 
|align="center"| x
|align="center"| working
+
|align="center"| -- glitchy, default LUT (unchangeable)
 
|align="center"|  
 
|align="center"|  
 
|  
 
|  
Line 335: Line 335:
 
|align="center"|  
 
|align="center"|  
 
|align="center"| x
 
|align="center"| x
|align="center"|  
+
|align="center"| -- glitchy, default LUT (unchangeable)
 
|align="center"|  
 
|align="center"|  
 
|  
 
|  

Revision as of 10:29, 3 June 2019

Characters


Adding characters to your level is important as this will allow you to add other important systems such as conversations which is one way to introduce story elements to your level.

To add characters to your level you must open up the mission script and locate the character table. It should look something like this:

[[File:|frame|none|alt=|caption charactertable.png]]

To add a character in the table you must include the following:

  • name
  • displayName
  • internalName
  • characterType
  • prefab

This would look like the following in code:

 5 -- Character definitions:
 6 	characters = {
 7 		joe = {
 8 			displayName = "Joe Harman",
 9 			internalName = "Joe",
10 			characterType = "player",
11 			prefab = "player",
12 			spawnpoint = "PlayerSpawn",
13 		},
14 	},

Note. When the characterType is virtual you do not need to add a prefab or spawn-point.

Character Types and Prefabs

character type prefab name description
enemy bigGuard,hugeGuard,drone All of the guards listed require the character type enemy. These will allow you to add guards to patrol your level.
virtual n/a virtual characters are characters that you won't see in the level but may communicate with the player using via CryptoChat
player player This will allow you to add a playable character to your game.There can only be one per level.
npc Secretary To add the Secretary character will require you add the character type npc


Prefabs Available

Prefab Name Image
SecurityGuard-M-Lrg-Hulk insert image here
M_Lrg_Waistcoat-01 insert image here
M_Lrg_LongJacket-01 insert image here
F_Med_Teen-01-Jen insert image here


prefab name player neutral enemy tested old image
player x x
Player_Joe x x
Player_Jen x
hugeGuard x x
Secretary x x
drone x x
M_Lrg_LongJacket-01 x x x
M_Lrg_Waistcoat-01 x x
M_Med_SmartShirt_01 x x
F_Med-WorkSuit-01 x x
Masculine_Lrg_Vest_Enemy x
Masculine_Lrg_SmartSuit_Enemy x -- glitchy, no LUT
Masculine_Lrg_LongJacket_Enemy x -- glitchy, default LUT (unchangeable)
Masculine_Med_Vest_Enemy x
Masculine_Med_SmartSuit_Enemy x
Masculine_Med_LongJacket_Enemy x
Masculine_Lrg_Waistcoat_Enemy x
Masculine_Med_Waistcoat_Enemy x
Masculine_Med_Bomberjacket_Enemy x
Masculine_Med_OpenShirt_Enemy x
Masculine_Med_CasualBlazer_Enemy x
Masculine_Med_CoatScarf_Enemy x
Masculine_Med_HordseHead_Enemy x
Masculine_Med_LeatherJacket_Enemy x
Masculine_Med_SmartJumper_Enemy x
Masculine_Lrg_LongJacket-2600-Gasmask_Enemy x
Masculine_Lrg_LongJacket-2600-Hat_Enemy x
Feminine_Med_CardiganNecklase_Enemy x
Feminine_Med_Vest_Enemy x
Feminine_Med_SmartSuit_Enemy x
Feminine_Med_LongJacket_Enemy x -- glitchy, default LUT (unchangeable)
Feminine_Lrg_Vest_Enemy x
Feminine_Lrg_SmartSuit_Enemy x
Feminine_Lrg_Waistcoat_Enemy x
Feminine_Med_Waistcoat_Enemy x
Feminine_Med_Teen_Enemy x
Feminine_Med_Hoodie_Enemy x
Feminine_Med_HoodieLongHair_Enemy x broken
Feminine_Med_Shirt_Enemy x broken
Feminine_Med_ShirtLongHair_Enemy x broken

Virtual characters

Once you have created your virtual characters in order to use them within conversations you will have to add them to a network that is shared with the player. By default the mission script includes a mobile network called "Semaeopus4G" to connect other characters to this network you must use the ConnectToNetwork function. For example: Mission.ConnectToNetwork(mission.characters.terrance,mission.networks.Semaeopus4G.name,mission.networks.Semaeopus4G.userAccessKey)

Adding Guards

When creating guards you must add:

  • Spawn points
  • Patrol route
  • Profile
  • Agent
 5 -- Guard definitions:
 6 	characters = {
 7 		guard01 = {
 8 	             displayName = "Thomas Template",
 9 	             internalName = "Thomas",
10 	             characterType = "enemy",
11 		     prefab = "bigGuard",
12                      profile = "GuardTemplate.lua",
13                      agent = "Guard.lua",
14 		     spawnpoint = "GuardSpawn",
15                      patrolroute = {
16                              points = {
17                                       "PatrolPoint_0-001",
18                                       "PatrolPoint_0-002",
19                                        },
20                                       cyclic = false,
21                                       },
22 		         },
23 	            },

Spawn points

To create a spawn point:

  • Create empty game object
  • Add the mission object script to the empty game object
  • Select type "Spawn"

Your inspector should look something like this:

Spawn Point inspector.png

Patrol route

To create a Patrol point:

  • Create empty game object
  • Add the Patrol point script to the empty game object
  • Within the Patrol point script component section you can define the maximum and minimum time a guard spends at the particular point.
  • Repeat this process for as many points as you require.

Your inspector should look something like this:

Patrol Point inspector.png

Profile

When creating a guard you can give each one a personal profile, which will effect how each guard communicates and behaves.

This is a basic template and structure you should use:

 5 Character ={
 6 
 7     Motivation = 0.6,
 8     Sociability = 0.5,
 9     FavouriteColor = { 1, 0.5586207, 0, 1 },
10     Background = {
11 
12 		FirstName = "THOMAS",
13 
14 		LastName = "TEMPLATE",
15 
16 		Nickname = {
17 			"Tommy",
18 		},
19 
20 		DerogetoryName = {
21 			"Noggin",
22 		},
23 
24 		FavouriteSwear = {
25 			"gosh-darn",
26 		},
27 
28 		FavouriteFood = {
29 			"slice of Wensleydale cheese",
30 		},
31 
32 		FavouriteSnack = {
33 			"Babybell",
34 		},
35 
36 		FavouriteDrink = {
37 			"coffee",
38 		},
39 
40 		BestFriend = {
41 			"Tristan",
42 		},
43 
44 		RecipientPetName = {
45 			"Sweetums",
46 		},
47 
48 		SenderPetName = {
49 			"Hubby",
50 		},
51 
52 		FavouriteExclamation = {
53 			"Golly",
54 		},
55 
56 		RandomHashtag = {
57 		  "#ROFL",
58 		},
59 
60 		Mood = {
61 	    "happy",
62 		},
63 
64 		PastEvent = {
65 		 "ate",
66 		},
67 
68 		FutureEvent = {
69 			 "eat",
70 		 },
71      },
72     },