PDA

View Full Version : Making Custom Gun Help



sabot00
03-31-2010, 08:39 PM
I've followed this tutorial:
http://code.google.com/p/steam-punk-pirates-mod/wiki/CustomGunTutorial#Exporting_to_UT3_PSK_PSA_format
and GeoDav's UDK Weapon video tutorial, http://sites.google.com/site/ut40kmod/UT40k_mod/udk-tutorials

When I go into cmd any cd into UDK-2010-03/Binaries and use UDK Make it pops me an error.
http://img534.imageshack.us/img534/3381/errorb.png
I got an idea to simply add a .uc file named *, however 2 things prevent this:
1. You cannot use a * in a filename
2. The error shows C:\UDK\UDK-2010-03\Binaries\Win32\... there is no Src, CustomGun, or Classes folder in there.
I'm guessing the reason for that is it's looking for those folders within the UDK MS-DOS app which is in Win32.

After I close the prompt if I start UDK Editor it will say "Scripts Outdated, Rebuild now?" If I press:
Yes - The same prompt as UDK Make shows up, same error, UDK Ed won't start
No - UDK Ed starts, nothing changes

Looking at the places that something could go wrong:

Model:
I have 2, 3P & 1P, it's a G23 made in Blender 2.49b.
1P: 2 Bones, MuzzleFlash & ROOT.
3P: 3 Bones, b_gun_root, b_gun_left_hand, MuzzleFlash

Texture/Mat:
No normals, UV Mapped color textures

In UDK:
Using ShockRifle ammo
Everything in: UTGame\Content\Weapons\WP_CustomGun
There's 3 folders: Anim, Materials, Mesh
In Anim: WP_Custom_Gun_1P_Anim and it's an AnimSet
In Materials: Color_Tex (1024^2) .tga file, WP_Custom_Gun_Mat
In Mesh: SK_WP_Custom_Gun_1P (1304 tris, 2 bones)
SK_WP_Custom_Gun_3P (1304 tris, 3 bones)

Code:
Copied the files the tut's called for, followed GeoDav's instructions

Anyone know something I'm doing wrong?

OmegaMinus1
03-31-2010, 11:21 PM
You should have the choice of YourCustomGunName in a weaponpickupfactory. This warning is harmless it happens when your ModEditPackages folder is missing or has no uc files to build.

The warning is from a second package reference in your ini file. the first occurence compiled fine.

C:\UDK\UDK-2010-03\UTGame\Config\UTEngine.ini Can you please post your ini file lines 420 through 450

sabot00
03-31-2010, 11:29 PM
Well I went into Config & deleted all of my UT*.ini files, then UDK Made, no warnings/errors this time, and when selecting the WeaponSpawn it shows UTWeap_CustomGun.
However in-game the gun doesn't show up, the secondary ball blast shows up but the primary does also does not. However the primary does work as shooting the ball blows it up.

This the last lines of UTEngine

[UnrealEd.ContentTagIndex]
DefaultTags=(AssetTypeName="Engine.StaticMesh",Tags=(Arch,Ash,Brick,Blood,Building,Cave,Chair,Ch aracter,COG,Column,Concrete,Corner,Couch,Cover,Cra te,Decoration,Destroyed,Dome,Door,Electronic,Exter ior,Facade,Fire,Flare,Floor,Foliage,Fracture,Furni ture,Glass,Gore,Hail,HeroPiece,Ice,Ink,Interior,La dder,Lever,Light,Liquid,Locust,Mechanical,Metal,Mo untain,Optimization_Done,Optimization_ToDo,Optimiz ation_NotNeeded,Organic,Physics,Pipe,Railing,Riftw orm,Road,Rock,Roof,Rubble,Sidewalk,Sign,Sky,Snow,S tairs,Stone,Stranded,Table,Trash,Tree,Trim,Tunnel, Urban,Vehicle,Volumetric,Wall,Weapon,Wheel,Window, Wood)))
DefaultTags=(AssetTypeName="Engine.ParticleSystem",Tags=(Ash,Beam,Blood,Camera,Dirt,Dust,Electricity ,Explosion,Fire,Fog,Impact,Imulsion,Ink,Liquid,Met al,Mud,MuzzleFlash,Optimization_Done,Optimization_ ToDo,Optimization_NotNeeded,Riftworm,Shell,Smoke,S now,Spark,Stone,Water,Weapon,Wood))
DefaultTags=(AssetTypeName="Engine.Material",Tags=(Ash,Asphalt,Blood,Brick,Ceiling,Character,C OG,Column,Concrete,Damaged,Decal,Dirt,Distortion,D oor,Dust,Electricity,Explosion,Exterior,Fire,Flare ,Floor,Fog,Foliage,Gases,Glass,Gore,Hail,Ice,Imuls ion,Ink,Interior,Light,LightFunction,Liquid,Locust ,Mechanical,Metal,MuzzleFlash,Neutral,Optimization _Done,Optimization_ToDo,Optimization_NotNeeded,Org anic,Riftworm,Rock,Roof,Sign,Sky,Smoke,Snow,Steam, Stone,Stranded,Tiling,Trash,Tree,Trim,Vehicle,Wall ,Water,Weapon,Wood)))

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

