Page 1 of 5 1 2 3 ... LastLast
Results 1 to 10 of 47

Thread: How you can contribute to WCS development

  1. Arrow How you can contribute to WCS development

    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.



  2. Default

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



  3. Default

    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:
    Code:
    //Decals
    new String:IronFileVMT[] = "materials/decals/custom/ibisgaming/iron.vmt";
    new String:IronFileVTF[] = "materials/decals/custom/ibisgaming/iron.vtf";
    OnMapStart:
    Code:
    //decals load
        OnMapStart_PrepareDecal(IronFileVMT, IronFileVTF);
    Display the actual effect to clients:
    Code:
                        //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.

    Code:
    /*
     * 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);
    }
    Code:
    /**
     * 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);
    }
    Code:
    /*
     * 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)),newEntity1Origin); 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:
    Code:
    /*
     * 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...



  4. Default

    So do you require us to animate this via coding in game? Or can u simply import an animated vtf like how sprays work?
    Started from bottom. Now we here. <IBIS>


    Quote Originally Posted by ZERO View Post
    Trying to hack in IBIS is like trying to kill someone in a police station, not the best idea...

  5. Default

    Yea you would animate it via the vtf file itself. Just like how the hearts and spades are animated for jack for example.



  6. Default

    Try this and let me know what you think! I can't test it other then in vtfedit : /

    irontest.zip
    What: my life skills use meat

    “Let us be thankful for the fools. But for them the rest of us could not succeed. ” -Mark Twain

  7. Default

    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.
    What: my life skills use meat

    “Let us be thankful for the fools. But for them the rest of us could not succeed. ” -Mark Twain

  8. Default

    Quote Originally Posted by Passarelli View Post
    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.
    Why don't you animate my penis slowly bitchslapping you? Bonus point for slow motion dramatic effects.
    Started from bottom. Now we here. <IBIS>


    Quote Originally Posted by ZERO View Post
    Trying to hack in IBIS is like trying to kill someone in a police station, not the best idea...

  9. Default

    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.



  10. Default

    Damnit, I knew I shouldn't have sent you those links. I'll see if I can figure out how to make any of the beam or particle effects look more 'warcrafty'.
    What: my life skills use meat

    “Let us be thankful for the fools. But for them the rest of us could not succeed. ” -Mark Twain

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •