-
Notifications
You must be signed in to change notification settings - Fork 89
VOBS & Triggers
Try edited this page May 27, 2022
·
3 revisions
- zCVob
struct zCVob {
string presetName;
bBox bbox3DWS;
zMat3 trafoOSToWSRot;
zVec3 trafoOSToWSPos;
string vobName;
string visual;
bool showVisual;
enum visualCamAlign;
#if GOTHIC1
bool cdStatic;
bool cdDyn;
bool staticVob;
enum dynamicShadow;
#endif
enum visualAniMode;
#if GOTHIC2
float visualAniModeStrength;
float vobFarClipZScale;
bool cdStatic;
bool cdDyn;
bool staticVob;
bool dynamicShadow;
float zBias;
bool isAmbient;
#endif
};
struct zCVobLevelCompo : zCVob {};
struct oCItem : zCVob {
instance itemInstance;
};
struct oCMOB : zCVob {
string focusName;
int hitpoints;
int damage;
bool moveable;
bool takeable;
bool focusOverride;
enum soundMaterial;
string visualDestroyed;
string owner;
string ownerGuild;
bool isDestroyed;
};
struct oCMobInter : oCMOB {
int stateNum;
string triggerTarget;
string useWithItem;
string conditionFunc;
string onStateFunc;
bool rewind;
};
struct oCMobBed : oCMobInter {};
// Not implemented
struct oCMobFire : oCMobInter {
string fireSlot;
string fireVobtreeName;
};
// Not implemented
struct oCMobLadder : oCMobInter {};
struct oCMobSwitch : oCMobInter {};
// Not implemented
struct oCMobWheel : oCMobInter {};
struct oCMobDoor : oCMobInter {
bool locked;
string keyInstance;
string pickLockStr;
};
struct zCPFXControler : zCVob {
string pfxName;
bool killVobWhenDone;
bool pfxStartOn;
};
struct zCVobAnimate : zCVob {
bool startOn;
};
struct zCVobLensFlare : zCVob {
string lensflareFX;
};
struct zCVobLight : zCVob {
string lightPresetInUse;
enum lightType;
float range;
color color;
float spotConeAngle;
bool lightStatic;
enum lightQuality;
string lensflareFX;
#if (lightStatic == true)
bool turnedOn;
string rangeAniScale;
float rangeAniFPS;
bool rangeAniSmooth;
string colorAniList;
float colorAniFPS;
bool colorAniSmooth;
# if GOTHIC2
bool canMove;
# endif
#endif
};
struct zCVobSpot : zCVob {};
struct zCVobStartpoint : zCVob {};
struct zCVobSound : zCVob {
float sndVolume;
enum sndMode;
float sndRandDelay;
float sndRandDelayVar;
bool sndStartOn;
bool sndAmbient3D;
bool sndObstruction;
float sndConeAngle;
enum sndVolType;
float sndRadius;
string sndName;
};
struct zCVobSoundDaytime : zCVobSound {
float sndStartTime;
float sndEndTime;
string sndName2;
};
struct oCZoneMusic : zCVob {
bool enabled;
int priority;
bool ellipsoid;
float reverbLevel;
float volumeLevel;
bool loop;
};
struct oCZoneMusicDefault : oCZoneMusic {};
struct zCZoneZFog : zCVob {
float fogRangeCenter;
float innerRangePerc;
color fogColor;
#if GOTHIC2
bool fadeOutSky;
bool overrideColor;
#endif
};
struct zCZoneZFogDefault : zCZoneZFog {};
struct zCZoneVobFarPlane : zCVob {
float vobFarPlaneZ;
float innerRangePerc;
};
struct zCZoneVobFarPlaneDefault : zCZoneVobFarPlane {};
// Partial implementation: no order
struct zCCodeMaster : zCVob {
string triggerTarget;
bool orderRelevant;
bool firstFalseIsFailure;
string triggerTargetFailure;
bool untriggeredCancels;
string[] slaveVobName;
};
struct zCTrigger : zCVob {
string triggerTarget;
uint8_t flags;
uint8_t filterFlags;
string respondToVobName;
int numCanBeActivated;
float retriggerWaitSec;
float damageThreshold;
float fireDelaySec;
};
using oCCSTrigger = zCTrigger;
struct zKeyFrame final {
float3 pos={};
float4 rotation={}; // Quaternion
};
// Partial implementation: no animation
struct zCMover : zCTrigger {
enum moverBehavior;
float touchBlockerDamage;
float stayOpenTimeSec;
bool moverLocked;
bool autoLinkEnabled;
#if GOTHIC2
bool autoRotate;
#endif
uint16_t numKeyframes;
#if numKeyframes>0
float moveSpeed;
enum posLerpType;
enum speedType;
zKeyFrame[] keyframes;
#endif
string sfxOpenStart;
string sfxOpenEnd;
string sfxMoving;
string sfxCloseStart;
string sfxCloseEnd;
string sfxLock;
string sfxUnlock;
string sfxUseLocked;
};
struct zCMoverControler : zCVob {
string triggerTarget;
#if GOTHIC1
enum moverMessage;
#else
byte moverMessage;
#endif
int gotoFixedKey;
};
struct oCTriggerScript : zCTrigger {
string scriptFunc;
};
struct zCTriggerList::Entry final {
#if GOTHIC2
string triggerTarget{id};
#else
string slaveVobName{id};
#endif
float fireDelay{id};
};
struct zCTriggerList : zCTrigger {
int32 listProcess;
Entry[] list;
};
struct oCTriggerChangeLevel : zCTrigger {
string levelName;
string startVobName;
};
struct zCTriggerWorldStart : zCTrigger {
string triggerTarget;
bool fireOnlyFirstTime;
};
struct zCMessageFilter : zCVob {
string triggerTarget;
enum onTrigger;
enum onUntrigger;
};
struct zCTouchDamage : zCVob {
float damage;
bool Barrier;
bool Blunt;
bool Edge;
bool Fire;
bool Fly;
bool Magic;
bool Point;
bool Fall;
float damageRepeatDelaySec;
float damageVolDownScale;
enum damageCollType;
};
struct oCTouchDamage : zCTouchDamage {};
struct zCTriggerUntouch : zCVob {
string triggerTarget;
};
struct zCCamTrj_KeyFrame : zCVob {
float time;
float angleRollDeg
float camFOVScale
enum motionType
enum motionTypeFOV
enum motionTypeRoll
enum motionTypeTimeScale
float tension
float bias
float continuity
float timeScale
bool timeIsFixed
zMAT4 originalPose;
};
struct zCCSCamera : zCVob {
zCCamTrj_KeyFrame[] frames = this->zCVob::childVobs;
enum camTrjFOR;
enum targetTrjFOR;
enum loopMode;
enum splLerpMode;
bool ignoreFORVobRotCam;
bool ignoreFORVobRotTarget;
bool adaptToSurroundings;
bool easeToFirstKey;
bool easeFromLastKey;
float totalTime;
string autoCamFocusVobName;
bool autoCamPlayerMovable;
bool autoCamUntriggerOnLastKey;
float autoCamUntriggerOnLastKeyDelay;
int numPos;
int numTargets;
};
struct zCEarthquake : zCVob {
float radius;
float timeSec;
zVEC3 amplitudeCM;
};