PDA

View Full Version : OJP Enchanced sabers


Master_Luke
01-01-2007, 12:37 PM
Happy New 2007 to All,


I've been away for quite some time now,but now i'm interested in coding againg.I've wanted to try the new saber trials in OJP Enchnted that Vruki_Saletreleased some time ago,but can't seem to download them now since Vruki's page is under construction.So i'm asking could someone,who has them,upload them to another site?


Master_Luke

JRHockney*
01-01-2007, 07:57 PM
Happy New 2007 to All,


I've been away for quite some time now,but now i'm interested in coding againg.I've wanted to try the new saber trials in OJP Enchnted that Vruki_Saletreleased some time ago,but can't seem to download them now since Vruki's page is under construction.So i'm asking could someone,who has them,upload them to another site?


Master_Luke

Yeah that would be great. I forget where the code is. I might have a copy of it some where if no one else can find it. If you can, it would probably be better to code the MB2 sabers as a menu option since we are still making changes to the cgame code and it if it is made an optional pk3 patch, it will only be good until we make more changes to it. You might also be able to commit it this way without people objecting. Good luck with it, that saber code is a little beyond my understanding or patence. :p

Master_Luke
01-02-2007, 02:03 AM
I have the original code,so i just have to find a way of making it in a menu.That would be the biggest problem I think,but I'll try to do it someway nontheless.


Master_Luke

JackBaldy
01-02-2007, 02:11 AM
Sounds difficult... good luck lol

UDM
01-02-2007, 02:57 AM
Good luck with it ML!

TheShaman
01-02-2007, 10:03 AM
Could it be possible to make the mb-like sabers really like MB sabers? because the ones for 009f were far too thin...
But if it's too difficult, forget it, I don't want to bother you.
Good luck!

UDM
01-02-2007, 10:10 AM
They ARE the MB sabers :P

Master_Luke
01-02-2007, 10:15 AM
The ones for 009f indeed were the MBII code that I posted,Originally made by AJL but Vruki edited them to be more relistic to the movies.But where ca i get them,since i want to test them in Enchanted?


PS:If Anyone has the sabers for OJP Enchanted 0.0.9f can he upload the on some site,please?

TheShaman
01-02-2007, 10:27 AM
No UDM, I'm sorry they are not, they look like them, they have the same effect when moving, even idle, there is a trail, but it isn't the same look, as I said, in MB they are thicker, and more realistic, to me.

Here screenshots:
you will notice the MB glow is thicker, which makes it more realistic IMO because it looks more like a lightsaber than a plastic stick (especially when swinging)
Note: in both screenshots, the dynamic glows are off (looks too fat & goofy to me with dyn glows on)

Ooook, took me over 30 min to deal with this crappy imageshack, here are the 2 screenshots in big size...

MB2 saber:
http://img293.imageshack.us/my.php?image=mb2sabernc0.jpg

MB2-like saber:
http://img145.imageshack.us/my.php?image=mb2likesaberyg9.jpg

Chebawizz
01-02-2007, 10:39 AM
Can someone upload the code for Basic too? all the links of the other thread are dead :(

Lathain Valtiel
01-02-2007, 12:21 PM
I might have the code I used to port the sabers to OJP (I find it hilarious how I'm the one who actually made them work in OJP to begin with yet I don't get mentioned for it, ahahahhaha, go figure), but you'd have to compile it yourself since I lost the dlls Vruki compiled for me with that code in it (plus some modifications of his own, I believe he's the one who thinned the trails).

There's one problem though... they can't really be used in Enhanced. This is because Enhanced uses longer saber trails to indicate certain moves or states, and these lengthened saber trails start breaking up if made any longer with said sabers (which might I add are a fairly nasty hardcoded hack in my book which is not worthy for OJP inclusion) unless thinned out initially... As if this wasn't enough, I actually had to add back in support for sword trails, since the SFX code removed it.

So yeah. Not recommended for use in Enhanced, or with anything that's not a saber.

