Chameleon.h | inactive | new mods will ship with builds

Released modifications for the OpenSpades client.
Forum rules
Release, download, and praise or criticize completed modifications. For installation and creation help, please visit the OpenSpades general discussion forum.
142 posts Page 5 of 10
Chameleon
Modder
Modder
Posts: 601
Joined: Thu Nov 22, 2012 6:41 pm


I am sorry, but the model of mod has wrong filename.
It is WeaponNoMagazineM14.kv6 instead of WeaponNoMagazine.kv6
Please rename it, I will re-upload the file.

Bloodfox - sorry, I am busy now with a revolver. Somewhat a cross between S&W 29, S&W 629 and Colt Python.
bloodfox
Post Demon
Post Demon
Posts: 2206
Joined: Mon Oct 21, 2013 4:32 pm


can't wait for the revolver!

When will it be released? (Your estimated time)
bloodfox
Post Demon
Post Demon
Posts: 2206
Joined: Mon Oct 21, 2013 4:32 pm


Hey man, I have a request for sights... Here is what I want you to do: I want you to make it so that when you aim down the sight, it is a completely different kv6 file. So, you have your WeaponNoMagazine when no scoping. Then, when you aim, you don't have that weaponNoMagazine so it disappears when you aim down. Get my drift?
Chameleon
Modder
Modder
Posts: 601
Joined: Thu Nov 22, 2012 6:41 pm


Do "if (AimDownSightStateSmooth < 0.5f) { render the gun, you know }"
so if you are not aiming or are less than halfway to aim state, you see the gun.
When you are aiming, you no longer see the gun. Simple.

I am not interested in this, as there is a mod provided by yvt called "PngSights" or something.
Also this is a feature in TopenSpadongs, which I am currently using for it's cg_zoomfov (thx topo).
bloodfox
Post Demon
Post Demon
Posts: 2206
Joined: Mon Oct 21, 2013 4:32 pm


The reason why I don't do the png sight thing is because I suck at making png sights
Chameleon
Modder
Modder
Posts: 601
Joined: Thu Nov 22, 2012 6:41 pm


*faceplant*
It has the code you need. Also you will need to aim with something...
Also you should pm me instead. Lets keep my Modding thread for discussion of already present mods and pm for misc help at modding. Ok? Ok.
Wolfman389
Deuced Up
Posts: 40
Joined: Thu Oct 23, 2014 12:28 am


The revolver looks nice bra


also, I like your AK, The iron sights are nice 2
Blue_Sunglasses1
Chameleon
Modder
Modder
Posts: 601
Joined: Thu Nov 22, 2012 6:41 pm


Image
Thanks for your support Blue_BigSmile
Evergreen
Deuced Up
Posts: 199
Joined: Thu Jul 24, 2014 5:38 am


Revolver is coming along great! How are you doing the slants? I'm gonna take a shot in the dark and say it's a separate model that's been rotated 45 degrees forwards? Are the light gray ones going to be rotated ~22.5 degrees?
bloodfox
Post Demon
Post Demon
Posts: 2206
Joined: Mon Oct 21, 2013 4:32 pm


Oh btw, I want you to make with the revolver that when you sprint, your arms hold it up at a 90 degree angle.
Chameleon
Modder
Modder
Posts: 601
Joined: Thu Nov 22, 2012 6:41 pm


Evergreen, your shots are quite good :)
The black parts are indeed turned by 45 degrees (in-game it is "atan(1)")
The light gray ones... well they should be rotated by ~20-25 degress (in-game it is "atan(0.5f)").
I did these "atan(0.5f)" parts on barrel and they fit with the model well. But now, I did everything correctly and I can't get these f-king parts to fit the frame...
That's why I'm so pissed off I will stop modding for some time, then I come back to either finish this one or do something better.

If you are going to try this on your weapons, don't forget to scale the parts too, or else their edges won't fit.
atan(1) = 45 degrees = Scale(sqrt(2)/2)
atan(0.5f) = ~23 degrees = Scale(sqrt(5)/2)
problems arise if you try any other degree, as it is very hard to scale and position them, I ended up doing a rounded value
Remember that you can scale each axis independently! Good luck
Evergreen
Deuced Up
Posts: 199
Joined: Thu Jul 24, 2014 5:38 am


