Jump to content
s13n1

How are scopes attached to weapons?

Recommended Posts

Hello everyone, hopefully the collective modding brain here will have the answers I need as I’ve hit a wall and can’t continue.

I started modding DayZ at the start of this week and have made some okay progress so far. I’m not a programmer at all, but after studying the code I’ve managed to make sense of how some things work and I’ve been changing the size of items in the inventory and setting the inventory slot for items so they can be attached to belts and bags etc. I’ve also been trying to attach a scope to the cz61 Scorpion, and have managed to get the scope slot to appear and the scope attaches, but you can’t see the scope on the gun and when ADSing the camera points down and back towards the player.

Now I’ve looked absolutely everywhere and can’t find any script or config file that defines the positioning of scopes on guns, so I’m assuming it’s defined by a parent bone on the gun model itself, probably labelled scope or something, and the scope attaches to the bone and your ADS view is then aligned to the scope?
 

Also, how are attachment points defined? For example, the two points on backpacks labelled “chemlight” and “walkietalkie”, are their positioning  defined by bones on the backpack model? How is the scale and orientation of the items attached to those slots defined? I made it so a compass could be attached to the walkietalkie slot, but it’s scale and rotation is a bit off, and I’d like to fine tune it. Also I want to start adding additional attachment slots to backpacks, but I’m assuming it’s possibly like gun scopes and is defined by bones?

If this is the case, how am I able to open the models and edit them? They’re are binary files and the editor won’t open them.

Any help would be very much appreciated!

Thank you!

Share this post


Link to post
Share on other sites

It's like you assumed. You create proxies for the attachments. In Object Builder/Oxygen "Create > Proxy". It will appear as a triangle, which you can link to the model to be attached. Then adjust.

https://community.bistudio.com/wiki/Oxygen_2_-_Manual#Proxy_objects

You are not allowed to edit their binarised models.

Share this post


Link to post
Share on other sites

Oh nice, thanks for the super quick reply!

I don’t want to ask too many more questions before having a go myself, but is it possible to create a scope proxy that I can attach to the scorpion?
 

So for creating new attachment slots for a backpack, I’ll make the proxies and position them, but is there any further definition required? Or do you simply name the proxies and then add the “inventorySlot=proxyname”?

Thanks again!

 

Share this post


Link to post
Share on other sites
28 minutes ago, s13n1 said:

Oh nice, thanks for the super quick reply!

I don’t want to ask too many more questions before having a go myself, but is it possible to create a scope proxy that I can attach to the scorpion?

You need to edit the model so no.
 

30 minutes ago, s13n1 said:

So for creating new attachment slots for a backpack, I’ll make the proxies and position them, but is there any further definition required? Or do you simply name the proxies and then add the “inventorySlot=proxyname”?

Thanks again!

I haven't looked at the backpacks but you need to have the appropriate configs. Which you can observe from the game ones.

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

×