Powerthirst Edition

The Powerthirst Edition is a mod of the version 0.75 that adds a few new features, such as:

  • Longer user names
  • 64 players
  • Support for AngelScript scripts

This version adds 4 new packets, extends 2 packets, and duplicate maps 1 packet over another.

The World Update packet has up to 64 fields now instead of 32.

Map StartColor

Server->Client

Sent when a client connects, or a map is advanced for already existing connections.

Should be the first packet received when a client connects.

The version must exist and be >= 1 (and <= the client's Powerthirst proto version or otherwise the client will refuse to connect) to enable certain Powerthirst features such as long-name support.

Packet ID18

Fields

Field NameField TypeExampleNotes
Map sizeUint324567
PT versionUInt324

Map ChunkColor

Server->Client

This is just a remapping of the Map Chunk packet to 2 packets back to stop vanilla clients from connecting.

Packet ID17
Total Size:9 bytes

Fields

Field NameField TypeExampleNotes
Map DataUByte0DEFLATE/zlib encoded AOS map data

Script BeginColor

Server->Client

Packet ID31
Total Size:(varies) bytes

Fields

Field NameField TypeExampleNotes
Script sizeUint324567
Module nameCP437 String

Script ChunkColor

Server->Client

This is just a remapping of the Map_Chunk packet to 2 packets back to stop vanilla clients from connecting.

Packet ID32
Total Size:(varies) bytes

Fields

Field NameField TypeExampleNotes
Script DataUByte0DEFLATE/zlib encoded AngelScript source code

Script EndColor

Server->Client

Once this is sent, the script is loaded.

Packet ID33
Total Size:(varies) bytes

Fields

Field NameField TypeExampleNotes
Module nameCP437 String

Script CallColor

Server->Client

Packet ID34
Total Size:(varies) bytes

Fields

Field NameField TypeExampleNotes
Function name0-terminated CP437 Stringvoid main()Must be an AngelScript prototype, not just the name itself
ParametersSee below

Script Parameters

Start from after the 0-byte in the Function name string. Then, loop through these IDs:

  • 0: ASP_TERM: End of parameter list.
  • 1: ASP_INT: Read a 32-bit little-endian int. AngelScript type: "int"
  • 2: ASP_FLOAT: Read a 32-bit little-endian single-precision float. AngelScript type: "float"
  • 3: ASP_PSTRING: Read an 8-bit uint, then read that many bytes as a string (do NOT add in a terminating NUL). AngelScript type: "const string &in"