Jump to content

Changing Force Aura fx (Sense, Protection, Rage, etc)


Recommended Posts

We all know, that most things can be easily changed in JA, including lightsabers, weapons effects, skins, shaders, textures and much more. I wonder, if it's possible to change the aura of the characters and objects, when you use Force sense to see through walls, those of enemies, neutrals, allies and items.

 

shot0192_zpseb82ec6d.jpg

 

The same applies to the effect, which applies to the Player or NPC, when he activates a certain Force power on himself, like Force rage or Force Rage, or similar like these.

 

The question is, where is this data stored inside the game? Is it a shader, then which one? I looked through a lot of files, but found nothing, what might be responsible for this aspect of the Force. =) I've experimented with so many things in JA and JO, and yet "this one eludes me. It must be important" ©

Omicron likes this
Link to comment

for change effects of weapons and force power like rage, push, pull, saber clash efx, lightning, drain,mindtrick,

Yu need effected as tool. the data are stored on assest.PK3 file and in the effects folder: force folder for force efx, and the folder with weapons name have the efx of the weapons. efx, files can also edit \ appended with notepad or notepad ++ :D

for change force sight, disruptor sniper mode , force protect and absorb... this is really hard. i not know exactly where are the shader and the textures of that's powerl, also, grip and push \ pull are blur effects and yu need to edit the sprite of the shader used for generate. there is NOT an efx file for grip, protect, abosrb, sight and for the disruptor alt attack sniper modality. but the sprites are allocated in gfx folder. gfx \ sabers yu find the sprites of the lightsabers. gfx \ effects\protectionshield i think is for force protection, for force abosrb i not know. for disruptor shot yu need to edit gfx\effects\yellowline or something like that-  . however., they are on gfx/effects. gfx/2d allocate the sight shell and the sniper aim components. be careful tothe alpha channel, yu need tga or png immagefor edit that and something like photoshop or paintshop pro.

for hard editing of force protect, absorb, grip, push, pull, sight efx: the unique is use cmake and visual c studio for scroll the SP code game or the MP codemp file, for mp the efx shoul be on weaponinit and in w_force files. for single player  on the WP_saber.cpp shoul be also the parameter for efx and sound of force power, IMHO. i am not much sure of that, because i have not again edit effect wirth the code, but i have edit all weapons effect for my fantasy mod. for weapons is easy. for the force power not much, some power shader are setted by the code, and there is not an external efx file for protect, absorb, grip and sight and push and pull. the pushblur.efx it's for the animation of the BOTH_VICTORY_STAFF.

Link to comment

After you make, can yu told here, how yu have done? i am very interessed: i am making a mod about Legacy of Kain. My force sight is good, is replace by Light spell of blodo omen so the aura is yellow and glowing, like a revelation enchantment. 

But i Need to edit the protect and absorb shield for make absorb purple and protect blue (like absorb) . so if you know how to make, thanks a lot. :)

Link to comment

It's actually Olgo, who found the effect. At least one of them, which is effects/forceprotect, can be changed with ease. The thing is that you are limited to the color, or so it seems. Thus you can't make all allies be colored with blue or so. But you can change the way it looks.

 

I plan to look more into this, and will post any new info on the matter here later.

Link to comment

mmm, maybe i understood . when i watch the code some month ago, i watch some parameter of the code about forceprotect shader. i think if someone want to change the color of force protect, need to edit the code line of shader RGB alteration by a value of green to a value of blue or other, same for absortb. if i remember correct the parameters are in the w_force file of codemp for multiplayter and in the wp_saber.cpp in SP. in that file are setted also force powers efx, sounds, etc etc.

:) look at coding section , there is an old my topic with some question about coding. atmoment i am ending a lot of maps for my mod, so for code i make later. see ya! :D

Link to comment

We've already changed the effect, and I am soooo glad, we've made it for our mod. The game is just played differently, because nothing spoils now the model of your character, or the appearance of your enemies, which are otherwise almost unrecognizable.

Link to comment

In the Code you can change the colors of individual classes in

 

void CG_AddForceSightShell( refEntity_t *ent, centity_t *cent )

 

I did this for the SJE 



