Log in

View Full Version : How you can contribute to WCS development



ZERO
07-19-2014, 01:46 PM
As you all know it takes a lot of work to release new races and get all the abilities working. Unfortunately b/c of the current stages of development and to reduce bugs I do not take code contributions for races themselves as a whole right now. However, there is another side to race development and updating that does not require me to directly make everything b/c even if I need to reprogram what you did to work better in the confines of the race itself it is the creation to begin with that takes all the time.

What I am taking about is effects and notifications. All the races have them and they are a major thing that effects game play. Well in order to speed up development and to enrich the server I invite all of you to come up with your own effects for existing abilities and races or even ones for future things or something that just looks cool but your not sure what I might want to use it for. You do not need to have a particular race or ability in mind but let us know if you do.

While ideas with detailed descriptions are welcome I encourage you to try your had and coding effects and post what you came up with here along with some pics of it in action. Do not limit yourself to visuals. You can think up and post cool soundeffects that can go with existing abilities/effects we already have or new ones you can think up. Also you could even find a better way of formatting the output for the chat notifications with better colors ect.

Lastly, I will sometimes make requests for work in this thread. This is to speed up development of very complex or time consuming effects or to see if others can find a better way to do it. You can think of them as effect challenges. These challenges can also be used as sort of a training to get into effect development or for those of you who want to learn more about what it takes to make some of the more complex effects work.

ZERO
07-19-2014, 01:56 PM
OK here is the first challenge and it is a seemingly simple one as it is currently a low priority effect enhancement to one of alchemists current abilities.

In order to provide a more fluid effect for the iron ability it would be nice if the decal was to be animated to fade in and out. Note that I can define any fps I want when I play the effect so pay attention to the length it remains solid vs the time it is fading and always have it remain blank for at least 3 times the length of the entire effect that you made as to ensure it does not display more than once due to a programing error later on.

If you have connected to the test server you can find the files at:

materials/decals/custom/ibisgaming/iron

Note that you can open the texture and save it in gimp/photo shop with the correct addons to support the file type.

It may be possible to take the static image and then convert it into an animated gif and then convert it back. I make them the hard and manual way 1 frame at a time in gimp. There is no best way but I am sure there is a fastest way. I recommend you to try to find the fastest way possible and share it.

So good luck! As you see you do not even need to know how to program to make this effect, I got that part done already lol.

ZERO
07-19-2014, 02:05 PM
For those wondering how much code it takes to display that little image here is a look at the programing behind displaying that little thing in game:

GlobalVars:

//Decals
new String:IronFileVMT[] = "materials/decals/custom/ibisgaming/iron.vmt";
new String:IronFileVTF[] = "materials/decals/custom/ibisgaming/iron.vtf";

OnMapStart:

//decals load
OnMapStart_PrepareDecal(IronFileVMT, IronFileVTF);

Display the actual effect to clients:


//Shield Sprite
decl Float:clientLocation[3];
GetClientAbsOrigin(attacker, clientLocation);
clientLocation[2]+=40;

decl Float:targetLocation[3];
GetClientAbsOrigin(targetclient, targetLocation);
targetLocation[2]+=40;

decl Float:vecEyeAng[3];
GetClientEyeAngles(attacker, vecEyeAng);

if(vecEyeAng[1]>180.0)
{
vecEyeAng[1]=vecEyeAng[1]-360;
}

new Float:distance = IronBaseRange + (skill_level*IronRangeMult);

if(Entity_GetDistance(attacker, targetclient) <= distance)
{
distance = Entity_GetDistance(attacker, targetclient);
}

decl Float:vecLocation[3];

Math_MoveVector(targetLocation, clientLocation, distance/GetVectorDistance(targetLocation, clientLocation), vecLocation);

CreateSprite(victim, IronFileVMT, vecLocation, vecEyeAng, 0.15, "1", 1.0);

//END SHIELD SPRITE


So that is what you actually see in the source code of the race but you notice a lot of native function calls. Some are from others and some are from my stocks. You hear me talk about making stocks a lot and without stock functions all the code below would be in the race sourcecode making things hard to read and debug. As this same code is reused as often as the above functions are there is no point in cluttering up races with all that extra code making it harder to read the program and find bugs and make quick and easy changes.


/*
* Precaches and adds decal files to DL.
*
* @param String:VMT VMT file
* @param String:VTF VTF file
* @return
*/
stock OnMapStart_PrepareDecal(String:VMT[], String:VTF[])
{
PrecacheModel(VTF);
AddFileToDownloadsTable(VMT);
AddFileToDownloadsTable(VTF);
}


/**
* Returns the Float distance between an entity
* and a vector origin.
*
* @param entity Entity Index.
* @param target Vector Origin.
* @return Distance Float value.
*/
stock Float:Entity_GetDistanceOrigin(entity, const Float:vec[3])
{
new Float:entityVec[3];
Entity_GetAbsOrigin(entity, entityVec);

return GetVectorDistance(entityVec, vec);
}


/*
* Moves the start vector on a direct line to the end vector by the given scale.
* Note: If scale is 0.0 the output will be the same as the start vector and if scale is 1.0 the output vector will be the same as the end vector.
* Exmaple usage: Move an entity to another entity but only 12 units: Vector_MoveVector(entity1Origin,entity2Origin,(12. 0 / GetVectorDistance(entity1Origin,entity2Origin)),ne wEntity1Origin); now only teleport your entity to newEntity1Origin.
*
* @param start The start vector where the imagined line starts.
* @param end The end vector where the imagined line ends.
* @param scale The position on the line 0.0 is the start 1.0 is the end.
* @param output Output vector
* @noreturn
*/
stock Math_MoveVector(const Float:start[3], const Float:end[3], Float:scale, Float:output[3])
{
SubtractVectors(end,start,output);
ScaleVector(output,scale);
AddVectors(start,output,output);
}

And finally the one that actually makes the dam thing show up on your screen:

/*
* CREATE SPRITE
*
* @param iClient Player to target.
* @param String:sprite Path to VMT File.
* @param Float:vOrigin[3] Location of Sprite.
* @param Float:fAng[3] Angles (P Y R).
* @param Float:Scale Size of Sprite.
* @param String:fps Render Speed.
* @param Float:fLifetime Life of Sprite. -1 for infinate
* @return Ent on success, -1 otherwise.
*/
stock CreateSprite(iClient, String:sprite[], Float:vOrigin[3], Float:fAng[3], Float:Scale, String:fps[], Float:fLifetime)
{
new String:szTemp[64];
Format(szTemp, sizeof(szTemp), "client%i", iClient);
DispatchKeyValue(iClient, "targetname", szTemp);

new ent = CreateEntityByName("env_sprite_oriented");
if(IsValidEdict(ent))
{
new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ent_sprite_oriented_%i", ent);
DispatchKeyValue(ent, "model", sprite);
DispatchKeyValue(ent, "classname", "env_sprite_oriented");
DispatchKeyValue(ent, "spawnflags", "1");
DispatchKeyValueFloat(ent, "scale", Scale);
DispatchKeyValue(ent, "rendermode", "1");
DispatchKeyValue(ent, "rendercolor", "255 255 255");
DispatchKeyValue(ent, "framerate", fps);
DispatchKeyValueVector(ent, "Angles", fAng);
DispatchSpawn(ent);

TeleportEntity(ent, vOrigin, fAng, NULL_VECTOR);

if(fLifetime > 0)
{
CreateTimer(fLifetime, RemoveParticle, ent);
}

return ent;
}

return -1;
}

So there you have it, the inner workings of making a single little image popup on your screen for 1 second. The question is if you can animate this image...

CYBER
07-21-2014, 06:01 PM
So do you require us to animate this via coding in game? Or can u simply import an animated vtf like how sprays work?

ZERO
07-21-2014, 07:53 PM
Yea you would animate it via the vtf file itself. Just like how the hearts and spades are animated for jack for example.

Passarelli
07-23-2014, 08:27 PM
Try this and let me know what you think! I can't test it other then in vtfedit : /

8673

Passarelli
07-27-2014, 07:16 PM
Zero, give me more work to do please! <3

Cyber was mad at me for beating him to finishing the last one and I love how he bitches. :lmao:

CYBER
07-27-2014, 07:55 PM
Zero, give me more work to do please! <3

Cyber was mad at me for beating him to finishing the last one and I love how he bitches. :lmao:
Why don't you animate my penis slowly bitchslapping you? Bonus point for slow motion dramatic effects.

ZERO
07-27-2014, 09:03 PM
I found a way to automate the animations in gimp with instant commands so it has been a lot faster getting effects done as a result.

As I said before though, when there is not a direct request for a particular effect or item it is a good idea to try to invent some new effects. Study up on the TE_ stocks and other entities and effects in source. Also try to see how you can make much different looking effects by using all the different sprites and textures already in game for cooler beam effects ect.

