Jump to content
Sign in to follow this  
khorosho

Rechambering an existing gun

Recommended Posts

Hi, I'm looking to find a tutorial or example on how to modify a gun that's already in-game to use a different caliber bullet and magazine. Specifically, I'm trying to make the SDAR fire the 7.62 NATO as the RFB does in real life. It seems like it would be a simple enough task for someone who knows what they're doing but I literally have no idea where to start. Thanks.

Share this post


Link to post
Share on other sites

http://forums.bistudio.com/showthread.php?130062-The-Configs-amp-Scripting-Info-Thread-%28WIP%29

That thread may have some helpful links.

What you want to do find the class name, then create a new config for it, and change the ammunition. For that you will also need the magazine classname. You would possibly also want to change the recoil and some other things. You will not be able to alter the appearance of the magazine, unfortunately.

Share this post


Link to post
Share on other sites

Please ignore that last post. I've finally returned to this with the help of Myke's five-year-old advice and actually gotten something into the game. But right before my soldier spawns with the weapon I get "Error: creating weapon RFB_base with scope=private." I couldn't find anything about this on the webs besides some DayZ troubleshooting stuff.

The soldier acts like he's holding an invisible rifle, and it recoils like a 7.62 but doesn't fire anything. and when I shot at it (the invisible model) with another guy, the game crashed. The display name in the upper right is $STR_DN_RIFLE.

Here's my config.cpp: http://pastebin.com/XkAtKav4

Share this post


Link to post
Share on other sites

Hi,

First I am on tablet so is diffucult to see pastebin scroll

Scope refers to the define of Scope =

0 = protected (private)

1 = not visable in editor but can be spawned via script or added to unit in config

2 = public means can be seen in editor

I think your config has changed a base class and not a weapon

You need

Base class scope 0 here in this config

Baseclass : weapon scope 1 or 2 here in this config

If you added baseclass to unit with scope 0 , you get this error , game can think it has weapon but soon as interacted with game crash

Share this post


Link to post
Share on other sites

Thanks for the reply. I'll edit the scope and whatnot and see how it goes from there.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×