ensiform
01-02-2007, 04:19 PM
Can someone upload the code for Basic too? all the links of the other thread are dead :(

It's all on the same svn repo.

Chebawizz
01-02-2007, 05:40 PM
where? :o

ensiform
01-02-2007, 06:32 PM
What did you do just grab Enhanced directory?

You should be pointing your svn checkout to: https://opensvn.csie.org/ojp

Not https://opensvn.csie.org/ojp/Enhanced.

JRHockney*
01-02-2007, 07:28 PM
There's one problem though... they can't really be used in Enhanced. This is because Enhanced uses longer saber trails to indicate certain moves or states, and these lengthened saber trails start breaking up if made any longer with said sabers (which might I add are a fairly nasty hardcoded hack in my book which is not worthy for OJP inclusion) unless thinned out initially... As if this wasn't enough, I actually had to add back in support for sword trails, since the SFX code removed it.

So yeah. Not recommended for use in Enhanced, or with anything that's not a saber.

Actually, the trails are fine the way they were in enhanced when they were in enhanced. The only move that had the slightly extended trail was the attack fake (power attack) and most of us are so use to the way an attack fake looks when it moves that the extended trails don't really make much of a difference anyways for us enhanced saber system vets. It would still be a nice option on the menu for those of us who want them. I miss fighting with them and using my pointed tip MB saber :(

Maxstate
01-02-2007, 07:54 PM
Actually, the trails are fine the way they were in enhanced when they were in enhanced. The only move that had the slightly extended trail was the attack fake (power attack) and most of us are so use to the way an attack fake looks when it moves that the extended trails don't really make much of a difference anyways for us enhanced saber system vets. It would still be a nice option on the menu for those of us who want them. I miss fighting with them and using my pointed tip MB saber :(

I was starting to like them for having a trail even when not slashing, and drawing a nice trail even when more erratic saber moves (like staff kata transitions) were used.

Lathain Valtiel
01-03-2007, 01:42 AM
Actually, the trails are fine the way they were in enhanced when they were in enhanced. The only move that had the slightly extended trail was the attack fake (power attack) and most of us are so use to the way an attack fake looks when it moves that the extended trails don't really make much of a difference anyways for us enhanced saber system vets. It would still be a nice option on the menu for those of us who want them. I miss fighting with them and using my pointed tip MB saber :(

"Actually," nothing. Excuse me, but wouldn't it be best to trust the guy who added them in to begin with? I was talking about the default code, before changes were made.

Vruki messed around with the trails, it wasn't like that initially. When he was reporting bugs to me he mentioned the trails breaking up when they got longer, so he thinned them out to prevent that. Remember, we made a couple of builds so that I could fix bugs or oversights and somewhat clean up that mess of code before I left it to him, so I know what went on up to that point better than you do. TheShaman is right, they are not exactly the same and the trails ARE thinner than they used to be, and I am right in saying that they were breaking up initially, because I doubt tremendously that Vruki would have mentioned them breaking up to me otherwise. He apparently found it very irritating.

Master_Luke
01-03-2007, 02:37 AM
Hi


Lathain Valtiel,If you find your altered code,can you send it to me,since i want to have the edited sabers,not the original ones that i posted?


Master_Luke

JRHockney*
01-03-2007, 02:45 AM
"Actually," nothing. Excuse me, but wouldn't it be best to trust the guy who added them in to begin with? I was talking about the default code, before changes were made.

Vruki messed around with the trails, it wasn't like that initially. When he was reporting bugs to me he mentioned the trails breaking up when they got longer, so he thinned them out to prevent that. Remember, we made a couple of builds so that I could fix bugs or oversights and somewhat clean up that mess of code before I left it to him, so I know what went on up to that point better than you do. TheShaman is right, they are not exactly the same and the trails ARE thinner than they used to be, and I am right in saying that they were breaking up initially, because I doubt tremendously that Vruki would have mentioned them breaking up to me otherwise. He apparently found it very irritating.

Well, whatever version we ended up with in 0.0.9f was good enough as far as I'm concerned, eventhough the trials probably could have been longer. Especially at higher fps, they looked more than fine. I still had lot more fun playing with those than the default sabers. I still think Master Luke should try his hand at it if he wants to. Especially if they're built in the menu, we could always try and make them better in a later build.

Unless of course, you want to try it? Since you added them in originally and Vruki's not around anymore :( , you should probably get first dibs if you want. :)

Master_Luke
01-03-2007, 03:21 AM
Hi


Well JRHockney*,I'll try implementing the the sabers,but I'll need the code edited by Lathain Valtiel.If he can find it and post it I think I'll be able to implement it in the game.

razorace
01-03-2007, 05:28 AM
What did you do just grab Enhanced directory?

You should be pointing your svn checkout to: https://opensvn.csie.org/ojp

Not https://opensvn.csie.org/ojp/Enhanced.
They're referring to code that was never commited to the repository.

JRHockney*
01-04-2007, 01:54 AM
Hi


Well JRHockney*,I'll try implementing the the sabers,but I'll need the code edited by Lathain Valtiel.If he can find it and post it I think I'll be able to implement it in the game.

Thats alot of code to post and I'm not sure how the MB team will feel about posting portions of their code in public. I might have found a newer copy of that code (not sure though) that I was going to pm you, but pm didnt seem to come up as an option on your profile.

Lathain Valtiel
01-05-2007, 12:34 AM
It's not the MB team's code to dictate how we post. The SFX sabers were originally posted for anyone to use, similar to OJP itself.

As for my code, I have it, but I don't quite know what state the copy I have is in. I'll look into it in an hour.

Lathain Valtiel
01-05-2007, 01:55 AM
...Correction, I DON'T have it. Seems I replaced all my files with that (horribly failed) custom blade project I had going.

Oops. I thought that my code folder being there meant they were around...

Lathain Valtiel
01-05-2007, 02:47 AM
...Eesh, reading this hackjob so I can recreate what AJL did reminds me why I hate it. Give me awhile.

TheShaman
01-05-2007, 05:38 AM
BUSHADA triple post.

Lathain Valtiel
01-05-2007, 05:51 AM
Yes, I get triple posty when I get annoyed with this code.

I'm almost done. Not sure if it works, but that's for you all to find out.

Lathain Valtiel
01-05-2007, 06:47 AM
Right then. Here's my first attempt that I totally doubt will compile.

http://www.seraphicradiance.net/BB/avaimages/SFXRGBSabersE.zip

If by some miracle it DOES compile and I got it right the first time, put the .dll into a pk3 along with those folders there. Put a z in front of it so Enhanced loads it last.

If this works, a new cvar has been added: sfx_sabers. Setting it to 1 actiavtes SFX sabers.

JRHockney*
01-05-2007, 01:55 PM
Awsome. Thanks for the effort lathain. Good luck Master Luke.

Master_Luke
01-06-2007, 02:46 AM
Hi


Thanks Lathain Valtiel for the code.I'll try it and see what can I do.


Master_Luke

TheShaman
01-06-2007, 05:39 AM
Sorry for repeating my self and being annoying, but... thicker glow than 009f 's please... :)

(for more info check my previous post, with 2 screenshots)
good luck :vsd:

Maxstate
01-06-2007, 07:52 AM
Sorry for repeating my self and being annoying, but... thicker glow than 009f 's please... :)

(for more info check my previous post, with 2 screenshots)
good luck :vsd:
The glow around the saber like that is attributed to the rGB_glow2 file, if they don't, I'll do it for you :thumbsup:.

TheShaman
01-07-2007, 02:02 PM
The default one of basejka, ojp, or any mod, which is located in gfx/effects/sabers/ ?
if it's this one, I could do it, I know a bit of that, I actually made a little saber mod (looks nicer than OJP's default one, sorry, and it also replaces the saber sounds with MB2 B18 ones).