/*
===============
CG_AddForceSightShell

Adds the special effect
===============
*/
extern void CG_AddHealthBarEnt( int entNum );
void CG_AddForceSightShell( refEntity_t *ent, centity_t *cent )
{
	ent->customShader = cgs.media.forceShell;
	ent->renderfx &= ~RF_RGB_TINT;
	// See through walls.
	ent->renderfx |= (RF_MORELIGHT|RF_NODEPTH);

	if ( (cent->currentState.eFlags&EF_FORCE_VISIBLE) 
		|| (cent->currentState.eType == ET_PLAYER && cent->gent && cent->gent->message) )
	{		
		ent->shaderRGBA[0] = 0;
		ent->shaderRGBA[1] = 0;
		ent->shaderRGBA[2] = 255;
		ent->shaderRGBA[3] = 254;

		cgi_R_AddRefEntityToScene( ent );
		return;
	}

	ent->shaderRGBA[0] = 210;
	ent->shaderRGBA[1] = 145;
	ent->shaderRGBA[2] = 55;

	
	team_t team = TEAM_NEUTRAL;
	if ( cent->gent && cent->gent->client )
	{
		team = cent->gent->client->playerTeam;
	}
	else if ( cent->gent->owner )
	{
		if ( cent->gent->owner->client )
		{
			team = cent->gent->owner->client->playerTeam;
		}
		else
		{
			team = cent->gent->owner->noDamageTeam;
		}
	}
	switch ( team )
	{
	case TEAM_ENEMY:
		if ( cent->gent->client->NPC_class == CLASS_DESANN
			|| cent->gent->client->NPC_class == CLASS_SHADOWTROOPER
			|| cent->gent->client->NPC_class == CLASS_TAVION
			|| cent->gent->client->NPC_class == CLASS_ALORA
			|| cent->gent->client->NPC_class == CLASS_REBORN )
		{
			ent->shaderRGBA[0] = 255;
			ent->shaderRGBA[1] = 120;
			ent->shaderRGBA[2] = 255;
		}
		else if ( cent->gent->client->NPC_class == CLASS_SBD
			|| cent->gent->client->NPC_class == CLASS_ASSASSIN_DROID
			|| cent->gent->client->NPC_class == CLASS_BATTLEDROID
			|| cent->gent->client->NPC_class == CLASS_DROIDEKA
			|| cent->gent->client->NPC_class == CLASS_SABER_DROID )
		{
			ent->shaderRGBA[0] = 100;
			ent->shaderRGBA[1] = 90;
			ent->shaderRGBA[2] = 160;
		}
		else
		{
			ent->shaderRGBA[0] = 255;
			ent->shaderRGBA[1] = 50;
			ent->shaderRGBA[2] = 50;
		}
		break;
	case TEAM_PLAYER:
		if ( cent->gent->client->NPC_class == CLASS_JEDI
			|| cent->gent->client->NPC_class == CLASS_LUKE
			|| cent->gent->client->NPC_class == CLASS_KYLE )
		{
			ent->shaderRGBA[0] = 0;
			ent->shaderRGBA[1] = 120;
			ent->shaderRGBA[2] = 0;
		}
		else if ( cent->gent->client->NPC_class == CLASS_R2D2
			|| cent->gent->client->NPC_class == CLASS_R5D2
			|| cent->gent->client->NPC_class == CLASS_PROTOCOL )
		{
			ent->shaderRGBA[0] = 255;
			ent->shaderRGBA[1] = 255;
			ent->shaderRGBA[2] = 230;
		}
		else if ( cent->gent->client->NPC_class == CLASS_JAN )
		{
			ent->shaderRGBA[0] = 125;
			ent->shaderRGBA[1] = 255;
			ent->shaderRGBA[2] = 230;
		}
		else
		{
			ent->shaderRGBA[0] = 75;
			ent->shaderRGBA[1] = 75;
			ent->shaderRGBA[2] = 255;
		}
		break;
	case TEAM_FREE:
		if ( cent->gent && cent->gent->client )
		{
			if ( cent->gent->client->NPC_class == CLASS_TUSKEN
				|| cent->gent->client->NPC_class == CLASS_RANCOR
				|| cent->gent->client->NPC_class == CLASS_WAMPA
				|| cent->gent->client->NPC_class == CLASS_SAND_CREATURE )
			{
				ent->shaderRGBA[0] = 255;
				ent->shaderRGBA[1] = 120;
				ent->shaderRGBA[2] = 0;
			}
		}
		break;
	}

	if ( g_entities[0].client->ps.forcePowerLevel[FP_SEE] > FORCE_LEVEL_2 )
	{//TEST: level 3 also displays health
		if ( cent->gent && cent->gent->health > 0 && cent->gent->max_health > 0 )
		{//draw a health bar over them
			CG_AddHealthBarEnt( cent->currentState.clientNum );
		}
	}

	//if ( g_entities[0].client->ps.forcePowerLevel[FP_SEE] < FORCE_LEVEL_2 )
	//{ //only level 2+ can see players through walls
	//	ent->renderfx &= ~RF_NODEPTH;
	//}
	
	

	cgi_R_AddRefEntityToScene( ent );
}

 The end result is this for the classes 

 

 

http://www.moddb.com/mods/serenitysabersystems/images/force-class-sense

 

 

This allows you to see the different classes in different colors.

Link to comment

Amazing!!!!! @@Serenity937 Do you know if There is a way for make something like that for NPC Classes and Team also for force PROTECT and ABSORB shield? so i can make different color shields for humand mages and vampires! :D

 

 

Well i haven't done anything with PROTECT or ABSORB in SJE myself, only the CLASS SENSE but i think its possibly a good idea to add some variety.

 

 

Ill look in to this further  but for now i can tell you your answer probably lies in

 

cg_players.cpp 

 

start in here

