JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.03k stars 614 forks source link

NPCs and WP_Melee... #112

Closed dusty22 closed 11 years ago

dusty22 commented 11 years ago

So in Single Player... NPCs only use heavy melee, where they slow punch you and it does like 30+ damage a hit. And then you have cultists which are hard-coded to only use force powers, but it can't seem to be duplicated.

It'd be so cool if you could add fields to NPCs that have melee, like: 1) fastMelee - 1 (defaults to heavy melee if not set) Will punch/kick at normal speed but only does normal damage. (normal damage = whatever the coded/weapons.dat damage is, heavy melee = 4x normal damage, which is how the game is already coded)

2) canKick - 1 Allows the NPC to throw kicks periodically like a saberist.

Perhaps non-force only melee users with force powers could use AI code like saberists/force cultists? Where at range they only use force-powers, but up close they might throw in a couple punches/kicks?

I mean, melee users, force-wielding or not, just run a straight B-line up to you, unless if they're a force-only cultist, which then they circle and strafe around you like a saberist.

eezstreet commented 11 years ago

You're better off making a CLASS_CULTIST or something for this, since all of these would also apply to gran_boxer and would change gameplay otherwise.

dusty22 commented 11 years ago

Well, I would think you would just have everything default to the way it normally is, so it doesn't mess up/change current NPCs, and have these new modifiers would only change anything if they were even present in the .npc file, kind of like Raven adding all the .sab file modifiers in version 1.01 of JA.

No asset modding/touching/changing necessary ;)!

eezstreet commented 11 years ago

Problem is that if you hardcode "noForce" to be off for all but cultists, you're really just exchanging one hardcode for another and nothing is really solved at that rate. Like I said, it'd make more sense mod-wise to make a CLASS_CULTIST for this sort of thing.

