Resources/ObjectWorld / GEdit
Resource Type | Set Objects |
---|---|
File Extension | .gedit |
Used In Games | |
Container Format | BINA |
Editing Tools | |
Reverse Engineering Status | Done |
Object World (more well known as GEdit) is the set object data format for Hedgehog Engine 2 games. Set object data is a list of objects that should spawn in the stage, such as Springs, Rings, Goal Rings and more.
File Format
It's made up of a list of objects using Reflection for their parameters.
Each object containing:
- GUID, unique for every object as its their identifier
- Parent GUID, the object its parented to, referenced by a GUID
- Object Name, the name of the object
- Type Name, name of the object type
- Position, the position of the object
- Rotation, the rotation of the object
- Components, a list of Game Object Components (more known as tags), they are used to spawn GOComponents for the Game Object such as GOCActivator (RangeSpawning), to determine the Game Objects spawning distance
- Parameters, these are just the parameters of the object, every Object Type has a set of their own, e.g. Springs have a parameter for the velocity for when the player touches them. These are using Reflection. The reflection resources are included in their entirety (minus BinaryFile container), but the parameter pointer points directly to the data. I.e., in games that use Reflection v2, which contains a small header, the headers are included in the gedit resource, but the pointers point to the internal data object.
Technical info
Structs taken from universal-csl
struct ComponentData {
unsigned long long unk1;
const char* type;
unsigned long long size;
void* data; // reflection
};
struct ObjectTransformData {
Position position;
Position rotation;
};
struct ObjectId {
// Forces
unsigned int id{};
// Frontiers and onward
uint64_t objectId{};
uint64_t groupId{};
};
struct ObjectData {
enum class Flag : unsigned int {
DEALLOCATE,
DEALLOCATE_SPAWNER_DATA,
};
Bitset<Flag> flags;
const char* gameObjectClass;
VariableString name; // const char* in Forces
ObjectId id;
ObjectId parentID;
ObjectTransformData transform;
ObjectTransformData localTransform;
Array<ComponentData*> componentData;
void* spawnerData; // reflection
};
struct ObjectWorldData {
unsigned int unk1;
unsigned int unk2;
unsigned char flags;
Array<ObjectData> objects;
};