Lathain Valtiel
01-07-2007, 02:24 PM
Actually, there is a variable in the code called glowscale which may have some influence.

But other than that, yes, the file in question matters.

I'm more amazed you psychos actually want it BRIGHTER.

Maxstate
01-07-2007, 04:58 PM
Actually, there is a variable in the code called glowscale which may have some influence.

But other than that, yes, the file in question matters.

I'm more amazed you psychos actually want it BRIGHTER.
Could you tell me if there's anything in there that changes how the core looks?

I can't seem to recreate the tiny white glow around the saber's core without destroying or making the blade transparent with my own mods.

Care to help me out?

Lathain Valtiel
01-08-2007, 07:44 AM
Tiny white glow? What are you referring to? That fuzziness around the base of the standard Raven sabers?

And I don't believe that is the case. I'm fairly sure the core's look is totally dominated by the shader file and texture, except for the weapon's width, which you can change. What are you trying to do exactly?

Maxstate
01-08-2007, 11:18 AM
Tiny white glow? What are you referring to? That fuzziness around the base of the standard Raven sabers?

And I don't believe that is the case. I'm fairly sure the core's look is totally dominated by the shader file and texture, except for the weapon's width, which you can change. What are you trying to do exactly?
It's hard to explain..

Around the saber's core there's a fuzzy white glow in the movies, the core actually glows white and the colour of the blade comes after that part:

http://www.cswu.cz/epizoda-iii/images/anakin/051.jpg

Look at this core for an example, and:

http://home.scarlet.be/yodawallpapers/Star%20Wars%20wallpaper%20Obi%20Wan.jpg
Really obvious there^.

Here's some pictures of the sabers I've made btw:

http://i2.photobucket.com/albums/y30/Maxstate/shot2297.jpg
170 Red

http://i2.photobucket.com/albums/y30/Maxstate/shot2296.jpg
70 +\- Green

http://i2.photobucket.com/albums/y30/Maxstate/shot2295.jpg
255 blue
100 green

But they lack that whitish glow around the core, I just can't get it right without making the whole core see-through.

If there isn't any code for it, maybe you could help me graphically?

Lathain Valtiel
01-08-2007, 12:08 PM
Hmmmmm.... you mean how in the outer edge of the core, the white sort of blends in with the outer, colored glow for a bit?

Hmmm... no, I don't believe that specifically possible. Raven cheats to get that effect by building color into the saber core textures. Unfortunately, we cannot take that route with the RGB sabers I don't think.

What RGB sabers do is actually create TWO cores. One core is simply a dead, white core. The other core is layered behind this core, but its white is filled in with the selected color in the RGB saber screen. Thus, you have a white core layered on top of a colored core. Then, the glow is applied, the white in the glow texture is once again filled in with color and that glow is casted around the core.

Hmmm... try this. Take rgb_core. That is the dead white core that is applied over on top of the colored core. Make its outer edges gray. What I believe this will do is make it partially transparent. I hope.

Maxstate
01-08-2007, 12:12 PM
Hmmmmm.... you mean how in the outer edge of the core, the white sort of blends in with the outer, colored glow for a bit?

Hmmm... no, I don't believe that specifically possible. Raven cheats to get that effect by building color into the saber core textures. Unfortunately, we cannot take that route with the RGB sabers I don't think.

What RGB sabers do is actually create TWO cores. One core is simply a dead, white core. The other core is layered behind this core, but its white is filled in with the selected color in the RGB saber screen. Thus, you have a white core layered on top of a colored core. Then, the glow is applied, the white in the glow texture is once again filled in with color and that glow is casted around the core.

Hmmm... try this. Take rgb_core. That is the dead white core that is applied over on top of the colored core. Make its outer edges gray. What I believe this will do is make it partially transparent. I hope.

The rgb_line file being the first thing that's rendered, so if I make the line and core files unique (save for the glows) qua core, the line will be drawn wherever the core is transparent? That could work, I've been ignoring the rgb_line file up till now.

Lathain Valtiel
01-08-2007, 12:25 PM
*Checks*

Yes, rgb_line is rendered first, it provides the blade color because the white in its texture is filled in. rgb_core is rendered on top of it with its white staying as-is to provide a visible white core. What you could try is making rgb_core's sides gray, so that the color will only partially shine through. We just cut off the sides so the whole thing shows through as it is now. My bad, most likely.

I have no idea what'll happen if you make rgb_line's sides gray.

Maxstate
01-08-2007, 12:27 PM
*Checks*

Yes, rgb_line is rendered first, it provides the blade color because the white in its texture is filled in. rgb_core is rendered on top of it with its white staying as-is to provide a visible white core. What you could try is making rgb_core's sides gray, so that the color will only partially shine through. We just cut off the sides so the whole thing shows through as it is now. My bad, most likely.
Do you have MSN? Or an email I could send you the files too?
Just incase I need further help, don't want to mess up this thread any more than I already have ;)

Lathain Valtiel
01-08-2007, 01:02 PM
...Wow, I'm a screwup, I read them backwards and switched what the cores do. LOL

rgb_line is rendered first, it's the white core.

