Gaming Underground Network

Come for the mods, stay for the community
 
HomePortalLatest imagesInterviewsRegisterLog in
Search
 
 

Display results as :
 

 


Rechercher Advanced Search
Info Panel
______________
MOD MASTER THREADS:
FALLOUT
THE ELDER SCROLLS

______________


______________


GUNinsider
Fallout Miami: Mika999
Stay Connected

GUNetwork
Keywords
space machine hunk vault commonwealth Ryse Call daryl wolfenstein body NPCs money Superpele marvel Reforged ghoul Gear boom Mask upgrades mandalorian khan boomers FCOM dead riot
Latest topics
» Your favorite mods for F:NV
Changing Clip Size Code Emptyby ZedraxStereo Today at 9:44 am

» Whats the Number 1 mod you really want? (NV)
Changing Clip Size Code Emptyby john96 Yesterday at 12:53 pm

» Unpopular Opinion: Too many mods ruin the game
Changing Clip Size Code Emptyby Lupinboi Yesterday at 7:43 am

» Who Would Win: Ulysses or Joshua Graham?
Changing Clip Size Code Emptyby Lupinboi Yesterday at 7:26 am

» Guns you want in Fallout
Changing Clip Size Code Emptyby Lupinboi Yesterday at 7:21 am

» black doors in sierra madre bug
Changing Clip Size Code Emptyby Wɪmzɪkl Wed Mar 20, 2024 8:27 pm

» Any Titanfall mods out their that have the female sniper armor?
Changing Clip Size Code Emptyby john96 Wed Mar 20, 2024 3:14 pm

» Modder looking for gun mods
Changing Clip Size Code Emptyby Bset Sun Mar 17, 2024 6:33 pm

» schorched enclave officer
Changing Clip Size Code Emptyby Smash96 Sun Mar 17, 2024 5:13 pm

» Sup everyone (link funny shorts here)
Changing Clip Size Code Emptyby DHB00P Thu Mar 14, 2024 2:29 pm

» Late Introduction
Changing Clip Size Code Emptyby Battleclad Sun Mar 03, 2024 4:29 am

» Greetings!
Changing Clip Size Code Emptyby Primus_Daibhidh Thu Feb 29, 2024 9:01 pm

» Fallout New Vegas Stuttering And LOD Problems
Changing Clip Size Code Emptyby gamerdude7892 Thu Feb 29, 2024 7:48 am

» hello, here for porting tips and tricks to fnv
Changing Clip Size Code Emptyby uxof Mon Feb 26, 2024 4:50 pm

» (Fo4) fo76 Steel Dawn Weapons and Armor ports
Changing Clip Size Code Emptyby DireTheRed Fri Feb 23, 2024 5:52 pm

» So I tried my hand at modding...
Changing Clip Size Code Emptyby Bset Fri Feb 23, 2024 4:01 am

» hi i'm new person
Changing Clip Size Code Emptyby Jackfishproductions Mon Feb 19, 2024 9:00 am

» What Fallout 4 Armor Mod is This?
Changing Clip Size Code Emptyby Skroge Sun Feb 18, 2024 11:15 pm

» [FNV] Weird facial problem when using Dragbody overhaul
Changing Clip Size Code Emptyby CommunistDragon Sun Feb 18, 2024 10:18 pm

» [FNV] Some help with placing npcs in wasteland pls
Changing Clip Size Code Emptyby TimvorixosGR Sun Feb 18, 2024 5:37 am

March 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031
CalendarCalendar
_
March 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031
CalendarCalendar

Share
 

 Changing Clip Size Code

View previous topic View next topic Go down 
AuthorMessage
Gray Wolf

Gray Wolf

Posts : 23
Join date : 2015-01-16
Location : USA

Changing Clip Size Code Empty
PostSubject: Changing Clip Size Code   Changing Clip Size Code EmptySun Jul 05, 2015 5:24 am

I've looked but can't find anything anywhere, and from the research I've done, I don't know how to implement the code I do know. I want to make a custom ammolist (easy), where if one type of ammo is chosen, there will be a clip size of ten, whereas if another type is chosen, the projectile, damage, sound, and clip size is changed. Anyone have any ideas on this? Thanks.
Back to top Go down
Guest
Guest
avatar


