Unlockable weapons in mods

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

    #1

    Unlockable weapons in mods

    Has anyone figured out how to have multiple kits per class?
    I'm trying to figure out how to bypass the whole rank system and give everyone unlocks for a mod I am working on.

    Thanks
  • imported_shadow2k1
    Member
    • Jun 2005
    • 192

    #2
    i read somewhere (dont remember where) that you cant have multiple kits
    you can only have 2 kits per class. in leimans terms, the regular weapon and the unlock weapon.

    and so far thru trial and error ive come to realize you can only have X amount of items in the kit, for instance you cant have spec ops class have C4, claymores, AT mines, grenades and rockets.

    I have also been trying to find a solution or a workaround to this issue
    if you happen to find a way i would appreciate it if you could fill me in, and ill do the same.

    Comment

    • Super Six Three
      Member
      • Oct 2006
      • 1093

      #3
      i know how to give sniper class a m82

      Comment

      • 22CW Cainius

        #4
        yeah the unlock deal is a good idea. just alternate set ups for folks... like for the anti-armor you could have a guy with a few stingers and a different hand weapon instead...

        Comment

        • imported_dadofsam

          #5
          the wepaons cant be "simply" added to other kits, as they all have index number which dictates where the weapons allowed to go, you can edit the index numbersas to make them all fit into 1 kit,
          there are most probably easy ways to create a random kit spawn, eg. if set criteria is met, eg. if 5 AT kits then spawn as AA etc.
          selecting the whole unlock kit, hmm probably doable, but dont quote me on that

          Comment

          • GlobalFear

            #6
            I am pretty sure it is doable.

            My issue is that I know no python what so ever.
            If I could somehow trick the game itself into thinking that I had all the unlocks for the mod...........

            dadofsam,
            How would I go about doing something like you mentioned?

            Comment

            • The Vincester

              #7
              You can make anyone have anything you want... with a few exceptions. No player can carry more than 9 items (8 unless you want things to be a real pain).

              For example my Spec Ops that I use for COOP by modifying the US_Specops.con:

              Code:
              ObjectTemplate.create Kit US_Specops
              ObjectTemplate.saveInSeparateFile 1
              ObjectTemplate.kitType Specops
              ObjectTemplate.aiTemplate Specops
              ObjectTemplate.geometry US_Kits
              ObjectTemplate.geometry.kit 0
              ObjectTemplate.geometry.dropGeom 10
              ObjectTemplate.networkableInfo KitInfo
              ObjectTemplate.setHasCollisionPhysics 1
              ObjectTemplate.unlockIndex 4
              ObjectTemplate.cullRadiusScale 2.5
              rem -------------------------------------
              ObjectTemplate.addTemplate USPIS_92FS_silencer
              rem ObjectTemplate.addTemplate SIMRAD
              ObjectTemplate.addTemplate USHGR_M67
              ObjectTemplate.addTemplate c4_explosives
              ObjectTemplate.addTemplate kni_knife
              ObjectTemplate.addTemplate UnlockUSSpecops
              ObjectTemplate.addTemplate USRIF_M4
              ObjectTemplate.addTemplate ussni_m95_barret
              ObjectTemplate.addTemplate ammokit
              ObjectTemplate.addTemplate usatp_predator
              ObjectTemplate.addTemplate ParachuteLauncher
              rem -------------------------------------
              
              ObjectTemplate.createComponent AbilityHud
              ObjectTemplate.abilityHud.ammoSound S_Resupply
              ObjectTemplate.abilityHud.healingSound S_Heal
              ObjectTemplate.abilityHud.repairingSound S_Repair
              
              ObjectTemplate.createComponent VehicleHud
              ObjectTemplate.vehicleHud.hudName 		"HUD_TEXT_MENU_SPAWN_KIT_SPECIALFORCES"
              ObjectTemplate.vehicleHud.miniMapIcon		"Ingame\Kits\Icons\kit_Specops_outline.tga"
              ObjectTemplate.vehicleHud.vehicleIcon		"Ingame\Kits\Icons\kit_Specops.tga"
              ObjectTemplate.vehicleHud.spottedIcon 		"Ingame\Player\Icons\Minimap\mini_Soldier.dds"
              ObjectTemplate.vehicleHud.pantingSound		S_SprintBreath
              ObjectTemplate.vehicleHud.injurySound		S_Injury
              ObjectTemplate.sprintStaminaDissipationFactor 0.2
              
              rem ---BeginComp:Radio ---
              ObjectTemplate.createComponent Radio
              ObjectTemplate.Radio.spottedMessage	"infantry_spotted"
              rem ---EndComp ---
              
              ObjectTemplate.create ItemContainer UnlockUSSpecops
              ObjectTemplate.addTemplate usrif_g36c
              ObjectTemplate.unlockLevel 1
              As you can see he has the M95 and ammokit and the predator... I'm a killing machine.

              Now, you have to be careful because you have to change the default "slot" that certain items are in... like the M95 being slot "3", I had to change to slot "6" like so in the ussni_m95_barret.tweak file:

              Code:
              ObjectTemplate.itemIndex 6
              All of these files are in your Objects_server.zip file. If you plan on doing a lot of changing to these files, move a copy from your mod/bf2 folder into your mod/***your mod name*** folder, then change your ServerArchives.con file (in your mods root folder) to read:

              Code:
              fileManager.mountArchive Objects_server.zip Objects
              That will force your mod to use YOUR files.

              Basically play around with things... I've made quite a fun Single Player game for myself (I'm sick of Smacktards) and having fun "tweaking" things. Just be sure to change a little at a time and keep a LOG of what you change. In fact keep the ORIGINAL code right there, but add a "rem" line with a comment on what you did in the file, it will ignore it as code.

              You'll know if you have something wrong, because as soon as you do, you'll have a CTD during the map loading.

              HAVE FUN!

              p.s. Remember these files are "read only" by default... don't forget to change that or you won't be able to save.

              Comment

              • GlobalFear

                #8
                I'm aware of all of that. I said in the original post that this was for my own mod.
                Might help someone else out though.
                (Unless of course the .tweak files are python then I stand corrected)

                I need to figure out how to make use of the unlocks feature to add multiple kits per class.


                Changing this:
                Code:
                ObjectTemplate.create ItemContainer UnlockUSSpecops
                ObjectTemplate.addTemplate usrif_g36c
                ObjectTemplate.unlockLevel 1
                to this:
                Code:
                ObjectTemplate.create ItemContainer UnlockUSSpecops
                ObjectTemplate.addTemplate usrif_g36c
                ObjectTemplate.unlockLevel 0
                Didn't work. It displays the default weapon it the selection screen but spawns with the unlockable one. No choice.

                If anyone has any ideas I am open to hear them. :)

                Comment

                • Raslin

                  #9
                  do it like they did with the demo. Go into the python files, forget which ones, and set rank levels to 0.

                  Comment

                  • ={SOC}= Sniper

                    #10
                    How u add the 50 cal that was cut out?

                    Comment

                    • GlobalFear

                      #11
                      Raslin, that hasn't worked since the patch???

                      Comment

                      • Super Six Three
                        Member
                        • Oct 2006
                        • 1093

                        #12
                        Originally posted by sniper
                        How u add the 50 cal that was cut out?
                        go to Objects_server.zip,open kits,US,US_Sniper. Then in the \mods\bf2\ go to Objects,weapons,handheld,and find USSNI_M82A1, in US_Sniper,type this:
                        Code:
                        ObjectTemplate.addTemplate USSNI_M82A1
                        and put the rem in front of this:
                        Code:
                        rem ObjectTemplate.addTemplate USRIF_M24
                        now u have a M82.

                        Comment

                        • imported_shadow2k1
                          Member
                          • Jun 2005
                          • 192

                          #13
                          Originally posted by The Vincester
                          Now, you have to be careful because you have to change the default "slot" that certain items are in... like the M95 being slot "3", I had to change to slot "6" like so in the ussni_m95_barret.tweak file:

                          Code:
                          ObjectTemplate.itemIndex 6
                          .
                          how do ya know what slot to set this to? does this have to be changed for all the weapons?

                          Comment

                          • The Vincester

                            #14
                            Originally posted by shadow2k1
                            how do ya know what slot to set this to? does this have to be changed for all the weapons?
                            Well, it's all according to what you want to put where... the # is determined by an "open slot" in a kit.

                            For example, the normal spec op kit has as it's slot:

                            1. Knife
                            2. Pistol
                            3. M4
                            4. C-4
                            9. Is the Parachute for all classes.

                            That means slots 5, 6, 7, and 8 are open... you have to go to the weap on change the "default" slot. So say I want an AT rocket, and it's default is slot 4, it needs to be changed, because that would be a conflict with the C-4, so it needs to be changed, or you will crash on loading a map.

                            Now, keep in mind, if you change the weapon, it's changed for the "normal" AT, so they'll have to select the new slot to select the weapon.

                            Hopefully that makes sense.

                            Comment

                            • imported_shadow2k1
                              Member
                              • Jun 2005
                              • 192

                              #15
                              ok so if spec ops is
                              1. Knife
                              2. Pistol
                              3. M4
                              4. C-4
                              9. Is the Parachute for all classes.

                              and the AT class is
                              1. Knife
                              2. Pistol
                              3. M4
                              4. AT rocket
                              9. Is the Parachute for all classes.

                              and i change the index number of the rocket to 5
                              what happens to the AT class slot 4? does that slot open up?

                              i guess what im trying to get at is how does changing that index number effect the other classes

                              if C4 is slot 4 and i want to use it on 2 other classes do all the files have to have the same slot number?

                              Comment

                              Working...