Replicator Updates for TGEA 1.8.1
by Jaimi McEntire · 05/15/2009 (12:38 pm) · 22 comments
This update includes updated FxReplicatorBlocker, twSurfaceReference, Square FxFoliageReplicators, FxShapeReplicator, and GroundCover all ported to TGEA 1.8.1 - fully integrated, with minor bug fixes and some enhancements.
What's New:
fxReplicatorBlocker:
Ported to 1.8.1
Original Resource: www.garagegames.com/community/resources/view/6467
New:
BlockShapes property added (block fxShapeReplication, true/false)
BlockFoliage property added (block fxFoliageRepliaction, true/false)
BlockGroundCover property added (Block ground cover, true/false)
ReplicatorBlockers now visible in the editor. It was hard to see where your blockers were before. Now there is a transparent block drawn where they are.
Blocker color in editor different for type of blocking.
GroundCover:
New:
FxReplicatorBlocker using new blocking algorithm
FxFolageReplicator:
Square Replicators added from this resource:
www.garagegames.com/community/resources/view/15871
TwSurfaceReference changes added
FxReplicatorBlocker using new blocking algorithm
FxShapeReplicator:
TwSurfaceReference changes added
FxReplicatorBlocker using new blocking algorithm
TwSurfaceReference:
Ported to 1.8.1
Original resources:
www.garagegames.com/community/resources/view/3615
www.garagegames.com/community/resources/view/14905
The main changes beyond porting are the ability to specify what gets blocked by a replicator blocker -- ie, you can block shapes (trees) for a yard, but leave the foliage replicators intact. In addition, I added the ability to block out ground cover. All of the replicators now have support for blockers, as well as TwSurfaceReference (which lets you specify what type of terrain you want something to appear on).
Why?
For example, you might want a clearing in the forest, but you want it to be a meadow, so you want the groundcover to continue. You may also want to create a garden in the meadow - so you want the groundcover blocked in that particular spot, but you don't want foliage blocked (it's the vegetables). And you want everything blocked where the cabin is. Previously, you couldn't block groundcover at all, and blockers worked on everything, so it would take a ton of blockers and/or strategic placement of replicators. Now, it's just three blockers - the big meadow blocker, the ground cover blocker for the garden, and an everything blocker for the cabin area.
In the below shots, the Blocker on the left is blocking Shapes and foliage. The Blocker on the right is blocking shapes and ground cover.
In Game:

In Editor:

To install:
Download code file
Replace or merge the files in your project with the files in the zip file. If you have not previously added FxReplicatorBlocker or TwSurfaceReference, you will need to add the files to your project.
In addition, you will need to make the following code changes (needed for groundcover support):
in Sim.h
you will need to add a named set for the fxBlockerSet:
in Sim.cpp
You will need to implement the set:
in SimManager.cpp
You willneed to instantiate the named set:
If you have not previously added twSurfaceReference or fxReplicatorblocker to your script source, you will also need to do this.
In objectGuilderGui.ed.gui
You will need to add
in Creator.ed.cs
Add the fxReplicatorBlocker and twSurfaceReference to the environment array. You will need to adjust the index depending on what is already there. (in Stock TGEA, this is the Atlas item). Example only:
What's New:
fxReplicatorBlocker:
Ported to 1.8.1
Original Resource: www.garagegames.com/community/resources/view/6467
New:
BlockShapes property added (block fxShapeReplication, true/false)
BlockFoliage property added (block fxFoliageRepliaction, true/false)
BlockGroundCover property added (Block ground cover, true/false)
ReplicatorBlockers now visible in the editor. It was hard to see where your blockers were before. Now there is a transparent block drawn where they are.
Blocker color in editor different for type of blocking.
GroundCover:
New:
FxReplicatorBlocker using new blocking algorithm
FxFolageReplicator:
Square Replicators added from this resource:
www.garagegames.com/community/resources/view/15871
TwSurfaceReference changes added
FxReplicatorBlocker using new blocking algorithm
FxShapeReplicator:
TwSurfaceReference changes added
FxReplicatorBlocker using new blocking algorithm
TwSurfaceReference:
Ported to 1.8.1
Original resources:
www.garagegames.com/community/resources/view/3615
www.garagegames.com/community/resources/view/14905
The main changes beyond porting are the ability to specify what gets blocked by a replicator blocker -- ie, you can block shapes (trees) for a yard, but leave the foliage replicators intact. In addition, I added the ability to block out ground cover. All of the replicators now have support for blockers, as well as TwSurfaceReference (which lets you specify what type of terrain you want something to appear on).
Why?
For example, you might want a clearing in the forest, but you want it to be a meadow, so you want the groundcover to continue. You may also want to create a garden in the meadow - so you want the groundcover blocked in that particular spot, but you don't want foliage blocked (it's the vegetables). And you want everything blocked where the cabin is. Previously, you couldn't block groundcover at all, and blockers worked on everything, so it would take a ton of blockers and/or strategic placement of replicators. Now, it's just three blockers - the big meadow blocker, the ground cover blocker for the garden, and an everything blocker for the cabin area.
In the below shots, the Blocker on the left is blocking Shapes and foliage. The Blocker on the right is blocking shapes and ground cover.
In Game:

In Editor:

To install:
Download code file
Replace or merge the files in your project with the files in the zip file. If you have not previously added FxReplicatorBlocker or TwSurfaceReference, you will need to add the files to your project.
In addition, you will need to make the following code changes (needed for groundcover support):
in Sim.h
you will need to add a named set for the fxBlockerSet:
DeclareNamedSet(fxFoliageSet) DeclareNamedSet(twSurfaceSet) // <-- Add this line too DeclareNamedSet(fxBlockerSet) // <-- Add this line. Note - no semicolon
in Sim.cpp
You will need to implement the set:
ImplementNamedSet(fxFoliageSet) ImplementNamedSet(twSurfaceSet) // <-- Add this line too ImplementNamedSet(fxBlockerSet) // <-- Add this line. Note - no semicolon
in SimManager.cpp
You willneed to instantiate the named set:
InstantiateNamedSet(fxFoliageSet); InstantiateNamedSet(twSurfaceSet); //<-- Add this line too InstantiateNamedSet(fxBlockerSet); //<-- Add this line. Semicolon needed this time
If you have not previously added twSurfaceReference or fxReplicatorblocker to your script source, you will also need to do this.
In objectGuilderGui.ed.gui
You will need to add
function ObjectBuilderGui::buildfxReplicatorBlocker(%this)
{
%this.className = "fxReplicatorBlocker";
%this.addField("dimensions", "TypePoint3", "Dimensions", "2 2 2");
%this.process();
}
function ObjectBuilderGui::buildtwSurfaceReference(%this)
{
%this.className = "twSurfaceReference";
%this.process();
}in Creator.ed.cs
Add the fxReplicatorBlocker and twSurfaceReference to the environment array. You will need to adjust the index depending on what is already there. (in Stock TGEA, this is the Atlas item). Example only:
%Environment_Item[18] = "Atlas"; %Environment_Item[19] = "twSurfaceReference"; // <--- This was added %Environment_Item[20] = "fxReplicatorBlocker"; // <--- This was added %Environment_Item[21] = "fxGenericObject"; // <--- Previous resource %Environment_Item[22] = "fxForceField"; // <--- Upcoming resource if anyone wants it. %Environment_Item[23] = "fxSwarm"; // <--- Upcoming resource if anyone wants it.
About the author
Recent Blogs
• GuiLensFlareHud - Lens flares and white out for TGEA 1.8.1• fxGenericObject for TGEA 1.8.1
• GuiStatusCtrl - *Updated* Display Field Name, Values, Status Bar for any field or method on any named object. TGEA and (new! TGE 1.52)
• Bitmap Channel Embedder
• Updated GuiObjectView for TGEA 1.7.1 and 1.8.0
#2
By they way, what's this hint about "fxForceField" and "fxSwarm", "if anyone want's it"? Of course we want it :D
05/15/2009 (1:26 pm)
Awesome suite of replicator enhancements Jaimi! Two thumbs up for porting the twSurfaceReference and fxReplicatorBlocker. By they way, what's this hint about "fxForceField" and "fxSwarm", "if anyone want's it"? Of course we want it :D
#3
05/15/2009 (4:04 pm)
Quote:By they way, what's this hint about "fxForceField" and "fxSwarm", "if anyone want's it"? Of course we want it :DDuhh!! Yes we want it. :-)
#4
05/15/2009 (4:14 pm)
Haha, yeah - FxForceField and FxSwarm - I'll post those also. If I don't get a chance tomorrow, I'll do it on Monday.
#5
05/15/2009 (4:42 pm)
Nice work Jaimi!
#6
I did get 3 warnings and 1 error when trying to compile:
Warnings:
Warning 8 warning C4189: 'halfInnerRadiusX' : local variable is initialized but not referenced c:\Program Files\Garage Games\TGEA_1_8_1\engine\source\T3D\fx\fxFoliageReplicator.cpp 1613
Warning 9 warning C4189: 'halfPlacementBandHeight' : local variable is initialized but not referenced c:\Program Files\Garage Games\TGEA_1_8_1\engine\source\T3D\fx\fxFoliageReplicator.cpp 1615
Warning 10 warning C4189: 'halfInnerRadiusY' : local variable is initialized but not referenced c:\Program Files\Garage Games\TGEA_1_8_1\engine\source\T3D\fx\fxFoliageReplicator.cpp 1614
Error:
Error 4 error C2065: 'fxReplicatorBlockerObjectType' : undeclared identifier c:\Program Files\Garage Games\TGEA_1_8_1\engine\source\T3D\fx\fxReplicatorBlocker.cpp 67
Unfortunately, it wouldn't compile. Any ideas? (I have the March 2008 SDK installed)
Thanks.
05/15/2009 (8:44 pm)
This is great! Thanks for all your coding efforts!I did get 3 warnings and 1 error when trying to compile:
Warnings:
Warning 8 warning C4189: 'halfInnerRadiusX' : local variable is initialized but not referenced c:\Program Files\Garage Games\TGEA_1_8_1\engine\source\T3D\fx\fxFoliageReplicator.cpp 1613
Warning 9 warning C4189: 'halfPlacementBandHeight' : local variable is initialized but not referenced c:\Program Files\Garage Games\TGEA_1_8_1\engine\source\T3D\fx\fxFoliageReplicator.cpp 1615
Warning 10 warning C4189: 'halfInnerRadiusY' : local variable is initialized but not referenced c:\Program Files\Garage Games\TGEA_1_8_1\engine\source\T3D\fx\fxFoliageReplicator.cpp 1614
Error:
Error 4 error C2065: 'fxReplicatorBlockerObjectType' : undeclared identifier c:\Program Files\Garage Games\TGEA_1_8_1\engine\source\T3D\fx\fxReplicatorBlocker.cpp 67
Unfortunately, it wouldn't compile. Any ideas? (I have the March 2008 SDK installed)
Thanks.
#7
fxReplicatorBlockerType is no longer needed. Just delete the line, and it should compile and work correctly. I'll update the source here in a bit.
You can also delete the lines that are generating warnings - those are no longer used.
05/15/2009 (9:12 pm)
@Kerry - Sorry! That's from the original ReplicatorBlocker code. Indeed,fxReplicatorBlockerType is no longer needed. Just delete the line, and it should compile and work correctly. I'll update the source here in a bit.
You can also delete the lines that are generating warnings - those are no longer used.
#8
05/15/2009 (9:24 pm)
The resource has been updated, so it no longer generates the warnings, nor requires 'fxReplicatorBlockerObjectType' (You don't have to redownload it if you follow the instructions and delete the offending lines above).
#9
main.cc
After this
After this
Other than that, it compiled just fine.
Thanks for updating and packaging these resources.
05/15/2009 (9:37 pm)
From the original fxReplicatorBlocker resource you forgot:main.cc
After this
Con::setIntVariable("$TypeMasks::StaticRenderedObjectType", StaticRenderedObjectType);
Con::setIntVariable("$TypeMasks::DamagableItemObjectType", DamagableItemObjectType);add thisCon::setIntVariable("$TypeMasks::fxReplicatorBlockerObjectType", fxReplicatorBlockerObjectType);objectTypes.hAfter this
DamagableItemObjectType = BIT(27),add this
fxReplicatorBlockerObjectType = BIT(28),
Other than that, it compiled just fine.
Thanks for updating and packaging these resources.
#10
05/15/2009 (10:11 pm)
The "raycast" method it was using to pull objects for collision would get messed up if you had overlapping blockers, so I created an alternate method that should actually be faster - so fxReplicatorBlockerType is not needed at all anymore -- I just forget to remove it from the original netmask. It's my fault, sorry guys!
#11
05/16/2009 (2:27 am)
Thank you Jaimi!
#12
Quick question: Do you add a twSurfaceReference to the mission (or is it built into groundCover)? Because when I add it from the environment section of the editor it crashes once I name it and hit 'ok'.
05/16/2009 (7:53 am)
Thanks, Jaimi, the changes worked great. I'm looking forward to finding out about fxswarm and fxforcefield.Quick question: Do you add a twSurfaceReference to the mission (or is it built into groundCover)? Because when I add it from the environment section of the editor it crashes once I name it and hit 'ok'.
#13
05/16/2009 (2:05 pm)
You're supposed to be able to add it to the mission, somewhere above the terrain (from environment). I'll look into it, see if I can figure out what went wrong.
#14
05/16/2009 (2:16 pm)
@Kerry - I can't duplicate this here. Can you run the application in the debugger, and tell me the callstack when it crashes?
#15
05/16/2009 (10:23 pm)
Uh...I hate to admit this, but I'm not sure how to do that. I have a debug version ready to go and I messed around with hitting the tilde key a bit...
#16
It should give you a list of lines of code that led to the current location. If it stopped on a DebugBreak, you will need to go back a few lines to find the cause - it will look something like this:
But go ahead and just copy the entire callstack for me anyway - thanks, I'll see if I can figure it out.
05/17/2009 (12:34 pm)
Just run it under the debugger. When it crashes, it should take you to the line of code that is dying (or a DebugBreak). If the callstack window isn't open - select Debug/Windows/Call Stack. It should give you a list of lines of code that led to the current location. If it stopped on a DebugBreak, you will need to go back a few lines to find the cause - it will look something like this:
AssertFatal(mNextParticleTime > 0, "Error, should not have deferred this particle!");
But go ahead and just copy the entire callstack for me anyway - thanks, I'll see if I can figure it out.
#17
Stronghold_DEBUG.exe!twSurfaceReference::onAdd() Line 228 + 0x2e bytes C++
Stronghold_DEBUG.exe!SimObject::registerObject() Line 445 + 0xd bytes C++
Stronghold_DEBUG.exe!CodeBlock::exec(unsigned int ip=17, const char * functionName=0x12a3136c, Namespace * thisNamespace=0x00000000, unsigned int argc=0, const char * * argv=0x00000000, bool noCalls=false, const char * packageName=0x00000000, int setFrame=0) Line 600 + 0xb bytes C++
Stronghold_DEBUG.exe!CodeBlock::compileExec(const char * fileName=0x12a3136c, const char * inString=0x0cb61370, bool noCalls=false, int setFrame=0) Line 648 C++
Stronghold_DEBUG.exe!cexec(SimObject * __formal=0x0675f870, int argc=2, const char * * argv=0x011c3660) Line 1150 C++
Stronghold_DEBUG.exe!CodeBlock::exec(unsigned int ip=4479, const char * functionName=0x066f4d60, Namespace * thisNamespace=0x066e4e3c, unsigned int argc=1, const char * * argv=0x011c3660, bool noCalls=false, const char * packageName=0x00000000, int setFrame=-1) Line 1358 + 0x20 bytes C++
Stronghold_DEBUG.exe!CodeBlock::exec(unsigned int ip=8, const char * functionName=0x00000000, Namespace * thisNamespace=0x00000000, unsigned int argc=0, const char * * argv=0x00000000, bool noCalls=false, const char * packageName=0x00000000, int setFrame=0) Line 1267 + 0x41 bytes C++
Stronghold_DEBUG.exe!CodeBlock::compileExec(const char * fileName=0x00000000, const char * inString=0x0674c234, bool noCalls=false, int setFrame=0) Line 648 C++
Stronghold_DEBUG.exe!Con::evaluate(const char * string=0x0674c234, bool echo=false, const char * fileName=0x00000000) Line 932 C++
Stronghold_DEBUG.exe!GuiControl::execConsoleCallback() Line 1684 + 0x13 bytes C++
Stronghold_DEBUG.exe!GuiControl::onAction() Line 1525 C++
Stronghold_DEBUG.exe!GuiButtonBaseCtrl::onAction() Line 334 C++
Stronghold_DEBUG.exe!GuiButtonBaseCtrl::onMouseUp(const GuiEvent & event={...}) Line 234 C++
Stronghold_DEBUG.exe!GuiCanvas::rootMouseUp(const GuiEvent & event={...}) Line 888 C++
Stronghold_DEBUG.exe!GuiCanvas::processMouseEvent(InputEventInfo & inputEvent={...}) Line 599 C++
Stronghold_DEBUG.exe!GuiCanvas::processInputEvent(InputEventInfo & inputEvent={...}) Line 387 + 0x1e bytes C++
Stronghold_DEBUG.exe!WindowInputGenerator::generateInputEvent(InputEventInfo & inputEvent={...}) Line 72 + 0x16 bytes C++
05/17/2009 (6:06 pm)
Ok, here's the call stack:Stronghold_DEBUG.exe!twSurfaceReference::onAdd() Line 228 + 0x2e bytes C++
Stronghold_DEBUG.exe!SimObject::registerObject() Line 445 + 0xd bytes C++
Stronghold_DEBUG.exe!CodeBlock::exec(unsigned int ip=17, const char * functionName=0x12a3136c, Namespace * thisNamespace=0x00000000, unsigned int argc=0, const char * * argv=0x00000000, bool noCalls=false, const char * packageName=0x00000000, int setFrame=0) Line 600 + 0xb bytes C++
Stronghold_DEBUG.exe!CodeBlock::compileExec(const char * fileName=0x12a3136c, const char * inString=0x0cb61370, bool noCalls=false, int setFrame=0) Line 648 C++
Stronghold_DEBUG.exe!cexec(SimObject * __formal=0x0675f870, int argc=2, const char * * argv=0x011c3660) Line 1150 C++
Stronghold_DEBUG.exe!CodeBlock::exec(unsigned int ip=4479, const char * functionName=0x066f4d60, Namespace * thisNamespace=0x066e4e3c, unsigned int argc=1, const char * * argv=0x011c3660, bool noCalls=false, const char * packageName=0x00000000, int setFrame=-1) Line 1358 + 0x20 bytes C++
Stronghold_DEBUG.exe!CodeBlock::exec(unsigned int ip=8, const char * functionName=0x00000000, Namespace * thisNamespace=0x00000000, unsigned int argc=0, const char * * argv=0x00000000, bool noCalls=false, const char * packageName=0x00000000, int setFrame=0) Line 1267 + 0x41 bytes C++
Stronghold_DEBUG.exe!CodeBlock::compileExec(const char * fileName=0x00000000, const char * inString=0x0674c234, bool noCalls=false, int setFrame=0) Line 648 C++
Stronghold_DEBUG.exe!Con::evaluate(const char * string=0x0674c234, bool echo=false, const char * fileName=0x00000000) Line 932 C++
Stronghold_DEBUG.exe!GuiControl::execConsoleCallback() Line 1684 + 0x13 bytes C++
Stronghold_DEBUG.exe!GuiControl::onAction() Line 1525 C++
Stronghold_DEBUG.exe!GuiButtonBaseCtrl::onAction() Line 334 C++
Stronghold_DEBUG.exe!GuiButtonBaseCtrl::onMouseUp(const GuiEvent & event={...}) Line 234 C++
Stronghold_DEBUG.exe!GuiCanvas::rootMouseUp(const GuiEvent & event={...}) Line 888 C++
Stronghold_DEBUG.exe!GuiCanvas::processMouseEvent(InputEventInfo & inputEvent={...}) Line 599 C++
Stronghold_DEBUG.exe!GuiCanvas::processInputEvent(InputEventInfo & inputEvent={...}) Line 387 + 0x1e bytes C++
Stronghold_DEBUG.exe!WindowInputGenerator::generateInputEvent(InputEventInfo & inputEvent={...}) Line 72 + 0x16 bytes C++
#18
Stronghold_DEBUG.exe!fastdelegate::FastDelegate4<unsigned int,unsigned int,unsigned int,unsigned short,void>::operator()(unsigned int p1=0, unsigned int p2=0, unsigned int p3=2, unsigned short p4=0) Line 1248 + 0x27 bytes C++
Stronghold_DEBUG.exe!Signal<void __cdecl(unsigned int,unsigned int,unsigned int,unsigned short)>::trigger(unsigned int a=0, unsigned int b=0, unsigned int c=2, unsigned short d=0) Line 402 C++
Stronghold_DEBUG.exe!Journal::Call<Signal<void __cdecl(unsigned int,unsigned int,unsigned int,unsigned short)>,unsigned int,unsigned int,unsigned int,unsigned short>(Signal<void __cdecl(unsigned int,unsigned int,unsigned int,unsigned short)> * obj=0x036e1f10, void (unsigned int, unsigned int, unsigned int, unsigned short)* method=0x007b85b9, unsigned int a=0, unsigned int b=0, unsigned int c=2, unsigned short d=0) Line 534 + 0xc1 bytes C++
Stronghold_DEBUG.exe!JournaledSignal<void __cdecl(unsigned int,unsigned int,unsigned int,unsigned short)>::trigger(unsigned int a=0, unsigned int b=0, unsigned int c=2, unsigned short d=0) Line 115 + 0x1f bytes C++
Stronghold_DEBUG.exe!_dispatch(HWND__ * hWnd=0x0016066c, unsigned int message=514, unsigned int wParam=0, unsigned int lParam=9503068) Line 286 C++
Stronghold_DEBUG.exe!DispatchNext() Line 539 + 0x15 bytes C++
Stronghold_DEBUG.exe!Win32WindowManager::_process() Line 277 + 0x5 bytes C++
Stronghold_DEBUG.exe!fastdelegate::FastDelegate0<void>::operator()() Line 908 + 0x16 bytes C++
Stronghold_DEBUG.exe!Signal<void __cdecl(void)>::trigger() Line 338 C++
Stronghold_DEBUG.exe!Process::processEvents() Line 53 C++
Stronghold_DEBUG.exe!StandardMainLoop::doMainLoop() Line 468 + 0x5 bytes C++
Stronghold_DEBUG.exe!TorqueMain(int argc=1, const char * * argv=0x01d51e90) Line 35 + 0x5 bytes C++
Stronghold_DEBUG.exe!run(int argc=1, const char * * argv=0x01d51e90) Line 279 + 0xd bytes C++
Stronghold_DEBUG.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * __formal=0x00000000, char * lpszCmdLine=0x00151f3d, HINSTANCE__ * __formal=0x00000000) Line 343 + 0x17 bytes C++
Stronghold_DEBUG.exe!__tmainCRTStartup() Line 263 + 0x2c bytes C
Stronghold_DEBUG.exe!WinMainCRTStartup() Line 182 C
kernel32.dll!7c817077()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
And here's the line (228) it pointed to in the twsurfaceReference.cpp:
dynamic_cast<SimSet*>(Sim::findObject("twSurfaceSet"))->addObject(this);
05/17/2009 (6:10 pm)
Stronghold_DEBUG.exe!WindowInputGenerator::handleMouseButton(unsigned int did=0, unsigned int modifiers=0, unsigned int action=2, unsigned short button=0) Line 195 C++Stronghold_DEBUG.exe!fastdelegate::FastDelegate4<unsigned int,unsigned int,unsigned int,unsigned short,void>::operator()(unsigned int p1=0, unsigned int p2=0, unsigned int p3=2, unsigned short p4=0) Line 1248 + 0x27 bytes C++
Stronghold_DEBUG.exe!Signal<void __cdecl(unsigned int,unsigned int,unsigned int,unsigned short)>::trigger(unsigned int a=0, unsigned int b=0, unsigned int c=2, unsigned short d=0) Line 402 C++
Stronghold_DEBUG.exe!Journal::Call<Signal<void __cdecl(unsigned int,unsigned int,unsigned int,unsigned short)>,unsigned int,unsigned int,unsigned int,unsigned short>(Signal<void __cdecl(unsigned int,unsigned int,unsigned int,unsigned short)> * obj=0x036e1f10, void (unsigned int, unsigned int, unsigned int, unsigned short)* method=0x007b85b9, unsigned int a=0, unsigned int b=0, unsigned int c=2, unsigned short d=0) Line 534 + 0xc1 bytes C++
Stronghold_DEBUG.exe!JournaledSignal<void __cdecl(unsigned int,unsigned int,unsigned int,unsigned short)>::trigger(unsigned int a=0, unsigned int b=0, unsigned int c=2, unsigned short d=0) Line 115 + 0x1f bytes C++
Stronghold_DEBUG.exe!_dispatch(HWND__ * hWnd=0x0016066c, unsigned int message=514, unsigned int wParam=0, unsigned int lParam=9503068) Line 286 C++
Stronghold_DEBUG.exe!DispatchNext() Line 539 + 0x15 bytes C++
Stronghold_DEBUG.exe!Win32WindowManager::_process() Line 277 + 0x5 bytes C++
Stronghold_DEBUG.exe!fastdelegate::FastDelegate0<void>::operator()() Line 908 + 0x16 bytes C++
Stronghold_DEBUG.exe!Signal<void __cdecl(void)>::trigger() Line 338 C++
Stronghold_DEBUG.exe!Process::processEvents() Line 53 C++
Stronghold_DEBUG.exe!StandardMainLoop::doMainLoop() Line 468 + 0x5 bytes C++
Stronghold_DEBUG.exe!TorqueMain(int argc=1, const char * * argv=0x01d51e90) Line 35 + 0x5 bytes C++
Stronghold_DEBUG.exe!run(int argc=1, const char * * argv=0x01d51e90) Line 279 + 0xd bytes C++
Stronghold_DEBUG.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * __formal=0x00000000, char * lpszCmdLine=0x00151f3d, HINSTANCE__ * __formal=0x00000000) Line 343 + 0x17 bytes C++
Stronghold_DEBUG.exe!__tmainCRTStartup() Line 263 + 0x2c bytes C
Stronghold_DEBUG.exe!WinMainCRTStartup() Line 182 C
kernel32.dll!7c817077()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
And here's the line (228) it pointed to in the twsurfaceReference.cpp:
dynamic_cast<SimSet*>(Sim::findObject("twSurfaceSet"))->addObject(this);
#19
in Sim.h
in Sim.cpp
You will need to implement the set:
in SimManager.cpp
You willneed to instantiate the named set:
05/17/2009 (7:58 pm)
Ok - problem solved. TwSurfacereference requires a named set also. I didn't include all the instructions for the earlier resources, perhaps I should have. Anyway, I have updated the instructions above to include adding the missing set (twSurfaceSet). The relevant parts are below:in Sim.h
DeclareNamedSet(fxFoliageSet) DeclareNamedSet(twSurfaceSet) // <-- Add this line too
in Sim.cpp
You will need to implement the set:
ImplementNamedSet(fxFoliageSet) ImplementNamedSet(twSurfaceSet) // <-- Add this line too
in SimManager.cpp
You willneed to instantiate the named set:
InstantiateNamedSet(fxFoliageSet); InstantiateNamedSet(twSurfaceSet); //<-- Add this line too
#20
05/18/2009 (7:18 pm)
I added the changes and it works now. Thanks for all the help!
Torque Owner Quinton Delpeche
Gobbo Games
*sigh* I need to get a life. :)