Game Development Community

dev|Pro Game Development Curriculum

fxGrassReplicator TGE 1.4

by Stephan - viKKing - Bondier · 04/30/2006 (3:10 pm) · 5 comments

I found several instances for fxGrassReplicator on the site but none pointed me out to a recent version. The zip file I downloaded contained instruction dated of 2002, so it quickly became evident it wasn't up to date with TGE 1.4.

I supposed some people would be interested in getting an updated version of the installation instructions, so here they are:

- install both .c and .h files in Torque SDK/engine/game/Fx folder.

- Put the function in /example/creator/editor/ObjectBuilderGui.gui [around line 462] ...
function ObjectBuilderGui::buildfxGrassReplicator(%this)

	{

		%this.className = "fxGrassReplicator";

		%this.process();

	}


- Put this in /example/creator/editor/EditorGui.cs in [function Creator::init( %this ) - line 1136]

%Environment_Item[12] = "fxGrassReplicator";
(or use the next number in the sequence [line 1246])


- Put this in /example/common/client/missionDownload.cs in [function clientCmdMissionStartPhase3(%seq,%missionName)] (around line 65)

after codeline 'onPhase2Complete();'.

StartGrassReplication();


- Put this in /engine/console/simBase.h (around line 1266) somewhere in the 'nameSpace Sim' block (put it as the last xxxxSet entry)

DeclareNamedSet(fxGrassSet)  <-- ADD THIS (Note no semi-colon).


- Put this in /engine/console/simBase.cc (around line 19) somewhere in the 'nameSpace Sim' block (put it as the last xxxxSet entry)
ImplementNamedSet(fxGrassSet)  <-- ADD THIS (Note no semi-colon).


- Put this in /engine/console/simManager.cc [function void init()] (around line 341) (put it as the last xxxSet entry)
InstantiateNamedSet(fxGrassSet);  <-- ADD THIS (Note the semi-colon).


I will provide a complete .zip file with all the original files as well as about 8 new grass textures to play with, within a day or two.

I'm very happy to have been able to do that, this is my very first look at Torque and my very first program compiling ever (even if it was only a little hack)!
Gonna pay myself a beer - 1 confidence point earned today. ;-)

Stephan, STef, viKKing, all the same.

#1
04/30/2006 (11:04 pm)
Hey, good job on your first "hack!" Little things like that can still be useful. Thanks a lot actually, that might come in handy at some point. Perhaps you should even submit it as a resource.
#2
05/01/2006 (8:07 am)
I thought there was talk of including this into the engine. Is that not the case? Are there plans to?
#3
05/02/2006 (12:26 am)
@Bryan: dunno. I hope so, it would then be better integrated and wouldn't require new code compiling.

@Andrew: thanks. I'm so what proud of myself. 8-P>


Anyway: here is the .zip file, including 8 new grass shapes, both in grayscales and color version, for people preferring using fxFoliage or FxShape.
All credits to Melv and Bendik.

DOWNLOAD www.jmnos.com/torque/fxGrassTGE1.4.zip
#4
05/02/2006 (12:28 am)
fxFoilageReplicator or is it not the same?
#5
05/29/2006 (10:04 pm)
Im having a wicked time puting this code into my 1.4. Im doing a fresh install to test it on (cancel out my personal code). When I got it to work on my personal code it didnt crash but it didnt place an object in the tree eather. The log mentioned "unable to instantiate fxgrass....)<-something to that effect, when i check the code its being loaded exactly like the fxfoliage so it should work but at least it compiled. Ill get back to you if this works.

Update; Well that didnt work:( heres the error log
exec:warning! found a dso from the future! (editor/newobject.cs.dso)
compiling editor/newObject.cs...
loading compiled script editor/newObject.cs
editor/newObject.cs (0): Unable to instantiate non-conobject class fxGrassReplicator

edit: Fixed it with 1.5 and twsurface. There are bugs but Ill take a crack at figuring it out.