Chameleon wrote:
Evergreen, your shots are quite good :)
The black parts are indeed turned by 45 degrees (in-game it is "atan(1)")
The light gray ones... well they should be rotated by ~20-25 degress (in-game it is "atan(0.5f)").
I did these "atan(0.5f)" parts on barrel and they fit with the model well. But now, I did everything correctly and I can't get these f-king parts to fit the frame...
That's why I'm so pissed off I will stop modding for some time, then I come back to either finish this one or do something better.

If you are going to try this on your weapons, don't forget to scale the parts too, or else their edges won't fit.
atan(1) = 45 degrees = Scale(sqrt(2)/2)
atan(0.5f) = ~23 degrees = Scale(sqrt(5)/2)
problems arise if you try any other degree, as it is very hard to scale and position them, I ended up doing a rounded value
Remember that you can scale each axis independently! Good luck
I was wondering about the scaling, thanks for those numbers! I very well might try this. This would be useful not just for slants, but for portions of models that are actually angled. Like the magazine, you could actually model it correctly and place it at an angle, rather than mess with the voxels to look like it's on an angle
Chameleon
Modder
Modder
Posts: 601
Joined: Thu Nov 22, 2012 6:41 pm


Please ignore my rant, it was evening when I wrote that :) I made some progress now

Magazine? Damn man, I never thought of magazine!
I see you are smart... Maybe YOU can think of a way to make a sphere out of cubes? Not a perfect one, but one that has no edges of 90 degrees. It would be useful in weapon mods, like the end of dust cover of AKM.
P.S. I get those degrees and scales from trigonometry.

Here are some more (i guessed them, might not work):
atan(1) = 45 degrees = Scale(sqrt(2)/2) = 1:1 slope
atan(0.5f) = ~27 degrees = Scale(sqrt(5)/2) = 2:1 slope
atan(1.f/3.f) = ~18 degrees = Scale(sqrt(10)) = 3:1 slope
atan(0.25f) = ~14 degrees = Scale(sqrt(17)) = 4:1 slope

Formula:
"#blocks" is the number of blocks the slope, while rising only by one block, should cover.
atan( 1.0f / #blocks.0f ) = ? = Scale( sqrt( (#blocks * #blocks) +1)) = #blocks:1 slope
Evergreen
Deuced Up
Posts: 199
Joined: Thu Jul 24, 2014 5:38 am


Chameleon wrote:
Please ignore my rant, it was evening when I wrote that :) I made some progress now

Magazine? Damn man, I never thought of magazine!
I see you are smart... Maybe YOU can think of a way to make a sphere out of cubes? Not a perfect one, but one that has no edges of 90 degrees. It would be useful in weapon mods, like the end of dust cover of AKM.
P.S. I get those degrees and scales from trigonometry.

Here are some more (i guessed them, might not work):
atan(1) = 45 degrees = Scale(sqrt(2)/2) = 1:1 slope
atan(0.5f) = ~27 degrees = Scale(sqrt(5)/2) = 2:1 slope
atan(1.f/3.f) = ~18 degrees = Scale(sqrt(10)) = 3:1 slope
atan(0.25f) = ~14 degrees = Scale(sqrt(17)) = 4:1 slope

Formula:
"#blocks" is the number of blocks the slope, while rising only by one block, should cover.
atan( 1.0f / #blocks.0f ) = ? = Scale( sqrt( (#blocks * #blocks) +1)) = #blocks:1 slope
I'm not good with math, unfortunately. But if you continue to think through the trigonometry, I'll attempt to find more ways to apply it :)

As for the sphere, that's a difficult one. Thing only thing I could think is just more faces, and more faces. I'll think about this one some more and let you know if I can crack this one. That may end up just being our curse. Curves are great, but this is a block game. Improvising may be more effective than trying to force it to be something it's not.
Chameleon
Modder
Modder
Posts: 601
Joined: Thu Nov 22, 2012 6:41 pm


I am as old as you. You must be even a little bit familiar with trigonometry.
This is what I am talking about:
Image
I need to think of a way to fill those triangles without any holes or any edges poking out... Hold on, I've thought of smth
EDIT: Nope. It's impossible to make it match 100%, unless you use an infinite number of infinitely small cubes, which would in turn result in exactly 0 fps
142 posts Page 5 of 10
Return to “OpenSpades MODs”

Who is online

Users browsing this forum: No registered users and 3 guests