Right now a lot of our beam effects are very similar looking but with different colors. There should be, via better materials, a way to improve their appearance of these common effects.

Passarelli
07-27-2014, 10:22 PM
Damnit, I knew I shouldn't have sent you those links. :banghead: I'll see if I can figure out how to make any of the beam or particle effects look more 'warcrafty'.

ZERO
07-27-2014, 10:54 PM
No I actually found a special gimp script that is a fully automated program for making multi layer animations automatically via a syntax.

ZERO
07-27-2014, 10:58 PM
Next Bounty:

Find sounds to go with the alchemist abilities. They can be already in the game or 100% custom. Keep in mind who hears the sound and when they should be hearing it. Sounds not only notify users of an ability trigger but are an important part of a races immersion.

Passarelli
08-02-2014, 08:38 PM
Audio work, eh? Well sadly I'm not nearly as savvy with audio as images. That coupled with being on a shittastic laptop for the next month or three (I might be able to play WCS, but I'll likely only do ok as a lion. Shooting is pretty out of the question.) means getting anything useful is doubtful. If I do manage to find something useful simply by browsing the interwebs, what sort of CC licenses would you be able to use? I'm not exactly sure how you would implement those with attribution, which is most of what I have found thus far.

CYBER
08-02-2014, 10:06 PM
Now that's something I can look up.
Zero can u give me a rough estimate of the proc rates for abilities? And duration of the effect and animation


Reason: i want to see what audio lengths I should get and estimate if said audio is acceptable if it proves a lot or just becomes annoying as fuck like the infinite Santa song or void shotgun proc

Passarelli
08-03-2014, 12:41 AM
Santa song is perfect since it usually happens at the start of the round ; p

Iron should likely be around .75 seconds since that is the length of the animation. If you go a little over or under it shouldn't be a huge deal (under would likely be better, especially since the effect fades in and you could delay the sound effect slightly).

I'm more worried about the licenses. If Zero doesn't care about them at all, I could always just rip shit straight out of FMA and call it a day. :smirk:
Roy's transmutation (snap followed by fwoshBOOM) would be perfect in my head for when the ultimate casts after the delay.

An idea for EE would be a sound that is red to blue or blue to red shifted. (doppler effect--think of how the sound shifts when something moves very quickly past you).

Item transmutation is a little tough. Do you want a sound effect for when you are within (or close) to the radius before it casts?
An idea for when it actually casts might be the gate slamming shut in FMA for when the effect starts for that player. Maybe the creepy laughing in the background for duration or before it is cast?


If you wanted to go the Alchemist root from war3--well, it gets a little harder for ideas from me.

