Jump to content

SP new game styles (RPG - Space \ air dogfight battles)


Recommended Posts

Posted

found on NPC_spawn.cpp the NPC_canfly field and the parameter that nullify gravity for probe and sentry droids.

added this exception to the new class. :)

Now should move flying and not silly jumping.

 

Well... works for NPC. in the time i wrote AI for fighter, they fight like bobafett \ sithtroper of ecm IV (but flying chasing player and changing weapons.)

need really an auto forward movement for be realistic. >.<

for player again not work much. not leave land.

Posted

3 -disabling force power and saber (a fighter sure cannot use XD but this is easy for force power... for saber... i have not idea how to avoid a class to use the saber as weapon)

 

Doesn't the atst_drivable entity has that information? After all, it has a limited amount of weapons and it doesn't allow either the use of force powers or lightsabers.

Asgarath83 likes this
Posted

Doesn't the atst_drivable entity has that information? After all, it has a limited amount of weapons and it doesn't allow either the use of force powers or lightsabers.

 

Your pretty right, noodle. Sorry, it's pretty hot here in italy and not sleep much in the last times >.< 

For answer you, noddle,i remember the toggleatstweapon function. this enabled only ATST MAIN and SIDE weapon as weapon for drivable atst. the same thing can used also for tie fighter: a togglefighterfunction that disabling the melee and saber weapons.

so that's is not really a problem.

the more hard stuff is code of moves.

 

Question: about your opinion @@Ramikad @@Noodle is better if the NPC \ player fighter class get an auto forward move (like in oldest rogue squadron 3d arcade game) or only NPC that attack player (this avoid me some headache on bg_pmove i guess) and player can get a vertical flying start \ landing and the auto-forward only after the player take velocity in air? (autoforward also should stop if player want to stop the fighter movement and stay upon some place on vertical)... 

i am pretty confuse about movement and i not have idea about how to start with that. this is the baddest trouble for me.

Posted

Question: about your opinion @@Ramikad @@Noodle is better if the NPC \ player fighter class get an auto forward move (like in oldest rogue squadron 3d arcade game) or only NPC that attack player (this avoid me some headache on bg_pmove i guess) and player can get a vertical flying start \ landing and the auto-forward only after the player take velocity in air? (autoforward also should stop if player want to stop the fighter movement and stay upon some place on vertical)... 

i am pretty confuse about movement and i not have idea about how to start with that. this is the baddest trouble for me.

 

I'd try to keep the fighter in the air without moving, like the way the AT-ST and most NPCs have a default state untill they spot a player or get a specific instruction. Perhaps give the ship a default in-air animation like in this video I just did to show you what I mean:

 

 

That's just playing a .roff file located in vjun1/bomber_run_tiebomber_2ndship.roff 

 

The first thing I'd try to do is to see if in that state, the fighter NPC can aim at the player and fire at him whenever he moves, like a normal NPC. After that is done, I think setting movement could be much easier. 

Posted

I'd try to keep the fighter in the air without moving, like the way the AT-ST and most NPCs have a default state untill they spot a player or get a specific instruction. Perhaps give the ship a default in-air animation like in this video I just did to show you what I mean:

 

 

That's just playing a .roff file located in vjun1/bomber_run_tiebomber_2ndship.roff 

 

The first thing I'd try to do is to see if in that state, the fighter NPC can aim at the player and fire at him whenever he moves, like a normal NPC. After that is done, I think setting movement could be much easier. 

seems a right approach. i have already see that with AI of bobafett the tie chase player and shoot... but is too much...

"flying up and down... like a dragonfly or a butterfly... seems silly movement of a rockettrooper XDD

 

however i have a little idea for fastforward vector for player: program like a blaster projectile for playermodel tiefighter

lerporigin, forward.

ti think i will check fx_blaster and wp_blaster_rifle.cpp for see how can works. so should go forward like a projectile and i can define velocity etc. the difference is that this "projectile" is a fighter that chase player... but stay at a safe distance for engage him. mmm

well, i try to do the fly idle status first. :3 thanks for reply

Posted

well, i try to do the fly idle status first. :3 thanks for reply

 

Thank you for doing what so many have tried to for so long!

Posted

Thank you for doing what so many have tried to for so long!

 

ui suppose need to be setted on npc_spawn.cpp when i set the tie for not have gravity like a probe droid.

what i need to do i guess is to add the code part that allow a swoop idle without pilot to static floating and bobbing.