void CG_AddRefEntityWithPowerups( refEntity_t *ent, int powerups, centity_t *cent )
{

 and the area your going to need to work with will probably be here

if ( (cent->gent->client->ps.forcePowersActive & (1 << FP_PROTECT))
		&& (cent->gent->client->ps.forcePowersActive & (1 << FP_ABSORB)) )
	{//using both at once, save ourselves some rendering
		//protect+absorb is represented by cyan..
		ent->shaderRGBA[0] = 0;
		ent->shaderRGBA[1] = 255;
		ent->shaderRGBA[2] = 255;
		ent->shaderRGBA[3] = 254;

		ent->renderfx &= ~RF_RGB_TINT;
		//ent->renderfx &= ~RF_FORCE_ENT_ALPHA;
		if ( cent->gent->client->ps.forcePowerLevel[FP_PROTECT] > FORCE_LEVEL_1
			|| cent->gent->client->ps.forcePowerLevel[FP_ABSORB] > FORCE_LEVEL_1 )
		{
			ent->customShader = cgs.media.forceShell;
		}
		else
		{
			ent->customShader = cgs.media.playerShieldDamage;
		}
		
		cgi_R_AddRefEntityToScene( ent );
	}
	else if ( cent->gent->client->ps.forcePowersActive & (1 << FP_PROTECT) )
	{ //protect is represented by green..
		ent->shaderRGBA[0] = 0;
		ent->shaderRGBA[1] = 255;
		ent->shaderRGBA[2] = 0;
		ent->shaderRGBA[3] = 254;

		ent->renderfx &= ~RF_RGB_TINT;
		//ent->renderfx &= ~RF_FORCE_ENT_ALPHA;
		if ( cent->gent->client->ps.forcePowerLevel[FP_PROTECT] > FORCE_LEVEL_1 )
		{
			ent->customShader = cgs.media.forceShell;
		}
		else
		{
			ent->customShader = cgs.media.playerShieldDamage;
		}
		
		cgi_R_AddRefEntityToScene( ent );
	}
	else if ( cent->gent->client->ps.forcePowersActive & (1 << FP_ABSORB))
	{ //absorb is represented by blue..
		ent->shaderRGBA[0] = 0;
		ent->shaderRGBA[1] = 0;
		ent->shaderRGBA[2] = 255;
		ent->shaderRGBA[3] = 254;

		ent->renderfx &= ~RF_RGB_TINT;
		//ent->renderfx &= ~RF_FORCE_ENT_ALPHA;
		if ( cent->gent->client->ps.forcePowerLevel[FP_ABSORB] > FORCE_LEVEL_1 )
		{
			ent->customShader = cgs.media.forceShell;
		}
		else
		{
			ent->customShader = cgs.media.playerShieldDamage;
		}
		
		cgi_R_AddRefEntityToScene( ent );
	}

the shaders that support the effect can be found in effects.shader under the heading gfx/misc/forceprotect

 

use a small else if tree for such simple instances to get the desired effect and just alter the RGB number to your desired color.

 

 

I will post an example when i get time later if you need more help

 

Hope this helps :winkthumb:

Asgarath83 likes this
Link to comment

Aaawww thanks so mech! is terrible to add a new force power on the game, so the better way is to customize code of existings powerrs, so the protects of the vsampires can be really scarry to see, and the portect of humans or sarafan warrior can be somethjing like a sacred aura. thanks so much!!! :D Okay, if yu make some test about that in your mod and you have more suggestion i am glad to learn by you. :) altering effects is one of my first code attempts for my mod. :)

Link to comment

Aaawww thanks so mech! is terrible to add a new force power on the game, so the better way is to customize code of existings powerrs, so the protects of the vsampires can be really scarry to see, and the portect of humans or sarafan warrior can be somethjing like a sacred aura. thanks so much!!! :D Okay, if yu make some test about that in your mod and you have more suggestion i am glad to learn by you. :) altering effects is one of my first code attempts for my mod. :)

 

Well your very welcome  :winkthumb:

 

Once you get the general idea of what you can or want to do with this color thing you can use a mix of force levels or class, here is a small example for you to use as you wish, alter the RGB colors / class or Fp Level how you wish until you get the effect you like. 

 

 

This example deals with ABSORB but you could theoretically add an "AURA" for any FP like when speeding ,or for example Saber Defense low fp glow by adding a fp check similar to "ps.forcePower < 30" for example

