Jump to content

Ask me anything about the Jedi source code


Recommended Posts

Posted

Not sure what you're asking - did KOTOR borrow anything from Jedi?  No, completely different studios, completely different engines.  Their lightsaber combat was based entirely on standing in place and playing canned animations while rolling "invisible dice" to see if you hit or not.  Ours was dynamic, player-controlled and relied on hitscans to see where the lightsaber actually hit.  Not that one was better than the other - that's just the difference between an RPG and an action game (though later RPGs would blur those lines to make them more appealing to the mass market of gamers).

Have you seen the Jedi Knight Galaxies thread, devs been making mod that makes game mmo style sorta so it's like star wars galaxies but with jedi academy combat. There was a video on youtube where quests looked similar to kotor, it has quite alot of potential but still heavily WIP lol sorry if a bit off topic..

MGummelt likes this
Posted

@@MGummelt

 

If one is trying to raise the NPC limit, what steps would they need to take?

 

Pretty common to just attempt to raise the MAX_NPC_DATA_SIZE variable, but I feel there's more to it than that. Do you know of any other lines of code that need tweaking?

That should be all you have to do, for example: define MAX_NPC_DATA_SIZE 0x80000

default is 0x20000

 

MGummelt likes this
Posted

Yeah, sounds good!  My idea was deeper than the KOTOR workbench - it was to have you actually assemble it yourself build it by manipulating the pieces, aligning it just right and tuning it until it "resonated" just right.  By feel - use the "force" to feel when it was done correctly, etc.  That would be interesting if you had a mission where you had to collect and cook (or, in my original idea: meditate over) the crystals first to prepare them.

Do you still have your code? Maybe upload it to github or another repository... maybe coders here in the community would have an interest in it?

Smoo likes this
Posted

Do you still have your code? Maybe upload it to github or another repository... maybe coders here in the community would have an interest in it?

No code, never made it past the pitch phase.  :/

Posted

Unfortunately it's a false solution (for single player), increasing it to 0x40000, 0x80000, or leaving it at 0x20000 makes no difference.

 

My findings: https://jkhub.org/topic/9105-developer-thread-linken233/?do=findComment&comment=130625

Perhaps you're hitting another limit.  How many .npc files are you trying to load?  Look in NPC_LoadParms() in NPC_stats.cpp.

 

void NPC_LoadParms( void )
{
int len, totallen, npcExtFNLen, fileCnt, i;
char *buffer, *holdChar, *marker;
char npcExtensionListBuf[2048]; // The list of file names read in

See that last one?  That's a string buffer 2048 characters long.  That means the list of files it will read in can only be 2048 characters long.  If you have a ton of separate .npc files (instead of putting multiple ones in a single .npc file), and you have a long path to your .npc files (that really shouldn't be an issue) and/or long .npc file names - *maybe* you're hitting that limit instead.  Try increasing that to 4096 or 8192.  Or put all your npcs in one .npc file.

 

Other than that, I don't see what else could be your problem.  Are you actually getting the "NPC_LoadParms: ran out of space" error when reading in your NPCs?  Or does it just stop?  If it's the former, then increasing MAX_NPC_DATA_SIZE is the solution.  If it's the latter, my above suggestion is the solution.

 
At your other topic, I posted an explanation of hexidecimals and how that relates to the more common base 10 and binary counting systems.
Smoo likes this
Posted

Unfortunately it's a false solution (for single player), increasing it to 0x40000, 0x80000, or leaving it at 0x20000 makes no difference.

 

My findings: https://jkhub.org/topic/9105-developer-thread-linken233/?do=findComment&comment=130625

The max data is a good solution if you create a unique, big NPC file like into Jedi outcast and put all your personal NPC entries in this file.

nstead if you want to get THOUSANDS of NPC files into NPC folder... yes, you need to edit the field quoted by MGummelt .

on my mod i have hundreds of NPCs but the npc files are relatively fews because i created NPC file by categories.

in your mode you can organize maybe with a BIG file with ALL droid entries, a file with ALL jedi, another with all siths, another with all creatures and monsters, another with all star wars saga characters... and another with edited default JO\ JKA  npc. should work. :)

on my mod i simply put a file for all vampires, one for all reavers, one for all sarafan warrior etc etc... also without editing the max file number readable, until this moment i never get trouble of bypass the limit.

Smoo likes this
  • 1 month later...
Posted

Sweet! I just noticed this thread! I recognized your name right away. Too bad you weren't around 5 years sooner.

My question is: Why did you guys feel the need to change the fight animations. What were the deciding factors? I'm obviously partial to the older JO animations, hence why I don't play JA. I love all the other aspects of JA like vehicles and a more dynamic play regarding how interactive a player is with their environment.

Posted

Alright, i've tried to stay out of this but last year I played through JKO and JKA again just to recapture some inspiration and for the joy of it. While I see allot of people bombing you with tons of questions at once I have only one. It was a concern as soon as I launched JKA the first time and started watching the opening scenes.

Who the hell was responsible for the creation of Rosh Penin and why were they not slapped and fired on the spot for bringing this evil into the world!

Stoiss likes this
Posted