is not exactly perfect like your movement, but should be fine. also because if a tie in the dock bay move on sides or strafe can be difficult for a mapper place the NPC docked fine without geometry compenetration problems with enviroments.

Posted

Found on bg_pmove...i added a FLY_HOVER brank for fighter class...

cute... fly on the sky like a balloon... XD not exactly what we desire, huh?

 

ok, parameter that allow a vehicle to float are: hoverheight and hoverstrenght. i need to add a custom "hoverheight" and "strenght" to tie NPC for allow him to float.

Posted

Ok, really... i have not idea of how damn let fly a fighter. for moment... is like a big and slow car... or a grasscutter. 

 

Is the problem related to the velocity at which the ship moves, or it just doesn't go in the air? Is it moving like a sentry or a probe? Both NPCs move really slow but float in the air. Maybe there's something in the swoop's code regarding movement and velocity. Those NPCs, after all, move really fast and usually avoid collision.

Posted

Is the problem related to the velocity at which the ship moves, or it just doesn't go in the air? Is it moving like a sentry or a probe? Both NPCs move really slow but float in the air. Maybe there's something in the swoop's code regarding movement and velocity. Those NPCs, after all, move really fast and usually avoid collision.

i want to make as AI for NPC an half way between AI_sentry and AI_bobafett (so enemy fighter can also change weapons if NPC file have multiple weapons equipped ) at moment i end an alpha of an AI fighter that duplicated AI sentry. after i need to add:

- bobbing movement when the fighter is in default \ idle state. like your request.

- fast forward movement when fighter is flying (NPC)

- fast forward movement when fighter is flyed by player (more difficult. i see there is an entire file code aboiut fighter.cpp but they are 1000 lines of commands and are all vectors and complex stuff... i am not so skilled to fully understand at moment. this require a looong study for do a movement for player like a tie fighter vehicle )

- fast forward movement for npc, also dodging, evasion, attacking, rolling etc, exactly like a nice starfighter into game like x wing alliance or rogue squadron 3d. also that is very complex.

Posted

Well. now fighter fight exactly like a sentry. follow the player at GREAT speed. but i need to give more distance about minimal distance by shoot the player. too close. i think i will add on statement fighter_idle the "bobbing" movement.

mmm... a tie fighter that chase and atk jedi like this remember me force unleashed XD

Posted

Well. now fighter fight exactly like a sentry. follow the player at GREAT speed. but i need to give more distance about minimal distance by shoot the player. too close. i think i will add on statement fighter_idle the "bobbing" movement.

mmm... a tie fighter that chase and atk jedi like this remember me force unleashed XD

 

Even though there might be much left to do, that is already a great improvement! It could make a very fun boss battle. 

Posted

Even though there might be much left to do, that is already a great improvement! It could make a very fun boss battle. 

yes, now i need to change it with boba fett weapon changing system (so that will be REALLY a fierce boss :P )

, and with "floating" when is idle. and as AI i suppose i ended. :)

about playermodel fighter instead and client player interface and radar HUD ..., eeeeeeeh... please someone help me!!! D: with movement. i can set like an atstdrivable maybe, when fighter is used and is of playerteam... but i cannot give him the atst movements to a flight vehicle >.<

i not know how to move for player control a fighter npc like a fighter vehicle. today i tryed the tie-fighter vehicle into the huge map and should be fine as movement system.

Posted

Good to know that at least there has been some development in this idea! What are the main issues at the moment? 

Posted

Good to know that at least there has been some development in this idea! What are the main issues at the moment? 

 

 

FIGHTER NPC COMBAT - MOVEMENT AI :

 

1 spawn NPC: missing again the hover floating of fighter. also if i spawn with width and height correct parms for fighter, fighter spawn with the down part of is body inside the grass \ terrain... it's like a grasscutter giant XD lol. the fighter however is not affected by gravity and if i spawn on air with noclip  cheat on my jedi, it spawn on air and is static on the air. not again floating.

2 weapon system: i see the fighter have an issue that avoid to be equipped with WP_THERMAL (redundacy of launching thermal sound). use fine WP_ATST_MAIN, WP_ATST_SIDE and WP_EMPLACED_GUN. i'd like to equip also to other weapons howevers and i want fighter can change the weapons are stored into npc data and use alt fire \ fire attack.

3: make a bomber : the unique way for doing a npc acceptable on JKA is to have the concussion alt fire of WP_REPEATER enabled. this can do the "plasma bombs" of tie bomber and fighters in general. this will be useful for making swamrs of NPC that attack a facility with bombardment and you need to defeat with your fighter or your squadron.

