Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

Anyway to give sound/collision to new zolika1351 trainer addon weapons on GTA IV? +weapon addon guide


sirebire999
 Share

Recommended Posts

sirebire999

Zolika1351's trainer allows for spawning "addonweapons" in GTA IV which is a nifty feature I've been poking at for some time. It took awhile for me to figure out how it worked though.

If you do it correctly, you can spawn new separate guns but they wont have sound (except for reloading & impact sound interestingly) or physics when you throw the gun away (it just floats mid air).

I have no clue if its because my trainer is out of date (not sure how to update it) or if some other complicated mod would be needed to give the guns full in game sound and collision.

I've looked through a much older guide explaining how a different trainer could allow giving the weapons sound from in game assets, but it was only from that specific trainer.

 

Building on top of my last post going into this topic, I can share a better updated example of how to get this feature on the Zmenu working properly.

If you have the Actual Complete Edition mod, there's already a few full functioning addon guns you can actually play with. Here's how :)

 

Remember to backup your files...

 

First go in to your GTA IV directory through OpenIV and edit the ZolikaPatch.ini (in config text section).

I scroll through seeing options inside the file that can be enabled/disabled with corresponding values 1 and 0.

I see two options:

 

"IncreaseWeaponLimit=0 ; increase weaponinfo.xml to 256 weapons (after ANYWEAPON, the weapon names are ADDONWEAPON_(number)) (patch 5 and up only) "

and

"IncreaseWTDLimit=0; increase the amount of WTDs that can be in the game files"

 

I enable both with value 1.

 

After toying around with different ways I prefer this method because I don't like to clutter my Weaponinfo.xml, default.ide, and weapon.img files too much.

For this more organized method we will create separate "new" copies of those files. First go into in common/data and edit (with note pad) the files:

 

gta.dat

add "IDE common:/data/newdef.ide" to the very end of it like this:

(scrollscrollscroll)

 

#
#  Lod Cullers
#
IPL platform:/DATA/MAPS/GENERIC/lodcull_j.IPL
IPL platform:/DATA/MAPS/GENERIC/lodcull_m.IPL
IPL platform:/DATA/MAPS/GENERIC/lodcull_e.IPL
IDE common:/data/newdef.ide           <--

 

default.dat

Add "WEAPONINFO common:/data/newweaponinfo.xml" close to the end just before the "HTML http:" like this:

 

(scrollscrollscroll)

LBICONSFILE independent:/textures/Leaderboards.itd
WEAPONINFO common:/data/newweaponinfo.xml                 <--

 

HTML http:

 

and then images.txt

Add "platformimg:/models/cdimages/newwep     1" towards the end as so:

 

(scrollscrollscroll)

(scrollscrollscroll)

platformimg:/data/maps/east/bronx_e2    0
platformimg:/data/maps/east/bronx_w    0
platformimg:/data/maps/east/bronx_w2    0
platformimg:/models/cdimages/newwep     1         <--

 

#map xref

 

#map instance

 

(that part is done)

Now we create the: NewWeaponsInfo.xml

(example to add say a Spas-12)

<weaponinfo version="1">

 

    <!-- SPAS12 PUMP -->
    <weapon type="ADDONWEAPON_3">
        <data slot="SHOTGUN" firetype="INSTANT_HIT" damagetype="BULLET" group="SHOTGUN" targetrange="35.0" weaponrange="60.0" clipsize="8" ammomax="96" timebetweenshots="433">
            <damage base="27" networkplayermod="5.0" networkpedmod="1.0"/>
            <physics force="21.0"/>
            <reload time="2933" fasttime="2933" crouchtime="2933"/>

 

            <aiming accuracy="0.05">
                <offset         x="0.15" y="1.0" z="0.55"/>
                <crouchedoffset x="0.15" y="1.0" z="0.05"/>
                <reticule standing="1.0" ducked="1.0" scale="0.0"/>
            </aiming>

 

            <pickup regentime="480000" ammoonstreet="15"/>

 

            <controller>
        <rumble duration="200" intensity="1.0"/>
      </controller>

 

            <flags>
                <flag>GUN</flag>
                <flag>CAN_AIM</flag>
                <flag>CAN_FREE_AIM</flag>
                <flag>ANIM_RELOAD</flag>
                <flag>ANIM_CROUCH_FIRE</flag>
                <flag>2HANDED</flag>
                <flag>HIGHER_BREAK_FORCE</flag>
            </flags>


        </data>

 

        <assets model="w_spas12">
            <anim group="[email protected]"/>

 

            <effects>
                <muzzle fx="muz_shotgun"/>
                <shell fx="weap_ejected_shotgun"/>
            </effects>
        </assets>
    </weapon>

</weaponinfo>

 

Now we create Newdef.ide which should look like:

###############################################################################
weap
###############################################################################

 

# handguns
w_silenced,         w_silenced,         [email protected],        1,    30,    0                             (<--note: I made this use the "unused0" weapon type slot)
w_e2_eagle,        w_e2_eagle,        [email protected],        1,    30,    0                       (<--note: The A.C.E mod allows
w_revolver,          w_revolver,          [email protected],           1,    30,    0                        <--these all to be usable)

 

# shotguns
w_spas12,        w_spas12,        [email protected],        1,    50,    0                                 <--    

 

end

 

###############################################################################
amat
###############################################################################
w_e2_eagle,CM_WEAPONS_PISTOL
w_revolver,0,CM_WEAPONS_PISTOL
w_silenced,0,CM_WEAPONS_PISTOL
w_spas12,0,CM_WEAPONS_SHOTGUN
            
end

 

Now put your NewWeaponInfo and Newdef.ide in common/data which should have your Spas-12 (and other beta/dlc guns) fully functional(sound and collision)!

Then go into pc/models/cdimages and create a copy of the weapons.img and rename it "newwep.img"

Delete everything inside except the wbd, wdr and wdt's for the weapons. Now you can replace textures and (a must) rename any the files to whatever you want.

If they're the same name as those in the "weapons.img" there'll be a conflict with the files and you'll experience possible save corruptions/crashes.

Just also make sure you reference the textures and animations in your addonweapons to utilize in the "newdef.ide" "newweaponinfo.xml" files

Addonweapons weapon type will be classified as the ZolikaPatch.ini states:

"IncreaseWeaponLimit=1 ; increase weaponinfo.xml to 256 weapons (after ANYWEAPON, the weapon names are ADDONWEAPON_(number)) (patch 5 and up only) "

 example in newweaponinfo:

<weapon type="ADDONWEAPON_3"> and whatever number you wish

 

One interesting note is if you write up a new weapon as an in game copy you can modify/tweak attributes in the newweaponinfo like firerate or damage and more.

Key Examples:

    <!-- "HALLOWPOINT MP5" -->

<weapon type="ADDONWEAPON_(number)">
<damage base="49"

weaponrange="80.0"

        <assets model="w_mp5">

<rates firerate="1.3" blindfirerate="2.2"/>

The weapon will have sound, but its just a cloned weapon using separate specs.

Once the texture is renamed it wont have sound or collsion. If the you're sourcing from two separate textures

of the same name from both weapon.img and newwep.img gun will either not spawn or will only spawn one of either of the texture for both.

And where you may experience corruptions or crashes. One note i want to make is I actually did experience a glitch or something where I was able to spawn a separate gun to use sound.

I haven't been able recreate what I did unfortunately thus far. All I remember was replacing the AA12 texture to the saiga and renaming a copy of the

default aa12 textures as w_aa12(1) and making that an addonweapon instead. And the addon AA12 actually fired with sound, but the firerate was vanilla slow ass fire rate.

I noticed now it was a typo in the weaponinfo stats. I don't remember how exactly I got this to work tho, I was rushing through my experiments to fast. Maybe it was just a one time bug I could exploit.

Might try exploring that again at some point.

 

some extra stuff

 

You can also make an assault rifle an smg which allows for driveby capability (derped in a car lol):

  Classify your addon weapon's "data slot" section like <data slot="SMG" but keep "group="RIFLE_ASSAULT" " just as.

 

Driveby works for shotguns too but only functional for semi auto shotguns on motorcycle. Put this in the "flags" section:

            </flags>

                <flag>CAN_BE_USED_AS_DRIVEBY</flag>  <--
            </flags>

 

I wish the pump shotgun would work for it but it looks nice for posing at least.

 

And remember any new separate weapons that aren't using/replacing beta/dlc assets wont have firing sound or collision physics when you throw the gun away.

That is problem that is yet to be solved if even possible.

 

Enjoy and Cheers

 

 

Edited by sirebire999
:P
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.