#pragma once #include "../../DNACommon/DNACommon.hpp" #include "../DNAMP1.hpp" #include "../SAVW.hpp" #include "specter/genie.hpp" namespace DataSpec::DNAMP1 { enum class EPickupType : atUint32 { PowerBeam = 0, IceBeam = 1, WaveBeam = 2, PlasmaBeam = 3, Missile = 4, ScanVisor = 5, MorphBallBomb = 6, PowerBomb = 7, Flamethrower = 8, ThermalVisor = 9, ChargeBeam = 10, SuperMissile = 11, GrappleBeam = 12, XRayVisor = 13, IceSpreader = 14, SpaceJump = 15, MorphBall = 16, CombatVisor = 17, BoostBall = 18, SpiderBall = 19, PowerSuit = 20, GravitySuit = 21, VariaSuit = 22, PhazonSuit = 23, EnergyTank = 24, UnknownItem1 = 25, HealthRefill = 26, UnknownItem2 = 27, WaveBuster = 28, Truth = 29, Strength = 30, Elder = 31, Wild = 32, LifeGiver = 33, Warrior = 34, Chozo = 35, Nature = 36, Sun = 37, World = 38, Spirit = 39, Newborn = 40 } SPECTER_ENUM("Pickup Type", "", EPickupType); enum class ESpecialFunctionType : atUint32 { What, PlayerFollowLocator, SpinnerController, ObjectFollowLocator, Function4, InventoryActivator, MapStation, SaveStation, IntroBossRingController, ViewFrustumTest, ShotSpinnerController, EscapeSequence, BossEnergyBar, EndGame, HUDFadeIn, CinematicSkip, ScriptLayerController, RainSimulator, AreaDamage, ObjectFollowObject, HintSystem, DropBomb, Function22, MissileStation, Billboard, PlayerInAreaRelay, HUDTarget, FogFader, EnterLogbook, PowerBombStation, Ending, FusionRelay, WeaponSwitch // PAL Only } SPECTER_ENUM("Special Function", "", EPickupType); struct AnimationParameters : BigDNA { AT_DECL_DNA_YAML UniqueID32 animationCharacterSet; Value character; Value defaultAnimation; UniqueID32 getCINF(PAKRouter& pakRouter) const; void nameANCS(PAKRouter& pakRouter, const std::string& name) const { if (!animationCharacterSet) return; PAK::Entry* ancsEnt = (PAK::Entry*)pakRouter.lookupEntry(animationCharacterSet); if (ancsEnt->name.empty()) ancsEnt->name = name; } void depANCS(std::vector& pathsOut) const { g_curSpec->flattenDependencies(animationCharacterSet, pathsOut, character); } void depANCSAll(std::vector& pathsOut) const { g_curSpec->flattenDependencies(animationCharacterSet, pathsOut); } }; struct BehaveChance : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5; Value unknown6; Value unknown7; }; struct DamageInfo : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value weaponType; Value damage; Value radius; Value knockbackPower; }; struct DamageVulnerability : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value power; Value ice; Value wave; Value plasma; Value bomb; Value powerBomb; Value missile; Value boostBall; Value phazon; Value enemyWeapon1; Value enemyWeapon2Poison; Value enemyWeapon3Lava; Value enemyWeapon4; Value unkownWeapon1; Value unkownWeapon2; Value deflected; struct ChargedBeams : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value power; Value ice; Value wave; Value plasma; Value deflected; } chargedBeams; struct BeamCombos : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value superMissiles; Value iceSpreader; Value wavebuster; Value flameThrower; Value deflected; } beamCombos; }; struct FlareDefinition : BigDNA { AT_DECL_DNA_YAML Value propertyCount; UniqueID32 texture; Value unknown1; Value unknown2; Value unknown4; // CColor void nameIDs(PAKRouter& pakRouter, const std::string& name) const { if (texture) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture); ent->name = name + "_texture"; } } void depIDs(std::vector& pathsOut) const { g_curSpec->flattenDependencies(texture, pathsOut); } }; struct GrappleParameters : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5; Value unknown6; Value unknown7; Value unknown8; Value unknown9; Value unknown10; Value unknown11; Value disableTurning; }; struct HealthInfo : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value health SPECTER_PROPERTY("Health", "Base health for object"); Value knockbackResistence SPECTER_PROPERTY("Knockback Resistence", ""); } SPECTER_PROPERTY("Health Info", ""); struct LightParameters : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value unknown1; Value unknown2; Value shadowTesselation; Value unknown3; Value unknown4; Value noLightsAmbient; // CColor Value makeLights; Value worldLightingOptions; Value lightRecalculationOptions; Value actorPosBias; Value maxDynamicLights; Value maxAreaLights; Value ambientChannelOverflow; Value layerIndex; }; struct PatternedInfo : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value mass; Value speed; Value turnSpeed; Value detectionRange; Value detectionHeightRange; Value dectectionAngle; Value minAttackRange; Value maxAttackRange; Value averageAttackTime; Value attackTimeVariation; Value leashRadius; Value playerLeashRadius; Value playerLeashTime; DamageInfo contactDamage; Value damageWaitTime; HealthInfo healthInfo; DamageVulnerability damageVulnerability; Value halfExtent; Value height; Value bodyOrigin; Value stepUpHeight; Value xDamage; Value frozenXDamage; Value xDamageDelay; Value deathSfx; AnimationParameters animationParameters; Value active; UniqueID32 stateMachine; Value intoFreezeDur; Value outOfFreezeDur; Value unknown10; Value particle1Frames; Value particle1Scale; UniqueID32 particle1; UniqueID32 electric; Value particle2Scale; UniqueID32 particle2; Value iceShatterSfx; void nameIDs(PAKRouter& pakRouter, const std::string& name) const { animationParameters.nameANCS(pakRouter, name + "_animp"); if (stateMachine) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(stateMachine); ent->name = name + "_fsm"; } if (particle1) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1); ent->name = name + "_part1"; } if (electric) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(electric); ent->name = name + "_elsc"; } if (particle2) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2); ent->name = name + "_part2"; } } void depIDs(std::vector& pathsOut) const { animationParameters.depANCS(pathsOut); g_curSpec->flattenDependencies(stateMachine, pathsOut); g_curSpec->flattenDependencies(particle1, pathsOut); g_curSpec->flattenDependencies(electric, pathsOut); g_curSpec->flattenDependencies(particle2, pathsOut); } }; struct PlayerHintParameters : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value unknown1; Value unknown2; Value extendTargetDistance; Value unknown4; Value unknown5; Value unknown6; Value unknown7; Value unknown8; Value unknown9; Value unknown10; Value unknown11; Value unknown12; Value unknown13; Value unknown14; Value unknown15; }; struct ScannableParameters : BigDNA { AT_DECL_DNA_YAML Value propertyCount; UniqueID32 scanId; void nameIDs(PAKRouter& pakRouter, const std::string& name) const { if (scanId) { PAK::Entry* scanEnt = (PAK::Entry*)pakRouter.lookupEntry(scanId); scanEnt->name = name + "_scan"; } } void depIDs(std::vector& pathsOut) const { g_curSpec->flattenDependencies(scanId, pathsOut); } void scanIDs(std::vector& scansOut) const { scansOut.emplace_back(scanId); } }; struct VisorParameters : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value unknown1; Value scanPassthrough; Value visorMask; }; struct PlayerParameters : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Vector bools; }; struct ActorParameters : BigDNA { AT_DECL_DNA_YAML Value propertyCount; LightParameters lightParameters; ScannableParameters scannableParameters; UniqueID32 cmdlXray; UniqueID32 cskrXray; UniqueID32 cmdlThermal; UniqueID32 cskrThermal; Value globalTimeProvider; Value fadeInTime; Value fadeOutTime; VisorParameters visorParameters; Value thermalHeat; Value renderUnsorted; Value noSortThermal; Value thermalMag; void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc, const AnimationParameters& animParms) const { auto cinf = animParms.getCINF(pakRouter); if (cmdlXray && cskrXray) { charAssoc.m_cmdlRigs[cmdlXray] = std::make_pair(cskrXray, cinf); charAssoc.m_cskrCinfToCharacter[cskrXray] = std::make_pair( animParms.animationCharacterSet, "ATTACH.XRAY.CSKR"); charAssoc.addAttachmentRig(animParms.animationCharacterSet, {}, cmdlXray, "XRAY"); } if (cmdlThermal && cskrThermal) { charAssoc.m_cmdlRigs[cmdlThermal] = std::make_pair(cskrThermal, cinf); charAssoc.m_cskrCinfToCharacter[cskrThermal] = std::make_pair( animParms.animationCharacterSet, "ATTACH.THERMAL.CSKR"); charAssoc.addAttachmentRig(animParms.animationCharacterSet, {}, cmdlThermal, "THERMAL"); } } void nameIDs(PAKRouter& pakRouter, const std::string& name) const { scannableParameters.nameIDs(pakRouter, name); if (cmdlXray) { PAK::Entry* xmEnt = (PAK::Entry*)pakRouter.lookupEntry(cmdlXray); xmEnt->name = name + "_xraymodel"; } if (cskrXray) { PAK::Entry* xsEnt = (PAK::Entry*)pakRouter.lookupEntry(cskrXray); xsEnt->name = name + "_xrayskin"; } if (cmdlThermal) { PAK::Entry* xmEnt = (PAK::Entry*)pakRouter.lookupEntry(cmdlThermal); xmEnt->name = name + "_thermalmodel"; } if (cskrThermal) { PAK::Entry* xsEnt = (PAK::Entry*)pakRouter.lookupEntry(cskrThermal); xsEnt->name = name + "_thermalskin"; } } void depIDs(std::vector& pathsOut, std::vector& lazyOut) const { scannableParameters.depIDs(lazyOut); g_curSpec->flattenDependencies(cmdlXray, pathsOut); g_curSpec->flattenDependencies(cskrXray, pathsOut); g_curSpec->flattenDependencies(cmdlThermal, pathsOut); g_curSpec->flattenDependencies(cskrThermal, pathsOut); } void scanIDs(std::vector& scansOut) const { scannableParameters.scanIDs(scansOut); } }; struct BeamInfo : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value unknown1; UniqueID32 particle1; UniqueID32 particle2; UniqueID32 texture1; UniqueID32 texture2; Value unknown2; Value unknown3; Value unknown4; Value unknown5; Value unknown6; Value unknown7; Value unknown8; Value unknown9; Value unknown10; DNAColor unknown11; DNAColor unknown12; void nameIDs(PAKRouter& pakRouter, const std::string& name) const { if (particle1) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1); ent->name = name + "_part1"; } if (particle2) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2); ent->name = name + "_part2"; } if (texture1) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture1); ent->name = name + "_tex1"; } if (texture2) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture2); ent->name = name + "_tex2"; } } void depIDs(std::vector& pathsOut) const { g_curSpec->flattenDependencies(particle1, pathsOut); g_curSpec->flattenDependencies(particle2, pathsOut); g_curSpec->flattenDependencies(texture1, pathsOut); g_curSpec->flattenDependencies(texture2, pathsOut); } }; }