else if ( cent->gent->client->ps.forcePowersActive & (1 << FP_ABSORB))
	{ //absorb is represented by blue..  //Normally but not anymore
		if ( cent->gent->client->NPC_class == CLASS_DESANN
			|| cent->gent->client->NPC_class == CLASS_SHADOWTROOPER
			|| cent->gent->client->NPC_class == CLASS_TAVION
			|| cent->gent->client->NPC_class == CLASS_ALORA
			|| cent->gent->client->NPC_class == CLASS_REBORN )
		{
			ent->shaderRGBA[0] = 255; //add any number from 0-255 to use your own color
			ent->shaderRGBA[1] = 120; //add any number from 0-255 to use your own color
			ent->shaderRGBA[2] = 255; //add any number from 0-255 to use your own color
		}
		else if ( cent->gent->client->NPC_class == CLASS_SBD
			|| cent->gent->client->NPC_class == CLASS_ASSASSIN_DROID
			|| cent->gent->client->NPC_class == CLASS_BATTLEDROID
			|| cent->gent->client->NPC_class == CLASS_DROIDEKA
			|| cent->gent->client->NPC_class == CLASS_SABER_DROID )
		{
			ent->shaderRGBA[0] = 100; //add any number from 0-255 to use your own color
			ent->shaderRGBA[1] = 90;  //add any number from 0-255 to use your own color
			ent->shaderRGBA[2] = 160;  //add any number from 0-255 to use your own color
		}
		else if ( cent->gent->client->NPC_class == CLASS_JEDI
			|| cent->gent->client->NPC_class == CLASS_LUKE
			|| cent->gent->client->NPC_class == CLASS_KYLE )
		{
			ent->shaderRGBA[0] = 0;   //add any number from 0-255 to use your own color
			ent->shaderRGBA[1] = 120; //add any number from 0-255 to use your own color
			ent->shaderRGBA[2] = 0;   //add any number from 0-255 to use your own color
		}
		else if ( cent->gent->client->NPC_class == CLASS_R2D2
			|| cent->gent->client->NPC_class == CLASS_R5D2
			|| cent->gent->client->NPC_class == CLASS_PROTOCOL )
		{
			ent->shaderRGBA[0] = 255;
			ent->shaderRGBA[1] = 255;
			ent->shaderRGBA[2] = 230;
		}
		else if ( cent->gent->client->NPC_class == CLASS_JAN )// Jan gets her own because she is my bitch and i need to know where bitch is all the time
		{
			ent->shaderRGBA[0] = 125; 
			ent->shaderRGBA[1] = 255;
			ent->shaderRGBA[2] = 230;
		}
		else if ( cent->gent->client->NPC_class == CLASS_PLAYER ) //Oh shit its me ?
		{
			if ( cent->gent->client->ps.forcePowerLevel[FP_ABSORB] > FORCE_LEVEL_2 ) // if i have fp 3 i get this color
			{
				ent->shaderRGBA[0] = 120;
				ent->shaderRGBA[1] = 190;
				ent->shaderRGBA[2] = 255;
				ent->shaderRGBA[3] = 254;
			}
			else //if i have less than FP 3 i get this color
			{
				ent->shaderRGBA[0] = 0;
				ent->shaderRGBA[1] = 120;
				ent->shaderRGBA[2] = 0;
			}
		}
		else //this just insures i didnt miss anybody
		{
			if ( cent->gent->client->ps.forcePowerLevel[FP_ABSORB] > FORCE_LEVEL_2 )
			{
				ent->shaderRGBA[0] = 0;
				ent->shaderRGBA[1] = 0;
				ent->shaderRGBA[2] = 255;
				ent->shaderRGBA[3] = 254;
			}
			else 
			{
				ent->shaderRGBA[0] = 0;
				ent->shaderRGBA[1] = 120;
				ent->shaderRGBA[2] = 0;
			}
		}

		ent->renderfx &= ~RF_RGB_TINT;
		if ( cent->gent->client->ps.forcePowerLevel[FP_ABSORB] > FORCE_LEVEL_1 )
		{
			ent->customShader = cgs.media.forceShell;
		}
		else
		{
			ent->customShader = cgs.media.playerShieldDamage;
		}
		
		cgi_R_AddRefEntityToScene( ent );
	}

hope this helps get you going with this. ;)

Asgarath83 likes this
Link to comment

Very interessing! Very very interessing! So i can also make the force lightning of different colors when they are shooted at second of shbooter classes? maybe the "Hyldens class" lightning can be green :D and some other can shoots yellow. shold be very nice! :D

Also for Force Drain! Vampires can drain the blood so not need to recolorize my effect but the Reavers wraith like raziel can add in their class a "blue aura" on the drain. so can seee like draining the soul instead of the blood. :)

Link to comment

Very interessing! Very very interessing! So i can also make the force lightning of different colors when they are shooted at second of shbooter classes? maybe the "Hyldens class" lightning can be green :D and some other can shoots yellow. shold be very nice! :D

Also for Force Drain! Vampires can drain the blood so not need to recolorize my effect but the Reavers wraith like raziel can add in their class a "blue aura" on the drain. so can seee like draining the soul instead of the blood. :)

 

 

Well if i understand you correctly ..Urm..

 

Making force lightning different colors for different classes would be handled by adding new Lightning effects firstly in code and then secondly  the effect its self. sorry i dont know "Hyldens class" but you would need to look into 

 

cg_weapons.cpp

cgs.effects.forceLightning		= theFxScheduler.RegisterEffect( "force/lightning" );
cgs.effects.forceLightningWide	        = theFxScheduler.RegisterEffect( "force/lightningwide" );

adding your new lightning effect here first

 

then Activate or Action your new effect here in

 

cg_players.cpp

if ( cent->gent->client->ps.forcePowersActive&(1<<FP_LIGHTNING) )
			{//doing the electrocuting
				//FIXME: if the target is absorbing or blocking lightning w/saber, draw a beam from my hand to his (hand?chest?saber?)
				vec3_t tAng, fxDir;
				VectorCopy( cent->lerpAngles, tAng );
				if ( cent->gent->client->ps.forcePowerLevel[FP_LIGHTNING] > FORCE_LEVEL_2 )
				{//arc
					vec3_t	fxAxis[3];
					AnglesToAxis( tAng, fxAxis );
					theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
					if ( cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING
						|| cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING_START
						|| cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING_HOLD
						|| cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING_RELEASE )
					{//jackin' 'em up, Palpatine-style
						theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
					}
				}
				else
				{//line
					AngleVectors( tAng, fxDir, NULL, NULL );
					theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
					if ( cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING
						|| cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING_START
						|| cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING_HOLD
						|| cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING_RELEASE )
					{//jackin' 'em up, Palpatine-style
						theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handRPoint, fxDir );
					}
				}
			}

the damage effect of lightning would start here

 

wp_saber.cpp