for player the bombardment can be nice with WP_DET_PACk too (this weapon not worked never fine on NPC.)

. you can place the bombs dropping on objective of a bombardment mission and activate remotely the detonation. it's like kyle 2 and sullust bombardment mission of rogue squadron 3d in that way! :P

i wanna do this weapons for fighters (player and NPC )

BLASTER_PISTOL? (weak blaster fire maybe for rookie pilots )

BLASTER FIRE: standard blaster fire

DISRUPTOR: a fighter that shoot disgregations ray will be cool to see and to fight against! (like a star trek dogfights ship)

DEMP2: can used for making and E-pulse weapon for destroy of disabled enemy fighter... should replace the ionic cannon.

REPEATER: npc weapons for concussion bombs and concussion repeating plasma torpedo maybe.

CONCUSSION: strong concussion shoot \ antimatter rocket. explode with huge damage on hulls of enemies.

WP_ROCKET_LAUNCHER: absolutely necessary for get seeker torpedo on fighter that can trace and purchase the players.

WP_FLECHETTE (maybe a fragmnet weapon that can equival to chaff \ flare defense system of a fighter? )

other weapons:

AT_ST_MAIN, ATST_SIDE: strong shoot weapons and proton torpedo for elite fighters and heavy weaponed fighters.

WP_EMPLACED_GUN: another fiercy strong weapon.

 

the other SP weapons are not joinable for a fighter concept.

 

Other features:

- Rolling \ dodging skills for tie fighters (this i cannot manage alone with AI, i need some expert of fly vectors )

- tactical use \ switch weapon of fighter (like ai_bobafett and the ai i have builded for sith and sithtrooper for RJA Epic challenge mod )

- self regenerating shield\armor of fighter.

 

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

FIGHTER AS PLAYERMODEL

- make a fighter usable if is on team_player? maybe so player can activate and go inside like a "fighter drivable vehicle"

- a fighter version flying of atst drivable weapon that need to move EXACTLY like tie-fighter vehicle

- radar icon hud to draw when you enter in fighter and disapper when you leave the fighter. maybe also change crosshair forms? (this is hard to do)

- fighter weapons system. (should work like toggleatstweapon features. so you can use weapons stored on NPC data of your fighter )

- self regenerating shield\armor of fighter for player (because you cannot use force heal for heal the fighter in combat :P )

 

 

FOR BOTHS:

- saber resistance of fighters. already done. is more resistance of an hazardtrooper :P  really you you can kill a fighter jumping on top and cutting with saber? good luck. :P too easy and cheap fight. (cortosis hull for starships :P )

use strong weapons like concussion or rocket launcher or an eweb emplaced should be the unique way of destroy this opponent for a jedi on ground. i guess

 

in future will add also a lot of blaster \ light blaster weapons resistance but is pretty easy to do in g_combat so i take this task for last.

Posted

1 spawn NPC: missing again the hover floating of fighter. also if i spawn with width and height correct parms for fighter, fighter spawn with the down part of is body inside the grass \ terrain... it's like a grasscutter giant XD lol. the fighter however is not affected by gravity and if i spawn on air with noclip  cheat on my jedi, it spawn on air and is static on the air. not again floating.

 

Is it possible to make the NPC spawn some units above his point of origin? That way he wouldn't spawn on the floor. Maybe it's related to a collision problem?

 

 

3: make a bomber : the unique way for doing a npc acceptable on JKA is to have the concussion alt fire of WP_REPEATER enabled. this can do the "plasma bombs" of tie bomber and fighters in general. this will be useful for making swamrs of NPC that attack a facility with bombardment and you need to defeat with your fighter or your squadron.

 

Check the tie-bomber entity. It's hard coded to fire bombs every time it's model is spawned as a misc_model_breakable entity.

Posted

Is it possible to make the NPC spawn some units above his point of origin? That way he wouldn't spawn on the floor. Maybe it's related to a collision problem?

 

 

 

Check the tie-bomber entity. It's hard coded to fire bombs every time it's model is spawned as a misc_model_breakable entity.

 

Thanks for idea. for origin again i have not idea because now i am focus on weapon combat system of foes.

 

PS: okay this can set a loop sound engine for fighter spawn. and also a flag damage only by heavy weapons :D

 

Origin fighter bug: there is in game some example of origin fix i can use for see how to fix origin of fighter spawning?

Posted

Origin fighter bug: there is in game some example of origin fix i can use for see how to fix origin of fighter spawning?

 