Alright, i've tried to stay out of this but last year I played through JKO and JKA again just to recapture some inspiration and for the joy of it. While I see allot of people bombing you with tons of questions at once I have only one. It was a concern as soon as I launched JKA the first time and started watching the opening scenes.

 

Who the hell was responsible for the creation of Rosh Penin and why were they not slapped and fired on the spot for bringing this evil into the world!

 

That's a good question. Although without Rosh Penin we probably wouldn't have had the epic Christmas Episode of Jedi Academy Re-edited :P

AngelModder and Smoo like this
Posted

That's a good question. Although without Rosh Penin we probably wouldn't have had the epic Christmas Episode of Jedi Academy Re-edited :P

This is soo true... EagleStriker was the shit! I think I got his name right. But on a serious design note I'm just going to paint a clear picture true fans of a  generally dark story do no appreciate a Jar Jar binks like character. Which essentially is what Rosh was; a humor touch to it all, the problem was the because of the lack of interaction with Kyle and again a lack of interaction with Rosh you didn't care about either when it came to the choice of light and dark, all you knew was Rosh was an annoyingly over competitive pos and a cowardly traitor. Kyle you sadly only had two missions where he actually was there. Seriously who sends a Jedi Padawan out on like 9 deadly missions by themselves. It was simnply poor story and plot driving writing that screwed JKA and ultimately lead to there not being another due to sales and opinion reflecting negatively.

 

On the outside of it all, the designers took the easier road by avoiding using Kyle as the main character and went with the easier road of making some thing new. NOW some thing new isn't always bad but in the situation of a legacy driven by a particular character you (if your not going to make them the playable toon) need a LOT of interaction with them. Finding this balance is hard for those who despite affording to say so were severely rushed in making JKA. This rushed concept is not only apparent in the game it's self but also very much the opinion of several of this games designers not simply the one being questioned here.

While I wont go so far as to drive up old convo's or topics. many of them acknowledged this game was released ahead of schedule by pressure from the as we'll call them overseers. It's this drive for quick money of a stable name that has killed many things. 

The JK series is just one of many that deserved more credit then it was given, and despite the embarrassment the JKA brought to the titles prestige, it deserved a second chance. It still in many ways does even now after all these years. How many old games like this do you still see so many people working there ass off to preserve and restore?

 

This also ties into the short sighted nature of most companies these days. MODDING keeps games alive as much as a great story and an awesome multiplayer. The secret? DONT FRIGGIN RUSH YOUR PROJECTS...

  • 2 months later...
Posted

Hey, just made an account for JKHub to respond to a thread about manual saber blocking and figured I'd offer up my insights if anyone had any questions about the Jedi Outcast or Jedi Academy source code (SP or MP). It's been almost 15 years since I've written or even seen most of it, but hopefully if you ask me a specific question about a specific chunk of code (copy/paste a chunk or gimme a file name and line number) I can at least try to jog my memory and speak intelligently about it. ;)

 

I'll try to check back if people have questions.

Saw Your interview here - 

 

Rly inspiring video... The fact that You started from modding is amazing (With this game and Jk2 i started my modding adventure and my intrest in Map creating, 3D modelling etc) . You and Your team Have created a Masterpiece and You passed a Torch to the People on this site.  Love the games .. Jedi Academy and Jk2 are my favourtie games

 

And also the fact that i see Your comments here and that You started the topic on Hub is just .. amazing. 

 

Thank You @@MGummelt , People from Your team and JkHub People for keeping this game alive. 

 

 

 

I hope many new great things will be created by the hands of the modders!

 

 

 

MGummelt likes this
Posted

It's a shame that he never confirmed his identity to us, otherwise we would have had a nice interview. He disappeared from here right when we had asked him.

Posted

Saw Your interview here - 

 

Rly inspiring video... The fact that You started from modding is amazing (With this game and Jk2 i started my modding adventure and my intrest in Map creating, 3D modelling etc) . You and Your team Have created a Masterpiece and You passed a Torch to the People on this site.  Love the games .. Jedi Academy and Jk2 are my favourtie games

 

And also the fact that i see Your comments here and that You started the topic on Hub is just .. amazing. 

 

Thank You @@MGummelt , People from Your team and JkHub People for keeping this game alive. 

 

 

 

I hope many new great things will be created by the hands of the modders!

 

 

 

 

Thanks, man!  It's pretty cool when we hire someone new at Raven and it turned out they used to mod Jedi... Full circle moment.  :)

Langerd and Noodle like this
Posted

It's a shame that he never confirmed his identity to us, otherwise we would have had a nice interview. He disappeared from here right when we had asked him.

 

You're not talking about me, right?  I offered to prove it, took a picture and everything, then everyone said not to bother and that it was obvious I was who I said I was from my answers to everyone's questions.  I then I hung around for weeks answering questions - I certainly didn't "disappear" because someone asked me to prove I am who I am.

Posted

Hey ! is there any way to be able to force push saber throws away ?

 

This would be pretty simple to code, since you can already block a thrown saber and send it scattering away.  Just have the force push code look for thrown sabers and knock them away like the saber blocking code does.

J450N likes this
Posted

Even cooler... steal/snatch (force grab) the in-air saber (if you're a single saber user) and then become a dual wielder?!

 

Again, totally doable. Have the force pull code pull the thrown saber to you and change the owner so that if it touches you, it gets added to your list of sabers.  Might need to do some work to set the player weapons to be a dual saber user for them to catch the second saber and use it properly, but it should be doable.

Archangel35757 likes this
Posted

Alright, i've tried to stay out of this but last year I played through JKO and JKA again just to recapture some inspiration and for the joy of it. While I see allot of people bombing you with tons of questions at once I have only one. It was a concern as soon as I launched JKA the first time and started watching the opening scenes.

 

Who the hell was responsible for the creation of Rosh Penin and why were they not slapped and fired on the spot for bringing this evil into the world!

 

LOL!  He is a little prick, isn't he?  Blame the writer.  ;)

SomaZ and AngelModder like this
Posted

You're not talking about me, right?  I offered to prove it, took a picture and everything, then everyone said not to bother and that it was obvious I was who I said I was from my answers to everyone's questions.  I then I hung around for weeks answering questions - I certainly didn't "disappear" because someone asked me to prove I am who I am.

 

I wasn't aware of any reply to our email to you, and since this is the first response we get since March, it definitely could be classified as disappearing. :P No offense meant of course, just seemed odd. Also, answering questions about the game code isn't especially sound proof, because there are tons of people out there that know these game's code inside and out, maybe even more-so than a developer that created it, because you created it so long ago.

 

And don't get me wrong, I don't think you'd be an imposter because I think that would be a very silly and pointless thing for someone to do. However, the JKA community has a track record of doing silly and pointless things to spite others in the community, especially JKHub. We have to be sure when approaching things like this.

Posted

this is the first response we get since March

 

Yeah, I answered questions for about 6 weeks then stopped coming back because people stopped asking questions. :)

Posted

LOL!  He is a little prick, isn't he?  Blame the writer.   ;)

 

He made choosing to remain on the light side really hard. Recently I've been wandering about the differences in the AI in JO and JA. Why do gunners behave in such a different way in Jedi Academy? I've been replaying Jedi Outcast a lot and I can't help but notice how different it is when stormtroopers move around the map, firing quickly and dodging bullets, while in Jedi Academy they just stay stationary. 

Posted

He made choosing to remain on the light side really hard. Recently I've been wandering about the differences in the AI in JO and JA. Why do gunners behave in such a different way in Jedi Academy? I've been replaying Jedi Outcast a lot and I can't help but notice how different it is when stormtroopers move around the map, firing quickly and dodging bullets, while in Jedi Academy they just stay stationary. 

 

A different person did the AI for the non-Jedi in Academy.  Plus the map designers can script them to be stationary if they want.  But, mostly, it was the new AI programmer on Jedi Academy that rewrote their AI and changed their behavior so much.

Smoo and Noodle like this
Posted

Hope you can help me with this small problem.

 

Im looking to make single player lightsaber so that.

 

As it is now.

At the point of impact , where the saber hits an enemy. If it is not a strike that causes dismemberment or a kill strike due to low health. The saber passes through the enemy (npc,s) body causing damage.

 

what I'm trying to do.

At the point of impact , where the saber hits an enemy. If it is not a strike that causes dismemberment or a kill strike due to low health. The saber bounce's off the enemy (npc,s) body causing damage.

 

I have made a small piece of code to call at the point where the saber impacts the body 



void G_SaberBounceNokill(gentity_t* self, gentity_t* other, qboolean hitBody)
{
	if (self && self->client)
	{
		if (!PM_SaberInSpecialAttack(self->client->ps.torsoAnim))
		{
			if (SaberAttacking(self))
			{// saber has hit enemt but didn't kill or dismember so bounce off his body
				self->client->ps.saberMove = PM_SaberBounceForAttack(self->client->ps.saberMove);
				self->client->ps.saberBlocked = BLOCKED_BOUNCE_MOVE;
			}
			else
			{
				self->client->ps.saberBlocked = BLOCKED_ATK_BOUNCE;
			}
		}
	}
}

​My problem is that I can not find the exact location where I should call this piece of code.

 

I'm thinking in qboolean WP_SaberApplyDamage.

 

I have tried this.

if ( victim->client
							&& (victim->s.weapon == WP_SABER || (victim->client->NPC_class==CLASS_REBORN) || (victim->client->NPC_class==CLASS_WAMPA))
							&& !g_saberRealisticCombat->integer )
						{//dmg vs other saber fighters is modded by hitloc and capped
							totalDmg[i] *= damageModifier[hitLoc[i]];
							if ( hitLoc[i] == HL_NONE )
							{
								maxDmg = 33*baseDamage;
							}
							else
							{
								maxDmg = 50*hitLocHealthPercentage[hitLoc[i]]*baseDamage;
							}
							if ( maxDmg < totalDmg[i] )
							{
								totalDmg[i] = maxDmg;
							}
							G_SaberBounceNokill(victim, ent, qfalse);
						}

​But it does not give the effect I'm looking for.

 

I just want a non kill strike to bounce off the point of impact instead of passing through the body 

 

can you help??

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