rgb_core is rendered second, and winds up behind the white core. It's usually bigger. Its color is filled in by the RGB values to give the saber color. Since it's bigger, its color shows up on the edges of the white core.

Thus we should edit rgb_line's sides to gray so that rgb_core's color goes through it.

TheShaman
01-08-2007, 01:55 PM
Hem, I don't really understand the difference between the core and the blade, to me, a lightsaber is made of the core, which is a cutting white laser blade, and of the core, which determines the colour, for a cool effect.

Also Max, I think your sabers are a bit too bright (glow), especially the cyan one, and the core/blade (white thing) isn't straight, it seemed you drew it with hand, going left, right, left, right again... instead of just being a line. Weird thing.

Lathain Valtiel
01-08-2007, 01:58 PM
It's just the way the RGB sabers were coded so that it looked nice. I imagine it was done so you could provide some color to the edge of the white center.

Maxstate
01-08-2007, 03:48 PM
Hem, I don't really understand the difference between the core and the blade, to me, a lightsaber is made of the core, which is a cutting white laser blade, and of the core, which determines the colour, for a cool effect.

Blade = everything in it's entirety.

Also Max, I think your sabers are a bit too bright (glow), especially the cyan one, and the core/blade (white thing) isn't straight, it seemed you drew it with hand, going left, right, left, right again... instead of just being a line. Weird thing.
Your resolution isn't picking it up right then, the sabers themselves (the version you have) are on 2500x XXXX I think, lol. They look that way because I made them to be smaller in perspective, meaning they get smaller near the tip and are rounder and wider near the emitter.

JRHockney*
01-11-2007, 11:08 PM
Hey I got the SFX sabers working! Great cvar, Lathain!

The only thing you forgot in those files was this: vec3_t rgb1={255.0f,255.0f,255.0f}; in the definition section of cg_players.c. Given my sad level of coding knowledge, its a miracle that I figured that out, especially since that appeared to be defined in several other places in that file. :p

Lathain Valtiel
01-13-2007, 12:59 AM
Actually, it's there, it just happened to fall to the joys of only being stored between parantheses... typical.

I uploaded a new file with the fix. If you just pasted the declaration somewhere (probably after the line: // Draw the SFX blade. Yeah, it has to be here. Yes, the person who wrote this should be shot.), I don't think it will work exactly as intended due to having lost the old SFX rgb1 value, which retains it, so use the fixed file. Same link as before.

The cvar worked? Any other problems?

JRHockney*
01-13-2007, 04:26 PM
Hmm, Ok I replaced your new file with the one I modified and I got some errors. I looked for that definition that I showed and I found it after "CheckTrail:" I tried that previously and it didn't work for some reason. It showed it as not being defined properly. I put it back to were I had it before which was around line 35 before that "char *cg_customSoundNames[MAX_CUSTOM_SOUNDS] = {" thing and it compiled with no errors. I might just be my code though, there are alot of weird things about it. :nut:

As far as how it works overall, it works very well for the most part. The RGB sabers don't really work right with the SFX ones and you can't use the base sabers and SFX sabers at the same time on a server without it messed up it seems, but I didn't expect those to work anyways since their based on different code. THe funny thing is, when I first added the code and compiled it without doing a fresh build, it compiled, but had the CRAZIEST effects in game: the sabers were mess up, the sounds were messed up and I got struck with a red lightning bolt everytime I rolled or jumped! LOL! I thought you played a prank on us! Of course after I did a fresh build, I got those errors that I fixed with that definition. Heh, shows how much I know about code :p I don't know the first thing about vector stuff.

Lathain Valtiel
01-13-2007, 09:33 PM
Did you change the code?

Max got it to compile without changing it apparently, so it may be something on your end.

JRHockney*
01-13-2007, 11:06 PM
Did you change the code?

Max got it to compile without changing it apparently, so it may be something on your end.

Probably is. I don't remember changing anything and that definition after checktrail should work, but since it works now, I don't have the patience to figure out why. :p Anyways, thanks again for making it available.

Maxstate
01-14-2007, 06:58 AM
I got a friend of mine to compile the OLD one that was posted, didn't do anything myself. I'm starting PHP in 2 weeks and my coach gave me permission to use the school network to download the full visual studios pack from msdn though :D