1syntax = "proto3"; 2 3// Message returned to client when scanning a game server's listen port 4message NServerInfo { 5 int32 ProtocolVersion = 1; 6 uint32 ENetPort = 2; 7 string Hostname = 3; 8 int32 GameMode = 4; 9 string CampaignName = 5; 10 int32 MissionNumber = 6; 11 int32 NumPlayers = 7; 12 int32 MaxPlayers = 8; 13} 14 15message NClientId { 16 uint32 Id = 1; 17 // This client's players will use UID from this number 18 uint32 FirstPlayerUID = 2; 19} 20 21message NCampaignDef { 22 string Path = 1; 23 int32 GameMode = 2; 24 uint32 Mission = 3; 25} 26 27message NColor { 28 int32 RGBA = 1; 29} 30 31message NCharColors { 32 NColor Skin = 1; 33 NColor Arms = 2; 34 NColor Body = 3; 35 NColor Legs = 4; 36 NColor Hair = 5; 37 NColor Feet = 6; 38} 39 40message NPlayerStats { 41 int32 Score = 1; 42 int32 Kills = 2; 43 int32 Suicides = 3; 44 int32 Friendlies = 4; 45} 46 47message NPlayerData { 48 string Name = 1; 49 string CharacterClass = 2; 50 string Hair = 3; 51 NCharColors Colors = 4; 52 repeated string Weapons = 5; 53 uint32 Lives = 6; 54 NPlayerStats Stats = 7; 55 NPlayerStats Totals = 8; 56 uint32 MaxHealth = 9; 57 uint32 LastMission = 10; 58 uint32 UID = 11; 59 repeated NAmmo Ammo = 12; 60} 61 62message NPlayerRemove { 63 uint32 UID = 1; 64} 65 66message NConfig { 67 string Name = 1; 68 string Value = 2; 69} 70 71message NTileSet { 72 NVec2i Pos = 1; 73 string ClassName = 2; 74 string ClassAltName = 3; 75 int32 RunLength = 4; 76} 77 78message NThingDamage { 79 uint32 UID = 1; 80 int32 Kind = 2; 81 int32 SourceActorUID = 3; 82 int32 Power = 4; 83 NVec2 Vel = 5; 84 float Mass = 6; 85 uint32 Flags = 7; 86 int32 Special = 8; 87 int32 SpecialTicks = 9; 88} 89 90message NMapObjectAdd { 91 uint32 UID = 1; 92 string MapObjectClass = 2; 93 NVec2 Pos = 3; 94 uint32 ThingFlags = 4; 95 int32 Health = 5; 96 NColor Mask = 6; 97} 98 99message NMapObjectRemove { 100 uint32 UID = 1; 101 int32 ActorUID = 2; 102 uint32 Flags = 3; 103} 104 105message NScore { 106 uint32 PlayerUID = 1; 107 int32 Score = 2; 108} 109 110message NSound { 111 string Sound = 1; 112 NVec2 Pos = 2; 113 uint32 Distance = 3; 114} 115 116message NVec2i { 117 int32 x = 1; 118 int32 y = 2; 119} 120 121message NVec2 { 122 float x = 1; 123 float y = 2; 124} 125 126message NGameBegin { 127 int32 MissionTime = 1; 128} 129 130message NActorAdd { 131 uint32 UID = 1; 132 int32 PilotUID = 2; 133 int32 VehicleUID = 3; 134 uint32 CharId = 4; 135 int32 Direction = 5; 136 int32 Health = 6; 137 int32 PlayerUID = 7; 138 uint32 ThingFlags = 8; 139 NVec2 Pos = 9; 140 repeated NAmmo Ammo = 10; 141} 142 143message NActorMove { 144 uint32 UID = 1; 145 NVec2 Pos = 2; 146 NVec2 MoveVel = 3; 147} 148 149message NActorState { 150 uint32 UID = 1; 151 int32 State = 2; 152} 153 154message NActorDir { 155 uint32 UID = 1; 156 int32 Dir = 2; 157} 158 159message NActorSlide { 160 uint32 UID = 1; 161 NVec2 Vel = 2; 162} 163 164message NActorImpulse { 165 uint32 UID = 1; 166 NVec2 Vel = 2; 167 NVec2 Pos = 3; 168} 169 170message NActorSwitchGun { 171 uint32 UID = 1; 172 uint32 GunIdx = 2; 173} 174 175message NActorPickupAll { 176 uint32 UID = 1; 177 bool PickupAll = 2; 178} 179 180message NActorReplaceGun { 181 uint32 UID = 1; 182 // Index of gun in actor to replace 183 uint32 GunIdx = 2; 184 string Gun = 3; 185} 186 187message NActorHeal { 188 uint32 UID = 1; 189 int32 PlayerUID = 2; 190 int32 Amount = 3; 191 bool IsRandomSpawned = 4; 192} 193 194message NAmmo { 195 uint32 Id = 1; 196 uint32 Amount = 2; 197} 198 199message NActorAddAmmo { 200 uint32 UID = 1; 201 int32 PlayerUID = 2; 202 NAmmo Ammo = 3; 203 bool IsRandomSpawned = 4; 204} 205 206message NActorUseAmmo { 207 uint32 UID = 1; 208 int32 PlayerUID = 2; 209 NAmmo Ammo = 3; 210} 211 212message NActorDie { 213 uint32 UID = 1; 214} 215 216message NActorMelee { 217 uint32 UID = 1; 218 string BulletClass = 2; 219 int32 HitType = 3; 220 int32 TargetKind = 4; 221 uint32 TargetUID = 5; 222} 223 224message NActorPilot { 225 uint32 UID = 1; 226 int32 VehicleUID = 2; 227 bool On = 3; 228} 229 230message NAddPickup { 231 uint32 UID = 1; 232 string PickupClass = 2; 233 bool IsRandomSpawned = 3; 234 int32 SpawnerUID = 4; 235 uint32 ThingFlags = 5; 236 NVec2 Pos = 6; 237} 238 239message NRemovePickup { 240 uint32 UID = 1; 241 int32 SpawnerUID = 2; 242} 243 244message NBulletBounce { 245 uint32 UID = 1; 246 int32 HitType = 2; 247 bool Spark = 3; 248 NVec2 BouncePos = 4; 249 NVec2 Pos = 5; 250 NVec2 Vel = 6; 251 bool HitSound = 7; 252 bool WallMark = 8; 253} 254 255message NRemoveBullet { 256 uint32 UID = 1; 257} 258 259message NGunReload { 260 int32 PlayerUID = 1; 261 string Gun = 2; 262 NVec2 Pos = 3; 263 int32 Direction = 4; 264} 265 266message NGunFire { 267 int32 ActorUID = 1; 268 string Gun = 2; 269 NVec2 MuzzlePos = 3; 270 int32 Z = 4; 271 float Angle = 5; 272 bool Sound = 6; 273 uint32 Flags = 7; 274 // Whether the shot was from a real player-gun, or a derived gun e.g. explode 275 bool IsGun = 8; 276} 277 278message NGunState { 279 uint32 ActorUID = 1; 280 int32 Barrel = 2; 281 int32 State = 3; 282} 283 284message NAddBullet { 285 uint32 UID = 1; 286 string BulletClass = 2; 287 NVec2 MuzzlePos = 3; 288 int32 MuzzleHeight = 4; 289 float Angle = 5; 290 int32 Elevation = 6; 291 uint32 Flags = 7; 292 int32 ActorUID = 8; 293} 294 295message NTrigger { 296 uint32 ID = 1; 297 NVec2i Tile = 2; 298} 299 300message NExploreTiles { 301 // RLE explore tiles 302 message Run { 303 NVec2i Tile = 1; 304 int32 Run = 2; 305 } 306 repeated Run Runs = 1; 307} 308 309message NRescueCharacter { 310 uint32 UID = 1; 311} 312 313message NObjectiveUpdate { 314 uint32 ObjectiveId = 1; 315 int32 Count = 2; 316} 317 318message NAddKeys { 319 uint32 KeyFlags = 1; 320 NVec2 Pos = 2; 321} 322 323message NMissionComplete { 324 bool ShowMsg = 1; 325} 326 327message NMissionEnd { 328 int32 Delay = 1; 329 bool IsQuit = 2; 330 string Msg = 3; 331 uint32 Mission = 4; 332} 333