Rise
The Vieneo Province
Loading...
Searching...
No Matches
ServerTypes.h
Go to the documentation of this file.
1// Maintained client protocol definitions. Edit this file directly.
2// Coordinate wire changes with Server.NET/RakNet and run Protocol11Tests.
3#pragma once
4
5#include <Windows.h>
6#include <string>
8
9#pragma region Moved to Server.Net
10enum PacketOrdering : unsigned char
11{
16 ORDERING_TELEMETRY, // can't do this one because you have multiple channels (vehicles) within the telemetry
17 ORDERING_CHAT, // to make sure chat goes out in order
19 ORDERING_WEATHER = 9 // independent plot weather, matches Server.NET
20};
21
22#include "MessageIdentifiers.h"
23#pragma endregion
24
25enum : unsigned char
26{
27 ID_USER_PACKET_ERROR = ID_USER_PACKET_ENUM + 1,
37};
38
39enum Reference : char
40{
42 REF_APNMODE = -3, // eventually can be swapped with REF_ONGROUND for consistant progression
44 REF_ACLMODE = -1, // eventually this is ACL only and REF_APNMODE is BCL
46 REF_BUILDING = 1, // windowed interiors
50 REF_WINDOWLESS = 5, // windowless interiors
53 REF_DOCKENUMCPOC = 8, // also used for enumeration
57};
58
59enum VehicleType : unsigned char
60{
61 C98 = 1,
62 DIHV = 2,
63 E10 = 3,
64 P13 = 4,
65 A4 = 5,
66 C2 = 6,
67 T120 = 7, // old T-120 slot
68 E11 = 8,
69 EVA_SUIT = 9, // old T-1 slot
70 ARJ_PAX = 10,
79 ARJ_ENUM = 19,
80 Apartment = 20, // reserved
81 C2A = 21, // new dasher
82 T27 = 22, // mammoth
84 W6Manx = 24,
85 SimBay = 25, // reserved
86 ControlTower = 26, // reserved
87 T19 = 27, // stratomaster
89 T121 = 29, // newest T-121 Steerhead
90 Hangar = 30,
91 Estate = 31
92};
93
120
121// display -1 is deleted? 0 is hidden, 1 is shown
122
144
145enum PlotType : unsigned char
146{
148 DeoisFinancial = 1, // colony record -1
151 DeoisIndustrial = 4, // colony record -4
152 DeoisCityCenter = 5, // colony record -5
154 //Noizni = 7,
155 NorthPole = 8, // used to be Cadadssum
159 Arcridge = 12, // colony record -12
170};
171
173{
174 short u, v;
175
177 {
178 u = 30000; v = 30000;
179 };
180
181 VECTOR2SHORT(short uu, short vv)
182 {
183 u = uu; v = vv;
184 }
185
187 {
188 return { static_cast<short>(u - rhs.u), static_cast<short>(v - rhs.v) };
189 }
190};
191
192#define MAX_SCAN 64
193#define MAX_SHIPINMEMORY 4096 // this could be eventually dynamic, list of all vessels to 65535
194#define MAX_BAYSPERSHIP 18 // Mammoth
195#define MAX_WEAPPERSHIP 5
196#define MAX_AVIOPERSHIP 5
197#define MAX_INVPERPLYR 7
198#define MAX_INVPERSHIP 8
199#define MAX_ONLINEPLAYERS 32//128 // 255 is reserved (full) - this matches exactly with client
200#define MAX_WEAPONS 64
201#define MAX_ENGINES 3
202
203#define MAX_TAB 8 // Configuration Dialog
204#define MAX_TAB_CHARS 16
205#define TRANSMIT_CHAT_SIZE 255
206
207#define maxdockC 3 // can be no larger than 20 without affecting personel.dat
208#define maxmenuC 6
209#define EDPORTS 8 // for server use only
210
211//As defined in globals.h (Viewscreen)
212const RiseMath::Vector3 northpoleK = RiseMath::Vector3(0.0f, 0.0f, 1.0f); // Geocentric-equatorial coordinate system @ref page 55
213const RiseMath::Vector3 eastpoleI = RiseMath::Vector3(-1.0f, 0.0f, 0.0f); // Geocentric-equatorial coordinate system @ref page 55
214const RiseMath::Vector3 meridianJ = RiseMath::Vector3(0.0f, -1.0f, 0.0f); // Geocentric-equatorial coordinate system @ref page 55
216
217
218#define limiterC 0.5235987756f // in radians, 30� control deflection stop
219#define rotlimitC RiseMath::Tau // in radians, rot/s structural limit
220
221struct SVesselDC // 84 bytes
222{
223 // can not total more than 84 or it will adjust the SPacketBig
224
225 // Things that affect functionality (or inside view)
228 // @todo should be fatigued over time and worse for each bad landing or G-pull etc
229 char hullintegrity; // can't visually represent this but will be used for cabin pressure exceedance, etc 8
230 char windshield, monitor[7]; // 16
232 unsigned char avionicdamage[MAX_AVIOPERSHIP]; // inventory 26
233 char vpt, steering; // 28
235 char holiday, baydoor, biolock, apu; // 36
237
238 // Things that affect functionality (or inside view) and outside view
242 char overhead, landing[2]; // 54
244 signed char rainAir; // 58: -1 absent, 0 failed, 1..127 serviceable
245 char padding2; // 59
247 unsigned char weapondamage[MAX_WEAPPERSHIP]; // inventory 68
248 char weaponreload; // 69
251 char iceDetector, padding3[3]; // 78
252
253 // Things that affect just outside view
254 char hulllight; // 79
255 char padding[2]; // 81
256 unsigned char logotype; // 82
257};
258
259struct SWeaponPacket // 40 bytes
260{
261 unsigned char array; // slot on server
262 unsigned char sequence; // for unreliable packet sequencing
263 unsigned short sampleTimeMs; // monotonic source sample time in milliseconds, modulo 65536
264 // for first shot this is offset from launching vehicle OR raw coordinates for explosionOnly OR could include uv of plot for ground weapons
269 // we need to add something to say which structure it hit
270 //unsigned char structure;
271 // kill colonists based on type of structure and total colonists
272 // destroy cargo based on type of structure and total cargo (and total capacity to leave un-sheltered alone)
273
274 unsigned short origin; // origin keeps the client from making it explode at the originating ship
275 unsigned short target; // need to support -1 -2 -3 ... 0 ... and then positive vehicle id's
276 char status; // 0=inactive, 1=new, 2=active, 3=explode, 4=explosionOnly
277 char type; // -1 is not installable, 0 is none, 1 is fuzer, 2 is sinker, 3 is longarm, 4 is explosionOnly
278 float yieldKg; // kg of TNT
279};
280
282{
283 WCHAR text[510];
284 int id;
285};
286
334
336{
347
348 short pitch1; //40
349 short roll1;
350
351 short yaw1; //44
353 unsigned char selectedPage;
354
355 char reference; //48
357 unsigned char inarray;
358 unsigned char bay;
359
360 unsigned char vehicleType; //52
362 unsigned char playerBldg;
363 unsigned char floor;
364
365 float flapsDown; //56
367
368 bool parkingBrake;//60
372
373 char oldShipData[78];//64
374 short hullTempCelsius; // 1/10th 142
375
376 unsigned char airIceAccumulationMm;
377 unsigned char mapZoom;
378 short pitchTrim; // -32767 to 32767 is -1 to 1 146
379
383 unsigned char radioChannel;
384
391};
392
394{
395 // we know who it came from so we don't need handle, email, version, steam, timestamp
396 int level;
397 char entry[256];
398 char stackTrace[256];
399};
400
419
420struct SPacketMenu // 532 bytes
421{
422 WCHAR row0[44];
423 WCHAR row1[44];
424 WCHAR row2[44];
425 WCHAR row3[44];
426 WCHAR row4[44];
427 WCHAR row5[44];
430};
431
432struct SPacketBig // 92 bytes
433{
434 unsigned char type, array, ship, inarray;
435
436 union
437 {
438 char msg[84];
439 WCHAR str[42];
442 };
443
445
446 // To Client
447 // 0=RESERVED
448 // 1=RESERVED
449 // 2=RESERVED
450 // 3=RESERVED
451 // 4=Subtitles, msg=text, array=, ship=, inarray=
452 // 5=UNUSED
453 // 6=Request4lineinput, msg=prompt, array=(1==copy plot name to outgoing), ship=, inarray=
454 // 7=playerdata msg=sex(1) Handle(12) rank(2) serial(4) name(30) joined() Delimeters(4), array=playerslot, ship=, inarray=(changed==1)
455 // 8=cargoscan msg=SER(5) type(3) loadtype(3) quantity(5) dest(3) setArjcur(1) bay(1)(0=none) ownerhandle(12), array=vesselslot(for position/tcp info), ship=, inarray=
456 // 9=vesselscan msg=IVR(5) Unused(6) type(3) logolight(1) geardown(1) headlight(1) align(1) array(5) baydoor(1) domelight(1) hullname(22) delimiters(10)total(54),array=vesselslot, ship=, inarray=
457 //10=aligndata msg=Alliancename(30) Allegianceto(5) Membersince(10) Alignment(1) Tax(3) Redist(3) Delimeters(5), array=playerslot, ship=, inarray=
458 //11=damagedata vdat=SVesselDC, array=playerFrame, ship=ourhealth, inarray=
459 //12=charactername msg=Character(30), array=sex (1=male 2=female), inarray=
460 //13=handle msg=Handle(13), array=, inarray=
461 //14=UNUSED
462 //15=RESERVED
463 //16=UNUSED
464 //17=subscription msg=type(1) exp(10) sid(19) delimeters(2), array=, ship=, inarray=
465 //18=UNUSED
466 //19=inventory msg=SInventory, array=, ship=, inarray=
467 //20=UNUSED
468 //21=UNUSED
469 //22=changechannelname msg=newname, array=channel, ship=, inarray=
470 //23=channel invite?
471 //24=RESERVED
472 //25=turnbyturn msg=EdgeId,x,y,distanceM,timeS,speedLimitKph,streetName(32), array=, ship=, inarray=
473 //26=TESTMODE msg
474 //27=TESTMODE vdat
475 //28=TESTMODE inventory
476 //29=finishedPatching msg=newpatchdate
477 //30=vesselscan msg=delimitedlist, array=parentslot, ship=, inarray=
478
479 // To Server
480 // 0=graphicscard msg=name, array=, ship=, inarray=
481 // 1=username msg=name, array=processors, ship=, inarray=
482 // 2=discordId msg=discordId, array=, ship=, inarray=
483 // 3=computername msg=name, array=, ship=, inarray=
484 // 4=RESERVED
485 // 5=UNUSED
486 // 6=Return of line input, msg=input, array=, ship=, inarray=
487 // 7=RESERVED
488 // 8=RESERVED
489 // 9=RESERVED
490 // 10=RESERVED
491 // 11=BOTHWAYS
492 // 12=RESERVED
493 // 13=LEGACYvptscan msg=damage(3) armed(1) occupied(5) ownerhandle(12) delimeters(3) total(24), array=vesselslot(for position/tcp info), ship=, inarray=
494 // 14=UNUSED
495 // 15=LogoRequest msg=filename(8), array=, ship=, inarray=
496 // 16=UNUSED
497 // 17=UNUSED? subscription msg=type(1) exp(10) sid(19) delimeters(2),array= ship= inarray=
498 // 18=UNUSED
499 // 19=RESERVED
500 // 20=UNUSED
501 // 21=UNUSED
502 // 22=BOTHWAYS
503 // 23=channel invite?
504 // 24=Validator msg=handle(13), array=(0=addhandle, 1=referral), ship=, inarray=
505 // 25=RESERVED
506 // 26=TESTMODE msg
507 // 27=TESTMODE vdat
508 // 28=TESTMODE inventory
509 // 29=requestPatches, msg=datetime
510 // 30=steampatchinfo, msg=lastpatchdate/version
511};
512
513struct SServerPacket // 20 bytes
514{
515 unsigned char type, array;
516 float f_x, f_y, f_z, f_w;
517
518 // 0=configpacket x=officialtimesecs, y=, z=officialtimehrs, w=, t=playerslot (MAX_ONLINEPLAYERS==too full)
519 // 1=changestatus, x=Offline/online, y=Idle/DND status?, z=, w=, t=playerslot
520 // 2=DockAuthorization, x=portAssigned, y=(1)docked(2)undocked, z=, w=, t=reference(sometimes)
521 // 3=conclusion, x=checks(bool), y=type(0=EOT, 1= 2=pwresult 3=alreadyloggedon 4=incompatablever), z=, w=, t=
522 // 4=manifestdata, x=fuel, y=payload, z=mileage/hours, w=deathfuel, t=
523 // 5=removevessel, x=, y=, z=, w=, t=vesselslot
524 // 6=animationdata, x=timeseq, y=comingbool, z=, t=
525 // 7=DisconnectClient, x=(1=serverPatch,2=kicked,3=invalidEmail), y=, z=, w=, t=
526 // 8=RESERVED
527 // 9=RESERVED
528 // 10=dockannouncement x=, y=number, z=, w=, t=
529 // 11=RESERVED
530 // 12=guarevent, x=extent, y=, z=, w=EventType Enumeration), t
531 // 13=achievement, x=achievementId, y=level log()+1, z=, w=
532 // 14=weather, x=winddir, y=unused, z=temperature, w=windspeed, array=unused
533 // 15=RESERVED
534 // 16=changeourref, x=(1=dead), y=reference, z=, w=, t=inarrayslot
535 // 17=cargobayclear, x=, y=, z=, w=, t=bay
536 // 18=RESERVED
537 // 19=RESERVED
538 // 20=RESERVED
539 // 21=BattleRoyale, x=lat, y=lng, z=range, w=, t=
540 // 22=fireworks, x, y, z location, w=(DWORD)color, t=type
541 // 23=soundEffect, x=type(0==car, 1=sonicBoom) y=, z=, w=, t=
542 // 24=validators, x=(0=addhandle,1=referral,2=charname,3=email), y=validatorpass1fail0, z=reasonCode, w=, array=(0=added,3=updated,4=validatorResult)
543 // 25=RESERVED turnbyturn
544 // 26=RESERVED transferinventory
545 // 27=RESERVED swapinventory
546 // 28=RESERVED installinventory
547 // 29=channelctrl, x=tab, y=channel, z=(0=RESERVED 1=addresult 2=invitation 3=plyrjoined 4=plyrleft 5=newowner), w=ownerslot, array=tempplayer
548 // 30=dockPositions x=cpoc, y=tac, z=ysp, w=vieneo, array=unused
549 // 31=UNUSED
550 // 32=RESERVED
551 // 33=adminaction, x=type, y=value, z=, w=
552 // 34=radiostuff, x=(0=atc, 1=player should be player id), y=, z=, w=, array=(0=EOT, 1=BOT)
553 // 35=manifest2, x=hullTempCelsius, y=hullIceAccumulationMM, z=cabinPressureMb, w=, array=
554 // 36=RESERVED
555 // 37=waypointmgmt, x=(0=set), y=uniqueID, z=unused, w=unused
556 // 38=patchInformation x=totalbytes, y=, z=, w=, array=
557 // 39=UNUSED
558 // 40=RESERVED
559 // 41=HelpVerbiageSeen, x=, y=, z=, w=, t=helpId
560 // 42=Lightning, x=tcpu, y=tcpv, z=, w=seed, t=
561};
562
563struct SServerPacketNew // 68 bytes
564{
565 unsigned char array; // slot
566 unsigned char onlyOne;
567 unsigned short sampleTimeMs; // monotonic source sample time in milliseconds, modulo 65536
571 short ai, aj, ak; // used for SOF adjustment REF_INANOTHER
572 char tx, ty, tz; // used for engine noise and thrust cones !!!TZ3!!!
573 unsigned char tenthsMs;
574 unsigned short sequence;
576 unsigned short sourceRevision; // source-sample revision, separate from delivery sequence
577};
578
579struct SClientPacket // 20 bytes
580{
581 unsigned char type;
582 // 3 bytes of padding here
583 float f_x, f_y, f_z, f_w;
584 // 0=RESERVED
585 // 1=RESERVED
586 // 2=dockauth, f_x=portassigned, f_y=(1)docked(2)undocked, f_z=, f_w=
587 // 3=RequestCompletionOfData, f_x=tzOffsetHours, f_y=, f_z=, f_w=
588 // 4=jettisonFuel, f_x=fuelLbs, f_y=, f_z=, f_w=
589 // 5=movevessel, f_x=addvelx, f_y=addvely, f_z=addvelz, f_w=vessel#
590 // 6=characterani, f_x=startx, f_y=starty, f_z=ani, f_w=hdg (maybe include g-forces, seperate ANIs for arms (special anyway, key off of head to aim, key off of yoke to drive))
591 // 7=addremoveclient
592 // 8=alignment x=playerslot (playerrecord on new CustomUI), y=align(0=enemy, 1=neutral, 2=ally, 3=partner, 4=self), z=, w=
593 // 9=requestname x=sex (0=random 1=male 2=female) y=rand()
594 // 10=RESERVED
595 // 11=interactivemenu, x=userchoice, y= z= w=
596 // 12=guaranteedflag, x=, y=, z=, w=type (0=RESERVED 1=RESERVED 2=headlighton, 3=headlightoff)
597 // 13=RESERVED
598 // 14=RESERVED
599 // 15=deathpacket x, y, z, w=reason (1=ground, 2=rotstress, 3=transstress 4=collisioncity, 5=selfdestruct, 6=water, =weapon, =collisionship, =collisiondock)
600 // 16=terrainrequest x=tcp.u, y=tcp.v, z=face (when type==0), w=type (0=all, 1=north 2=south 3=east 4=west)
601 // 17=vesselchangerequest x=(0=change, 1=displace), y=, z=, w=serverarray
602 // 18=cargoload x=(0=unload, 1=load, 2=scan, 3=unlock, 4=towflag), y=bay, z=, w=serial(load/unload)/serverarray(scan/unlock)
603 // 19=cashfuelxfer x=cashamount, y=fuelamount, z=, w=serverarray
604 // 20=framespersecond x=fps, y=, z=, w=
605 // 21=useinventory x=itemtype, y=itemsubtype, z=(0==personal, 1==vehicle), w=serverarray
606 // 22=RESERVED
607 // 23=outsidenoise x=type(0==horn) y= z= w=
608 // 24=RESERVED
609 // 25=TurnByTurn x=totalSegments, y=unused, z=distanceM, w=durationS, t=(0=clear,1=complete,2=closestApproach)
610 // 26=transferinventory x=itemtype, y=itemsubtype, z=(0==personal, 1==vehicle), w=serverarray
611 // 27=swapinventory x=itemtype, y=itemsubtype, z=(0==personal, 1==vehicle), w=serverarray
612 // 28=installinventory x=itemtype, y=itemsubtype, z=(0==personal, 1==vehicle), w=serverarray
613 // 29=channelctrl, x=tab (also used for target to invite?), y=channel, z=(0=closereq 1=addreq 2=invitereq 3=joinreq 4=kickplayer 5=transferowner), w=ownerslot
614 // 30=UNUSED
615 // 31=UNUSED
616 // 32=monitorInformation, x=width, y=height, z=dpi, w=mag
617 // 33=UNUSED
618 // 34=RESERVED
619 // 35=RESERVED
620 // 36=scanner, x=(0=shallow scan one vehicle, 1=get all data, 2=deep?), y=, z=, w=serverarray
621 // 37=waypointmgmt, x=(0=set, 1=delete, 2=getAll), y=uniqueID, z=unused, w=unused
622 // 38=RESERVED
623 // 39=RESERVED
624 // 40=RequestVerbiage, x=helpId, y=languageId, z=, w=
625 // 41=HelpVerbiageControl, x=helpId, y=(0=remindme,1=understood,2=reset,3=disable,4=import), z=, w=
626 // 42=Lightning, x=tcpu, y=tcpv, z=, w=seed
627};
628
629struct SClientPacketNew // 72 bytes
630{
631 // this is about our vehicle to the server
634 short pitch1, roll1, yaw1; // (40) ... 32767 is the full rotation limit 6.28 or 360 degrees per second
635 short ai, aj, ak; // (46) ... used for SoF adjustment REF_INANOTHER
636 char tx, ty, tz; // 3 (52) ... used for engine noise and thrust cones
637 char pitchdeflect, rolldeflect, yawdeflect; // (55) 3 ... -127 to 0 to 127 is -1 to 0 to 1 (55)
638
639 short airframeTemp; // (58) // @todo not visual, separate packet type or sent on-demand as an event
640 unsigned short fuel; // (60) // @todo not visual, separate packet type or sent on-demand as an event
641 char reference; // 1 (62) // @todo not visual, separate packet type or sent on-demand as an event
642 unsigned char airIceAccumulationMm; // (63) // @todo not visual, separate packet type or sent on-demand as an event
643 short pitchTrim; // (64) // @todo not visual, separate packet type or sent on-demand as an event
644
645 char steerdeflect; // (66) -127 to 0 to 127 is -1 to 0 to 1
646 unsigned char groundIceAccumulationMm; // (63) // @todo not visual, separate packet type or sent on-demand as an event
647 short cabinPressureMb; // (68-69) // @todo not visual, separate packet type or sent on-demand as an event
648 unsigned short sampleTimeMs; // (70-71) monotonic source sample time in milliseconds, modulo 65536
649};
650
651struct SServerPacketChar // 16 bytes
652{
653 unsigned char array;
654
655 // ignore these on ourshipC unless it is done by interior switch
656 char frame; // -1 is remove, 0 is vehicle, 1 is windowed interior, 2 is non-windowed interior, 3 is transition
657 unsigned char bldg; // 1 is bradbury, 1 is also subway, 1 is also train#1, 2 is also shaft#1
658 char request; // -1=elev going down, 1=elev going up, frame3 is floor number
659 char request2; // unused
660 // ignore these on ourshipC unless it is done by interior switch
661 short x, y; // position inside of frame when animation is finished
662 unsigned char hdg; // facing
663 char leftright, updown, rolltilt; // in degrees*0.1f
664 unsigned char ani; // animation action (0=standing, 1=walking)
665};
666
667struct SRenderVertex // 12 bytes
668{
669 unsigned char roads;
670 unsigned char pri_landform; // 255 is hidden
671 unsigned char pri_transition;
672 unsigned char sec_landform;
673 unsigned char sec_transition;
674 unsigned char ter_landform;
676 int color;
677};
678
679struct SRenderPoint // 17 bytes gets bumped up to 20
680{
681 // issue with what if this gets there after a SRenderRow?
682 VECTOR2SHORT tcp; // 31, 31 location, 4 bytes
684};
685
686struct SRenderRow // 901 bytes? side is 1 byte
687{
688 VECTOR2SHORT tcp; // 31, 31 location (4 bytes)
689 unsigned char side; // 0=north (l to r) 1=south (l to r) 2=east (u to d) 3=west (u to d)
690 // I think we have 3 free bytes in here to use
691 SRenderVertex gridarray[64]; // 14*64 bytes
692};
693
694struct SRenderGrid // 49156 bytes
695{
696 VECTOR2SHORT tcp; // 31, 31 location (4 bytes)
697 SRenderVertex gridarray[64][64]; // 12*64*64 bytes
698};
699
700struct SAssayVertex // 4 bytes
701{
702 unsigned char oreA;
703 unsigned char oreC;
704 unsigned char oreD;
705 unsigned char padding; // [0][0]: 0xA0 + cube face for seam-aware scans; legacy = 0
706};
707
708struct SAssayGrid // 104 bytes
709{
710 VECTOR2SHORT tcp; // face-local origin at [2][2]; 4 bytes
711 SAssayVertex gridarray[5][5]; // 5 * 5 * 4
712};
713
714//struct SWeatherGrid // 4096 bytes
715//{
716// unsigned char gridarray[64][64];
717//};
718
719struct Slayout // 16 bytes
720{
725};
726
727struct SRenderBuilding // 24 bytes pack 4
728{
729 VECTOR2SHORT tcp; // tcp, really!
730 unsigned char zone; // 0 city, 1-4 is colony
731 unsigned char type; // 0 none, 1 deois financial section, 2 residential, 3 mining
733 bool unused;
735};
736
737struct SObject // 12 bytes
738{
739 unsigned char type;
740 unsigned short owner;
741 long incept;
742 unsigned short usage;
743};
744
745struct SPlotData // 256 bytes
746{
747 unsigned char type;
748
749 unsigned char discount;
750
751 unsigned char padding1[2];
752
753 long ltime; // 9, 4 bytes neat to keep track of last process of colony
754
755 char colonyName[30]; // 13, 30 bytes // naming of colonies, could be for territories if we move this to colonies
756
757 char boundaryName[30]; // 13, 30 bytes // naming of colonies, could be for territories if we move this to colonies
758
759 float rawFood, procstorA, procstorfood, procstorC, procstorfuelore; // 47, 20 bytes we are moving to...
761
762 long layout1, layout2, layout3, layout4; // 32-modules/32-bits // 16 bytes
763
764 unsigned short totalPopulation; // 2 bytes
765 unsigned short workingPopulation; // 2 bytes
766
767 // 99 bytes??? total before this bottom stuff that isn't saved, 128 available
768
769 long incept; // 99, 4 bytes // could be moved to colony property
770 float cashbalance; // 103, 4 bytes // could be moved to colony property
771 // like to have inmates and the infirm?
772
773 unsigned char colonistsbuilding; // 111, 1 byte
774
775 unsigned char padding2[3];
776
777 long constructime; // 112, 4 bytes
778 // like to have multiple projects
779
780 // Part of plotdata but not saved in the same spot, colony record transmitted ----------------------------
782 buyG, sellG; // 120, 28 bytes
784 minG, maxG; // 148, 28 bytes
786
787 // Calculated, not loaded/saved, but transmitted -------------------------------------------
788 float grade; // 200, 8 bytes, grade could be represented by an (unsigned char) 212
789 // These should be determined based on the layout and not saved
790 // for mines we need daily extraction, daily refining capacity
791 float DlyXtractHarvestProduce; // 208, 4 bytes
792 unsigned char oreA, oreB, oreC, oreD, oreH; // 212, 5 bytes, efficiencies from BMP 144
793
794 bool HasSeparatorResearch; // 216, 1 byte
796
798
799 // Calculated, not loaded/saved, but transmitted -------------------------------------------
800 int maxprocstor, maxcolstor; // 224, 8 bytes
801
802 float rawOre;
803 float waste;
804};
805
807{
811 char IVR[6];
812 unsigned char type;
813 char hullname[23];
814 short reference;
818 bool tow;
820 bool stolen;
821 int parent_vehicle_id; // could be null if we figure it out
822 char owner[13];
825
827 short unused2;
829 unsigned char load_type;
835 int pilot;
836
837 char load_dest[20];
838};
839
841{
843 long pop;
847 char peak2deoistext[10], peak2ustext[10]; // excellent (9+null)
848 float priceadj; // relative to easydock
849
851 unsigned char nextannouncement;
852 char powered; // 0=no 1=yes
853
859 unsigned short maxprocstor, maxcolstor; // 4 bytes we are adding
860
861};
862
864{
865 char handle[13];
866 char password[16];
867 unsigned char unused1, unused2, unused3, unused4;
868};
869
870struct SSubscribeData // 134
871{
872 char handle[13];
873 char password[16];
874 char referrer[13];
876 unsigned char sex;
877 unsigned char context;
878 bool addrequest; // if false then it is an update
879 unsigned char age, weight, heightCm;
883 char vision;
884 char email[32];
887 unsigned char voice;
888};
889
891{
892 WCHAR text[64]; // UTF-16: 63 code units plus NUL, matching Server.NET SizeConst = 64
893 unsigned char group; // group IF TRANSMITTED IGNORED, I think this was folders? doesn't look like it was ever set
894 unsigned char type; // type 0=userPin 1=FAF(LOM) 2=TDZ(Threshold) 3=FlyoverFix 4=MM
895 char ils; // -1 never installed, 0 out-of-service, 63 G/S out-of-service, 127 fully operational ... GLS
896 bool powered; // for marker beacons ... this is baked into the ils above
898 RiseMath::Vector2 latlng; // lat/lng CALCULATED NOT PERSISTED
899 float elevationKm; // CALCULATED NOT PERSISTED
900 long id; // 0 is temporary, above 0 corresponds with Waypoints Id
901 short heading; // for FAF and runway, -1 doesn't change like waypoint stars
902 float length; // for runway
903 long pairedWithColonyId; // marker beacons
904 unsigned char source; // 0 is unknown, 1 is marked, 2 is OLDkeyed, 3 is shared, 4 is purchased, 5 is keyedLatLong, 6 is keyedAPN, 7 is derived
905
906 // simulator
910
911 unsigned char protectionLevel; // type 0=public, 5=private
913};
914
924
926{
927 unsigned char type;
928 unsigned char subtype;
929 unsigned char quantity;
930 unsigned char unused;
931};
932
933struct SPacketHuge // 260
934{
935 union
936 {
937 char msg[256]; // to make it at least 256, unused
939 SPlotData tempplot; // I think this is the biggest
945 };
946 unsigned char type;
947
949 {
950 type = 0;
951 ZeroMemory(msg, sizeof msg); // clears the whole union
952 }
953
954 // From Server to Client
955 // 0 is RESERVED
956 // 1 is SPlotData for mine expansion (SPacketHugePlotData)
957 // 2 is SSubscribeData for immigration (SPacketHugePlotData) (also used for client to server)
958 // 3 is SPlotData for storefront customer (SPacketHugePlotData)
959 // 4 is SPlotData for cargo operations (SPacketHugePlotData)
960 // 5 is SPlotData for farm expansion (SPacketHugePlotData)
961 // 6 is SPlotData for mine attributes (SPacketHugePlotData)
962 // 7 is SPlotData for farm attributes (SPacketHugePlotData)
963 // 8 is DockData for dock storefront (SPacketHugeDockData)
964 // 9 is SPlotData for Township expansion (SPacketHugePlotData)
965 // 10 is SPlotData for Township attributes (SPacketHugePlotData)
966 // 11 is DockData for Futures market (SPacketHugeDockData)
967 // 12 is SPlotData for Township demolition (SPacketHugePlotData)
968 // 13 is SPlotData for Mining demolition (SPacketHugePlotData)
969 // 14 is SPlotData for Farm demolition (SPacketHugePlotData)
970 // 15 is SSubscribeData for immigration form (SPacketHugeSubscribeData)
971 // 16 is SInventoryHelper for colony territory inventory (SPacketHugeInventory)
972 // 17 is reserved
973 // 18 is SPacketHugeWaypointData
974 // 19 is SScanData TESTMODE (SPacketHugeScanData)
975 // 20 is SScanData (SPacketHugeScanData)
976 // 21 is SPlotData for Advanced Grade A (SPacketHugePlotData)
977 // 22 is SPlotData for Advanced Grade B (SPacketHugePlotData)
978 // 23 is SPlotData for Advanced Grade C (SPacketHugePlotData)
979 // 24 is SPlotData for Advanced Grade D (SPacketHugePlotData)
980 // 25 is SPlotData for Advanced Grade E (SPacketHugePlotData)
981 // 26 is SPlotData for Advanced Grade F (SPacketHugePlotData)
982 // 27 is SPlotData for Advanced Grade G (SPacketHugePlotData)
983 // 141 is SPlotData for FBO (SPacketHugePlotData)
984 // 142 is SPlotData for airfield expansion (SPacketHugePlotData)
985 // 143 is SPlotData for airfield demolition (SPacketHugePlotData)
986
987 // From Client to Server
988 // 0 is SLoginData for logging in
989 // 1 is msg for exception reporting
990 // 2 is SSubscribeData for immigration (SPacketHugePlotData)
991 // 16 is SLoginData TESTMODE (SSubscribeData)
992 // 17 is SSubscribeData TESTMODE (SPacketHugeSubscribeData)
993 // 18 is SPacketHugeWaypointData;
994};
995
996struct SPlayerData // online players, not necessarily in same order as server
997{
998 bool online = false; // slot is online
999 char callsign[13];
1000 char referrer[13], characterName[30], email[32], rank, context, sex = 0; // rank (and sex) now a L_RANK_+string reference
1001 char extraText[99];
1002
1003 // anyID TSID; // starts with 1, 0 is closed
1004
1005 unsigned short serial;
1007 bool folder[MAX_TAB]; // for tabs
1008
1009 // int tax, redist, discount;
1010 // char alliance[30];
1011 WCHAR notes[32];
1012
1013 char alignment; // 0 is enemy, 1 is neutral, 2 is ally, 3 is partner, 4 is self
1014 unsigned short allianceHeadId;
1017
1019 unsigned char age, weight, heightCm;
1022 char vision, stubbleFreckle; // -1 means uninitialized... 0-100 for range
1023 unsigned char voice;
1024 unsigned char weightKg;
1025
1026 unsigned char bldg;
1027 //int floor;
1028 int x, y, request;
1029 int frame = -1;
1030 float hdg;
1031
1032
1033 // readded for in-apartment movement
1035 unsigned char ani, queueani; float anitime;
1037 float smoothhdg;// , smoothleftright, smoothupdown, smoothrolltilt;
1038
1039}; // one of the 128 real slots;
SCRIPT_CONTROL SCRIPT_STATE const void DWORD
#define MAX_INVPERSHIP
const RiseMath::Vector3 eastpoleI
@ ID_USER_PACKET_ERROR
Definition ServerTypes.h:27
@ ID_USER_PACKET_LOGO
Definition ServerTypes.h:36
@ ID_USER_PACKET_HELP
Definition ServerTypes.h:33
@ ID_USER_PACKET_CHAT
Definition ServerTypes.h:28
@ ID_USER_PACKET_TELEMETRY
Definition ServerTypes.h:29
@ ID_USER_PACKET_AVATAR
Definition ServerTypes.h:30
@ ID_USER_PACKET_LOGFILE
Definition ServerTypes.h:34
@ ID_USER_PACKET_DEVICE
Definition ServerTypes.h:35
@ ID_USER_PACKET_PATCH
Definition ServerTypes.h:31
@ ID_USER_PACKET_SUPER
Definition ServerTypes.h:32
#define MAX_AVIOPERSHIP
VehicleType
Definition ServerTypes.h:60
@ ARJ_ENUM
Definition ServerTypes.h:79
@ W6Manx
Definition ServerTypes.h:84
@ ARJ_CARGOAFT
Definition ServerTypes.h:72
@ Hangar
Definition ServerTypes.h:90
@ EVA_SUIT
Definition ServerTypes.h:69
@ ARJ_FUEL
Definition ServerTypes.h:73
@ C98
Definition ServerTypes.h:61
@ ControlTower
Definition ServerTypes.h:86
@ C2
Definition ServerTypes.h:66
@ BeishtKione
Definition ServerTypes.h:83
@ ARJ_UNUSED
Definition ServerTypes.h:71
@ ARJ_RESERVED17
Definition ServerTypes.h:77
@ C2A
Definition ServerTypes.h:81
@ ARJ_MUNITIONS
Definition ServerTypes.h:75
@ ARJ_RESERVED16
Definition ServerTypes.h:76
@ T19
Definition ServerTypes.h:87
@ P13
Definition ServerTypes.h:64
@ ARJ_RESERVED18
Definition ServerTypes.h:78
@ Apartment
Definition ServerTypes.h:80
@ ARJ_PAX
Definition ServerTypes.h:70
@ E10
Definition ServerTypes.h:63
@ T120
Definition ServerTypes.h:67
@ T27
Definition ServerTypes.h:82
@ E11
Definition ServerTypes.h:68
@ FloatingMan
Definition ServerTypes.h:88
@ SimBay
Definition ServerTypes.h:85
@ DIHV
Definition ServerTypes.h:62
@ A4
Definition ServerTypes.h:65
@ T121
Definition ServerTypes.h:89
@ ARJ_CARGOTOP
Definition ServerTypes.h:74
@ Estate
Definition ServerTypes.h:91
#define MAX_INVPERPLYR
PacketOrdering
Definition ServerTypes.h:11
@ ORDERING_ERRORS
Definition ServerTypes.h:18
@ ORDERING_WEATHER
Definition ServerTypes.h:19
@ ORDERING_TELEMETRY
Definition ServerTypes.h:16
@ ORDERING_NONE
Definition ServerTypes.h:12
@ ORDERING_PATCH
Definition ServerTypes.h:13
@ ORDERING_TERRAIN
Definition ServerTypes.h:14
@ ORDERING_AUDIO
Definition ServerTypes.h:15
@ ORDERING_CHAT
Definition ServerTypes.h:17
#define EDPORTS
#define MAX_WEAPPERSHIP
#define MAX_TAB
CargoLoadType
Definition ServerTypes.h:95
@ Residential
@ Airfield
@ WeaponLongarms
@ PaxEnum
@ CargoFab
@ CargoCommon
@ Salvage
@ OutfitEnum
@ Mining
@ Colonists
@ Passengers
@ Township
@ Farmstead
@ None
Definition ServerTypes.h:97
@ CargoRare
Definition ServerTypes.h:98
@ CargoGoods
@ Refinery
@ Prisoners
@ CargoFuelOre
@ WeaponEnum
@ CargoFood
Definition ServerTypes.h:99
@ CargoEnum
PlotType
@ UserSalvage
@ DeoisIndustrial
@ PlotTypeEnum
@ NorthPole
@ UserTownship
@ O4Ruin4
@ DeoisPort
@ Arcridge
@ DeoisFinancial
@ O4Ruin3
@ UserAirfield
@ DeoisTransit
@ Chojeir
@ DoNotRender
@ UserFarming
@ UserEstate
@ UserMining
@ DeoisCityCenter
@ UserRefinery
@ O4Ruin2
@ O4Ruin1
@ NotZoned
const RiseMath::Vector3 northpoleK
KitType
@ NexRad
@ Fireworks
@ LockPick
@ FirstAid
@ E11Upgrade
@ Binoculars
@ TemporaryRunwayLights
@ Polaroid
@ EVA_KIT
@ NightVision
@ ColonyUpLink
@ RVR
@ ATM
@ Sunglasses
@ Backpack
@ CartonOfCigarettes
@ ILS
@ CandyCane
const RiseMath::Vector3 meridianJ
const RiseMath::Vector3 centerC
Reference
Definition ServerTypes.h:40
@ REF_BUILDING
Definition ServerTypes.h:46
@ REF_DOCKTAC
Definition ServerTypes.h:54
@ REF_ACLMODE
Definition ServerTypes.h:44
@ REF_PROXIMITY
Definition ServerTypes.h:48
@ REF_DOCKENUMCPOC
Definition ServerTypes.h:53
@ REF_AUCTION
Definition ServerTypes.h:47
@ REF_IMPOUND
Definition ServerTypes.h:49
@ REF_RUSTYS
Definition ServerTypes.h:51
@ REF_INANOTHER
Definition ServerTypes.h:45
@ REF_ENUMMIN
Definition ServerTypes.h:41
@ REF_APNMODE
Definition ServerTypes.h:42
@ REF_ONGROUND
Definition ServerTypes.h:43
@ REF_ENUMMAX
Definition ServerTypes.h:56
@ REF_WINDOWLESS
Definition ServerTypes.h:50
@ REF_DOCKYSP
Definition ServerTypes.h:55
@ REF_HIDDEN
Definition ServerTypes.h:52
SAssayVertex gridarray[5][5]
VECTOR2SHORT tcp
unsigned char oreA
unsigned char oreD
unsigned char oreC
unsigned char padding
unsigned char type
unsigned short sampleTimeMs
unsigned char airIceAccumulationMm
RiseMath::Vector3 velocity
RiseMath::Quaternion orientation
unsigned short fuel
unsigned char groundIceAccumulationMm
RiseMath::Vector3 position
unsigned char channelInvLookLateral
char channelAxisLookVertical
unsigned char channelInvThrustLeft
unsigned char channelInvGas
unsigned char channelInvYaw
char channelAxisRightToeBrake
unsigned char channelInvLookVertical
unsigned char channelInvThrustRight
WCHAR name[160]
char channelAxisLookLateral
char channelAxisLeftToeBrake
unsigned char channelInvLeftToeBrake
unsigned char channelInvBrake
char channelAxisThrustRight
unsigned char deviceType
unsigned char channelSplitLeftToeBrake
unsigned char channelInvPitch
unsigned char channelSplitGas
unsigned char channelInvRightToeBrake
unsigned char channelSplitYaw
unsigned char channelInvSteer
unsigned char channelInvTurn
unsigned char channelInvPitchTrim
unsigned char forceFeedback
unsigned char channelSplitThrustRight
unsigned char deviceSubtype
unsigned char channelSplitThrustLeft
char channelAxisPitchTrim
unsigned char channelInvRoll
char channelAxisThrustLeft
unsigned char channelSplitRightToeBrake
unsigned char channelInvWalk
unsigned char channelSplitBrake
float procstormaterials
unsigned short maxcolstor
float pax2usfraction
float procstorgoods
unsigned char nextannouncement
float pax2deoisfraction
char peak2deoistext[10]
char peak2ustext[10]
unsigned short maxprocstor
float procstorfuelore
long lastannouncement
short playerassigned[EDPORTS]
char entry[256]
char stackTrace[256]
unsigned char quantity
unsigned char unused
unsigned char type
unsigned char subtype
CargoLoadType stowageLoadType
unsigned char stowageQuantity
unsigned char personalobjectsubtype[MAX_INVPERPLYR]
unsigned char personalobjecttype[MAX_INVPERPLYR]
unsigned char playerWeightKg
unsigned char stowageDestination
unsigned char vehicleobjectsubtype[MAX_INVPERSHIP]
unsigned char vehicleobjecttype[MAX_INVPERSHIP]
char handle[13]
unsigned char unused4
unsigned char unused1
unsigned char unused2
unsigned char unused3
char password[16]
unsigned short owner
unsigned short usage
unsigned char type
long incept
unsigned char array
unsigned char ship
unsigned char inarray
unsigned char type
unsigned char type
WCHAR row5[44]
WCHAR row2[44]
WCHAR row3[44]
WCHAR row4[44]
WCHAR row1[44]
short menuLevel
WCHAR row0[44]
char email[32]
unsigned char heightCm
unsigned char queueani
unsigned char bldg
char extraText[99]
time_t createdate
unsigned char skintone
char characterName[30]
time_t membersince
unsigned char weight
unsigned short allianceHeadId
bool folder[MAX_TAB]
bool revisitImmigration
unsigned char eyecolor
WCHAR notes[32]
unsigned char weightKg
unsigned short serial
unsigned char skincolor
char stubbleFreckle
unsigned char age
unsigned char voice
unsigned char haircolor
char allianceName[30]
char callsign[13]
char referrer[13]
unsigned char ani
float procstorgoods
bool HasObliterator
float waste
short sellG
unsigned char oreD
bool HasSeparatorResearch
unsigned short totalPopulation
float procstormaterials
long constructime
char ATMcharge
int maxprocstor
short sellD
char colonyUplink
float DlyXtractHarvestProduce
unsigned char padding1[2]
float procstorfuelore
short sellF
unsigned char type
unsigned char discount
float rawOre
short sellC
short sellA
unsigned char oreC
unsigned short workingPopulation
unsigned char colonistsbuilding
char boundaryName[30]
char colonyName[30]
short sellB
unsigned char oreB
float procstorfood
float procstorfuel
unsigned char oreH
unsigned char padding2[3]
float procstorA
unsigned char oreA
float rawFood
short sellE
float procstorC
float cashbalance
float grade
unsigned char type
VECTOR2SHORT tcp
unsigned char zone
VECTOR2SHORT tcp
SRenderVertex gridarray[64][64]
VECTOR2SHORT tcp
SRenderVertex gridarray
SRenderVertex gridarray[64]
VECTOR2SHORT tcp
unsigned char side
unsigned char pri_transition
unsigned char ter_landform
unsigned char pri_landform
unsigned char sec_landform
unsigned char sec_transition
unsigned char roads
float weightLbs
bool weightLbsHasValue
int parent_vehicle_id
bool loadQuantityHasValue
float positionx
short reference
char load_dest[20]
int last_updated
float positionz
char hullname[23]
unsigned char load_type
bool pilotHasValue
bool loadTypeHasValue
bool reposess
float positiony
unsigned char type
short load_quantity
char IVR[6]
short unused2
char owner[13]
unsigned char array
unsigned char hdg
unsigned char ani
unsigned char bldg
unsigned char array
unsigned char type
RiseMath::Vector3 position
unsigned short sourceRevision
unsigned short sequence
unsigned char onlyOne
RiseMath::Quaternion orientation
unsigned char tenthsMs
RiseMath::Vector3 velocity
unsigned char array
unsigned short sampleTimeMs
unsigned char skincolor
unsigned char weight
unsigned char heightCm
char handle[13]
unsigned char sex
char characterName[30]
unsigned char age
bool revisitImmigration
unsigned char eyecolor
char password[16]
unsigned char haircolor
unsigned char context
unsigned char skintone
unsigned char voice
char referrer[13]
unsigned char playerBldg
unsigned char groundIceAccumulationMm
unsigned char floor
bool remoteAssayPower
float orientationx
unsigned char inarray
unsigned char selectedPage
float rollDeflect
float orientationy
char parentReference
short hullTempCelsius
float orientationw
unsigned char bay
float steerDeflect
float orientationz
unsigned char mapZoom
float pitchDeflect
unsigned char vehicleType
unsigned char airIceAccumulationMm
short cabinPressureMb
unsigned char radioChannel
char oldShipData[78]
bool weatherRadarPower
WCHAR text[510]
char weapontype[MAX_WEAPPERSHIP]
char leftaileron
char leftengine
char rightaileron
char autoflyte
char parkingBrake
char rightBrake
char hullintegrity
char padding[2]
char padding2
char monitor[7]
char windshield
char rightStrut
char padding3[3]
char overhead
char leftwing
char transmission
unsigned char weapondamage[MAX_WEAPPERSHIP]
char inertialdamp
char landing[2]
char noseStrut
char pitchtrim
char avionictype[MAX_AVIOPERSHIP]
unsigned char avionicdamage[MAX_AVIOPERSHIP]
char elevator
DWORD instruments
char rightwing
char rightengine
char yawdamper
unsigned char logotype
char steering
char thrustaug
char iceDetector
char flightdirector
char leftStrut
signed char rainAir
char hulllight
char leftBrake
char clengine
char weaponreload
RiseMath::Vector3 position
unsigned short sampleTimeMs
RiseMath::Vector3 velocity
unsigned char sequence
unsigned char array
unsigned short origin
unsigned short target
long layout1
long layout3
long layout2
long layout4
RiseMath::Vector2 position
float timeS
float distanceM
int edgeId
char streetName[32]
float speedLimitKph
float elevationKm
short heading
unsigned char type
RiseMath::Vector3 velocity
RiseMath::Quaternion orientation
float length
RiseMath::Vector2 latlng
unsigned char group
char reference
unsigned char source
RiseMath::Vector3 location
unsigned char protectionLevel
WCHAR text[64]
long pairedWithColonyId
VECTOR2SHORT operator-(const VECTOR2SHORT &rhs) const
VECTOR2SHORT(short uu, short vv)