Date: Sun, 14 Apr 2013 13:55:21 -0700 From: notifications@github.com To: OpenJK@noreply.github.com CC: eezstreet@live.com Subject: Re: [OpenJK] NPCs and WP_Melee... (#112)

Well, I would think you would just have everything default to the way it normally is, so it doesn't mess up/change current NPCs, and have these be new modifiers purely code that would be recognized in NPC files. No asset modding/touching/changing necessary ;)!

— Reply to this email directly or view it on GitHub.

dusty22 commented 11 years ago

Perhaps have force-only not affect cultists? I'm guessing you get this, but I'm saying have the default values for all these be 0 if not specified.

eezstreet commented 11 years ago

Then we're back to where I started: you'd need an asset pack, and the whole point of this is to work without an asset pack required

Date: Sun, 14 Apr 2013 16:13:43 -0700 From: notifications@github.com To: OpenJK@noreply.github.com CC: eezstreet@live.com Subject: Re: [OpenJK] NPCs and WP_Melee... (#112)

Perhaps have force-only not affect cultists? I'm guessing you get this, but I'm saying have the default values for all these be 0 if not specified.

— Reply to this email directly or view it on GitHub.

dusty22 commented 11 years ago

I don't think you're understanding me.

Say I have a .sab file. In the sab file if I want the saber to have a saber length of 40, I need to write "saberLength 40" in the file, or else it will default to a length of 32 with me leaving that field out entirely. Why can't .npc files just default to their stuff?

If I downloaded a code-only mod that added new modifiers for the code to search for and activate if found in .npc files, why would .npc files need to be changed? That seems silly to me. When Raven added the "damageScale" field in JA 1.01, they didn't have to redo all the .sab files with "damageScale 1.0" to make sure the damages were right, they didn't touch any of that, they just left it the way it was.

eezstreet commented 11 years ago

You're missing the point of what I'm saying here.

You're wanting to add a "forceOnly" field to enemies that use Melee. That's all fine and good. EXCEPT - you have to deal with gran_boxer and other enemies that rely on melee attacks. If you default it to 1, all of those enemies are broken. If you default it to 0, you have to write the special case for cultists into the code (aka redundant/pointless hardcode) OR release an asset pack in order to make the game work properly for gran_boxer/melee enemies. That's not something we want to do. Any asset packs should be purely optional, and the lack thereof shouldn't break game features.

Date: Sun, 14 Apr 2013 18:29:57 -0700 From: notifications@github.com To: OpenJK@noreply.github.com CC: eezstreet@live.com Subject: Re: [OpenJK] NPCs and WP_Melee... (#112)

I don't think you're understanding me.

Say I have a .sab file. In the sab file if I want the saber to have a saber length of 40, I need to write "saberLength 40" in the file, or else it will default to a length of 32 with me leaving that field out entirely.

Now if I downloaded a code-only mod that added new modifiers for the code to search for and activate if found, why would .npc files need to be changed? That seems silly to me. When Raven added the "damageScale" field in JA 1.01, they didn't have to redo all the .sab files with "damageScale 1.0" to make sure the damages were right, they didn't touch any of that.

— Reply to this email directly or view it on GitHub.

dusty22 commented 11 years ago

Well having it default to 1 would be silly IMO.

Anyways, cultist NPCs are kind of their own thing in my experience, they are special hardcodes that cannot be replicated by the player, which is why I suggested the "forceOnly" field. Why would "forceOnly" even have to be factored by them? Perhaps I'm oversimplifying, but with their hardcodes, they're practically locked that way, their AI could just ignore that field honestly in my opinion. I mean, my whole idea on this was custom NPCs, nothing to do with base/un-modded NPCs.

I'm kinda dissapointed you'd close my topic so quickly, I don't even want it that bad, but still... I guess I can't get you to reconsider? Anywhoo I'll let it go for now.

eezstreet commented 11 years ago

Well if you want people to recreate the behavior of cultists, I can change the behavior of their hardcodes slightly so that they're not quite as hardcoded. Hence, CLASS_CULTIST. Or at the very least, alter the way the hardcode works so that it doesn't hardcode by the exact name of the NPC, rather what it begins with (ie, anything that STARTS with "cultist_lightning" behaves similar to cultist_lightning, et al

Date: Thu, 18 Apr 2013 14:04:36 -0700 From: notifications@github.com To: OpenJK@noreply.github.com CC: eezstreet@live.com Subject: Re: [OpenJK] NPCs and WP_Melee... (#112)

Well having it default to 1 would be silly IMO.

Anyways, cultist NPCs are kind of their own thing in my experience, they are special hardcodes that cannot be replicated by the player, which is why I suggested the "forceOnly" field. Why would "forceOnly" even have to be factored by them? Perhaps I'm oversimplifying, but with their hardcodes, they're practically locked that way, their AI could just ignore that field honestly in my opinion. I mean, my whole idea on this was custom NPCs, nothing to do with base/un-modded NPCs.

I'm kinda dissapointed you'd close my topic so quickly, I don't even want it that bad, but still... I guess I can't get you to reconsider? Anywhoo I'll let it go for now.

— Reply to this email directly or view it on GitHub.

dusty22 commented 11 years ago

Sry I took so long to reply, I was just thinking about what my response would be. Thanks for offering to do this though!

So, I think it'd be nice if the force-only hardcode looked for NPCs starting with the name "cultist...", and then class_reborn and wp_melee, if this is possible. I believe you originally told me the SP code was supposed to work this way. Any chance we could get fastMelee and canKick too? Or naah?

EDIT: Updated the 1st post slightly.

eezstreet commented 11 years ago

fastMelee and canKick kinda fall under gameplay, so no. As for your other suggestion, I'll see what I can do about rigging up something for cultists. Ideally I'd want to fix their completely broken AI in MP too.

Date: Sun, 21 Apr 2013 03:37:28 -0700 From: notifications@github.com To: OpenJK@noreply.github.com CC: eezstreet@live.com Subject: Re: [OpenJK] NPCs and WP_Melee... (#112)

Sry I took so long to reply, I was just thinking about what my response would be. Thanks for offering to do this though!

So, I think it'd be nice if the force-only hardcode looked for NPCs starting with the name "cultist...", and then class_reborn and wp_melee, if this is possible. I believe you originally told me the SP code was supposed to work this way.

Any chance we could get fastMelee and canKick too? Or naah?

— Reply to this email directly or view it on GitHub.

dusty22 commented 11 years ago

Fair enough I suppose! Thank you!