-
Posts
2,023 -
Joined
-
Last visited
Content Type
Profiles
News Articles
Tutorials
Forums
Downloads
Everything posted by Asgarath83
-
yes, 0: install microsoft visual studio 2012 or superior. 1: download openjk 2: download cmake 3: make your solution with cmake following eezstreet tutorial. 4: locate and edit what i told. 5: build the SP client and SP dll. 6: put into gamedata (back up your dll and Jasp exe before)
-
it's necessary to change a little line of code on SP client for expand the buffer on NPC. Openjk however not get more the error of npc file too big. simply, if you put too many NPCs, they aren't read, but you can edit the code about this. go do npcs_stats.cpp and change this: // NPC parameters file : ext_data/NPCs/*.npc* // #define MAX_NPC_DATA_SIZE 0x40000 to // NPC parameters file : ext_data/NPCs/*.npc* // #define MAX_NPC_DATA_SIZE 0x80000 // original is 0x40000 so you can get a double value of NPC files before overload the allocating buffer memory.
-
You need to use microsoft visual studio 2010\2012 + cmake. cmake for making the solution, microsoft visual studio for building the exe of Openjk. Here the tutorial: http://jkhub.org/tutorials/article/145-compiling-openjk-win32-must-read-for-new-coders/ you can download here on github
-
mmm i check the pk3. try to copy the taunt.mp3 file and rename it in taunt3.mp3 file taunt3 is missing. the sounds of anger, taunt, combat, death, victory should ever by on groups of three. (anger1,2,3 ; taunt1,2,3 choke1,2,3 etc ) the issue is that you not hear all the taunts sounds? are you checked the consolle if you see some strange warning of error about these files? (they must be sampled at 44100 hertz for works)
-
Custom animations or emotes for SP?
Asgarath83 replied to AuriusPheonix's topic in Coding and Scripts
I am sorry. that's go over my actual skills. Good luck with your task! -
Custom animations or emotes for SP?
Asgarath83 replied to AuriusPheonix's topic in Coding and Scripts
Never told it easy. need to be encoded on UI part of code of MP clients. also, need a custom MP menu that interact with edited code. :\ -
Custom animations or emotes for SP?
Asgarath83 replied to AuriusPheonix's topic in Coding and Scripts
Yes, a little menu on side bar like i see in some MMORPG in past. -
Can you show screenshots of troubles and of your actual rigging? it's possible that the head is wrong placed, you know? if leye and reye bones are not exactly on the coordinates of the eyes mesh, the facial animation will be imperfect. :\
-
well i use 3d max for rigging. what kind or programm are you using? there are some tutorial but there is not a step by step tutorial of rigging because is a question of methodic. you need to learn HOW rig a model. is not sufficient to assign a mesh to a bones at 100% . i not know anything about blender rigging, my field is 3d max. i not use other for rigging. for learn how rig a model there are the @@Psyk0Sith tutorial for the basic. i learn in that mode. http://psyko3d.50webs.com/tuts.html in my case i simply followed this: http://psyko3d.50webs.com/tutorials/skin_modifier.htm
-
Custom animations or emotes for SP?
Asgarath83 replied to AuriusPheonix's topic in Coding and Scripts
Well, this should work with a code working similar to the code that activate weapons shoot \ altshoot \ use force power function by a button. the more difficult part is to align every animation to a different button. is not much good as idea because JKA has thousando of animations. so the best solution i suppose is make some kind of animation scrolling menu with a using key, like the scrolling force power \ weapons menu, . obvious it need to contain only some animation, not all the 1700 moves of humanoid files, like the taunt, showoff, victory, etc. -
You welcome, let me know if you got success
-
You need to weight better the head. rig to ceyebrows bone the vertex of the front, and use leye and reye bones for rig the respective eyeballs leye and reye bones control the eye blink movement. they stretch the textures and rotate, creating the closing effects. rig is 100% weight to leye for left eye, and reye for right eye. for eyes edges , instead, you need to rig 50% cranium 50% leye for left eye and 50 cra 50 reye for righteye. so, the facial skin of eyes edge need a 50-50 rig, instead the eyeballs meshes need 100% rig with eyes.
-
Help/bug: Tor Sabers color black thing issue
Asgarath83 replied to Dumah 11523's topic in Modding Assistance
appean also with force push \pull? this happened if the shader of pushblur texture is broken :\ -
I want to change the scale of the model .. problem is.. hitbox
Asgarath83 replied to Langerd's topic in Modding Assistance
Mmmm.... that's was unexpected. i not knew that not affected only the collision. That's really bad man. in this case i am asking how the rancor and atst bounding box working so goods, and also droid box, with blaster shoots and also if player jump on the "head" of the NPC, droids, monster etc. the value you need to put depende by the scale of your character. which is the scalue value of your custom NPC? playermodel "name of model" and under scale: "value" width: 16xvalue% crouchheight 32xvalue% height: 64xvalue% about the hit detection that's bad. i know how fix the bounding box demension but i not know how too fix this without code hacking, or the code parts that affected these (sure need to dive into code about the scale parameter of NPC file) however... there are also other 3 parameter, not only scale. scalex, scaley, scalez, each one affected one axis direction. . (width, height, lenght). try to work on this parameter. obvious height, croughtheight and width value are affected by scalex, y, z value. -
I want to change the scale of the model .. problem is.. hitbox
Asgarath83 replied to Langerd's topic in Modding Assistance
In this case it's not necessary to edit the GLM or GLA of model. you need to set custom NPC parameter for crouchheight, width and height. you can see that in Rancor and ATST .NPC files. about the value... mmm i not remember exactly the default value. should be 64 for height and 32 for croucheight for width i am not much sure. however this work in this mod: scale key of NPC file is the key. scale to default value is 100. so, if you put into NPC file the value scale setted to 110, you need to edit the width, height and croucheight default value x110%, aka for 1.1 if you make a dwarf NPC very smallest with scale 50, you need to put 32 as height, instead of 64. 50 is half of 100 and 32 is half of 64 understood? a pratical example of my mod: a mini rancor. i set his scale to 85, so is height and croucheight are the 85% of default Rancor.NPC file: scale 85 height 136 crouchheight 108 that's all. a simply .NPC file edit. . -
Evolution of Combat IV - Main Topic
Asgarath83 replied to MattFiler's topic in WIPs, Teasers & Releases
This is one of the best mod i never seen. i wait for download it D: -
Some enemies should be "invincible"...
Asgarath83 replied to Dusty's topic in General Modding Discussions
Why not. you can make invincibile by code, or use ent modding for add a spawnscript for some enemy that SET_UNDYING status with icarus. -
Nevermind i partially solved with MAX_FX 296 . it's maximum value i can stored without building overflows.
-
I have a little question. There is some way for expand the FX (special effect ) buffer of the number of visual effect played by NPCs and by clients? because after i added the new force power i get some trouble to displaying effect of weapons if i put command "give all" it's also true that with force lightning power i added a large amount of custom force lightning effect for each classes of the game. the problem is this: i load a map. i get the give all command to player. weapons are shooting and they display their effect and sound and all is fine. but if i add to player more of seven shooting weapons, the new weapons projectiles are invisibiles. Damage is okay however. so is a problem of overflow of buffer effect. there is some way to expand it? on q_shared i found there are the lines MAX_FX and MAX_WORLD_FX. #define MAX_MODELS 256 #define MAX_SOUNDS 380 #define MAX_SUB_BSP 32 #define MAX_SUBMODELS 512 // nine bits #define MAX_FX 128//128 #define MAX_WORLD_FX 66//66 // was 16 // was 4 on cg_main.cpp i found also this: static void CG_RegisterEffects( void ) { char *effectName; int i, numFailed=0; // Register external effects for ( i = 1 ; i < MAX_FX ; i++ ) { effectName = ( char *)CG_ConfigString( CS_EFFECTS + i ); if ( !effectName[0] ) { break; } if (!theFxScheduler.RegisterEffect( (const char*)effectName )) { //assert(0); numFailed++; } } if (numFailed && g_delayedShutdown->integer) { //assert(0); //CG_Error( "CG_RegisterEffects: %i Effects failed to load. Please fix, or ask Aurelio.", numFailed ); } // Start world effects for ( i = 1 ; i < MAX_WORLD_FX ; i++ ) { effectName = ( char *)CG_ConfigString( CS_WORLD_FX + i ); if ( !effectName[0] ) { break; } cgi_R_WorldEffectCommand( effectName ); } // Set up the glass effects mini-system. CG_InitGlass(); //footstep effects cgs.effects.footstepMud = theFxScheduler.RegisterEffect( "materials/mud" ); cgs.effects.footstepSand = theFxScheduler.RegisterEffect( "materials/sand" ); cgs.effects.footstepSnow = theFxScheduler.RegisterEffect( "materials/snow" ); cgs.effects.footstepGravel = theFxScheduler.RegisterEffect( "materials/gravel" ); //landing effects cgs.effects.landingMud = theFxScheduler.RegisterEffect( "materials/mud_large" ); cgs.effects.landingSand = theFxScheduler.RegisterEffect( "materials/sand_large" ); cgs.effects.landingDirt = theFxScheduler.RegisterEffect( "materials/dirt_large" ); cgs.effects.landingSnow = theFxScheduler.RegisterEffect( "materials/snow_large" ); cgs.effects.landingGravel = theFxScheduler.RegisterEffect( "materials/gravel_large" ); //splashes if ( (gi.totalMapContents()&CONTENTS_WATER) ) { theFxScheduler.RegisterEffect( "env/water_impact" ); theFxScheduler.RegisterEffect( "misc/waterbreath" ); } if ( (gi.totalMapContents()&CONTENTS_LAVA) ) { theFxScheduler.RegisterEffect( "env/lava_splash" ); } if ( (gi.totalMapContents()&CONTENTS_SLIME) ) { theFxScheduler.RegisterEffect( "env/acid_splash" ); } theFxScheduler.RegisterEffect( "misc/breath" ); }
-
Yes, i have a little question. because i am new using git and i not know much is particular upload system. I writed the read me file and i maked a repository, but i have some problem to update my stuff into it. how can i do it withut installig git desktop? i have a Windows Xp SP3. not sure if git desktop support my OS.
-
Getting JA's NPC AI on par with JK2's?
Asgarath83 replied to Dusty's topic in General Modding Discussions
Try to place not connected point_combat inside the waypoint grid into strategical points. Shooter Npcs love to place theirself into point_combat position for shoot the players. if you place POINT_COMBAT outside of waypoint grid, but however close to the waypoint, enemy will try to reach and use as point for shooting you. place this points into strategical parts of the path i have a swamp map in a my mod with thousand of jungle trees (2000 trees into the Map O.o ) and a biiig waypoint net and combat point net between the trees. that works. npc are lot smarter and they shoots and cover and escape in a good way. also, making ambush by the backs of the trees. -
Well... sure. i have again more back up of original openjk source code. D: but i need to copy paste by my large mod the block related to force hate. understood you are not a coder. well, me not too, just a beginner. give me a lot of time. next day i add into my git a repository of my code. after i am glad to perform your request. it's a gift for you, okay? i like to help people.
-
Well you're right ensi. i not agree much this mentality because is the programmed obsolescence. people is ever forced to use the last version of program of operating system. it's not much correct because peoples cannot choice. if someone is fine with an OS, why cannot continue to use it? That's is just my opinion, however. However, someone can give me an hint about freezing? :\ i am little stuck on that. i found code of pm_freeze, npc_freeze, d_npcfreeze command, and BS_cinematic, but they i haven't found nothing that working for moment. @ you are lucky, this is exactly what do my force hate power . i share with you the code. act just like mindtrick level 3. you poin an enemy with crosshair with power selected and press f. i added also a visual efx with a burning red cloud inside the face of enemy. the funniest thing of this power is that this can switch team every time you cast it. so you can also turn allied in an enemy... and turn again into an ally XD. testing this power give me a lot of hilarous laught. void ForceHate( gentity_t *self ) { trace_t tr; vec3_t end, forward; gentity_t *traceEnt; qboolean targetLive = qfalse; /*if ( WP_BreakHateTime( self ) ) { return; }*/ if ( self->health <= 0 ) { return; } //FIXME: if Hate 3 and aiming at an enemy need more force power if ( !WP_ForcePowerUsable( self, FP_HATE, 0 ) ) { return; } if ( self->client->ps.weaponTime >= 800 ) {//just did one! return; } if ( self->client->ps.saberLockTime > level.time ) {//FIXME: can this be a way to break out? return; } AngleVectors( self->client->ps.viewangles, forward, NULL, NULL ); VectorNormalize( forward ); VectorMA( self->client->renderInfo.eyePoint, 2048, forward, end ); //Cause a distraction if enemy is not fighting gi.trace( &tr, self->client->renderInfo.eyePoint, vec3_origin, vec3_origin, end, self->s.number, MASK_OPAQUE|CONTENTS_BODY, (EG2_Collision)0, 0 ); if ( tr.entityNum == ENTITYNUM_NONE || tr.fraction == 1.0 || tr.allsolid || tr.startsolid ) { return; } traceEnt = &g_entities[tr.entityNum]; if( traceEnt->NPC && traceEnt->NPC->scriptFlags & SCF_NO_FORCE ) { return; } if ( traceEnt && traceEnt->client ) { switch ( traceEnt->client->NPC_class ) { case CLASS_GALAKMECH: case CLASS_ATST: case CLASS_SAND_CREATURE: case CLASS_DESANN: case CLASS_JAN: case CLASS_MOUSE: case CLASS_LIZARD: case CLASS_MURJJ: case CLASS_FLIER2: case CLASS_GLIDER: case CLASS_FISH: case CLASS_CLAW: case CLASS_MORGANKATARN: case CLASS_REELO: case CLASS_KYLE: case CLASS_LUKE: case CLASS_SHADOWTROOPER: case CLASS_LANDO: case CLASS_GALAK: case CLASS_ROCKETTROOPER: //no droids either case CLASS_R2D2: case CLASS_R5D2: case CLASS_MARK2: case CLASS_MARK1: case CLASS_SEEKER: case CLASS_SENTRY: case CLASS_REMOTE: case CLASS_PROTOCOL: case CLASS_ASSASSIN_DROID: case CLASS_SABER_DROID: case CLASS_WAMPA: case CLASS_BOBAFETT: // gli Elementali e i Demoni posson esser condizionati ma non boss class ed elementali supremi. break; case CLASS_RANCOR: if ( !(traceEnt->spawnflags&1) ) { targetLive = qtrue; } break; default: targetLive = qtrue; break; } } if ( targetLive && traceEnt->NPC && traceEnt->health > 0 ) {//hit an organic non-player if ( G_ActivateBehavior( traceEnt, BSET_MINDTRICK ) ) {//activated a script on him //FIXME: do the visual sparkles effect on their heads, still? WP_ForcePowerStart( self, FP_HATE, 0 ); } else if ( traceEnt->client->playerTeam != self->client->playerTeam ) {//an enemy of high level int override = 0; if ( (traceEnt->NPC->scriptFlags&SCF_NO_MIND_TRICK) ) {// Anche se una classe non può esser condizionata, essa resterà comunque confusa dall'hate per un attimo. if ( traceEnt->client->NPC_class == CLASS_GALAK || traceEnt->client->NPC_class == CLASS_DESANN || traceEnt->client->NPC_class == CLASS_LIZARD || traceEnt->client->NPC_class == CLASS_CLAW || traceEnt->client->NPC_class == CLASS_MURJJ || traceEnt->client->NPC_class == CLASS_GLIDER || traceEnt->client->NPC_class == CLASS_FLIER2 || traceEnt->client->NPC_class == CLASS_FISH || traceEnt->client->NPC_class == CLASS_KYLE || traceEnt->client->NPC_class == CLASS_LUKE || traceEnt->client->NPC_class == CLASS_ROCKETTROOPER || traceEnt->client->NPC_class == CLASS_SHADOWTROOPER || traceEnt->client->NPC_class == CLASS_MORGANKATARN || traceEnt->client->NPC_class == CLASS_GALAKMECH || traceEnt->client->NPC_class == CLASS_LANDO || traceEnt->client->NPC_class == CLASS_WAMPA ) { G_AddVoiceEvent( traceEnt, Q_irand( EV_CONFUSE1, EV_CONFUSE3 ), Q_irand( 3000, 5000 ) ); } } else if ( self->client->ps.forcePowerLevel[FP_HATE] == FORCE_LEVEL_3 && traceEnt->s.weapon != WP_NONE //don't charm people who aren't capable of fighting... like ugnaughts and droids, just confuse them && !Pilot_AnyVehiclesRegistered() //also, don't charm guys when bikes are near ) {//haha! AT LEVEL 3 PUOI CONFONDER CHI IMPUGNA UNA SPADA! if ( /*traceEnt->s.weapon != WP_SABER && */traceEnt->client->NPC_class != CLASS_DESANN ) {//turn them to our side //if mind trick 3 and aiming at an enemy need more force power override = 90; if ( self->client->ps.forcePower < 90 ) { return; } if ( traceEnt->enemy ) { G_ClearEnemy( traceEnt ); } if ( traceEnt->NPC ) { traceEnt->NPC->tempBehavior = BS_HUNT_AND_KILL; } //FIXME: maybe pick an enemy right here? //FIXME: does nothing to TEAM_FREE and TEAM_NEUTRALs!!! team_t saveTeam = traceEnt->client->enemyTeam; traceEnt->client->enemyTeam = traceEnt->client->playerTeam; traceEnt->client->playerTeam = saveTeam; //FIXME: need a *charmed* timer on this...? Or do TEAM_PLAYERS assume that "confusion" means they should switch to team_enemy when done? traceEnt->NPC->charmedTime = level.time + HateTime[self->client->ps.forcePowerLevel[FP_HATE]]; if ( traceEnt->ghoul2.size() && traceEnt->headBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "force/hate" ), traceEnt->playerModel, traceEnt->headBolt, traceEnt->s.number, traceEnt->currentOrigin, HateTime[self->client->ps.forcePowerLevel[FP_HATE]], qtrue ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/hate.mp3" ); } } } else if ( self->client->ps.forcePowerLevel[FP_HATE] == FORCE_LEVEL_2 && traceEnt->s.weapon != WP_NONE //don't charm people who aren't capable of fighting... like ugnaughts and droids, just confuse them && !Pilot_AnyVehiclesRegistered() //also, don't charm guys when bikes are near ) {//haha! AT LEVEL 2 PUOI CONFONDER CHI IMPUGNA UNA SPADA! if ( traceEnt->s.weapon != WP_SABER && traceEnt->client->NPC_class != CLASS_DESANN ) {//turn them to our side //if mind trick 3 and aiming at an enemy need more force power override = 50; if ( self->client->ps.forcePower < 50 ) { return; } if ( traceEnt->enemy ) { G_ClearEnemy( traceEnt ); } if ( traceEnt->NPC ) { traceEnt->NPC->tempBehavior = BS_HUNT_AND_KILL; } //FIXME: maybe pick an enemy right here? //FIXME: does nothing to TEAM_FREE and TEAM_NEUTRALs!!! team_t saveTeam = traceEnt->client->enemyTeam; traceEnt->client->enemyTeam = traceEnt->client->playerTeam; traceEnt->client->playerTeam = saveTeam; //FIXME: need a *charmed* timer on this...? Or do TEAM_PLAYERS assume that "confusion" means they should switch to team_enemy when done? traceEnt->NPC->charmedTime = level.time + HateTime[self->client->ps.forcePowerLevel[FP_HATE]]; if ( traceEnt->ghoul2.size() && traceEnt->headBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "force/hate" ), traceEnt->playerModel, traceEnt->headBolt, traceEnt->s.number, traceEnt->currentOrigin, HateTime[self->client->ps.forcePowerLevel[FP_HATE]], qtrue ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/hate.mp3" ); } } } else if ( self->client->ps.forcePowerLevel[FP_HATE] == FORCE_LEVEL_1 && traceEnt->s.weapon != WP_NONE //don't charm people who aren't capable of fighting... like ugnaughts and droids, just confuse them && !Pilot_AnyVehiclesRegistered() //also, don't charm guys when bikes are near ) {//haha! AT LEVEL 3 PUOI CONFONDER CHI IMPUGNA UNA SPADA! if ( traceEnt->s.weapon != WP_SABER && traceEnt->client->NPC_class != CLASS_DESANN ) {//turn them to our side //if mind trick 3 and aiming at an enemy need more force power override = 30; if ( self->client->ps.forcePower < 30 ) { return; } if ( traceEnt->enemy ) { G_ClearEnemy( traceEnt ); } if ( traceEnt->NPC ) { traceEnt->NPC->tempBehavior = BS_HUNT_AND_KILL; } //FIXME: maybe pick an enemy right here? //FIXME: does nothing to TEAM_FREE and TEAM_NEUTRALs!!! team_t saveTeam = traceEnt->client->enemyTeam; traceEnt->client->enemyTeam = traceEnt->client->playerTeam; traceEnt->client->playerTeam = saveTeam; //FIXME: need a *charmed* timer on this...? Or do TEAM_PLAYERS assume that "confusion" means they should switch to team_enemy when done? traceEnt->NPC->charmedTime = level.time + HateTime[self->client->ps.forcePowerLevel[FP_HATE]]; if ( traceEnt->ghoul2.size() && traceEnt->headBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "force/hate" ), traceEnt->playerModel, traceEnt->headBolt, traceEnt->s.number, traceEnt->currentOrigin, HateTime[self->client->ps.forcePowerLevel[FP_HATE]], qtrue ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/hate.mp3" ); } } } } else if ( traceEnt->client->playerTeam == self->client->playerTeam ) {//an ally can turned into an enemy! watch out! if ( self->client->ps.forcePower < 50 ) { return; } if ( traceEnt->enemy ) { G_ClearEnemy( traceEnt ); } if ( traceEnt->NPC ) { traceEnt->NPC->tempBehavior = BS_HUNT_AND_KILL; } //FIXME: maybe pick an enemy right here? //FIXME: does nothing to TEAM_FREE and TEAM_NEUTRALs!!! team_t saveTeam = traceEnt->client->playerTeam; traceEnt->client->playerTeam = traceEnt->client->enemyTeam; traceEnt->client->enemyTeam = saveTeam; //FIXME: need a *charmed* timer on this...? Or do TEAM_PLAYERS assume that "confusion" means they should switch to team_enemy when done? traceEnt->NPC->charmedTime = level.time + HateTime[self->client->ps.forcePowerLevel[FP_HATE]]; if ( traceEnt->ghoul2.size() && traceEnt->headBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "force/hate" ), traceEnt->playerModel, traceEnt->headBolt, traceEnt->s.number, traceEnt->currentOrigin, HateTime[self->client->ps.forcePowerLevel[FP_HATE]], qtrue ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/hate.mp3" ); } //maybe just have him look at you? Respond? Take your enemy? if ( traceEnt->client->ps.pm_type < PM_DEAD && traceEnt->NPC!=NULL && !(traceEnt->NPC->scriptFlags&SCF_NO_RESPONSE) ) { NPC_UseResponse( traceEnt, self, qfalse ); WP_ForcePowerStart( self, FP_HATE, 1 ); } }//NOTE: no effect on TEAM_NEUTRAL? else { NPC_Jedi_PlayConfusionSound( traceEnt ); } vec3_t eyeDir; AngleVectors( traceEnt->client->renderInfo.eyeAngles, eyeDir, NULL, NULL ); VectorNormalize( eyeDir ); G_PlayEffect( "force/force_hatetouch", traceEnt->client->renderInfo.eyePoint, eyeDir ); //make sure this plays and that you cannot press fire for about 1 second after this //FIXME: BOTH_FORCEMINDTRICK or BOTH_FORCEDISTRACT NPC_SetAnim( self, SETANIM_TORSO, BOTH_FORCEHEAL_QUICK, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_RESTART|SETANIM_FLAG_HOLD ); //FIXME: build-up or delay this until in proper part of anim } else { if ( self->client->ps.forcePowerLevel[FP_HATE] > FORCE_LEVEL_1 && tr.fraction * 2048 > 64 ) {//don't create a diversion less than 64 from you of if at power level 1 //use distraction anim instead G_PlayEffect( G_EffectIndex( "force/force_hatetouch" ), tr.endpos, tr.plane.normal ); //FIXME: these events don't seem to always be picked up...? AddSoundEvent( self, tr.endpos, 512, AEL_DISCOVERED, qtrue, qtrue ); AddSightEvent( self, tr.endpos, 512, AEL_DISCOVERED, 50 ); WP_ForcePowerStart( self, FP_HATE, 0 ); } NPC_SetAnim( self, SETANIM_TORSO, BOTH_FORCEHEAL_QUICK, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_RESTART|SETANIM_FLAG_HOLD ); } self->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have been in self->client->ps.saberBlocked = BLOCKED_NONE; self->client->ps.weaponTime = 1000; if ( self->client->ps.forcePowersActive&(1<<FP_SPEED) ) { self->client->ps.weaponTime = floor( self->client->ps.weaponTime * g_timescale->value ); } } follow my tutorial about adding a new FP into SP and add this void under void_forcetelepathy into wp_saber.cpp And you can make a foolish free for all battle also in single player game. for allow to you to charm all classes with hate, simply remove the classes i added into the first switch case. they resist to fhe hate power because i use as bosses. Note: at level 1 of hate you can charm only shooters. with level 2-3 you can charm also saberist. an important note: because charm code is done for affected only Shooters (default mindtrick level 3 cannot used for dark jedi) the saberist charmed will never return to enemy time also when power effect is up. but you can simply charm again and they will become again foes. if you charm a third time, they become allied. and so on. LOL. is a cycle. so, if you are lazy of some teammate you can turn it into an enemy and take down without get the mission failing status Maybe you will charm rosh? D: XD
-
firefox is a freeware D: why they should cut away the support for XP users? 10% of internet users use again XP. mmm, i did with force stun, force hate, force fear, force controlmind, and also force wrack (it's like a merge between controlmind and hate, @ with this power is possible to control the foes and they turn to player team. XD so is possible to take down the NPC with one of their teammate. ) the unique power i need to end is the more difficult, the forze freeze. i have not much clear how to add a freeze function with the same power time duration. @@Stoiss @@Serenity937 anyone can give me a little hint or help about force freeze? i put here the power code. void ForceFreeze( gentity_t *self ) { trace_t tr; vec3_t end, forward; gentity_t *traceEnt; qboolean targetLive = qfalse; if ( self->health <= 0 ) { return; } //FIXME: if Freeze 3 and aiming at an enemy need more force power if ( !WP_ForcePowerUsable( self, FP_FREEZE, 0 ) ) { return; } if ( self->client->ps.weaponTime >= 800 ) {//just did one! return; } if ( self->client->ps.saberLockTime > level.time ) {//FIXME: can this be a way to break out? return; } AngleVectors( self->client->ps.viewangles, forward, NULL, NULL ); VectorNormalize( forward ); VectorMA( self->client->renderInfo.eyePoint, 2048, forward, end ); //Cause a distraction if enemy is not fighting gi.trace( &tr, self->client->renderInfo.torsoPoint, vec3_origin, vec3_origin, end, self->s.number, MASK_OPAQUE|CONTENTS_BODY, (EG2_Collision)0, 0 ); if ( tr.entityNum == ENTITYNUM_NONE || tr.fraction == 1.0 || tr.allsolid || tr.startsolid ) { return; } traceEnt = &g_entities[tr.entityNum]; if( traceEnt->NPC && traceEnt->NPC->scriptFlags & SCF_NO_FORCE ) { return; } if ( traceEnt && traceEnt->client ) { switch ( traceEnt->client->NPC_class ) { case CLASS_GALAKMECH: case CLASS_ATST: case CLASS_SAND_CREATURE: case CLASS_MOUSE: case CLASS_DESANN: case CLASS_JAN: case CLASS_LIZARD: case CLASS_MURJJ: case CLASS_FLIER2: case CLASS_GLIDER: case CLASS_FISH: case CLASS_CLAW: case CLASS_MORGANKATARN: case CLASS_REELO: case CLASS_KYLE: case CLASS_LUKE: case CLASS_SHADOWTROOPER: case CLASS_LANDO: case CLASS_GALAK: case CLASS_GONK: case CLASS_ROCKETTROOPER: //no droids either case CLASS_R2D2: case CLASS_R5D2: case CLASS_MARK2: case CLASS_MARK1: case CLASS_SEEKER: case CLASS_SENTRY: case CLASS_REMOTE: case CLASS_PROTOCOL: case CLASS_ASSASSIN_DROID: case CLASS_SABER_DROID: case CLASS_WAMPA: case CLASS_BOBAFETT: // gli Elementali e i Demoni posson esser condizionati ma non boss class ed elementali supremi. break; case CLASS_RANCOR: if ( !(traceEnt->spawnflags&1) ) { targetLive = qtrue; } break; default: targetLive = qtrue; break; } } if ( targetLive && traceEnt->NPC && traceEnt->health > 0 ) {//hit an organic non-player if ( G_ActivateBehavior( traceEnt, BSET_MINDTRICK ) ) {//activated a script on him //FIXME: do the visual sparkles effect on their heads, still? WP_ForcePowerStart( self, FP_FREEZE, 0 ); } else if ( traceEnt->client->playerTeam != self->client->playerTeam ) {//an enemy of high level int override = 0; if ( (traceEnt->NPC->scriptFlags&SCF_NO_MIND_TRICK) ) {// Anche se una classe non può esser condizionata, essa resterà comunque confusa dall'hate per un attimo. if ( traceEnt->client->NPC_class != CLASS_GONK ) { G_AddVoiceEvent( traceEnt, Q_irand( EV_CONFUSE1, EV_CONFUSE3 ), Q_irand( 3000, 5000 ) ); } } else if ( self->client->ps.forcePowerLevel[FP_FREEZE] == FORCE_LEVEL_1 && traceEnt->s.weapon != WP_NONE //don't charm people who aren't capable of fighting... like ugnaughts and droids, just confuse them && !Pilot_AnyVehiclesRegistered() //also, don't charm guys when bikes are near ) {//haha! AT LEVEL 3 PUOI CONFONDER CHI IMPUGNA UNA SPADA! if ( /*traceEnt->s.weapon != WP_SABER && */traceEnt->client->NPC_class != CLASS_DESANN ) {//turn them to our side //if mind trick 3 and aiming at an enemy need more force power override = 30; if ( self->client->ps.forcePower < 30 ) { return; } if ( traceEnt->enemy ) { G_ClearEnemy( traceEnt ); } if ( traceEnt->NPC ) { traceEnt->NPC->tempBehavior = BS_CINEMATIC; traceEnt->client->ps.pm_type = PM_FREEZE; } //FIXME: maybe pick an enemy right here? //FIXME: does nothing to TEAM_FREE and TEAM_NEUTRALs!!! //FIXME: need a *charmed* timer on this...? Or do TEAM_PLAYERS assume that "confusion" means they should switch to team_enemy when done? traceEnt->NPC->tempBehavior = BS_CINEMATIC; traceEnt->client->ps.pm_type = PM_FREEZE; traceEnt->NPC->charmedTime = level.time + FreezeTime[self->client->ps.forcePowerLevel[FP_FREEZE]]; // traceEnt->NPC->charmedTime = level.time + FreezeTime[self->client->ps.forcePowerLevel[FP_FREEZE]]; if ( traceEnt->ghoul2.size() && traceEnt->chestBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "force/slowtime" ), traceEnt->playerModel, traceEnt->chestBolt, traceEnt->s.number, traceEnt->currentOrigin, FreezeTime[self->client->ps.forcePowerLevel[FP_FREEZE]], qtrue ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/slowtime.mp3" ); NPC_PlayConfusionSound( traceEnt ); } } } else if ( self->client->ps.forcePowerLevel[FP_FREEZE] == FORCE_LEVEL_2 && traceEnt->s.weapon != WP_NONE //don't charm people who aren't capable of fighting... like ugnaughts and droids, just confuse them && !Pilot_AnyVehiclesRegistered() //also, don't charm guys when bikes are near ) {//haha! AT LEVEL 2 PUOI CONFONDER CHI IMPUGNA UNA SPADA! if ( traceEnt->s.weapon != WP_SABER && traceEnt->client->NPC_class != CLASS_DESANN ) {//turn them to our side //if mind trick 3 and aiming at an enemy need more force power override = 60; if ( self->client->ps.forcePower < 60 ) { return; } if ( traceEnt->enemy ) { G_ClearEnemy( traceEnt ); } if ( traceEnt->NPC ) { traceEnt->NPC->tempBehavior = BS_CINEMATIC; traceEnt->client->ps.pm_type = PM_FREEZE; } //FIXME: maybe pick an enemy right here? //FIXME: does nothing to TEAM_FREE and TEAM_NEUTRALs!!! //FIXME: need a *charmed* timer on this...? Or do TEAM_PLAYERS assume that "confusion" means they should switch to team_enemy when done? traceEnt->NPC->tempBehavior = BS_CINEMATIC; traceEnt->client->ps.pm_type = PM_FREEZE; traceEnt->NPC->charmedTime = level.time + FreezeTime[self->client->ps.forcePowerLevel[FP_FREEZE]]; if ( traceEnt->ghoul2.size() && traceEnt->chestBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "force/incapacitate" ), traceEnt->playerModel, traceEnt->chestBolt, traceEnt->s.number, traceEnt->currentOrigin, FreezeTime[self->client->ps.forcePowerLevel[FP_FREEZE]], qtrue ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/incapacitate.mp3" ); NPC_PlayConfusionSound( traceEnt ); } } } else if ( self->client->ps.forcePowerLevel[FP_FREEZE] == FORCE_LEVEL_3 && traceEnt->s.weapon != WP_NONE //don't charm people who aren't capable of fighting... like ugnaughts and droids, just confuse them && !Pilot_AnyVehiclesRegistered() //also, don't charm guys when bikes are near ) {//haha! AT LEVEL 3 PUOI CONFONDER CHI IMPUGNA UNA SPADA! if ( /*traceEnt->s.weapon != WP_SABER && */traceEnt->client->NPC_class != CLASS_DESANN ) {//turn them to our side //if mind trick 3 and aiming at an enemy need more force power override = 80; if ( self->client->ps.forcePower < 80 ) { return; } if ( traceEnt->enemy ) { G_ClearEnemy( traceEnt ); } if ( traceEnt->NPC ) { traceEnt->NPC->tempBehavior = BS_CINEMATIC; traceEnt->client->ps.pm_type = PM_FREEZE; } //FIXME: maybe pick an enemy right here? //FIXME: does nothing to TEAM_FREE and TEAM_NEUTRALs!!! //FIXME: need a *charmed* timer on this...? Or do TEAM_PLAYERS assume that "confusion" means they should switch to team_enemy when done? // traceEnt->NPC->confusionTime = level.time + FreezeTime[self->client->ps.forcePowerLevel[FP_FREEZE]]; traceEnt->NPC->tempBehavior = BS_CINEMATIC; traceEnt->client->ps.pm_type = PM_FREEZE; traceEnt->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have been in traceEnt->client->ps.saberBlocked = BLOCKED_NONE; traceEnt->NPC->charmedTime = level.time + FreezeTime[self->client->ps.forcePowerLevel[FP_FREEZE]]; if ( traceEnt->ghoul2.size() && traceEnt->chestBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "force/incapacitate" ), traceEnt->playerModel, traceEnt->chestBolt, traceEnt->s.number, traceEnt->currentOrigin, FreezeTime[self->client->ps.forcePowerLevel[FP_FREEZE]], qtrue ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/incapacitate.mp3" ); NPC_PlayConfusionSound( traceEnt ); } } } } else if ( traceEnt->client->playerTeam == self->client->playerTeam ) {//an ally can turned into an enemy! watch out! //maybe just have him look at you? Respond? Take your enemy? if ( traceEnt->client->ps.pm_type < PM_DEAD && traceEnt->NPC!=NULL && !(traceEnt->NPC->scriptFlags&SCF_NO_RESPONSE) ) { NPC_UseResponse( traceEnt, self, qfalse ); WP_ForcePowerStart( self, FP_FREEZE, 1 ); } }//NOTE: no effect on TEAM_NEUTRAL? else { NPC_Jedi_PlayConfusionSound( traceEnt ); } vec3_t torsoDir; AngleVectors( traceEnt->client->renderInfo.torsoAngles, torsoDir, NULL, NULL ); VectorNormalize( torsoDir ); G_PlayEffect( "force/incapacitate_touch", traceEnt->client->renderInfo.torsoPoint, torsoDir ); //make sure this plays and that you cannot press fire for about 1 second after this //FIXME: BOTH_FORCEMINDTRICK or BOTH_FORCEDISTRACT NPC_SetAnim( self, SETANIM_TORSO, BOTH_FORCEGRIP_HOLD, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_RESTART|SETANIM_FLAG_HOLD ); //FIXME: build-up or delay this until in proper part of anim } else { if ( self->client->ps.forcePowerLevel[FP_FREEZE] > FORCE_LEVEL_0 && tr.fraction * 2048 > 64 ) {//don't create a diversion less than 64 from you of if at power level 1 //use distraction anim instead G_PlayEffect( G_EffectIndex( "force/incapacitate_touch" ), tr.endpos, tr.plane.normal ); //FIXME: these events don't seem to always be picked up...? AddSoundEvent( self, tr.endpos, 512, AEL_DISCOVERED, qtrue, qtrue ); AddSightEvent( self, tr.endpos, 512, AEL_DISCOVERED, 50 ); WP_ForcePowerStart( self, FP_FREEZE, 0 ); } NPC_SetAnim( self, SETANIM_TORSO, BOTH_FORCEGRIP_HOLD, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_RESTART|SETANIM_FLAG_HOLD ); } self->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have been in self->client->ps.saberBlocked = BLOCKED_NONE; self->client->ps.weaponTime = 1000; if ( self->client->ps.forcePowersActive&(1<<FP_SPEED) ) { self->client->ps.weaponTime = floor( self->client->ps.weaponTime * g_timescale->value ); } } what i want from this power: 1: npc cannot move. 2: npc animation is stuck until power duration. 2: saber defense and parries are disabled until power duration :\ thanks for every answer. at moment efx and sound and casting animation is perfect, but power not make any effect on NPCs.