Results 1 to 21 of 21
  1. #1
    MSgt. Shooter Person
    Join Date
    Mar 2008
    Location
    Australia
    Posts
    339

    Post Custom weapon scripts

    Hi Everyone

    It has been a while since I have been back to this forum. Anyway I am going to try and create a few custom weapons for UT3. I just need to brush up on Blender 2.6 with 5 or so tutorials and I am ready to go.

    I am wanting to ask with the script side of it I have been looking at the UT3ScriptSource 1.5 and I have noticed that for every UT3 weapon Epic games has a UTWeap_[weapon name].uc file, a UTAttachment_[weapon name].uc file, a UTAmmo_[weapon name].uc file and one or more UTDmgType_[weapon projectile name].uc files.

    I know I definitely will need a UTWeap uc file and probably a UTAmmon uc file for compiling. I don't know about the other two types though, what is the UTAttachment uc file for and can I or should I combine these parts into one big uc file?

    Is there anyone that is familiar with the UT3 ScriptSource I would appreciate some guidance?

  2. #2
    MSgt. Shooter Person
    Join Date
    Mar 2008
    Location
    Australia
    Posts
    339

    Default

    In this in the wrong section? Should I do it again in the Programming the Unreal Script section?

  3. #3

    Default

    Quote Originally Posted by UTCollector88 View Post
    In this in the wrong section?
    Kind of.

    Quote Originally Posted by UTCollector88 View Post
    Should I do it again in the Programming the Unreal Script section?
    No need to, as the guys who will read the "Programming the Unreal Script section" section read this section as well (the UT3 forum is not that big ).

    To answer your questions:
    Generally, you don't need to stick to the naming convetion like "UTWeap_", "UTAttachment_" and so on. The "UTWeap_" file/class has the logic for the basic weapon. The "UTAmmo_" class is a item to be placed into a world/level which gives you ammo for the specific weapon (set in its defaultproperties). The "UTDmgType_" class is the damagetype. It used for naming the particular death for the weapon (e.g. "You are killed by ... (WEAPON)"). Some weapons also adds a special treatment in its damagetype class - like spawning gibs, etc. The "UTAttachment_" class is for the treatment on 3rd person models for any other weapons you'll see in a game except the one you're carrying - eg. the DualWielding method for a Enforcer, or the Laser targetting of the Avril.

    There are some tutorials for you a basic weapon.
    Quote Originally Posted by RattleSN4K3 View Post
    [...]
    If you don't know aynthing about coding a mutator, you can check this tutorial. That article is a bit outdated, but works fine.
    http://www.jadeskaggs.com/2009/03/26...-superstinger/
    As you'll working with Blender, you might check this tutorial as well.
    http://code.google.com/p/steam-punk-...tomGunTutorial

  4. #4
    MSgt. Shooter Person
    Join Date
    Mar 2008
    Location
    Australia
    Posts
    339

    Default

    Okay great! You have been a great help. Also if I combine all the contents (damage type, ammo, basic logic and 3rd person attributes) into one uc file will it still compile and create the necessary files the same as if I used the conventional naming system? I decided I will definitely have the main uc weapon file named after the name of the weapon I will create just for the sake of not getting confused and lost.

  5. #5
    MSgt. Shooter Person
    Join Date
    Sep 2009
    Location
    Arlington, TX
    Posts
    394

    Default

    Quote Originally Posted by UTCollector88 View Post
    Okay great! You have been a great help. Also if I combine all the contents (damage type, ammo, basic logic and 3rd person attributes) into one uc file will it still compile and create the necessary files the same as if I used the conventional naming system? I decided I will definitely have the main uc weapon file named after the name of the weapon I will create just for the sake of not getting confused and lost.
    You go ahead and try it haha. Just kidding I don't see what is the point of attempting such a thing. You want a separate ammo pickup from your weapon pickup do you not? You want to keep compatibility with weapon replacement and other mods, yes? You dont want to have to rewrite a bunch of onlyownersee/noowner see stuff, right? Are you having trouble getting organized? I suggest trying notepad++ (free) if you do not have a favorite IDE; You can save sessions, open all epics relative classes and your classes splitscreen and tabbed.
    Narayana*SIG*

  6. #6

    Default

    Short: You should extend the existing classes.

    The UTWeapon class has a variable like "AttachmentClass" which has to derive from "UTAttachment". Otherwise casting the object would fail. You always have to extend the given classes in order to "extend"/customize content from UT3.

    Code:
    MyWeaponClass extends UTWeapon;
    Code:
    FooDamageType extends UTDamageType;
    Code:
    BarAttachment extends UTAttachement;
    Code:
    MyAmmo extends UTAmmoPickupFactory;
    Code:
    SomeProjetile extends UTProjectile;
    ...

    And the fact that every class definition cannont exist twice, you'll have to find a unique name for everything. That's why UnrealTorunament is often using the UT prefix.

    Quote Originally Posted by UTCollector88 View Post
    combine all the contents (damage type, ammo, basic logic and 3rd person attributes) into one uc file will it still compile
    Probably yes, but it won't work correctly as intended. Stick to the UT examples.

    Quote Originally Posted by UTCollector88 View Post
    create the necessary files the same as if I used the conventional naming system?
    Naming classes has nothing to do with the functional purpose of classes in general. Things are split up into several classes to logically split it and to have an opportunity to use a specific effect several times (the main idea of OOP languages - don't reinvent the wheel).

  7. #7
    MSgt. Shooter Person
    Join Date
    Mar 2008
    Location
    Australia
    Posts
    339

    Default

    Oh yeah, that reminds me! I forgot to ask is there a data dictionary on the UT3 variables or a list or something? Cause there are a heap of variables I've seen in UT3 scripts that I am not sure what they mean. Eg. PostBeginPlay and UTPawn, etc.

  8. #8

  9. #9
    MSgt. Shooter Person
    Join Date
    Mar 2008
    Location
    Australia
    Posts
    339

    Default

    Cool!Thanks for that.

  10. #10
    MSgt. Shooter Person
    Join Date
    Mar 2008
    Location
    Australia
    Posts
    339

    Default

    One other thing, if you want to add like an announcement/award like head shot or an award/announcement for getting 20 kills with the weapon/s where would you script that? Can you do that?

  11. #11
    MSgt. Shooter Person
    Join Date
    Sep 2009
    Location
    Arlington, TX
    Posts
    394

    Default

    Quote Originally Posted by UTCollector88 View Post
    One other thing, if you want to add like an announcement/award like head shot or an award/announcement for getting 20 kills with the weapon/s where would you script that? Can you do that?
    http://wiki.beyondunreal.com/?ns106=...dvanced+search
    Narayana*SIG*

  12. #12
    MSgt. Shooter Person
    Join Date
    Mar 2008
    Location
    Australia
    Posts
    339

    Default

    Yeah, that is good but can you create your own new weapon announcement? That is what I meant to ask.

  13. #13
    MSgt. Shooter Person
    Join Date
    Sep 2009
    Location
    Arlington, TX
    Posts
    394

    Default

    Quote Originally Posted by UTCollector88 View Post
    Yeah, that is good but can you create your own new weapon announcement? That is what I meant to ask.
    Yes. Read the source of those classes. Review how others have done this. For example, the "Unreal!!" reward in HO0815XX's ShockSniper: http://forums.epicgames.com/threads/...inal-(Updated)
    Narayana*SIG*

  14. #14
    MSgt. Shooter Person
    Join Date
    Mar 2008
    Location
    Australia
    Posts
    339

    Default

    Some other things I want to ask can you point the pickup sound for your custom ammo or weapon to a pickup sound of an existing weapon? Also what is the variable MaxDesirablility used for in weapon and ammo scripts? The variable is a number. Also what am I suppose to put for the variables Scale, Translation and CollisionHeight?

  15. #15
    MSgt. Shooter Person
    Join Date
    Sep 2009
    Location
    Arlington, TX
    Posts
    394

    Default

    You should not run into problems using sounds from stock packages. MaxDesirability is for bot decisions, average weapon defaults are about 0.7, redeemer's is 1.5. I don't know what scale/translation you are referring to, you'll need to adjust these for most perceivable assets you create, and it will become apparent to you once the need arrives. The CollisionHeight to which you are referring may be that of the collision cylinders for pickups/dropped pickups, but some projectiles use them, too. To get a visual idea of how many unreal units some of these are, you can view the collision cylinders of pickups, flags and a few other things by placing them in a map in the editor and enabling the collision view flag in the editor viewport. Projectiles only seem to use collision cylinders in cases where the projectile needs collision notifications from other weapon fire. ex: shombos, redeemer denials, bio glob detonations.
    Narayana*SIG*

  16. #16

    Default

    You can test Sizes/ units in unreal editor; just change the x,y,z of a cube [brush component] and you can see a real image/ cube of your collision sizes.
    * take your projectile and place it in editor
    - try to make a box around it; this will be a good size.

    - Skeletal mesh usually handle there own collision

    - maybe an example will help you
    Code:
            Begin Object class=SkeletalMeshComponent Name=MeshFrame
                    SkeletalMesh=SkeletalMesh'WP_HomingPigeon.SkeletalMesh.SP_Bird1_SKMesh'
                    AnimSets.Add(AnimSet'WP_HomingPigeon.AnimSet.FlySoar2')
                    AnimTreeTemplate=AnimTree'WP_HomingPigeon.AnimTree.FlySoar2'
        Rotation=(Yaw=900) 
        //Rotation=(Yaw=384) // Pitch No, Roll Not tested
        //Rotation=(Yaw=180) 
            End Object
    
            CollisionComponent=MeshFrame
            mesh=MeshFrame
            Components.Add(MeshFrame)
        
        //skeletal mesh collision
        Begin Object Name=CollisionCylinder
            CollisionRadius=10
            CollisionHeight=10
            CollideActors=True
        End Object
    Last edited by TKBS; 07-02-2012 at 07:38 PM.

  17. #17
    MSgt. Shooter Person
    Join Date
    Mar 2008
    Location
    Australia
    Posts
    339

    Default

    Okay cool. Do I need permission from game companies if I want to use their sounds in my mod? For example like if I wanted to use the assault rifle fire sound in Na Pali for my UTWeap_CombatAssaultRifle, do I need to get permission of the makers of Unreal Na Pali before I use it or will they not care cause it is just a mod?
    Last edited by UTCollector88; 07-13-2012 at 10:06 AM.

  18. #18
    MSgt. Shooter Person
    Join Date
    Mar 2008
    Location
    Australia
    Posts
    339

    Default

    Do you know where I can find the UT99 scriptsource and is there a scriptsource for Unreal Na Pali available?

  19. #19

    Default

    umm why?

    http://hyper.dnsalias.net/files-sources.htm

    - you should not need these scripts for weapons; UT3 has all the existing unreal source code;
    - the old scripts are outdated/ not useful/
    - u would find it easier just starting from ut3 code;

    - i looked at the assault rifle and it confused the pants off me.
    - same for making a grenade; even with source code from ut2004 it aint gonna work unless you can code

    stick with up to date code


    - P.s is you feel like you need practice; i have a few project weapons i would appreciate some help with.
    - got most if not all of them complete; just not polished;
    - got a few weapons that i only have ut2004 source for; and having trouble making ut3 versions.

    - there's always room for improvements and im always half way through making something that will never be finished,
    Last edited by TKBS; 07-13-2012 at 12:26 PM.

  20. #20

    Default

    The provided link is not the official release. It's a modified version of Unreal called Hyper Unreal

    Official releases:
    UT v436 ScriptSource
    http://www.gamefront.com/files/96525...6_ScriptSource

    Unreal Tournament Source Code (432)
    http://www.gamefront.com/files/43792...rce_Code__432_



    Quote Originally Posted by TKBS View Post
    UT3 has all the existing unreal source code;
    - the old scripts are outdated/ not useful/
    - u would find it easier just starting from ut3 code;
    If someone wants to create a port of some objects (weapons, items, etc.) it's always good to inspect the old code.
    UT3 doesn't provide all the Unreal code nor all the Unreal Tournament code.

    But you're right, UTCollector88 should stick to the source of UT3. The UT3 source code is more "readable" and well structured.

    @UTCollector88
    The old editors of Unreal Engine games supports a class browser. The UnrealEd 2.0 has a class browser on the right side, and you can export all classes.

  21. #21
    MSgt. Shooter Person
    Join Date
    Mar 2008
    Location
    Australia
    Posts
    339

    Default

    Okay then. I will stick with UT3 source code if it is easier. I mainly thought it might help with the Assault Rifle. Scratch that idea then.

    You still haven't answered my first question in post 17?

    I haven't done much coding yet I am doing the modeling and animations and UVMapping first in Blender for all the weapons.

    ---
    Another thing. Is there a site you guys know where you can get good left and right side images of UT weapons? I want to use these as background images to model on to start off with. I tried Liandri Archives but that site isn't the best for images. And google images search doesn't come up positive for every weapon I tried to look for.
    Last edited by UTCollector88; 07-14-2012 at 08:47 AM.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.