Results 1 to 26 of 26
  1. #1
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Posts
    36

    Default Trouble Testing Custom Weapons

    I'm no programmer by any means, just an artist trying to get his weapons into the game. In UT3 I know the basic process behind doing it, but I can't get the same process to work in the UDK.

    The old way was to copy the UTWeap_Shockrifle and UTAttachment_Shockrifle and modify a few lines to use my own custom meshes. I've done the same thing in the UDK and I put my modified scripts in the /Development/Src/MyMods... folder. I added MyMods to the UTEditor.ini and modified the line:

    'ModPackagesInPath=..\..\UTGame\Src'

    to this:
    'ModPackagesInPath=..\..\Development\Src'.

    I'm not quite sure where to put my packages before building now, so I threw them into the Content folder under TestPackages. I used Frontend to recompile it, opened up the editor and placed a Weapon Factory in a simple level, but my weapon doesn't show up in the weapons list.

    I tried moving my packages to the Unpublished folder, but then Frontend gives me a bunch of warnings about not being able to find the assets.

    This non-programmer could sure use a little help. Thanks in advance

  2. #2
    Super Moderator
    Join Date
    Nov 2009
    Location
    Cary,NC
    Posts
    5

    Default

    you could just import your weapons with the same names in the same groups, in the same package, thus overwriting the original, say shock rifle with your mesh.

    I do this all the time to test different player characters and such locally.

    quick example:
    package name : ShockRifle
    Group name : Mesh
    SkelMesh name : SK_ShockRifle

    just import your weapon in same upk, same grp, and name yours the same, and it will overwrite

  3. #3
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Posts
    36

    Default

    I've always heard that you're never supposed to modify or write over the original packages or scripts.

  4. #4
    Veteran
    Join Date
    Sep 2006
    Location
    Newcastle, UK
    Posts
    6,942
    Gamer IDs

    Gamertag: ambershee

    Default

    Personally, I'd never overwrite them. I'm not sure code goes in the 'MyMods' folder however. Have you checked the UDN docs on how to compile?

  5. #5
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Posts
    36

    Default

    Ok I got it working.

    [EDIT]: [Not working completely. Having some more errors on compile. Scroll down to see them.]

    ambershee: you were right, I did not check the UDK documentation on compiling. It instructs you to remove a semicolon from the UTEngine.ini

    Don't know why they have it commented out, but they tell you what exactly to do here:

    http://udn.epicgames.com/Three/Devel...0and%20Testing

    Just have to figure out why the Shockrifle code keeps giving me compile errors. Commenting out the troubled lines allows it to compile just fine and then my weapon shows up in the editor, but the weapon doesn't play any of its animations. Anyways, at least it's showing up
    Last edited by TychoVII; 11-06-2009 at 02:02 AM.

  6. #6
    MSgt. Shooter Person
    Join Date
    Jul 2009
    Posts
    216

    Default

    so TychoVII where does ur coding go and where do ur weapon packages go?

  7. #7
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Posts
    36

    Default

    The packages seem to work in /UTGame/Content/TestPackages
    I guess 'Content' will sort of be like the new 'Published'

    Your custom scripts seem to work in /Development/Src/MyMods
    But that only works if you edit the UTEditor.ini AND the UTEngine.ini

    UTEditor.ini:
    [ModPackages]
    ModPackagesInPath=..\..\UTGame\Src
    ModOutputDir=..\..\UTGame\Unpublished\CookedPC\Scr ipt

    --change to--

    [ModPackages]
    ModPackagesInPath=..\..\Development\Src
    ModOutputDir=..\..\UTGame\Unpublished\CookedPC\Scr ipt
    ModPackages=MyMod

    UTEngine.ini:
    ;ModEditPackages=MyMod

    Remove the semicolon. It's commented out by default.

  8. #8
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Posts
    36

    Default

    I've gotten the weapon to show up in game, but I still can't get the script to compile properly. I keep getting the following error:

    Warning/Error Summary
    ---------------------
    C:\UDK\UDK-2009-11\Development\Src\MyMod\Classes\RKWeap_44Magnum.u c(311) : Error, BEGIN OBJECT: name MeshSequenceA redefined: Begin Object class=AnimNodeSequence Name=MeshSequenceA

    C:\UDK\UDK-2009-11\Development\Src\MyMod\Classes\RKWeap_44Magnum.u c(395) : Error, BEGIN OBJECT: name ForceFeedbackWaveformShooting1 redefined: Begin Object Class=ForceFeedbackWaveform Name=ForceFeedbackWaveformShooting1


    All I've done is copied the UTWeap_Shockrifle script and changed its name to RKWeap_44Magnum (both in file name and at the top of the script). Why would this code work perfectly fine in the shockrifle script, but not an exact duplicate of it?

    I tried commenting out the problem lines and the script DOES compile without errors and my weapon DOES show up in the editor, but its animations do not work.

    I'm baffled now.

  9. #9
    MSgt. Shooter Person
    Join Date
    Jul 2009
    Posts
    216

    Default

    have you tried UTWeap_Magnum or WP_Magnum
    i doubt that should make a difference tho lol

  10. #10
    Boomshot
    Join Date
    Oct 2007
    Posts
    2,300
    Gamer IDs

    Gamertag: Fr0z3nB0nes

    Default

    Quote Originally Posted by TychoVII View Post
    I've gotten the weapon to show up in game, but I still can't get the script to compile properly. I keep getting the following error:

    Warning/Error Summary
    ---------------------
    C:\UDK\UDK-2009-11\Development\Src\MyMod\Classes\RKWeap_44Magnum.u c(311) : Error, BEGIN OBJECT: name MeshSequenceA redefined: Begin Object class=AnimNodeSequence Name=MeshSequenceA

    C:\UDK\UDK-2009-11\Development\Src\MyMod\Classes\RKWeap_44Magnum.u c(395) : Error, BEGIN OBJECT: name ForceFeedbackWaveformShooting1 redefined: Begin Object Class=ForceFeedbackWaveform Name=ForceFeedbackWaveformShooting1


    All I've done is copied the UTWeap_Shockrifle script and changed its name to RKWeap_44Magnum (both in file name and at the top of the script). Why would this code work perfectly fine in the shockrifle script, but not an exact duplicate of it?

    I tried commenting out the problem lines and the script DOES compile without errors and my weapon DOES show up in the editor, but its animations do not work.

    I'm baffled now.
    You need to remove the Class=

    So it would look like this:

    Code:
    Begin Object Name=ForceFeedbackWaveformShooting1
                    blablabla
    End Object
    or it might be the name you need to remove, Im pretty tired right now so theres a big chance I muddled them up.

  11. #11
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Posts
    36

    Default

    marilol: Thankyou for the suggestion! It half worked

    Things are starting to get interesting now. I removed the "class=" from both lines I was getting errors from. It fixed one, but not the other. Now I'm getting the following error:

    Warning/Error Summary
    ---------------------
    C:\UDK\UDK-2009-11\Development\Src\MyMod\Classes\RKWeap_44Magnum.u c(311) : Error, BEGIN OBJECT: No base template named MeshSequenceA found in parent class UTWeap_ShockRifleBase: Begin Object Name=MeshSequenceA


    The damn thing complains that it's being redefined, then when I don't define it, it complains that it's NOT being defined! What gives Epic? :P

  12. #12
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Posts
    36

    Default

    Sorry to bump this, but I'm really stuck here. I can't figure out why I get an error no matter what I name this class. It makes no sense to me. I could really use some help on this.
    Last edited by TychoVII; 11-06-2009 at 07:28 PM.

  13. #13
    Redeemer
    Join Date
    Mar 2009
    Posts
    1,040

    Default

    Just a suggestion, but it's pretty hard to help with that little of information, at the very least post your defaultproperties{} so we can see it. Usually, like the class problem, you need to take info out. You actually generally shouldn't wholesale copy defaultproperties{} from another gun.

    danimal
    Danimal

    Space Flight Dev Thread/Video [Aug 2011] http://forums.epicgames.com/showthread.php?t=807107
    Grapple Gun Playable Demo/Video [Nov 2010] http://forums.epicgames.com/showthread.php?t=752450

  14. #14
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Posts
    36

    Default

    Well I got it working 100%.

    Instead of duplicating the shockrifle script, I created a new script and extended off of UTWeap_Shockrifle. Then I just added a few lines in the defaultproperties to tell it to use my mesh. It compiles just fine now. Thanks for the suggestions guys.

  15. #15

    Default

    Is there any reload system sample out there?

    i wanted to add some awesome guns with epic reload anims

  16. #16
    MSgt. Shooter Person
    Join Date
    Mar 2007
    Posts
    456

    Default

    i got this problem too. (and im not a noob coder lol)

    Code:
    class TacticalAssault_BASEWeapons extends UTWeapon
    config(TACustomWeapons);
    Code:
    class TacticalAssault_Weapon extends TacticalAssault_BASEWeapons;
    
    defaultproperties
    {
    Begin Object class=AnimNodeSequence Name=MeshSequenceA
    	End Object
    }
    can someone confirm this is a bug or if im just sleep deprived :P

  17. #17

    Default

    I'm also trying to get a weapon working, but I'm unsure how to actually get it in the game to test. (Console command?)

  18. #18
    Boomshot
    Join Date
    Oct 2007
    Posts
    2,300
    Gamer IDs

    Gamertag: Fr0z3nB0nes

    Default

    Quote Originally Posted by Ortzinator View Post
    I'm also trying to get a weapon working, but I'm unsure how to actually get it in the game to test. (Console command?)
    giveweapon UTGame.UTWeap_ShockRifle

    so if I made a chainsaw in my mymod folder:

    giveweapon mymod.chainsaw

    chainsaw being the name of the file. Thats a console command.

    As for TOP-Proto I have no idea why its causing that, I will have to try this myself.

  19. #19
    Marrow Fiend
    Join Date
    Jul 2006
    Location
    UT40k
    Posts
    4,182

    Default

    just starting myself, don't use the code from UT3 as it throws errors all over the place, use the code that comes with UDK, i build a test map and added a weapon pick-up base that way you can check your weapon in game
    UT40K:The Chosen - Warhammer 40,000 for UDK
    ut40kgeodav - UT3 Tutorials - Characters - Weapons - Vehicles - FaceFX
    UDK Tutorials - Basics - Vehicles - Characters - Weapons

  20. #20
    Redeemer
    Join Date
    Mar 2009
    Posts
    1,040

    Default

    Rule #1 when you get errors and aren't sure what it does or what you're doing: comment it out.

    For anyone wanting to test out their weapon, there's several different ways (see above), I personally favor this, and making this gametype the default gametype (UTEngine.ini specifies default gametype I think):

    Code:
    class YourGametype extends UTTeamGame; //could be UTDeathMatch, etc etc.
    
    defaultproperties
    {
       DefaultInventory[0] = class'MyMod.UTWeap_YourGun'
    }
    That way I can just compile with Make (from FrontEnd), and Launch and test.

    danimal

  21. #21
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    Ripon, WI
    Posts
    59
    Gamer IDs

    Gamertag: SpartanDonut007

    Default

    When you get this working, could you PLEASE take a moment to write a quick tutorial of the steps you took? Also, is there any preparation you have to do to the mesh to get it to work in UDK?

    Thanks!

  22. #22
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Posts
    36

    Default

    Geodav has already made a phenomenal video tutorial for getting your custom weapon to replace one of UT3's weapons. If you follow all the steps in his video you will get a custom weapon working in the UDK, but there are a couple steps you have to take differently. I've already pointed out what those steps are earlier in this thread.

  23. #23
    MSgt. Shooter Person
    Join Date
    Jul 2009
    Posts
    216

    Default

    Quote Originally Posted by TychoVII View Post
    The packages seem to work in /UTGame/Content/TestPackages
    I guess 'Content' will sort of be like the new 'Published'

    Your custom scripts seem to work in /Development/Src/MyMods
    But that only works if you edit the UTEditor.ini AND the UTEngine.ini

    UTEditor.ini:
    [ModPackages]
    ModPackagesInPath=..\..\UTGame\Src
    ModOutputDir=..\..\UTGame\Unpublished\CookedPC\Scr ipt

    --change to--

    [ModPackages]
    ModPackagesInPath=..\..\Development\Src
    ModOutputDir=..\..\UTGame\Unpublished\CookedPC\Scr ipt
    ModPackages=MyMod

    UTEngine.ini:
    ;ModEditPackages=MyMod

    Remove the semicolon. It's commented out by default.
    do you have to say /UTGame/Content/TestPackages/CustomWeapons ????

  24. #24
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    Ripon, WI
    Posts
    59
    Gamer IDs

    Gamertag: SpartanDonut007

    Default

    Quote Originally Posted by TychoVII View Post
    Geodav has already made a phenomenal video tutorial for getting your custom weapon to replace one of UT3's weapons. If you follow all the steps in his video you will get a custom weapon working in the UDK, but there are a couple steps you have to take differently. I've already pointed out what those steps are earlier in this thread.
    Sweet! I shall have to check it out.

  25. #25
    MSgt. Shooter Person
    Join Date
    Mar 2007
    Posts
    456

    Default

    Quote Originally Posted by TychoVII View Post
    Well I got it working 100%.

    Instead of duplicating the shockrifle script, I created a new script and extended off of UTWeap_Shockrifle. Then I just added a few lines in the defaultproperties to tell it to use my mesh. It compiles just fine now. Thanks for the suggestions guys.
    this will not work when you come to package your game as the shockrifle is part of the utcontent pack that your not allowed to package with your game

  26. #26
    MSgt. Shooter Person
    Join Date
    Mar 2007
    Posts
    456

    Default

    furthermore i also believe this is a bug.

    Begin Object class=AnimNodeSequence Name=MeshSequenceA
    End Object

    should work. if it doesnt i think its fixed by replacing all the UT .u files with the RELEASE versions, or its something to do with cooking and the cook cache.


 

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.