void ForceLightningDamage( gentity_t *self, gentity_t *traceEnt, vec3_t dir, float dist, float dot, vec3_t impactPoint, int saberNum, int bladeNum )
{




traceEnt->s.powerups |= ( 1 << PW_SHOCKED );

Its the PW_SHOCKED part that plays the effect . it can be altered or messed with here

 

cg_players.cpp

// Electricity
	//------------------------------------------------
	if ( (powerups & ( 1 << PW_SHOCKED )) ) 
	{
		int	dif = gent->client->ps.powerups[PW_SHOCKED] - cg.time;

		if ( dif > 0 && random() > 0.4f )
		{
			// fade out over the last 500 ms
			int brightness = 255;
			
			if ( dif < 500 )
			{
				brightness = floor((dif - 500.0f) / 500.0f * 255.0f );
			}

			ent->renderfx |= RF_RGB_TINT;
			ent->shaderRGBA[0] = ent->shaderRGBA[1] = ent->shaderRGBA[2] = brightness;
			ent->shaderRGBA[3] = 255;

			if ( rand() & 1 )
			{
				ent->customShader = cgs.media.electricBodyShader;	
			}
			else
			{
				ent->customShader = cgs.media.electricBody2Shader;
			}

			cgi_R_AddRefEntityToScene( ent );

			if ( random() > 0.9f )
				cgi_S_StartSound ( ent->origin, gent->s.number, CHAN_AUTO, cgi_S_RegisterSound( "sound/effects/energy_crackle.wav" ) );
		}
	} 

so you can see messing with the lightning effect is possible but a little more complicated than protect, see rage or absorb. But the principle of code remains the same of classes or force levels ,easily done at a basic level through an else if tree.

 

The hardest part (not hard at all really) would be adding new variations of lightning  or different colored lightning effects and then letting this raziel guy use it through a class addition...

Link to comment

Mmm, i think it's better add a new force power called "Soul Drain", maybe is more easy that make the differential color for class for the attack powers. it'more easy to make that with effect ed.

however no, LOL. In my mod i align every class (only theorically) to the nosgoth creatures. so example: class jedi? sarafan human warrior. class Reborn? Vampires (generic) Swamptroooper class (cannot drown) rahabim vampires. (are immune to water) rockettrooper class? elemental air creatures.... etc etc etc. my coding trouble need 3 step:

1: changing effects for some weapons SP like blaster pistol briar pistol and jawa,., they have the same efx  >_> also many droid weapons use same efx of other, i wanna every weapon do dmg of a different element (i edit the efx after with effected) so i need to change some address for efx of the weapons.

2: cucstom class damage: like demp2 deadly for droid and unuseful against living enemies, i need to make the same thing for other weapisn, so a earth shoot weapon can be deadly for a enemy of element fire, the "light" weapons can be deadly for the vampires. the darks weapons are strongs against humans, the fire weapons against ice and water monster etc etc.

3: some new force power for more variety in the attack. i need the same thing, not any modification for damage of effect or the physics. simply i need some custom "rage" powers for different enemies classes. it's the same, identic power, but i can make different efx, so the FP_RAGE has an effect, the FP_RAGE2 another, FP_RAGE3 another again etc etc.

the same thing i need for the attacks.

the unique new effect that i need to encodes in JA are the following spells:

Stun: stun the enemy for a few second like force mindtrick level

level 1: enemie be stunned like mindtrick level 1.

level 2: enemies be stunned more strong.

level 3: enemy get paralyse (a spell called incapacitate, that require an aura efx like protect for statis duration, like in KOTOR game) enemy cannot atk, move, or do any animation and be freeze for some lot of second. using force absorb or force push can nullify the statis state.

 

Inpire hate: it's like mindtrick level 3: the enemies get to TEAM_PLAYER and fight for player for a lot amount of time.

i think the Rank can determinaze the duration of the changing of teammeate. at level 3 the NPC can change team for permanent time. LOL. sure, function only with human and weak mind enemies, not for undead, demons etc etc.

 

FP_NPCheal: it's like the teamheal of multiplayer, but can heal the allied NPC targetted  by player, not the player itself.

 

i need just that's new powers, for other, i can simply make a copy of the existing powers.

The problem is: in that site there is a tutorial of eezstreet for how to make a new force power. but is for MP. I see you know very good the JASP code so can i ask you tu make a tutorial for changing the aura efx and making new force power customizable in the sound and efx or physics? i have a desperate need of that for know how i need to manage the code for making that's thing.

for the differenzial dmg and effects of weapons i am okay, and i not need to create new weapons, because cannot be mopre of 32 weapons in the game and in the SP there are already 28 weapons.

The bad problem of all that it's: i need that a new force power can be used by player, obvious, and that require a modification of icarus for add the new line of command in the icarus script.

also, the new power need to be available by NPCS, so need to interface also with NPC and SAB files (for force restrict) so create a new force power is very difficult. :(

II not know if you can help me with that or making a tutorial for that's site about that but if you make i can have the idea more clear about my modding work.

now i am ending a map. when i end, i think is time to learn something of coding.

Can yu help me a lot @@Serenity937? Can you make some tutorial about the force power customization on the SP code or how to create a new force power working for NPC files , sab file forcerestrict and player with icarus scripts? I know, that need a strong alteration and customizzation also of behaved. :\ 

uff, hacking the Force it's rthe more diffucult thing of Jedi Academy. :\

 

However the Hylden class not exist LOL. the Hyldens are creatures of Nosgoth,. i am making a conversion of JA about legacy of kain saga. :) the Hyldens are a demonic, exiled race enemy of the ancient vampires.

Link to comment

{Quote}

All that stuff Asgarth83 just said... :o

 

Well that seems like a lot of stuff you want to do, and some of it is going to be difficult for a beginner.

 

I'm sorry i don't really have time to get my head in to a  "new" project . the only advice i can give you is "think small, start small."

 

I really wish i had more time to help you but i just don't.I can offer small advice to get you started . like with FP_LIGHTNING but adding new force powers is a bigger task that would need a lot of code work , new effects to be made , new sounds and more. 

 

Maybe you could ask one of the other known coders who may have more time to help you than i do.But be careful who you ask, because some coders can be "touchy" and just flame your ass for asking!

Or even open a new post to ask if anybody wants to join your mod team and stress you need a coder! :ph34r:

 

 
1: changing effects for some weapons SP like blaster pistol briar pistol and jawa,., they have the same efx  >_> also many droid weapons use same efx of other, i wanna every weapon do dmg of a different element (i edit the efx after with effected) so i need to change some address for efx of the weapons.

 

Changing the address of weapon effects 

 

This would mean adding a new weapon function starting in the weapons.dat 

 

muzzleEffect briar_pistol/muzzle_flash
missileFuncName briar_pistol_func
 
then adding the new function in code 
g_weaponload.cpp
// Table used to attach an extern missile function string to the actual cgame function
func_t	funcs[] =
{
	{"bryar_func",			FX_BryarProjectileThink},
	{"bryar_alt_func",		FX_BryarAltProjectileThink},
	{"blaster_func",		FX_BlasterProjectileThink},
	{"blaster_alt_func",	FX_BlasterAltFireThink},
	{"bowcaster_func",		FX_BowcasterProjectileThink},
	{"repeater_func",		FX_RepeaterProjectileThink},
	{"repeater_alt_func",	FX_RepeaterAltProjectileThink},
	{"demp2_func",			FX_DEMP2_ProjectileThink},
	{"demp2_alt_func",		FX_DEMP2_AltProjectileThink},
	{"flechette_func",		FX_FlechetteProjectileThink},
	{"flechette_alt_func",	FX_FlechetteAltProjectileThink},
	{"rocket_func",			FX_RocketProjectileThink},
	{"rocket_alt_func",		FX_RocketAltProjectileThink},
	{"conc_func",			FX_ConcProjectileThink},
	{"emplaced_func",		FX_EmplacedProjectileThink},
	{"turret_func",			FX_TurretProjectileThink},
	{"atstmain_func",		FX_ATSTMainProjectileThink},
	{"atst_side_alt_func",	FX_ATSTSideAltProjectileThink},
	{"atst_side_main_func",	FX_ATSTSideMainProjectileThink},
	{"tusk_shot_func",		FX_TuskenShotProjectileThink},
	{"noghri_shot_func",	FX_NoghriShotProjectileThink},
	{"briar_pistol_func",			FX_briar_pistolProjectileThink},
	{"briar_pistol_alt_func",		FX_briar_pistolAltProjectileThink},
	{NULL,					NULL}
};

FX_brayar_pistol.cpp

FX_BryarProjectileThink
-------------------------
*/
void FX_briar_pistolProjectileThink(  centity_t *cent, const struct weaponInfo_s *weapon )
{
	vec3_t forward;

	if ( VectorNormalize2( cent->gent->s.pos.trDelta, forward ) == 0.0f )
	{
		if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f )
		{
			forward[2] = 1.0f;
		}
	}

	// hack the scale of the forward vector if we were just fired or bounced...this will shorten up the tail for a split second so tails don't clip so harshly
	int dif = cg.time - cent->gent->s.pos.trTime;

	if ( dif < 75 )
	{
		if ( dif < 0 )
		{
			dif = 0;
		}

		float scale = ( dif / 75.0f ) * 0.95f + 0.05f;

		VectorScale( forward, scale, forward );
	}

	if ( cent->gent && cent->gent->owner && cent->gent->owner->s.number > 0 )
	{
		theFxScheduler.PlayEffect( "briar_pistol/npcshot", cent->lerpOrigin, forward );
	}
	else
	{
		theFxScheduler.PlayEffect( cgs.effects.briar_pistolShotEffect, cent->lerpOrigin, forward );
	}
}

Basicly follow all the traces of the effect you want to change in the code . in this example briar_pistolShotEffect then make a "renamed" copy and change the effect in

cg_weapons.cpp

case WP_BRYAR_PISTOL:
		cgs.effects.briar_pistolShotEffect			= theFxScheduler.RegisterEffect( "briar_pistol/shot" );
											          theFxScheduler.RegisterEffect( "briar_pistol/NPCshot" );

2: cucstom class damage: like demp2 deadly for droid and unuseful against living enemies, i need to make the same thing for other weapisn, so a earth shoot weapon can be deadly for a enemy of element fire, the "light" weapons can be deadly for the vampires. the darks weapons are strongs against humans, the fire weapons against ice and water monster etc etc.

 

custom class damge.

 

there are already examples of this in the code you can use as guidelines start here

 

weapons.h

// Concussion Rifle
//---------
//primary
#define	CONC_VELOCITY				3000
#define	CONC_DAMAGE					150
#define CONC_NPC_SPREAD				0.7f
#define	CONC_NPC_DAMAGE_EASY		15
#define	CONC_NPC_DAMAGE_NORMAL		30
#define	CONC_NPC_DAMAGE_HARD		50
#define	CONC_SPLASH_DAMAGE			50
#define	CONC_SPLASH_RADIUS			256
//alt
#define CONC_ALT_DAMAGE				225//100
#define CONC_ALT_NPC_DAMAGE_EASY	10
#define CONC_ALT_NPC_DAMAGE_MEDIUM	20
#define CONC_ALT_NPC_DAMAGE_HARD	30

Follow the examples of how the code increases the damage and add a class definition for it.

 

 

level 3: enemy get paralyse (a spell called incapacitate, that require an aura efx like protect for statis duration, like in KOTOR game) enemy cannot atk, move, or do any animation and be freeze for some lot of second. using force absorb or force push can nullify the statis state.

 

this is a biggie

 

look in to 

 

bg_public.h

MOVE MODULE

The pmove code takes a player_state_t and a usercmd_t and generates a new player_state_t
and some other output data.  Used for local prediction on the client game and true
movement on the server game.
===================================================================================
*/

typedef enum {
	PM_NORMAL,		// can accelerate and turn
	PM_NOCLIP,		// noclip movement
	PM_SPECTATOR,	// still run into walls
	PM_DEAD,		// no acceleration or turning, but free falling
	PM_FREEZE,		// stuck in place with no control
	PM_INTERMISSION	// no movement or status bar
} pmtype_t;

I think you will be able to use PM_FREEZE by adding an activator and effect etc.

 

bg_pmove.cpp

 

in 

void Pmove( pmove_t *pmove )
{

look for this to get you started

if (pm->ps->pm_type == PM_FREEZE) {
		return;		// no movement at all
	}

add the effect in cg_player.cpp somewhere in

void CG_AddRefEntityWithPowerups( refEntity_t *ent, int powerups, centity_t *cent )
{

Cant think of anything better at the moment to help you get started, without getting out my code and actually writing the stuff!

 

 

I did a similar thing to this in Evolution of combat by making a freeze grenade .

 

http://www.moddb.com/mods/serenitysabersystems/images/eociii-pro#imagebox

 

Good luck and remember "Think small, start small".

 

Ill keep my eye on this topic and help where i can :)

Link to comment

{Quote}

All that stuff Asgarth83 just said... :o

 

Well that seems like a lot of stuff you want to do, and some of it is going to be difficult for a beginner.

 

I'm sorry i don't really have time to get my head in to a  "new" project . the only advice i can give you is "think small, start small."

 

I really wish i had more time to help you but i just don't.I can offer small advice to get you started . like with FP_LIGHTNING but adding new force powers is a bigger task that would need a lot of code work , new effects to be made , new sounds and more. 

 

Maybe you could ask one of the other known coders who may have more time to help you than i do.But be careful who you ask, because some coders can be "touchy" and just flame your ass for asking!

Or even open a new post to ask if anybody wants to join your mod team and stress you need a coder! :ph34r:

 

 
1: changing effects for some weapons SP like blaster pistol briar pistol and jawa,., they have the same efx  >_> also many droid weapons use same efx of other, i wanna every weapon do dmg of a different element (i edit the efx after with effected) so i need to change some address for efx of the weapons.

 

Changing the address of weapon effects 

 

This would mean adding a new weapon function starting in the weapons.dat 

 

muzzleEffect briar_pistol/muzzle_flash
missileFuncName briar_pistol_func
 
then adding the new function in code 
g_weaponload.cpp
// Table used to attach an extern missile function string to the actual cgame function
func_t	funcs[] =
{
	{"bryar_func",			FX_BryarProjectileThink},
	{"bryar_alt_func",		FX_BryarAltProjectileThink},
	{"blaster_func",		FX_BlasterProjectileThink},
	{"blaster_alt_func",	FX_BlasterAltFireThink},
	{"bowcaster_func",		FX_BowcasterProjectileThink},
	{"repeater_func",		FX_RepeaterProjectileThink},
	{"repeater_alt_func",	FX_RepeaterAltProjectileThink},
	{"demp2_func",			FX_DEMP2_ProjectileThink},
	{"demp2_alt_func",		FX_DEMP2_AltProjectileThink},
	{"flechette_func",		FX_FlechetteProjectileThink},
	{"flechette_alt_func",	FX_FlechetteAltProjectileThink},
	{"rocket_func",			FX_RocketProjectileThink},
	{"rocket_alt_func",		FX_RocketAltProjectileThink},
	{"conc_func",			FX_ConcProjectileThink},
	{"emplaced_func",		FX_EmplacedProjectileThink},
	{"turret_func",			FX_TurretProjectileThink},
	{"atstmain_func",		FX_ATSTMainProjectileThink},
	{"atst_side_alt_func",	FX_ATSTSideAltProjectileThink},
	{"atst_side_main_func",	FX_ATSTSideMainProjectileThink},
	{"tusk_shot_func",		FX_TuskenShotProjectileThink},
	{"noghri_shot_func",	FX_NoghriShotProjectileThink},
	{"briar_pistol_func",			FX_briar_pistolProjectileThink},
	{"briar_pistol_alt_func",		FX_briar_pistolAltProjectileThink},
	{NULL,					NULL}
};

FX_brayar_pistol.cpp

FX_BryarProjectileThink
-------------------------
*/
void FX_briar_pistolProjectileThink(  centity_t *cent, const struct weaponInfo_s *weapon )
{
	vec3_t forward;

	if ( VectorNormalize2( cent->gent->s.pos.trDelta, forward ) == 0.0f )
	{
		if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f )
		{
			forward[2] = 1.0f;
		}
	}

	// hack the scale of the forward vector if we were just fired or bounced...this will shorten up the tail for a split second so tails don't clip so harshly
	int dif = cg.time - cent->gent->s.pos.trTime;

	if ( dif < 75 )
	{
		if ( dif < 0 )
		{
			dif = 0;
		}

		float scale = ( dif / 75.0f ) * 0.95f + 0.05f;

		VectorScale( forward, scale, forward );
	}

	if ( cent->gent && cent->gent->owner && cent->gent->owner->s.number > 0 )
	{
		theFxScheduler.PlayEffect( "briar_pistol/npcshot", cent->lerpOrigin, forward );
	}
	else
	{
		theFxScheduler.PlayEffect( cgs.effects.briar_pistolShotEffect, cent->lerpOrigin, forward );
	}
}

Basicly follow all the traces of the effect you want to change in the code . in this example briar_pistolShotEffect then make a "renamed" copy and change the effect in

cg_weapons.cpp

case WP_BRYAR_PISTOL:
		cgs.effects.briar_pistolShotEffect			= theFxScheduler.RegisterEffect( "briar_pistol/shot" );
											          theFxScheduler.RegisterEffect( "briar_pistol/NPCshot" );

2: cucstom class damage: like demp2 deadly for droid and unuseful against living enemies, i need to make the same thing for other weapisn, so a earth shoot weapon can be deadly for a enemy of element fire, the "light" weapons can be deadly for the vampires. the darks weapons are strongs against humans, the fire weapons against ice and water monster etc etc.

 

custom class damge.

 

there are already examples of this in the code you can use as guidelines start here

 

weapons.h

// Concussion Rifle
//---------
//primary
#define	CONC_VELOCITY				3000
#define	CONC_DAMAGE					150
#define CONC_NPC_SPREAD				0.7f
#define	CONC_NPC_DAMAGE_EASY		15
#define	CONC_NPC_DAMAGE_NORMAL		30
#define	CONC_NPC_DAMAGE_HARD		50
#define	CONC_SPLASH_DAMAGE			50
#define	CONC_SPLASH_RADIUS			256
//alt
#define CONC_ALT_DAMAGE				225//100
#define CONC_ALT_NPC_DAMAGE_EASY	10
#define CONC_ALT_NPC_DAMAGE_MEDIUM	20
#define CONC_ALT_NPC_DAMAGE_HARD	30

Follow the examples of how the code increases the damage and add a class definition for it.

 

 

level 3: enemy get paralyse (a spell called incapacitate, that require an aura efx like protect for statis duration, like in KOTOR game) enemy cannot atk, move, or do any animation and be freeze for some lot of second. using force absorb or force push can nullify the statis state.

 

this is a biggie

 

look in to 

 

bg_public.h

MOVE MODULE

The pmove code takes a player_state_t and a usercmd_t and generates a new player_state_t
and some other output data.  Used for local prediction on the client game and true
movement on the server game.
===================================================================================
*/

typedef enum {
	PM_NORMAL,		// can accelerate and turn
	PM_NOCLIP,		// noclip movement
	PM_SPECTATOR,	// still run into walls
	PM_DEAD,		// no acceleration or turning, but free falling
	PM_FREEZE,		// stuck in place with no control
	PM_INTERMISSION	// no movement or status bar
} pmtype_t;

I think you will be able to use PM_FREEZE by adding an activator and effect etc.

 

bg_pmove.cpp

 

in 

void Pmove( pmove_t *pmove )
{

look for this to get you started

if (pm->ps->pm_type == PM_FREEZE) {
		return;		// no movement at all
	}

add the effect in cg_player.cpp somewhere in

void CG_AddRefEntityWithPowerups( refEntity_t *ent, int powerups, centity_t *cent )
{

Cant think of anything better at the moment to help you get started, without getting out my code and actually writing the stuff!

 

 

I did a similar thing to this in Evolution of combat by making a freeze grenade .

 

http://www.moddb.com/mods/serenitysabersystems/images/eociii-pro#imagebox

 

Good luck and remember "Think small, start small".

 

Ill keep my eye on this topic and help where i can :)

 WOW!!! Well i am not exactly a beginner because i am good right mapper and rigger and i am modding by about something like 6 years or more... but i am not a programmer so the code get me crazy. and yes, i see that coders sometimes are little... easy to go to anger. LOL.

you... You make a Freeze grenade??? That's is amazing!!!! O.o Maybe is more easy to make the "incapacitate" like a weapon so i can shoot a projectile than freeze the enemies folliwng example of the code of your grenade. I think i can manage more easy that thar making a stasis power. And it's better. Incapacitate spell are shooted as a projectile in blood omen game.

However, you are very skilled! My regards, really! And sorry for my bad english.

Now i am ending 2 maps: the Ice Forge for my mod, for make more powerful the Water Reaver ghost sword. it's very labyrinthic and in soul reaver 2 style. When i end the temple, i try something about coding. but before i make the effects of the spells, obvious XD. the sounds... i have already done that. and for effect i am faster to make. :)

however thanks very much. for all help and answer. I think i become with the more easy things: changing efx for some weapons and end the customizzation of the weapons. so i can learn something about the code. after i pass to class damage and at the end at the new force power or new weapons. :)

Thanks very much! ^^

Serenity937 likes this
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...