Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
908feb9
add function definition for AddCreature
Valla-Chan Jan 9, 2024
0318112
Merge branch 'master' of https://github.com/emd4600/Spore-ModAPI
Valla-Chan Jan 9, 2024
9913d93
Add MouthTypes to CommonIDs.h
Valla-Chan Jan 9, 2024
6da280d
Add name for Unk10 in enum CreaturePersonality
Valla-Chan Aug 19, 2024
fbdc34f
Add definitions to Cursors.h
Valla-Chan Aug 23, 2024
d4d3380
Merge branch 'emd4600:master' into master
Valla-Chan Aug 23, 2024
5172cd9
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Aug 23, 2024
b9ae16c
Fix typo, remove duplicate of auto_METHOD(cEditor, bool, AddCreature,…
Valla-Chan Aug 23, 2024
2147ceb
Merge branch 'emd4600:master' into master
Valla-Chan Aug 23, 2024
1eed050
Add enum of identity colors to cIdentityColorable
Valla-Chan Aug 23, 2024
ff135fe
Add several more cursors
Valla-Chan Aug 23, 2024
9ba0a2e
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Aug 23, 2024
f887e7f
ammend comment
Valla-Chan Aug 24, 2024
117e938
remove mouthtypes commit
Valla-Chan Aug 24, 2024
af84e58
Add space game cursors
Valla-Chan Aug 24, 2024
ab8e0a9
fix compile error in cursors.h
Valla-Chan Aug 24, 2024
adaa6ce
remove erroneous comment
Valla-Chan Aug 24, 2024
8807ab6
Merge branch 'emd4600:master' into master
Valla-Chan Aug 24, 2024
f99c941
Merge branch 'emd4600:master' into master
Valla-Chan Aug 24, 2024
546fdde
Merge branch 'emd4600:master' into master
Valla-Chan Aug 24, 2024
489f3ad
change mIDColorID to use IdentityColors
Valla-Chan Aug 25, 2024
3c3ed76
Add 2 new dev cheats (devEffectLog & PrintCursor), add support for pa…
Valla-Chan Aug 25, 2024
49173ec
fix improper effects detour
Valla-Chan Aug 25, 2024
b8bf9c4
Merge branch 'emd4600:master' into master
Valla-Chan Aug 28, 2024
e4a1317
document several part unlocking related fields
Valla-Chan Aug 30, 2024
5343f13
add comment to cCollectibleItems::sub_597BC0
Valla-Chan Aug 30, 2024
56ea6fe
Add cursors, Document string format for CursorManager::Load
Valla-Chan Sep 4, 2024
831a44a
fix typo
Valla-Chan Sep 7, 2024
7787dff
Merge branch 'emd4600:master' into master
Valla-Chan Sep 7, 2024
ffef770
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Sep 7, 2024
daa82fe
Merge branch 'emd4600:master' into master
Valla-Chan Sep 7, 2024
cc145ad
Add Math::GetDistance
Valla-Chan Sep 8, 2024
3812c5f
Merge branch 'emd4600:master' into master
Valla-Chan Sep 8, 2024
588d5ba
Revert "Add Math::GetDistance"
Valla-Chan Sep 9, 2024
89fb05f
Begin redoing EP1 object system
Valla-Chan Sep 11, 2024
33ceaba
Merge branch 'emd4600:master' into master
Valla-Chan Sep 16, 2024
97039ee
Merge branch 'emd4600:master' into master
Valla-Chan Sep 18, 2024
da5eb0b
Merge branch 'emd4600:master' into master
Valla-Chan Sep 19, 2024
7d3abfa
Revert "change mIDColorID to use IdentityColors"
Valla-Chan Sep 20, 2024
de9e709
Update cIdentityColorable.h
Valla-Chan Sep 20, 2024
233dd5c
cTribeHut - Document field_218
Valla-Chan Sep 20, 2024
e3e3584
cTribeHut - document field_21C
Valla-Chan Sep 20, 2024
431ecdd
Resolve 4/5 PR change requests
Valla-Chan Sep 20, 2024
9fa6047
add 'class' to identitycolor enum
Valla-Chan Sep 20, 2024
d7fee33
SpawnNpcTribe's 4rd interger arg = foodAmount
Valla-Chan Sep 21, 2024
2bb178f
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Sep 21, 2024
8c2520c
fix typo
Valla-Chan Sep 28, 2024
c16de41
fix typo in LoadBackgroundFiles
Valla-Chan Sep 30, 2024
4053ad8
Add message enums to SimulatorMessages.h, organize by stage
Valla-Chan Sep 30, 2024
afad808
fix typo
Valla-Chan Oct 1, 2024
25cee87
Clarify new simulator messages
Valla-Chan Oct 2, 2024
488c26a
Clarify more messages
Valla-Chan Oct 2, 2024
a0ee254
Add messages, change 1 type
Valla-Chan Oct 3, 2024
8236dd7
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Oct 3, 2024
8276e41
Update SimulatorMessages.h
Valla-Chan Oct 3, 2024
cdc5dce
Update SimulatorMessages.h
Valla-Chan Oct 3, 2024
9197088
fix typo
Valla-Chan Oct 4, 2024
ed9c724
Document tribe vars
Valla-Chan Oct 7, 2024
4ca2586
Document cTribe.mbMembersFlee, add Button funcs, fix documentation co…
Valla-Chan Oct 7, 2024
f935542
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Oct 7, 2024
d9a3a71
Annotate unknown func
Valla-Chan Oct 8, 2024
d4c51f5
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Oct 9, 2024
482d47b
Resolve PR issues
Valla-Chan Oct 9, 2024
20bd733
Revert cTribeTool temp fix
Valla-Chan Oct 9, 2024
86fbc83
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Oct 10, 2024
f08e17c
Merge branch 'emd4600:master' into master
Valla-Chan Oct 10, 2024
5587d33
fix HandheldItem enum typos
Valla-Chan Oct 10, 2024
3e82986
Merge branch 'emd4600:master' into master
Valla-Chan Oct 10, 2024
8d5a1e5
document tribe vars, rename BakeManager::func4Ch to Bake
Valla-Chan Oct 12, 2024
4631b23
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Oct 12, 2024
88eb2a1
Document EditorNamePanel Initialize()
Valla-Chan Oct 16, 2024
ac45c89
rename mbMembersFlee to mbDefeated
Valla-Chan Oct 16, 2024
fb39540
Merge branch 'emd4600:master' into master
Valla-Chan Oct 17, 2024
9aed2e2
String16 serialization fix
Valla-Chan Oct 17, 2024
d314060
Update cTribe.h
Valla-Chan Oct 19, 2024
ec4bc2a
Merge branch 'emd4600:master' into master
Valla-Chan Oct 19, 2024
b7a3b85
re-sort numgraspers next to numfeet in enum
Valla-Chan Oct 24, 2024
a15d35d
Merge branch 'emd4600:master' into master
Valla-Chan Oct 24, 2024
7f953a2
Merge branch 'emd4600:master' into master
Valla-Chan Oct 24, 2024
08f62a0
fix typos, document working OTDB params, reformat func28 in OTDB
Valla-Chan Oct 25, 2024
d130a7d
Update SimulatorMessages.h
Valla-Chan Oct 26, 2024
f004672
remove unnecessary comment
Valla-Chan Oct 26, 2024
d8df782
rename field_80 in cCombatant to mbInvincible
Valla-Chan Oct 26, 2024
869cc61
Document Cell Stage vars
Valla-Chan Nov 5, 2024
62867cb
Add TribeToolData group ID
Valla-Chan Nov 8, 2024
5fe847a
Add kCitizenActionWalkTo
Valla-Chan Nov 11, 2024
4a59bd6
document mPaintID
Valla-Chan Nov 12, 2024
7e3f5ad
add Simulator::GetMinimapWindow(), Add documentation related to minimap
Valla-Chan Nov 13, 2024
5b5361c
Merge branch 'emd4600:master' into master
Valla-Chan Nov 13, 2024
684f3fb
remove unneeded header
Valla-Chan Nov 13, 2024
a459e0f
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Nov 13, 2024
615488d
remove messy comment
Valla-Chan Nov 13, 2024
c3fbbfe
undo dubious var name
Valla-Chan Nov 13, 2024
6f7edb5
fix GetMinimapWindow crash
Valla-Chan Nov 13, 2024
c13a29d
add EditorManipulators enum to CommonIDs
Valla-Chan Nov 14, 2024
1bf65be
fix new enum to type as a uint32
Valla-Chan Nov 14, 2024
ca7219c
annotate EditorRigblock field_138
Valla-Chan Nov 14, 2024
8b77761
fix typo
Valla-Chan Nov 14, 2024
372b89b
fix typo in EditorRigblockBoolAttributes
Valla-Chan Nov 14, 2024
87f2ca3
change kEditorRigblockModelCanBeParentless to kEditorRigblockModelCan…
Valla-Chan Nov 14, 2024
77b675a
document creature model related vars and flags
Valla-Chan Nov 15, 2024
bd2d8fb
clarify comment
Valla-Chan Nov 15, 2024
97ef7cb
document int arg in cTribe::SpawnMember
Valla-Chan Nov 17, 2024
42d0d59
Add ColorRGB & ColorRGBA Serializers
Valla-Chan Nov 17, 2024
e184d07
rename func78h to GrowUp()
Valla-Chan Nov 18, 2024
89c532b
clarify cCreatureBase::IsHerbivore (also returns if creature is omniv…
Valla-Chan Nov 21, 2024
fd03139
Swap AbilityMode enum entries, annotate Editor::AddCreature()
Valla-Chan Nov 25, 2024
b46c819
add better description for AnimEditor, Fix icon capture for subcatego…
Valla-Chan Nov 27, 2024
8464c53
change IsHervibore to IsHerbivore (recent enough addition to mod API …
Valla-Chan Dec 1, 2024
bce5106
stop tracking editable sdkpathconfigs
Valla-Chan Dec 1, 2024
dc2ce9c
gitgnore
Valla-Chan Dec 1, 2024
291bdd1
fix remaining 'hervibore' typo
Valla-Chan Dec 1, 2024
04b3fee
undo "Hervibore" fix due to crashes
Valla-Chan Dec 1, 2024
391154b
fix variable annotations
Valla-Chan Dec 3, 2024
550030c
add default var amount to AddCreature
Valla-Chan Dec 3, 2024
dd38507
annotate var
Valla-Chan Dec 8, 2024
3d5d0c0
Editor::field_14C set to uint32
Valla-Chan Dec 8, 2024
2895833
change PaletteUIPtr to Palettes::PaletteUI* in thumbnail capture
Valla-Chan Jan 20, 2025
e3b0bfc
Merge branch 'emd4600:master' into master
Valla-Chan Jan 21, 2025
8ccda3c
add kHandheldItemTrgWildHorn to HandheldItem enum
Valla-Chan Mar 22, 2025
6ba7df2
add -help param to animeditor, rename cCreatureCitizen::field_FFC to …
Valla-Chan Mar 24, 2025
7de9d84
clarify raids and gifts in CitizenActions
Valla-Chan Mar 25, 2025
5e1b125
Rename Unknowns, Annotate vars, fix typos
Valla-Chan Apr 22, 2025
796ab7c
Add GetOrientationYawTowards to cSpatialObject
Valla-Chan Apr 22, 2025
1c61d15
Update the Mod Creator Kit to use new variable names
Valla-Chan Apr 22, 2025
36d8196
Add Mod Creator Kit cheats devSFXLog and devPlaySound
Valla-Chan Apr 22, 2025
a1adc3e
Merge branch 'emd4600:master' into master
Valla-Chan Apr 22, 2025
ba13c57
fix typo
Valla-Chan Apr 25, 2025
0f28d7e
Annotate Editor Camera vars
Valla-Chan Jun 22, 2025
b883416
Add Lerp() Math util
Valla-Chan Jun 22, 2025
d394ed0
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Jun 22, 2025
cd8b0ce
Add names to Editor Palette vars
Valla-Chan Aug 1, 2025
6a28e66
minor fixes to thumbnail script
Valla-Chan Aug 1, 2025
f349bc9
Merge branch 'emd4600:master' into master
Valla-Chan Aug 1, 2025
d96f8cd
clarify comments
Valla-Chan Aug 1, 2025
30d70c1
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Aug 1, 2025
f9cd6cc
Update comments, fix compile error
Valla-Chan Aug 6, 2025
7c271e8
change mSkinEffectIDs to uint32_t
Valla-Chan Aug 7, 2025
6a693bb
Document + rename numerous vars, add funcs, fix typos
Valla-Chan Sep 14, 2025
f54aeae
fix comment typos
Valla-Chan Sep 15, 2025
50e74f5
add Game Mode checks, add note on strategy game modes
Valla-Chan Sep 15, 2025
fb6e56c
Update EditorRequest.h
Valla-Chan Sep 15, 2025
75394a8
annotate vars, fix itemviewer zoom vars
Valla-Chan Sep 22, 2025
81667c1
add IsEditorMode()
Valla-Chan Sep 22, 2025
397a92c
add UnlockPart, LockPart, etc, rename + annotate vars
Valla-Chan Sep 22, 2025
fef58f7
add AnimatedCreature::PlayAnimation Address
Valla-Chan Sep 22, 2025
778a285
Merge branch 'emd4600:master' into master
Valla-Chan Dec 9, 2025
c37b20a
set TakeDamage int to damagetype
Valla-Chan Dec 24, 2025
6c12298
fix typo
Valla-Chan Dec 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void ThumbnailCaptureScript::DrawLayer(int flags, int layerIndex, App::cViewer**
mOldColorSet = true;
}

mpItemViewer->field_16A = false;
mpItemViewer->mbRotationEnabled = false;

auto viewer = mpItemViewer->mpLayeredObject->GetViewer();
viewer->SetBackgroundColor(ColorRGBA(0, 0, 0, 0));
Expand All @@ -114,7 +114,7 @@ void ThumbnailCaptureScript::DrawLayer(int flags, int layerIndex, App::cViewer**
if (mpItemViewer->mZoom == mpItemViewer->mFinalZoom) {
CaptureImage();
// We will only do it once, also restore the rotation
mpItemViewer->field_16A = true;
mpItemViewer->mbRotationEnabled = true;
mpItemViewer = nullptr;

model->mColor = ColorRGBA(mOldColor, 1.0f);
Expand Down
5 changes: 5 additions & 0 deletions Spore ModAPI/SourceCode/DLL/AddressesAnim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

namespace Anim
{
namespace Addresses(AnimatedCreature)
{
DefineAddress(PlayAnimation, SelectAddress(0xA0C5D0, 0xA0C5D0));
}

namespace Addresses(IAnimManager)
{
DefineAddress(Get, SelectAddress(0x67CC70, 0x67CAE0));
Expand Down
6 changes: 6 additions & 0 deletions Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1128,9 +1128,15 @@ namespace Simulator

namespace Addresses(cCollectableItems)
{
DefineAddress(sub_5976E0, SelectAddress(0x5976E0, 0x597A20));
DefineAddress(LoadConfig, SelectAddress(0x599100, 0x599440));
DefineAddress(AddUnlockableItem, SelectAddress(0x598A70, 0x598DB0));
DefineAddress(AddUnlockableItemFromProp, SelectAddress(0x598B50, 0x598E90));

DefineAddress(UnlockPart, SelectAddress(0x596A60, 0x596DA0));
DefineAddress(LockPart, SelectAddress(0x596AD0, 0x596E10));
DefineAddress(sub_594010, SelectAddress(0x594010, 0x5942E0));

DefineAddress(sub_597BC0, SelectAddress(0x597BC0, 0x597F00));
DefineAddress(sub_597390, SelectAddress(0x597390, 0x5976D0));
}
Expand Down
38 changes: 19 additions & 19 deletions Spore ModAPI/SourceCode/Editors/EditorPalettes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,17 +531,17 @@ namespace Palettes
auto_METHOD_VOID(AdvancedItemViewer, SetAutoRotate, Args(bool arg), Args(arg));
auto_METHOD_VOID(AdvancedItemViewer, SetZoom, Args(float zoom), Args(zoom));

void AdvancedItemViewer::func2Ch(bool value) {
field_166 = value;
void AdvancedItemViewer::SetShowModelOnHover(bool value) {
mbShowModelOnHover = value;
}
bool AdvancedItemViewer::func30h() const {
return field_166;
bool AdvancedItemViewer::GetShowModelOnHover() const {
return mbShowModelOnHover;
}
UTFWin::IWindow* AdvancedItemViewer::GetWindow() const {
return mpWindow.get();
}
void AdvancedItemViewer::Set3dPreview(bool value) {
field_EA = value;
mb3DPreviewEnabled = value;
}
Anim::AnimatedCreature* AdvancedItemViewer::GetAnimatedCreature() const {
return mpCreature.get();
Expand Down Expand Up @@ -607,40 +607,40 @@ namespace Palettes
, field_34()
, field_38()
, field_3C()
, field_40()
, field_44()
, field_48()
, mInstanceID()
, mTypeID()
, mGroupID()
, mFileName()
, mpWindow()
, field_60()
, mZoom(1.0f)
, mpWindowUnk1()
, mInitialZoom(1.0f)
, mRotation(0.0f)
, field_6C(0.0f)
, mInitialRotation(0.0f)
, mZoom(1.0f)
, mFinalZoom(1.0f)
, field_94(1.0f)
, field_98(Matrix3().SetIdentity())
, field_BC()
, field_C0()
, field_C4()
, field_C8(-1)
, field_CC(-1)
, field_D0(u"ui_material_blink")
, field_D4(u"ui_material_blink")
, mUIMaterialUnk1(u"ui_material_blink")
, mUIMaterialUnk2(u"ui_material_blink")
, field_D8()
, field_DC()
, field_E0(-1)
, field_E4(u"ui_material_blink")
, mUIMaterialUnk3(u"ui_material_blink")
, field_E8(true)
, field_E9()
, field_EA(true)
, mb3DPreviewEnabled(true)
, field_EB()
, field_EC()
, mpCreature()
, field_F4(2)
, field_F8()
, field_FC(true)
, field_FD()
, field_100(0x71FA7D3F)
, mTriggerBehavior(TriggerBehaviors::Drag)
, field_104()
, mpModel()
, field_11C()
Expand All @@ -654,10 +654,10 @@ namespace Palettes
, mbCreationIsBaked()
, field_164()
, field_165(true)
, field_166(true)
, mbShowModelOnHover(true)
, field_167()
, field_169()
, field_16A(true)
, mbRotationEnabled(true)
, mShowTooltip(true)
, mbOmitBackground()
, field_170()
Expand Down
21 changes: 18 additions & 3 deletions Spore ModAPI/SourceCode/Simulator/CommManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,35 @@ namespace Simulator

auto_METHOD(cCommManager, cCommEvent*, CreateSpaceCommEvent,
Args(uint32_t source, PlanetID planetKey, uint32_t fileID,
uint32_t dialogID, void* pMission, int priority, unsigned int duration),
uint32_t dialogID, cMission* pMission, int priority, unsigned int duration),
Args(source, planetKey, fileID, dialogID, pMission, priority, duration));

auto_METHOD_VOID(cCommManager, ShowCommEvent, Args(cCommEvent* pEvent), Args(pEvent));

auto_METHOD_const_(cCommManager, bool, IsCommScreenActive);

auto_METHOD_VOID(cCommManager, HandleCivCommAction,
Args(const CnvAction& action, void* pUnk, cCity* pSourceCity, cCity* pTargetCity),
Args(const CnvAction& action, cCivilization* pUnk, cCity* pSourceCity, cCity* pTargetCity),
Args(action, pUnk, pSourceCity, pTargetCity));

auto_METHOD_VOID(cCommManager, HandleSpaceCommAction,
Args(const CnvAction& action, uint32_t source, PlanetID planetKey, void* pMission),
Args(const CnvAction& action, uint32_t source, PlanetID planetKey, cMission* pMission),
Args(action, source, planetKey, pMission));


UTFWin::IWindow* cCommManager::GetCommBackgroundWindow() { return GetCommWindow(kWindowBackground); }

UTFWin::IWindow* cCommManager::GetCommWindow(uint32_t windowid) {
if (CommManager.IsCommScreenActive()) {
auto window = WindowManager.GetMainWindow()->FindWindowByID(0x01C3BB0C);
return window->FindWindowByID(uint32_t(windowid));
}
return nullptr;
}

UTFWin::IButton* cCommManager::GetCommButton(uint32_t buttonid) {
return object_cast<UTFWin::IButton>(GetCommWindow(buttonid));
}
}

#endif
18 changes: 18 additions & 0 deletions Spore ModAPI/SourceCode/Simulator/SimulatorMisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,24 @@ namespace Simulator
Args(struct ResourceKey key, uint32_t categoryID, int row, int column, int pageIndex),
Args(key, categoryID, row, column, pageIndex));


auto_METHOD_VOID_(cCollectableItems, sub_5976E0);

auto_METHOD_VOID(cCollectableItems, UnlockPart,
Args(uint32_t instanceID, uint32_t groupID, int unk),
Args(instanceID, groupID, unk));

auto_METHOD_VOID(cCollectableItems, LockPart,
Args(uint32_t instanceID, uint32_t groupID),
Args(instanceID, groupID));

auto_METHOD_VOID_(cCollectableItems, sub_594010);

auto_METHOD_VOID(cCollectableItems, sub_597BC0,
Args(UnkCategoryHashMap& dst, int unk, const ResourceKey& speciesKey),
Args(dst, unk, speciesKey));


auto_METHOD_VOID(cCollectableItems, sub_597390,
Args(eastl::vector<int>& dst, struct cCollectableItemID itemID, int unk),
Args(dst, itemID, unk));
Expand Down
16 changes: 13 additions & 3 deletions Spore ModAPI/Spore/Anim/AnimatedCreature.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,14 @@ namespace Anim
/* 64h */ virtual int func64h() = 0;
/* 68h */ virtual int func68h() = 0;
/* 6Ch */ virtual int func6Ch() = 0;
/* 70h */ virtual Graphics::IModelWorld* GetAnimWorld() = 0;
/* 70h */ virtual Graphics::IModelWorld* zGetModelWorld() = 0; // Broken.
/* 74h */ virtual int func74h() = 0;
/* 78h */ virtual int func78h() = 0; // returns main anim_query?
/* 7Ch */ virtual ~AnimatedCreature();

IAnimWorld* GetAnimWorld() { return (mpAnimWorld); }
Graphics::IModelWorld* GetModelWorld() { return GetModel() ? GetModel()->GetModelWorld() : nullptr; }

static bool IsIdleWalkLookatStart(uint32_t animID);
static bool IsIdleWalkStop(uint32_t animID);
static bool IsIdleWalk(uint32_t animID);
Expand All @@ -124,12 +127,14 @@ namespace Anim

/* 04h */ Vector3 mPosition;
/* 10h */ Quaternion mOrientation;
/* 20h */ char padding_20[0x154 - 0x20];
/* 20h */ char padding_20[0x74 - 0x20];

// 3Ch scale?

// 70h flags?
// 74h ColorRGBA that gets copied to model color
/* 74h */ ColorRGBA mColor; // gets copied to model color initially. At runtime, color should be applied directly to the mpModel.

/* 84h */ char padding_84[0x154 - 0x84];

/* 154h */ int field_154;
/* 158h */ int field_158;
Expand All @@ -149,6 +154,11 @@ namespace Anim
};
ASSERT_SIZE(AnimatedCreature, 0x19C);

namespace Addresses(AnimatedCreature)
{
DeclareAddress(PlayAnimation); // 0xA0C5D0 0xA0C5D0
}

struct anim_query
{
struct AnimReference {
Expand Down
2 changes: 1 addition & 1 deletion Spore ModAPI/Spore/Anim/IAnimWorld.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace Anim
/* 28h */ virtual void UpdateCreatures(float deltaTime, App::cViewer* = nullptr) = 0;
/* 2Ch */ virtual void PostUpdateCreatures(float deltaTime, App::cViewer* = nullptr) = 0;
// model is not visible by default
/* 30h */ virtual AnimatedCreature* LoadCreature(const ResourceKey& key, int = 2, const Vector3& = Vector3(), const Quaternion& = Quaternion(), bool = true) = 0;
/* 30h */ virtual AnimatedCreature* LoadCreature(const ResourceKey& key, int = 2, const Vector3& position = Vector3(), const Quaternion& orientation = Quaternion(), bool = true) = 0;
/* 34h */ virtual int func34h(int, int, int, int, int) = 0;
// Loads a *.blocks file
/* 38h */ virtual int LoadCreatureByName(const char*, int, int, int, int, int) = 0;
Expand Down
119 changes: 116 additions & 3 deletions Spore ModAPI/Spore/App/cCreatureModeStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <Spore\Simulator\SubSystem\cStrategy.h>
#include <Spore\Simulator\cCreatureDisplayStrategy.h>
#include <Spore\Simulator\cCreatureBase.h>
#include <Spore\Simulator\cInteractableObject.h>

#define cCreatureModeStrategyPtr eastl::intrusive_ptr<App::cCreatureModeStrategy>
#define ICreatureModeActionHandlerPtr eastl::intrusive_ptr<App::ICreatureModeActionHandler>
Expand Down Expand Up @@ -82,21 +83,133 @@ namespace App
#endif

namespace CreatureModeStrategies {
using namespace Simulator;

struct Interact {
static const uint32_t ID = 0xD3353638;

Simulator::cCreatureBase* creature;
Simulator::cGameData* interactableObject;
cCreatureBase* creature;
cInteractableObject* interactableObject;
int count; // ?
void* unk1; // unknown class
};

struct EatFruit {
static const uint32_t ID = 0xD335362B;

cCreatureBase* creature;
cInteractableObject* food;
int field_8; // 0
int field_16; // 0
void* unk1; // unknown class?
};

struct EatMeat {
static const uint32_t ID = 0xD335362D;

cCreatureBase* creature;
cInteractableObject* food;
int field_8; // 0
void* unk1; // unknown class?
};

struct UnlockPart {
static const uint32_t ID = 0x5371F11;

Simulator::cCreatureBase* creature;
cCreatureBase* creature;
int field_4;
int unlockLevel;
};

struct Mate {
static const uint32_t ID = 0xD335362C;

cCreatureBase* creature;
cCreatureBase* targetcreature;
int field_8; // 0
void* unk1; // unknown class?
};

struct LayEgg {
static const uint32_t ID = 0xD335362C;

cCreatureBase* creature;
cCreatureBase* targetcreature;
int field_8; // 0
void* unk1; // unknown class?
};

struct Pickup {
static const uint32_t ID = 0xD335362C;

cCreatureBase* creature;
cInteractableObject* item;
int field_8; // 0
void* unk1; // unknown class?
};

/// Unknowns ///


struct UnkActionCombat1 { // something to do with combat?
static const uint32_t ID = 0xD3353637;

uint32_t field_4; // 0
int field_8; // usually 1
uint32_t field_12; // 0
uint32_t field_16; // large value
uint32_t field_20;
};

struct UnkActionRelation1 { // Called when socializing or killing successfully?
static const uint32_t ID = 0x45AB96E;

cCreatureBase* creature;
int field_4;
// struct, class, or pointer? Not cGameData
uint32_t field_8;
int field_12; // usually 1
uint32_t field_16;
uint32_t field_20;
};

struct UnkActionSocial1 { // Called when socializing successfully, after UnkActionRelation1
static const uint32_t ID = 0x60B4123;

cCreatureBase* creature;
cCreatureBase* targetcreature;
uint32_t field_8;
uint32_t field_12;
uint32_t field_16;
uint32_t field_20;
uint32_t field_24;
uint32_t field_28;
};

struct UnkActionKill1 { // Called when killing successfully, after UnkActionRelation1
static const uint32_t ID = 0xD335362C;

cCreatureBase* creature;
cCreatureBase* targetcreature;
uint32_t field_8;
uint32_t field_12;
uint32_t field_16;
uint32_t field_20;
uint32_t field_24;
uint32_t field_28;
};

struct UnkActionKill2 { // Called when killing successfully, after UnkActionKill1
static const uint32_t ID = 0xD3353637;

cCreatureBase* creature;
cCreatureBase* targetcreature;
uint32_t field_12; // large value
uint32_t field_16; // large value
uint32_t field_20;
uint32_t field_24;
uint32_t field_28;
};

}
}
Loading