[UTGame.UTActorFactoryTeamStaticMesh]
MenuPriority=25

[IniVersion]
0=1267214074.000000
1=1267213301.000000
This is counted with ConTEXT + UnrealScript Highlighter
There's only 367 lines.

Finally, you're wrong the warning is harmful to me, since when I start UDK it will ask to rebuild scripts if there is a warning UDK won't start.
It seems deleting all the UT*.ini is the only way to get a green.

OmegaMinus1
03-31-2010, 11:39 PM
Finally F U.

InhexSTER
04-01-2010, 12:26 AM
you put your classes in wrong direcrtory i think it should be development/src/YourGun/Classes/youclass.uc not development/src/utgame/src/yougun/classes/youclass.uc

and change it in defaultengine.ini +EditPackage=YourGun

sabot00
04-01-2010, 04:50 PM
The files are in Development/src/CustomGun

InhexSTER
04-01-2010, 05:06 PM
you need to put them into Development/src/CustomGun/classes/youcode.uc

engine searches for classes forlder

sabot00
04-01-2010, 08:05 PM
Yeah, that's what I meant.

geodav
04-02-2010, 01:26 PM
make sure your DefaultEngine.ini has these lines

[UnrealEd.EditorEngine]
EditPackagesOutPath=..\..\UTGame\Script
FRScriptOutputPath=..\..\UTGame\ScriptFinalRelease
+EditPackages=UDKBase
+EditPackages=UTGame
+EditPackages=UTEditor
+EditPackages=UTGameContent
+EditPackages=CustomGun
;ModEditPackages=MyMod
AutoSaveDir=..\..\UTGame\Autosaves
InEditorGameURLOptions=?quickstart=1?numplay=1

don't use the ;ModEditPackages=MyMod line as it's not needed

if you have this done and are still having problems, then can you post a screenshot of your folder setup

sabot00
04-02-2010, 07:16 PM
That's what I have, by that line not being needed do you mean I should delete ;ModEditPackages=MyMod

Exetus
04-02-2010, 09:31 PM
Doesn't matter as it is commented out and holds no bearing with the ;

geodav
04-03-2010, 01:38 PM
ok if you still haven't sorted it the put your code+content in to a rar file and upload it somewhere and PM me the link so that i can check it out

sabot00
04-03-2010, 02:35 PM
Since I can't get 7-zip to make a .rar I'll make a .zip with LZMA compression.
http://www.mediafire.com/?gz42wwnmj2z

geodav
04-03-2010, 03:16 PM
ok after a quick compile i found various typo's ref package name
WP_Custom_Gun
then once i corrected then i noticed the line
AttachmentClass=class'UTGameContent.UTAttachment_C ustomGun'
which should read
AttachmentClass=class'CustomGun.UTAttachment_Custo mGun'

then i got errors ref
AnimSets(0)=AnimSet'WP_Custom_Gun.Anims.WP_Custom_ Gun_1P_Anim' which is not in the content package

sabot00
04-03-2010, 07:24 PM
I don't understand where I should have "WP_Custom_Gun" and where I should have "WP_CustomGun".
For the errors ref what do you mean? Did I make a typo in the classes .uc or is the AnimSet missing in the .upk?

To edit the files I'm using ConTEXT with the UnrealScript highlighter, is there any format things to check like ANSII or Unicode?

DJMidknight
04-03-2010, 08:52 PM
Ok a good way to deal with the

AnimSets(0)=AnimSet'WP_Custom_Gun.Anims.WP_Custom_ Gun_1P_Anim'
or anytime you want to avoid typos is to have the *.UC file open that is going to reference the object (mesh, texture, sound or decal) anytime you are dealing with a custom asset.

Here's the steps I take after I have put in the code is if it compiles fine and gives back reference or object not found errors is goto the line of code and then open up my UDK Editor.

Now import the object or if you have already imported it is locate the object , right click on it and choose the copy full file name ( I think thats what it says I am not in front of my workstation so I am doing this from memory).
then paste that into the code location that is referencing that object that way I know the complete path is correct.

if this does not make sense please let me know Ill try to make another post with screenies to be more visual.

geodav
04-04-2010, 01:23 PM
@sabot00, i placed your code into my F:\UDK\UDK-2010-03\Development\Src\CustomGun\Classes folder, yes i created a folder called CustomGun.

you had typos in both the UTAttachment_CustomGun.uc & UTWeap_CustomGun.uc files ref-ing the wrong package.

and yes there is no Animset in the content package

you need to correct these problems before your weapon will work, while the compiler only shows warnings it can still cause the game to crash

DJMidknight
04-04-2010, 08:55 PM
yea those typos were fun to deal with. hope you had as much fun as I did Geo.............grrrr

sabot00
04-05-2010, 09:03 PM
I know I have the animset, as I can see it, so the .upk was probably an older version.

I'm just going to redo the entire process, as I know more about it now.