Jump to content

Home

Dual saber Tutorial


Kyle098

Recommended Posts

just open jedimod 1.2 source

open the game msvc workspace and search for "mod_dualsaber" in all the files....

 

and then read the code until you understand it....

then move to an other part of the code....

 

it's would be very long to write a tutorial like this cause there are so many places were the code has been changed ...

 

so just read the code and you'll understand...

if you have specific questions about a function or a few lines then ask your questions then sure we'll explain it to you ....

but don't expect someone to tell you which lines to modify one by one ...

 

good luck

Link to comment
Share on other sites

I would like to begin by saying that the coders on this forum are willing to help with any problem you may be encountering. That being said, there are a few things that should be made clear about 'help' requests. I think this snippet from the Quake3Wrold Mod Programming forum FAQ sums it up nicely. Please bear in mind that this is not a flame or insult of any kind, it will simply help explain why some of us react the way we do to requests such as this.

 

Originally posted on Quakw3World Modifications Programming FAQ

 

Why are the veterans of this forum such a$$holes to newbies?

 

No one on this forum will be offensive for no reason (with a couple of exceptions ;)). If somebody answers with an abrasive response more often than not it is because the question asked was very vague.

 

For example:

 

"I've been playing with the Q3 source for a week now. I made some changes and now whenever I jump Q3 crashes. Anybody know why?"

 

Of course not. When you ask a question, post as much information as you can about the problem and be very specific about what the problem actually is:

 

"I've been playing with the Q3 source for a week now. I made some changes and now whenever I jump Q3 crashes. I did a little bit of research and I found that Q3 is crashing in the G_ICrashInHere() function. I've looked through it but I can't see anything wrong.

 

 

Can anybody see anything wrong with this block of code? Thankyou."

 

"Hey. I just got the Q3 source and I want to make a mod. I haven't done any programming before so I was wondering if you guys could tell me how to implement 1. Realistic weapons 2. Realistic Falling damage 3. Sniper scope 4. Survial style gameplay?"

 

We are not your slaves. That means we are not going to implement features in your mod for you. A better question would have been:

 

"Hey. I just got the Q3 source and I want to make a mod. I haven't done any programming before but I am eager to learn. Could you point me to some tutorials or guides that might help me learn programming?"

 

"Does anyone know how to get QVM's to compile under Windows 98 or how to get Q3 to allow more than 16 weapons?"

 

These questions are in this FAQ. The FAQ is there for a reason. Please read it. Oh... hangon. Nevermind.

 

So in summary:

 

  • Be specific
  • Don't expect others to do your work
  • Don't ask questions that have been answered before
  • Most importantly - be polite. And humble - programmers are a queer bunch who like to be constantly reminded how "l33t" they are

 

We really should add something like this to our FAQ

Link to comment
Share on other sites

lol, hehe, yeah that does make kinda sence, but now we need some people for JK2 tutorials tho, i could do some of them, but i am just on my way making a mod 2 :p

 

i also looked at the quake3 tutorials that are pointed at in the Faq, but they don't make sence coz the code isn't the same. (they changed/updated/modified the engine, so thats normal) :p

Link to comment
Share on other sites

also looked at the quake3 tutorials that are pointed at in the Faq, but they don't make sence coz the code isn't the same. (they changed/updated/modified the engine, so thats normal) :p

 

you don't make sense !!

 

the code is modified of course but it's still the quake engine and most of the structure of the code and even functions are the same....

 

btw the code3arena tutorials whihc are for QUAKE are the best you can find for jk2 on the net...

Link to comment
Share on other sites

yeah sorry that was a little too rude ...

 

but when you will have a better understanding of how the engine works you will figure out that jk2 really really looks like quake 3...

 

the only major change is the ghoul2 support which changes a lot of things i agree on this point .

 

if you carefuly read the q3 and jk2 source you'll figure out ...

Link to comment
Share on other sites

Tchouky's right, the code from Q3 IS the JK2 code, just modified a bit. The only real way to learn about the JK2 code is to study some C tutorials on the web. Once you have a fundamental understanding of how (and more importantly WHY) the language works the way it does, then JK2 source starts to make more sense. Actually the JK2 code is pretty straight forward, once you understand how C works, it reads pretty much like a book. Then you can start at the main, get some paper, draw a few boxes for variable values, and start decoding it. (the veteran coders out there are rolling their eyes and saying "god I HATE desk-checking" right now ;) ).

Link to comment
Share on other sites

hehe, yeah lol. that is the one thing that does suck tho, i don't have any schools or hardly any books about C++ so i am learning myself it :p

 

i'm glad with JK2 source coz it's indeed straight forward. It's the first game since Quake2 that i can make a mod for :D

 

so u all just wish me luck ;)

 

btw, this is the mod that i am working on. more a sort of funmod.

 

 

http://www.nuclearfun.tk

 

 

Grtz, aS^Tetsuo

Link to comment
Share on other sites

wow thanks for the tutorial,i l myself am learning c++ one step at a time, While moddifying this game:D . so for me its like wen you learn a new language,right now i am at the stage where i understand what is being said(not everything) and can modify it,but wouldnt be able to make a program myself.(other than a really simple if then program:D :D )these tutorials make me understand more and more of the code.

 

the funny thing is that i am going through this trouble of learning myself when next semester in school i have a c++ class, but of course my coding of this game cant wait that long.(god damn it why did i have visual basic first semester and not 2nd.):)

if anyone finds any more tutorials then post them here.

 

also i understand what you guys are saying about looking through the code because from doing that i have already made my own mod,its based on jedimod,it gives admin full control of the weopon damage and speed(it took me quite a while to figurte out how to make the speed a variable because it wouldnt let me have the speed number a variable,it had to be a constant.) i added the jetpack,gravity boots,alot more cvars, like 10 more emotees and more!!,i sent it to jk2files like a week or two ago but they havent posted it yet,it is called JediRage BETA.

Link to comment
Share on other sites

Tchouky's right, the code from Q3 IS the JK2 code, just modified a bit

 

Not true Primesghost. JKII is part Team Arena AND Elite Force coding. True, it was all build on the TA engine. (TA is the updated QIII engine.) The things Raven added were alot of stuff. Like of course glm's, gla's and other sh*t that was in EF.

Link to comment
Share on other sites

I've always believed that tutorials should do more than just say "Copy my modded code here and paste into your workspace at line x. Load the game and poof you're done."

 

Tutorials should try to also teach why the modifications you're making work the way they do. If someone learns that from a tutorial, then they can take what they learned in the tutorial and apply it to other areas of the code.

 

I think that the most important thing to know when you want to start coding is that the C language is very complex. And the JK2 source code is a very complex program written in a complex language. There's no way you can just sit down and start modding the code without a firm understanding of C syntax and the underlying logic that drives all computer programs. No one should expect to open the source and "learn it as you go".

 

Another thing to keep in mind is patience. Don't expect to just jump into the source and start coding away (unless you want to make a lot of revisions and get a huge headache). The best way to go about it is to get some paper (or open notepad) and start going through the function you wish to modify. Break it down line by line, make sure you understand what, when, and where everything is happening, what other functions are being called, and what values are being passed. Once you think you have a firm understanding of it, change a value or two, compile and load it into JK2. If the changes you made produced the results you expected, then you're on the right track (you should probably try this part a couple times with different variables and values).

 

I could go on in this manner for quite some time, but I think I'll write a tutorial on how to get started coding instead. I'll post a link to it when I get it done.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...