feat: add GFF type schema definitions for visual editors

This commit is contained in:
plenarius
2026-04-20 20:07:48 -04:00
parent 3b91c0312d
commit c7f5646e62
8 changed files with 720 additions and 0 deletions
+116
View File
@@ -0,0 +1,116 @@
import { GffFieldType, type GffTypeSchema } from "./schema.js";
export const schema: GffTypeSchema = {
fileType: "utp",
displayName: "Placeable",
categories: ["Identity", "Lock", "Trap", "Scripts"],
fields: [
{
label: "Appearance",
displayName: "Appearance",
type: GffFieldType.Dword,
category: "Identity",
description: "Row index into placeables.2da",
},
{
label: "Tag",
displayName: "Tag",
type: GffFieldType.CExoString,
category: "Identity",
},
{
label: "TemplateResRef",
displayName: "Template ResRef",
type: GffFieldType.ResRef,
category: "Identity",
},
{
label: "Faction",
displayName: "Faction",
type: GffFieldType.Dword,
category: "Identity",
},
{
label: "Plot",
displayName: "Plot",
type: GffFieldType.Byte,
category: "Identity",
description: "Indestructible if set",
},
{
label: "Useable",
displayName: "Useable",
type: GffFieldType.Byte,
category: "Identity",
description: "Whether the player can interact with this placeable",
},
{
label: "HasInventory",
displayName: "Has Inventory",
type: GffFieldType.Byte,
category: "Identity",
},
{
label: "Locked",
displayName: "Locked",
type: GffFieldType.Byte,
category: "Lock",
},
{
label: "LockDC",
displayName: "Lock DC",
type: GffFieldType.Byte,
category: "Lock",
description: "Difficulty class to pick the lock",
},
{
label: "OpenLockDC",
displayName: "Open Lock DC",
type: GffFieldType.Byte,
category: "Lock",
},
{
label: "KeyName",
displayName: "Key Tag",
type: GffFieldType.CExoString,
category: "Lock",
description: "Tag of the key item that unlocks this",
},
{
label: "KeyRequired",
displayName: "Key Required",
type: GffFieldType.Byte,
category: "Lock",
},
{
label: "TrapDetectable",
displayName: "Trap Detectable",
type: GffFieldType.Byte,
category: "Trap",
},
{
label: "TrapDisarmable",
displayName: "Trap Disarmable",
type: GffFieldType.Byte,
category: "Trap",
},
{
label: "ScriptOnOpen",
displayName: "On Open Script",
type: GffFieldType.ResRef,
category: "Scripts",
},
{
label: "ScriptOnClosed",
displayName: "On Closed Script",
type: GffFieldType.ResRef,
category: "Scripts",
},
{
label: "ScriptOnUsed",
displayName: "On Used Script",
type: GffFieldType.ResRef,
category: "Scripts",
},
],
};