I have no idea what's causing this weird bug. Both the tie-fighter and the at-st have the model_root bone on the same place. 

Posted

Maybe the issue is related to how the origin is set here. Could it be related to how the mins and maxs are set? 

void SP_misc_atst_drivable( gentity_t *ent )
{
    extern void NPC_ATST_Precache(void);
    extern void NPC_PrecacheAnimationCFG( const char *NPC_type );

    ent->s.modelindex = G_ModelIndex( "models/players/atst/model.glm" );
    ent->playerModel = gi.G2API_InitGhoul2Model( ent->ghoul2, "models/players/atst/model.glm", ent->s.modelindex, NULL_HANDLE, NULL_HANDLE, 0, 0 );
    ent->rootBone = gi.G2API_GetBoneIndex( &ent->ghoul2[ent->playerModel], "model_root", qtrue );
    ent->craniumBone = gi.G2API_GetBoneIndex( &ent->ghoul2[ent->playerModel], "cranium", qtrue );    //FIXME: need to somehow set the anim/frame to the equivalent of BOTH_STAND1...  use to be that BOTH_STAND1 was the first frame of the glm, but not anymore
    ent->s.radius = 320;
    VectorSet( ent->s.modelScale, 1.0f, 1.0f, 1.0f );

    //register my weapons, sounds and model
    RegisterItem( FindItemForWeapon( WP_ATST_MAIN ));    //precache the weapon
    RegisterItem( FindItemForWeapon( WP_ATST_SIDE ));    //precache the weapon
    //HACKHACKHACKTEMP - until ATST gets real weapons of it's own?
    RegisterItem( FindItemForWeapon( WP_EMPLACED_GUN ));    //precache the weapon
//    RegisterItem( FindItemForWeapon( WP_ROCKET_LAUNCHER ));    //precache the weapon
//    RegisterItem( FindItemForWeapon( WP_BOWCASTER ));    //precache the weapon
    //HACKHACKHACKTEMP - until ATST gets real weapons of it's own?

    G_SoundIndex( "sound/chars/atst/atst_hatch_open" );
    G_SoundIndex( "sound/chars/atst/atst_hatch_close" );

    NPC_ATST_Precache();
    ent->NPC_type = (char *)"atst";
    NPC_PrecacheAnimationCFG( ent->NPC_type );
    //open the hatch
    misc_atst_setanim( ent, ent->rootBone, BOTH_STAND2 );
    gi.G2API_SetSurfaceOnOff( &ent->ghoul2[ent->playerModel], "head_hatchcover", 0 );

    VectorSet( ent->mins, ATST_MINS0, ATST_MINS1, ATST_MINS2 );
    VectorSet( ent->maxs, ATST_MAXS0, ATST_MAXS1, ATST_MAXS2 );

    ent->contents = CONTENTS_SOLID|CONTENTS_BODY|CONTENTS_MONSTERCLIP|CONTENTS_BOTCLIP;
    ent->flags |= FL_SHIELDED;
    ent->takedamage = qtrue;
    if ( !ent->health )
    {
        ent->health = 800;
    }
    ent->s.radius = 320;

    ent->max_health = ent->health; // cg_draw needs this

    G_SetOrigin( ent, ent->s.origin );
    G_SetAngles( ent, ent->s.angles );
    VectorCopy( ent->currentAngles, ent->s.angles2 );

    gi.linkentity ( ent );

    //FIXME: test the origin to make sure I'm clear?

    ent->e_UseFunc = useF_misc_atst_use;
    ent->svFlags |= SVF_PLAYER_USABLE;

    //make it able to take damage and die when you're not in it...
    //do an explosion and play the death anim, remove use func.
    ent->e_DieFunc = dieF_misc_atst_die;

Posted

 

Maybe the issue is related to how the origin is set here. Could it be related to how the mins and maxs are set? 

void SP_misc_atst_drivable( gentity_t *ent )
{
    extern void NPC_ATST_Precache(void);
    extern void NPC_PrecacheAnimationCFG( const char *NPC_type );

    ent->s.modelindex = G_ModelIndex( "models/players/atst/model.glm" );
    ent->playerModel = gi.G2API_InitGhoul2Model( ent->ghoul2, "models/players/atst/model.glm", ent->s.modelindex, NULL_HANDLE, NULL_HANDLE, 0, 0 );
    ent->rootBone = gi.G2API_GetBoneIndex( &ent->ghoul2[ent->playerModel], "model_root", qtrue );
    ent->craniumBone = gi.G2API_GetBoneIndex( &ent->ghoul2[ent->playerModel], "cranium", qtrue );    //FIXME: need to somehow set the anim/frame to the equivalent of BOTH_STAND1...  use to be that BOTH_STAND1 was the first frame of the glm, but not anymore
    ent->s.radius = 320;
    VectorSet( ent->s.modelScale, 1.0f, 1.0f, 1.0f );

    //register my weapons, sounds and model
    RegisterItem( FindItemForWeapon( WP_ATST_MAIN ));    //precache the weapon
    RegisterItem( FindItemForWeapon( WP_ATST_SIDE ));    //precache the weapon
    //HACKHACKHACKTEMP - until ATST gets real weapons of it's own?
    RegisterItem( FindItemForWeapon( WP_EMPLACED_GUN ));    //precache the weapon
//    RegisterItem( FindItemForWeapon( WP_ROCKET_LAUNCHER ));    //precache the weapon
//    RegisterItem( FindItemForWeapon( WP_BOWCASTER ));    //precache the weapon
    //HACKHACKHACKTEMP - until ATST gets real weapons of it's own?

    G_SoundIndex( "sound/chars/atst/atst_hatch_open" );
    G_SoundIndex( "sound/chars/atst/atst_hatch_close" );

    NPC_ATST_Precache();
    ent->NPC_type = (char *)"atst";
    NPC_PrecacheAnimationCFG( ent->NPC_type );
    //open the hatch
    misc_atst_setanim( ent, ent->rootBone, BOTH_STAND2 );
    gi.G2API_SetSurfaceOnOff( &ent->ghoul2[ent->playerModel], "head_hatchcover", 0 );

    VectorSet( ent->mins, ATST_MINS0, ATST_MINS1, ATST_MINS2 );
    VectorSet( ent->maxs, ATST_MAXS0, ATST_MAXS1, ATST_MAXS2 );

    ent->contents = CONTENTS_SOLID|CONTENTS_BODY|CONTENTS_MONSTERCLIP|CONTENTS_BOTCLIP;
    ent->flags |= FL_SHIELDED;
    ent->takedamage = qtrue;
    if ( !ent->health )
    {
        ent->health = 800;
    }
    ent->s.radius = 320;

    ent->max_health = ent->health; // cg_draw needs this

    G_SetOrigin( ent, ent->s.origin );
    G_SetAngles( ent, ent->s.angles );
    VectorCopy( ent->currentAngles, ent->s.angles2 );

    gi.linkentity ( ent );

    //FIXME: test the origin to make sure I'm clear?

    ent->e_UseFunc = useF_misc_atst_use;
    ent->svFlags |= SVF_PLAYER_USABLE;

    //make it able to take damage and die when you're not in it...
    //do an explosion and play the death anim, remove use func.
    ent->e_DieFunc = dieF_misc_atst_die;

 

Mmmm, i'll copy that on the spawn code of tie fighter and i 'll try what happen.

if fix the bug, i will fix code cleaning up by unuseful function for a fighter. 

 

i suppose should be the ent->s.radius to fix the collider bounding box.

Posted

I was thinking on how you could make the fighter chase the player when he's in a ship and remembered that the rocket launcher alt-fire chases the player as he moves around the place. Could the answer to your problem be there? Maybe there's some bit of code that explains how vectors work so they can chase the player. 

Posted

I was thinking on how you could make the fighter chase the player when he's in a ship and remembered that the rocket launcher alt-fire chases the player as he moves around the place. Could the answer to your problem be there? Maybe there's some bit of code that explains how vectors work so they can chase the player. 

 

well, for chasing... chasing... only if they reach the player they stop and are in static fly ' round the player shooting without strafing much... like a sentry droid without strafing. yes, should better a moving like a seeker. good idea to see the seeker projectile alt fire code about that. but instead of reach and hit and collide with player need to maintaine safe distance. a seeker AI movement should be nice for fighters for space battles.

 

sorry today i cannot code much. but i tested your idea on NPC.spawn and it not fix nothing about spawn fighter origin problem.

by other side, however, it is useful because make the fighter usable and when you got inside it is like pilot an atst. only when you leave the fighter... you become magically an atst :P

i need to work on the part that save and preserve playermodel.

however, this is nice. with a team restriction (you cannot enter into an enemy fighter) this can allow the use of a fighter for player.

all need to player part of code now is hud, weapon system and fly and drive a fighter like a fighter vehicle.

(so i think i need to call AI of fighter_NPC.cpp  file

 

i need just to

Noodle likes this

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...