Changing Clip Size Code Empty
PostSubject: Re: Changing Clip Size Code   Changing Clip Size Code EmptySun Jul 05, 2015 6:47 am

Assuming you mean multiple variations of the same weapon (your post is somewhat vague in that regard) that each fire different kinds of projectiles, its fairly easy to do.

Using a 10mm pistol as an example, you would need to create:

10mm Pistol 'Master' weapon (this is the item you'd loot and select in your inventory)
10mmPistolSA (standard ammo)
10mmPistolIA (incendiary ammo)
10mmPistolEA (explosive ammo)

You would script the Master weapon so that selecting/equipping it brings up a list, allowing you to choose which version of the 10mm Pistol you want to use. Choosing one of the ammo types adds that weapon to your inventory with the player.additem command.

And because each 'ammo type' is actually a standalone weapon in the GECK/plugin, you could make those weapons as distinct as you want.  Model/texture, projectile type, ammo capacity, etc.
Back to top Go down
Gray Wolf

Gray Wolf

Posts : 23
Join date : 2015-01-16
Location : USA

Changing Clip Size Code Empty
PostSubject: Re: Changing Clip Size Code   Changing Clip Size Code EmptyMon Jul 06, 2015 4:08 am

Hey Tes. Nice avatar too! Ha ha!

Thanks for the response. Sorry for the lack of detail at the time. It was really late and I was about to pass out. What I am working on is a pistol with an underbarrel shotgun. By pressing UP on the D-Pad (or 2 if using a keyboard), one can switch the type of ammo they are using for a gun. I have that part figured out, so that the ammo available is either 10mm or 12ga.

Now, using the script functions "GetWeaponAmmo", "GetWeaponAmmoUse", "GetWeaponClipRounds", and/or "SetWeaponClipRounds", I'd like to make it so that when using the 10mm ammo, the clip size is 15, but when using the 12ga shells, it's only 1. I've never used those functions before, and haven't been able to find an example of how they are used. Hope that helps.


EDIT:

Ok, so I figured it out finally in order to be more productive. However, I'm still having trouble with the code (see below). When on the default ammo (9mm), I start with 10 rounds in a ten round magazine. I'll fire three shots, leaving me with 7 rounds left in the magazine. I switch to the shotgun ammo and the magazine capacity changes to 1. I fire one shot and then reload. Then I'll switch back to the 9mm ammo, and the magazine capacity changes back to 10. So far so good.

Now, when I switch back to the 9mm ammo, there is only one round in the magazine from when it was using the shotgun ammo. I have to reload like normal in order to refill the magazine. What is supposed to happen is that after the magazine capacity changes back to 10, the magazine should be reloaded back to the 7 rounds that were left over from before switching to the shotgun shells. This is the last part of this stage in the mod before I move on to changing other values (damage done, projectile used, firing sound, etc.) the same way.

Code:

scn GunScript

ref Gun
ref GunAmmoType

int CurrentAmmoLevel
int NewAmmoLevel

Begin GameMode

let Gun := Player.GetEquippedObject 5
let GunAmmoType := GetPlayerCurrentAmmo

set NewAmmoLevel to 1

if Gun == DoublePistol
   
   if GunAmmoType == Ammo9mm
      SetWeaponClipRounds 10 DoublePistol      ;Set Magazine Capacity to 10.
      
      if NewAmmoLevel == 0
         SetPlayerCurrentAmmoRounds CurrentAmmoLevel   ;Set Ammo Level to CurrentAmmoLevel.
         set NewAmmoLevel to 1
      EndIf

      set CurrentAmmoLevel to GetPlayerCurrentAmmoRounds   ;Set CurrentAmmoLevel to current ammo level.
   
   else
      SetWeaponClipRounds 1 DoublePistol      ;Set Magazine Capacity to 1.
      set NewAmmoLevel to 0
   EndIf

EndIf
   


END
Back to top Go down
Sponsored content




Changing Clip Size Code Empty
PostSubject: Re: Changing Clip Size Code   Changing Clip Size Code Empty

Back to top Go down
 

Changing Clip Size Code

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» [FO4] Wrist size being enlarged
» FO4 Changing a weapon into a Flamethrower
» Changing the load order.
» What do you use to reduce load order size?
» Changing the race of a companion

Permissions in this forum:You cannot reply to topics in this forum
Gaming Underground Network :: Fallout :: Troubleshooting-