CYBER
08-03-2014, 06:12 AM
i can imagine the ULTIMATE sound (zero said roughly 5s channel and then circle BOOMS) as 2 things:
Either a dramatic music escalation similar to THIS (https://www.youtube.com/watch?v=QzgJs5ISW3M&t=0m11s)(give or take) or the Seal of Orichalchos from Yugioh as u can see in THIS (http://www.youtube.com/watch?v=LMpsuB1Vgns&t=0m6s)(similar to this at 0.06seconds in. I actually imagine the transmutation seal expanding from within the player and when full it just explodes with "Flame" for 1second, similar to this effect)

OR


I actually originally thought that scorched earth would have a channel of power sound for 5s before the "alchemy" seal bursts out of the player in a burning fashon, to which i can see it using this sound but at like 30% audio levels duh. (see attachement)

- - - Updated - - -

as for iron clad, i can imagine that 1s long escalading sound at EXACTLY 9:59 HERE. (https://www.youtube.com/watch?v=80mmK56_NJo#t=597) OR at 0:03 in SAME VIDEO (https://www.youtube.com/watch?v=80mmK56_NJo)
(it can fade in and out very easy so that it fits any shorter animation)

Passarelli
08-03-2014, 09:21 AM
Roffle, so the Alchemist summons a plane to crash as his ultimate? <3

Passarelli
08-03-2014, 03:18 PM
Zero, should these sound effects be mono or stereo? I'm guessing mono, but I'd just like to confirm that. ^_^

kionay
08-03-2014, 04:31 PM
i was hoping this would be some code work, but atm it seems what's needed is animations and sound effects, which are not at all my forte :-/


i have a python program i'm working on for my boss at work and once i get that done i'll look into what all is required for coding CS:S mods and hopefully i can contribute more then when i'm more familiarized

Passarelli
08-03-2014, 05:11 PM
Kionay, if you know Python, you can automate gimp to make some nice long animations to help update some of the bland effects that Zero was talking about before.

Also, I'd love to see a new ward effect for Shadow hunter to help balance the class in office and other such maps. Maybe something that allows you to see the entire radius as well as with a top, middle, and bottom ring so that you don't get hit by wards you can not see? I'm not sure how that animation works at the moment--it might be rendered by CS:S which means more coding for you! <3



By the way, I tried getting some sound effects and this laptop is too shitty. I'll try again later tonight when it has a chance to cool off/run without stuff in the background.

ZERO
08-04-2014, 12:16 AM
Stero, proc rates usually do not go hither than 25% for races that have really high rates. Sounds would be things that are REALLY short usually unless they are part of a longer effect. For example the fire sound you hear from the hell hunter fire nade is 100% custom. The sounds you hear for ult blocking and respawning (for races that have been updated with them) are short as they occur often and need to indicate something to the user.

Remember that the point of soundeffects are either to increase immersion or to accent and existing effect.

Passarelli
08-04-2014, 12:49 AM
Zero, any word on licenses? Wolf mentioned that wcs uses some stock war3 sounds, so I'm guessing it doesn't matter too much? Just want to double check before I try doin work that may or may not turn out decent due to my shitastic laptop ; p

ZERO
08-04-2014, 09:22 PM
Given we are not charging money or anything for it and that the length is <30sec any sounds should logically fall under fair use. If we were making our own game or something for resale then that would matter. It is why we can have storm troopers in the zm server but if we sold a game with storm troopers or tried to charge money for them that would be bad b.c we do not own the rights to them.

Passarelli
08-04-2014, 09:35 PM
Thanks for the clarification. I'll try again to pull sounds on my shitty laptop, and if that doesn't work, I'll attempt with the shitty desktop I have access to. Fun times. Hopefully I'll have something for you by tomorrow or Wednesday at the latest.

Pie Q
09-02-2014, 12:19 AM
Remove helm

Thank me later. I just improved your mod by 1000%

CYBER
09-03-2014, 01:04 AM
Remove helm

Thank me later. I just improved your mod by 1000%
helm's one of the very few anti-aimbotter items.

no shit u want it removed :D

Passarelli
09-03-2014, 09:44 AM
helm's one of the very few anti-aimbotter items.

no shit u want it removed :D

This. Somethin is odd when I'm moving fast as Die Xonvert and still get popped in the face by a deagle.

ZERO
09-08-2014, 04:08 PM
Here is what I need for someone to figure out an explain to me (I am still working on this on my own and that is the main delay right now):

How to using only the .vmt file scale or animate a sprite.

For example using decalscale or basetexturetransform.

I think decalscale might be unsupported but I am not sure why basetexturetransform is not working b/c I have heard of other people using it, at least in l4d.

DJ_MikeyRevile
09-08-2014, 04:31 PM
Here is what I need for someone to figure out an explain to me (I am still working on this on my own and that is the main delay right now):

How to using only the .vmt file scale or animate a sprite.

For example using decalscale or basetexturetransform.

I think decalscale might be unsupported but I am not sure why basetexturetransform is not working b/c I have heard of other people using it, at least in l4d.

Does this help at all?
https://developer.valvesoftware.com/wiki/$basetexture

- - - Updated - - -

" Bug:$basetexturetransform2 doesn't seem to work in Source 2007 source."

- - - Updated - - -

yea, nvm. this appears to be outdated.

ZERO
09-08-2014, 04:34 PM
Ok I found 1 solution which is that if you set your vtf to have the Procedural flag then your program code which is allowed to adjust the scale will work. Now perhaps there is another flag which will allow other parts such as the options to rotate a static sprite to work. :smirk:

ZERO
09-08-2014, 05:28 PM
Ok making it with no minimaps dramatically reduces file size and also allows me to scale it even without enabling the extra flag.

DJ_MikeyRevile
09-08-2014, 05:36 PM
is what you are doing all prehistoric pawn? I guess, im a tad bit confused as to what you actually need? Is it as simple as using audacity and ripping a sound clip out of a video, dled as an MP3?

ZERO
09-08-2014, 06:04 PM
Yea turning off the minimaps makes a huge difference in file size when you keep adding it up never turn that on.

ZERO
09-08-2014, 06:06 PM
I am not doing anything with sound right now, I was trying to solve the issue of clients needing to do hundreds of MB worth of effects for the new race. Now I figured out how to reduce the file sizes dramatically.

DJ_MikeyRevile
09-08-2014, 06:37 PM
I am not doing anything with sound right now, I was trying to solve the issue of clients needing to do hundreds of MB worth of effects for the new race. Now I figured out how to reduce the file sizes dramatically.

AHHH i see.

Passarelli
09-08-2014, 07:48 PM
Mikey, it'd be awesome if you could do what I was attempting to do and get the sound effects for the new race ready to go. I just can't because this computer is slow and shitty (my desktop is about 1000 miles away which is why I haven't been on WCS).

ZERO
09-08-2014, 07:56 PM
The sounds are more of a nice thing to have, I am not going to be delaying the race for them. I might do something about getting one for the ult though. I do really want to push this race out for final testing within the next week.

DJ_MikeyRevile
09-08-2014, 09:58 PM
how exactly does the ult operate?
I was thinking this for a couple seconds, then adding a WOOSHH (fire woosh) not like a (wind woosh)
https://www.youtube.com/watch?v=JMuzx2hSt4Y

- - - Updated - - -

here we go
https://www.youtube.com/watch?v=tJ9xvSEstWE

A sound for all the abilities!

38 seconds would be awesome.

Best part! The second link is all public domain!

ZERO
09-09-2014, 05:08 PM
So in order to create races where the leveling can be dynamic I need to replace multiple global variables in the current system which was designed to get rid of the need for massive global arrays which can get issues like out of bound errors. The goal is to create an actual method which will return the current value just like an array would except that the method statement computes the correct value automatically dependent on the min and max values for that ability, the number of levels for that ability and the users current level.

I will show what our deceleration looks like now which is then computed in the method.


new Float:IronBaseChance = 0.05;
new Float:IronChanceMult = 0.01;

In program:

if(Math_GetRandomFloat(0.0,1.0)<=IronBaseChance + (skill_level*IronChanceMult))

ZERO
09-09-2014, 05:23 PM
So the formula is:


=((A1+(((B1-A1)/(C1-1))*(D3)))-((B1-A1)/(C1)))-(((A1+(((B1-A1)/(C1-1))*(C1)))-((B1-A1)/(C1)))-B3)

or simplified

((A+(((B-A)/(C-1))*(D)))-((B-A)/(C)))-(((A+(((B-A)/(C-1))*(C)))-((B-A)/(C)))-B)

Where:
A = Min Constrant
B = Max Contrant
C = Levels Per Ability
D = Current Level

This will output the correct desired value based on a linear scale between the min and max for the ability.

The code used to actually implement this as a function will be shown later when completed to demonstrate how much better this is for reducing errors and making code dynamic and simple.

ZERO
09-09-2014, 05:37 PM
To minimize code and make it easier to read the mathematical function itself will be a stock function.

ZERO
09-09-2014, 05:57 PM
Also I now wish that math class taught you how to create a formula from some numbers to do something rather than give you formulas. B/c it takes a really long time to figure out math via trial and error. :banghead:

ZERO
09-09-2014, 09:52 PM
So before we had this:
Global Vars

new Float:IronBaseChance = 0.05;
new Float:IronChanceMult = 0.01;

In program:

if(Math_GetRandomFloat(0.0,1.0)<=IronBaseChance + (skill_level*IronChanceMult))

Now we have this:

Global Function

public Float:IronChance(currentLevel)
{
return AbilityValue(0.05, 0.25, RaceLevels, currentLevel);
}

In Program

if(Math_GetRandomFloat(0.0,1.0)<=IronChance(skill_level))

ZERO
09-10-2014, 06:20 PM
Can I please get another save of the irontest.vtf but with minimaps turned off. This will reduce the file size by about 1MB and allow me to scale the image dynamically in the program.

Passarelli
09-11-2014, 12:37 AM
Sure! I'm about to pass out but let me see if I can do it before that happens.

- - - Updated - - -

Actually I can't tonight. GF is sleepin and the files are on my desktop. I'll have her send them up and change it for you tomorrow! Sorry about the delay.

ZERO
09-12-2014, 02:42 PM
No Problem

ZERO
10-21-2014, 01:49 AM
I have added some posts to the Crypt Lord thread showing changes made to that race over the original. Think of it as an explanation for the entire code system that I use for the races and why they are reprogrammed from scratch to meet it.