Fable: The Lost Chapters Mod Scene
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Fable TLC » Discussion » Graphics Editing » Effects Discussion
Effects Discussion [message #60542] Wed, 01 December 2010 06:19 Go to next message
Keshire is currently offline  Keshire
Messages: 1266
Registered: July 2005

Administrator
Tearing myself away from minecraft for a few minutes....

04[05:13] <JohnDoe> Hey Kesh, at your convenience I'd love to see what you've got labeled with those effect structs.


I cleaned up the spec you gave me a bit for ease of reading.


I noticed that the unknowns that range from 0-1000 are percentages. value/10. So 1000 = 100%

The ones I messed with caused the sprite to blur, movexyz, and rotate. Just not sure which ones are which since I didn't have time to single them out.

typedef struct CPSCRenderSprite 
{

	zstring		CPSCRenderSprite;
	dword		SectionCRC; 

ubyte Boolean15;

	dword		SpriteName;
	dword		TrailName;

	ubyte		StartColourBGRA[4];
	ubyte		MidColourBGRA[4];
	ubyte		EndColourBGRA[4];

	dword		SpriteType;

//These dwords are percentages for sprite effects. 0-1000
dword Unknown5;
dword Unknown6;
dword Unknown7;
dword Unknown8;
dword Unknown9;
dword Unknown10;
dword Unknown11;
dword Unknown12;
dword Unknown13;
dword Unknown14;
dword Unknown15;
dword Unknown16;

//Sounds??
dword Unknown17;
dword Unknown18;
dword Unknown19;
dword Unknown20;
dword Unknown21;
dword Unknown22;

ubyte Boolean;
ubyte Boolean;
ubyte Boolean;
ubyte Boolean;
ubyte Boolean;
ubyte Boolean;
ubyte Boolean;


	ubyte		SectionTerminator1;

}CPSCRenderSprite;

struct CPSCSpline 
{
	zstring		CPSCSpline;
	dword		CRC2;

ubyte Boolean23;
ubyte Boolean24;
ubyte Boolean25;
float Unknown23;

	dword		SplineUserPointsArraySize;
	float		SplineUserPointsArray[SplineUserPointsArraySize*3];

ubyte Boolean26;

	ubyte		UseSplinePoints; //Not sure

ubyte Boolean28;

	dword		SplineConnectedEndPoints;
	dword 		CRC[SplineConnectedEndPoints];

	ubyte		SectionTerminator2;

}CPSCSpline;

struct CPSCEmitterGeneric 
{
	zstring		CPSCEmitterGeneric;
	dword		CRC;
ubyte Boolean29;
	dword		CRC; //Emitter Type
dword Unknown25;
dword Unknown26;
dword Unknown27;
dword Unknown28;
ubyte Boolean30;
ubyte Boolean31;
ubyte Boolean32;
ubyte Boolean33;
ubyte Boolean34;
ubyte Boolean35;
ubyte Boolean36;
ubyte Boolean37;
ubyte Boolean38;
ubyte Boolean39;
dword Unknown29;
dword Unknown30;
dword Unknown31;
dword Unknown32;
dword Unknown33;
dword Unknown34;
ubyte Boolean40;
ubyte Boolean41;
dword Unknown35;
dword Unknown36;
dword Unknown37;
ubyte Boolean42;
dword Unknown38;
dword Unknown39;
dword Unknown40;
dword Unknown41;
dword Unknown42;
dword Unknown43;
ubyte Boolean43;

	switch(Boolean43)
	{
		case 1:
			float		Unknown44;
			dword		UnknownCount2;
			dword		Unknown45[UnknownCount2*3];
					break;
		default:
					break;
	};

ubyte		SectionTerminator3;
}CPSCEmitterGeneric;

struct CPSCUpdateNormal 
{
zstring CPSCUpdateNormal;
dword CRC4;
ubyte Boolean44;
dword Unknown46;
dword Unknown47;
ubyte Boolean45;
ubyte Boolean46;
ubyte Boolean47;
ubyte Boolean48;
ubyte Boolean49;
ubyte Boolean50;
ubyte Boolean51;
ubyte Boolean52;
ubyte Boolean53;
ubyte Boolean54;
ubyte Boolean55;
ubyte Boolean56;
ubyte Boolean57;
ubyte Boolean58;
ubyte Boolean59;
ubyte Boolean60;
ubyte Boolean61;
ubyte Boolean62;
ubyte Boolean63;
float Unknown48;
float Unknown49;
float Unknown50;
float Unknown51;
float Unknown52;
float Unknown53;
float Unknown54;
float Unknown55;
float Unknown56;
float Unknown57;
float Unknown58;
float Unknown59;
float Unknown60;
float Unknown61;
float Unknown62;
float Unknown63;
float Unknown64;
float Unknown65;
float Unknown66;
float Unknown67;
float Unknown68;
float Unknown69;
float Unknown70;
float Unknown71;
float Unknown72;
float Unknown73;
float Unknown74;
float Unknown75;
float Unknown76;
float Unknown77;
float Unknown78;
float Unknown79;
ubyte SectionTerminator4;
ubyte EffectsTerminator;
}CPSCUpdateNormal;


//32bit switch is BROKEN!!
typedef struct Section
{
	//zstring		SectionName;
	dword		SectionCRC; 

	switch	(SectionCRC)
	{
		case 2362561053:
					CPSCRenderSprite	CPSC;
								break;

		default:
								break;
	};


}Section;



struct header 
{
	dword		Unknown1;
	zstring		EffectName;
	ubyte		Booleans[7];
	float		Floats[3];

	dword		Unknown2;
	dword		Unknown3;
	dword		Unknown4;

	ubyte		Booleans[5];


	dword		effectcount;
}header;

struct effect 
{
	zstring		EffectName;

	ubyte		Booleans[2];

	float		ScaleXYZ[3];

	dword		SectionCount;
}effect;



Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.

[Updated on: Wed, 01 December 2010 06:22]

Report message to a moderator

Re: Effects Discussion [message #60544 is a reply to message #60542] Wed, 01 December 2010 11:01 Go to previous messageGo to next message
JohnDoe is currently offline  JohnDoe
Messages: 3007
Registered: October 2007

Retired
I've dicked around with the effects a few times in the past and I'm kicking myself now for not documenting anything.

The only thing I did hold on to was a slimmed-down effect (attached) that includes just the essentials for flourish/multistrike/augment-type effects, I nulled out everything I could null out and still have the effect work. All of the booleans that are switched on are necessary to keep the effect working, at least one of them keeps it permanent (as opposed to augment effects, which die out), not sure which one. At least one of the booleans that are switched off must remain switched off, and again I have no idea which. I don't even know why it has to be switched off.

Usage note.


The slimmed effect will be useful when noting boolean differences between it and similar type effects. I'll have a lot of free time in a day or two, I can take some time to figure out some stuff. If nothing else I'll at least waste a few hours cursing Lionhead, BreakPoint, etc., the usual.
  • Attachment: BAREBONES
    (Size: 0.59KB, Downloaded 442 times)

[Updated on: Wed, 01 December 2010 11:31]

Report message to a moderator

Re: Effects Discussion [message #60558 is a reply to message #60544] Thu, 02 December 2010 02:11 Go to previous messageGo to next message
JohnDoe is currently offline  JohnDoe
Messages: 3007
Registered: October 2007

Retired
And a cool struct to start out my day. For the purposes of having a fully functional struct, this is perfect. Added a switch that only grabs first byte of the CRC to identify the section, which works out because the CRCs for the ten sections all start with a different byte.

But, for the purposes of making quick edits, this is just more hassle. Unless it's made to be far more efficient so that less clicking and moving around is needed to navigate the file, it is better to continue with the existing structs.
  • Attachment: effects.hsl
    (Size: 5.40KB, Downloaded 508 times)
Re: Effects Discussion [message #60571 is a reply to message #60558] Thu, 02 December 2010 05:24 Go to previous messageGo to next message
Keshire is currently offline  Keshire
Messages: 1266
Registered: July 2005

Administrator
JohnDoe wrote on Thu, 02 December 2010 04:11

And a cool struct to start out my day. For the purposes of having a fully functional struct, this is perfect. Added a switch that only grabs first byte of the CRC to identify the section, which works out because the CRCs for the ten sections all start with a different byte.

But, for the purposes of making quick edits, this is just more hassle. Unless it's made to be far more efficient so that less clicking and moving around is needed to navigate the file, it is better to continue with the existing structs.


More efficient until you come up on an effect that has a shitload of sections in it. And like five or six effect stages. Razz

I like wrapping things into nice little packages to open. It's in the spirit of x-mas. XD



Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
Re: Effects Discussion [message #60572 is a reply to message #60571] Thu, 02 December 2010 06:05 Go to previous message
JohnDoe is currently offline  JohnDoe
Messages: 3007
Registered: October 2007

Retired
Keshire wrote on Thu, 02 December 2010 07:24

More efficient until you come up on an effect that has a shitload of sections in it. And like five or six effect stages. Razz
Ah, very good point. So far I've only used it on that barebones effect, which is too simple to appreciate the organization.

Edit: Just going to collect my findings here.

Dwords.


Boolean Crash Tests


Stuff to look for.


Floats (to do)


Update: Just remembered (because I'm absent-minded and have a ten-second short term memory) that there are some variable names in the wiki. I don't know if they're complete, but they'll help me label some of these things.

Apologies for the night shots, I made the assumption it would be easier to notice changes in the effects, but it's hard on the eyes. Also, more apologies for having my WIP costume in the pics, I keep forgetting to remove it when testing. Should probably just make it so it doesn't spawn with the Hero.

[Updated on: Thu, 02 December 2010 16:46]

Report message to a moderator

Previous Topic: Help testing a mesh
Next Topic: Changing where the snow falls.
Goto Forum:
  


Current Time: Fri Apr 26 11:39:56 PDT 2024

Total time taken to generate the page: 0.02206 seconds