Announcement

Collapse
No announcement yet.

Getting a weapon into the game...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Getting a weapon into the game...

    While most of you are fightin the engine to get your characters on the game,
    im trying to put a weapon inside it.

    At the moment, i have imported succesfully the model, the texture and 2 animations into the editor.

    Now it comes the part i tell the engine this is a weapon.

    Usually you did this by togglin on actorx the "save script file", wich makes actorx made a file of unrealscript that contains instructions about executing the mesh as a weapon.


    If i try to compile that script file, ucc make says
    "error, unrecognized directive exec" which is strage, because i have not touched the .uc, it was fully written by actorx.

    Im just followin the unreal weapon making videos from 3dbuzz, but this videotrainings, are for ut99...

    It seems the new engine nows doesnt recognize that code, or something.
    Anyone has achieved to get a weapon?
    Any tip? I know im near the end, all the animations are displayed on unreal editor.

    #2
    Hm, I see what you're trying to do... I don't have a computer at my disposal to test it for you, but you might be able to do the same by extending the UTWeapon, and extending off that new class another Content class, or just copy over an existing weapon script file and edit it to your desire (it's easy to change the mesh and animations of the weapon, for example see UTWeap_Redeemer_Content.us).

    That means, if you want a weapon that's similar to the BioRifle but with other animations, meshes and projectiles and such, copy over all of the Biorifle unrealscript files (UTWeap_BioRifle_Content.us, UTWeap_BioRifle.us and the UTProj classes associated with it) and simply change all of the references to the BioRifle to your own weapon.

    Comment


      #3
      Originally posted by Stefander View Post
      Hm, I see what you're trying to do... I don't have a computer at my disposal to test it for you, but you might be able to do the same by extending the UTWeapon, and extending off that new class another Content class, or just copy over an existing weapon script file and edit it to your desire (it's easy to change the mesh and animations of the weapon, for example see UTWeap_Redeemer_Content.us).

      That means, if you want a weapon that's similar to the BioRifle but with other animations, meshes and projectiles and such, copy over all of the Biorifle unrealscript files (UTWeap_BioRifle_Content.us, UTWeap_BioRifle.us and the UTProj classes associated with it) and simply change all of the references to the BioRifle to your own weapon.
      yes, but which functions are the ones who tell the engine to use one mesh instead other?
      I am a script noob.

      Currently, i have a enforcerer_extended class, with some defaultproperties edited working properly, but now it is the time to make the class to load my very own pistol animated model, instead the normal enforcer one.

      What are the functions that make the engine load the enforcer with one model instead of other?
      Following the video tutorials, they say actor x makes the work, because can generates an .uc file with the needed code:
      "#exec MESH MODELIMPORT MESH=somepistolMesh MODELFILE=models\somepistol.PSK LODSTYLE=10"
      and so on

      this function should make the weapon code to load my model and animations,

      , but now this script doesnt compile on ucc make, and im not sure if this vtm is ok, because the vtm is from ut99!

      I will be rewatching all the vtms on code editing again this afternoon, but i think that the unrealscript functions are others now.


      ***A tutorial with instructons to make the enforcerer use the mesh of the... say rocket launcher for example, would be helpful, because it would help me understand wich functions make certain weapon load certain other model/mesh***

      And thanks in advance.

      Comment


        #4
        Just here to say that i have found the function that makes the game load a mesh as a weapon.

        It is a default propertie that is set on the .uc file:

        skeletalmesh=skeletalmesh'WP_RocketLauncher.Mesh.S K_WP_RocketLauncher_1P'

        I have achived to make the enforecer have the mesh of the rocket launcher.
        If everithing goes well, i will be able to use my very own pistol mesh instead the normal enforcer or the rocket launcher ones.

        And that means... custom weapons for everyone!


        (you should see how cool the rocket launcher is with the enforcer skin, by teh way...)

        Comment


          #5
          i've posted a tutorial at my mod site which might help you http://www.ut40k.planetunreal.gamespy.com/

          Comment


            #6
            i have been checkin your site until today, you finished the weapon tut? nice!

            , im following your discussion on characters making on the other user maps and mods thread,
            thanks geodav!

            Comment


              #7
              Geodav thanks for the tutorial. I knew how to do everything except the coding (I have been trying to change the manta code with no success ) so that section would help me a lot.
              Thanks again. Your work for the community is very well appreciated.

              Comment


                #8
                Wait, sorry but I take that back . That much coding I already know :d.

                P.S. I still think your contribution to the community is awesome though . Thanks and keep up the good work.

                Comment


                  #9
                  hm,
                  the **** model doesnt want to show on the game.

                  I can make the enforcer to use the mesh of the rocket launcher, but i cannot make the enforcer use my mesh.

                  I think i have done everything right, and i have looked again and again the tutorial.

                  And to make it even easier, i didnt used the animations, nor the textures yet, just wanted to import the firstperson model, to see how looks.
                  When i specify on the skeletalmesh to be the skeletal mesh from my package, the compiler says "warning: unresolved reference".

                  I know its there, but it seems the game doesnt want to use it.
                  I have copied the entire package structure of the original enforcer, making my package to have the subfolder "mesh" and the name "sk_wp_myweapon_1p" names, although i think this has nothing to do with the name: as soon as you say to the engine where is the model and the package it should pick it.

                  Althoug i know that my package has been saved on the unpublished>cookedpc>customweapons> where its supposed the engine should find it flawlessly.

                  I am not posting here this to whine, just to give information that something could be bad.
                  Has anyone achieved to use a custom weapon yet?
                  If so, i will repeat the entire GEodavĀ“s tutorial from the beggining, but it makes no sense.... the model is there, on a psk file well done, then well compressed on a .upk file, and is loaded and recognised by the editor....

                  just the damned script doesnt assign it to the enforcer

                  Comment


                    #10
                    hmm. I haven't worked on a weapon yet but I did make a health powerup made of a smiley face so I know that the approach works. Try putting the .upk in a folder in your cookedPC folder located inside the game install folder, that's the only location that worked for me. It would also help if you posted the code .

                    Comment


                      #11
                      i have said i have used the unpublished>cookedpc>customweapons,
                      that folder should work IMO, on that folder i have the .ukx file
                      on src i have the uc code.

                      This is.

                      Code:
                      //============================================================
                      
                      class pistol1911b1 extends UTweap_enforcer;
                      
                      
                      defaultProperties
                      {
                      	fireInterval(0)=0.23 //tiempo entre disparos
                      	burstMax=1  //
                      	fireinterval(1)=0.23
                      	spread(1)=0.01
                      	
                      	instantHitDamage(0)=86
                      	instantHitDamage(1)=86
                      	
                      	maxAmmoCount=8
                      	ammoCount=7
                      	LockerAmmoCount=1
                      	
                      	// Weapon SkeletalMesh
                      	Begin Object Name=FirstPersonMesh
                      		SkeletalMesh=SkeletalMesh'wp_pistolbravo.Mesh.sk_wp_somepistol_1p'
                      		
                      		AnimSets(0)=AnimSet'WP_Enforcers.Anims.K_WP_Enforcers_1P_Base'
                      		Materials(0)=Material'WP_Enforcers.Materials.M_WP_Enforcers_01'
                      		Animations=MeshSequenceA
                      		//Scale=1.1
                      		FOV=55.0
                      		bForceUpdateAttachmentsInTick=true
                      	End Object
                      
                      	name="Default_pistol1911b1"
                      
                      }
                      as you might realized, i have ripped the busrt fire,
                      i have increased the damage,
                      reduced the dispersion of shots and have decreased the number of shots to seven,


                      all works, but doesnt want to pick the model (the model are 2 rectagles attached imported, just to know if this works)

                      the model is displayed on ued, is packaged is blah blah blah


                      if i load this file,
                      the pistol loads the code but there is no pistol on his hands

                      your powerup wioth the smiley has been exported with actor x or ws an .ase file?

                      Comment


                        #12
                        ok i did mention to compile the package needs to be in the unpublished folder tree, to use it in game it needs to be in the published folder tree, the reason i did it this way was that when i use the -useunpublished switch sometimes the mutators don't work.

                        edit:- check your bone/socket names of your pistol and make sure they match the enforcer

                        also i used the shockrifle as a testbase as it has the least anims/add-ons, i'm still not sure how the arms anims are linked to the weapons, that's for more advance stuff later

                        edit again:- when you have your weapon selected 'shot' this way you can see if the weapon is in game, you might have to play around with the playerviewoffset

                        Comment


                          #13
                          yes yes i also use the -useunpublished command on the shorcut,
                          i will try all this and a couple more things im checkng at the moment, and post results

                          Comment


                            #14
                            Try putting your package in the cookedPC folder located in the game install directory. For some reason it was the only directory that worked for me, all others failed.

                            Comment


                              #15
                              atm no luck, im always putting my pakage files inside that directory, on unpublished,

                              and all my .uc files on scr,

                              i think im missing something important, but i have tried everything,

                              i follow geodavĀ“s tut but doesnt work for me

                              i will wait for that 3dbuzz script book to come out or maybe for someone who makes a videotutorial, i cannot waste my entire life getting stuck in 1 aspect,

                              i have lots of thing to learn.

                              Comment

                              Working...
                              X