Forums Gallery Downloads LOGIN |REGISTER

[Help] Weapon Attachments!!! {Resolved}

Topics about 3DS Max, Maya, Photoshop, and various other software packages.


 

User avatar
Gaming Arts
Developer
Developer
 
Posts: 211
Member since: 03.04.2012, 14:33
Likes: 0

[Help] Weapon Attachments!!! {Resolved}

Postby Gaming Arts » 21.08.2012, 09:45

Hi guys i want to ask can someone please help me or tell me how i can create weapon attachments. I have already modelled the attachments and textured them (They are Acog Sights) and i wanted to know how to implement them into Cryengine 3 Free SDK on my custom M16.
Please Help me guys
Thanks In Advance.....
Last edited by Gaming Arts on 26.08.2012, 10:51, edited 1 time in total.
Game Designer
User avatar
ceylonfarmer
Senior Developer
Senior Developer
 
Posts: 844
Member since: 11.11.2011, 07:36
Location: Asia
Likes: 2

Re: [Help] Weapon Attachments!!!

Postby ceylonfarmer » 22.08.2012, 15:27

You need to learn c++,scaleform :)) and i think no one has ever done so far in crydev i think :P
Image
Role :Texture artist
My skills : Level Designer|Game Designer|Sound Designer|3D Artist|2D Artist|
User avatar
ThunfischArnold
Junior Dev
Junior Dev
 
Posts: 179
Member since: 06.09.2011, 10:18
Location: Ilmenau, Germany
Likes: 2

Re: [Help] Weapon Attachments!!!

Postby ThunfischArnold » 22.08.2012, 15:44

I dont think that you would have to learn scaleform and c++... I'm not sure but I think, its completely done with the weapon xml. pick the SCAR.xml as an example, there is a possibility included for adding a silencer. depending on the attachment, you should try to add a part very similar to that one which is intended to attach the silencer properly (you find that at the bottom of the xml). Of course you'll have to change it a bit for the acogs (i think you need things like "scope mode" , for more examples look in the rocketlauncher.xml and maybe some original crysis xmls but dont copy them ;) )to execute the attaching process during game, you should use a flowgraph, there are nodes provided for this. I already tried that whith the silencer, if you are interested, I can load up my fg.
of course you also need to setup an attachment xml, therefor, you can also take the silencer.xml as an example.
by the way...would you mind loading up some examples, if your custom attachments work?
like ceylonfarmer said, i do not think that things like that are here on the forums yet.... and the community would be very happy

greetings,
ThunfischArnold
Last edited by ThunfischArnold on 22.08.2012, 15:49, edited 1 time in total.
Team: ThunfischGames
Project in development: Meteor
User avatar
ceylonfarmer
Senior Developer
Senior Developer
 
Posts: 844
Member since: 11.11.2011, 07:36
Location: Asia
Likes: 2

Re: [Help] Weapon Attachments!!!

Postby ceylonfarmer » 22.08.2012, 15:47

You can't do it with a .xml file :/ you need to learn scaleform and c++(example for a weapon customization menu is crysis 1 weapon customization menu )
Image
Role :Texture artist
My skills : Level Designer|Game Designer|Sound Designer|3D Artist|2D Artist|
User avatar
ThunfischArnold
Junior Dev
Junior Dev
 
Posts: 179
Member since: 06.09.2011, 10:18
Location: Ilmenau, Germany
Likes: 2

Re: [Help] Weapon Attachments!!!

Postby ThunfischArnold » 22.08.2012, 15:52

I do not mean a menu. of course menus only work with scaleform. but attaching those things with flowgraph definetely works!
please explain, why you think that there is c++ necessary
Team: ThunfischGames
Project in development: Meteor
User avatar
ceylonfarmer
Senior Developer
Senior Developer
 
Posts: 844
Member since: 11.11.2011, 07:36
Location: Asia
Likes: 2

Re: [Help] Weapon Attachments!!!

Postby ceylonfarmer » 22.08.2012, 16:15

if you want scaleform menu to swap attachments and stuff you need c++ ;)
Image
Role :Texture artist
My skills : Level Designer|Game Designer|Sound Designer|3D Artist|2D Artist|
User avatar
NeoLegends
Producer
Producer
 
Posts: 1731
Member since: 21.10.2011, 23:50
Likes: 8

Re: [Help] Weapon Attachments!!!

Postby NeoLegends » 22.08.2012, 19:59

Why should you? Everything possible via FG, as said it's possible to attach attachments to weapons via FG, so swapping is supported as well.
Duo Oratar
Not my first Rodeo
Not my first Rodeo
 
Posts: 573
Member since: 30.10.2011, 20:24
Likes: 20

Re: [Help] Weapon Attachments!!!

Postby Duo Oratar » 22.08.2012, 23:26

No C++ or Scaleform is required and someone on Crydev has done it, because I have.

You need to use Flash to create an attachment customization menu if you need one.
The actual weapon attachments are defined inside the weapon.xml for the individual weapons. The SCAR.xml example in CryEngine3/Game/Scripts/Entities/Items/XML/Weapons/ should give you a pretty good idea of how to do it.
C++ might be necessary if you want an attachment that goes far outside the ranges of the norm, like the Heartbeat sensor from Modern Warfare 2 would probably require it. (Grenade Launchers may also need it, I'm not sure on that one). But ACOG sights are easy enough.
The functionality of your Attachment customization menu can be handled through XML and the FlowGraph system though be warned it does get a bit messy (the FlowGraph that is).

The rough steps are as follows:
1: Model your Attachment, export it and set it up with materials etc.
2: Model your weapon, do all the materials etc.
3: In your weapon XML the attachment needs to be registered like so:
<accessories>
<accessory name="ACOGSight">
<attach helper="attachment_top"/>
<detach/>
<params>
</params>
</accessory>
</accessories>

attachment_top is the name of the helper on your weapon to mark where the attachment aught to go. There should probably be some other values in there but I'll be honest I don't know much about them.

4: Add a zoommode for your ACOG sights in between the <zoommodes></zoommodes> tags in your weapon.XML file, you should be able to see roughly how to do this from the setup in SCAR.xml

5: Use the flowgraph to attach the attachment to your weapon, this will work for you to test it at least, though you'll need a menu for actual usage instead of testing.
User avatar
chughes27
Not my first Rodeo
Not my first Rodeo
 
Posts: 424
Member since: 17.04.2012, 18:19
Location: Strathmore, Alberta, Canada
Likes: 0

Re: [Help] Weapon Attachments!!!

Postby chughes27 » 23.08.2012, 01:40

So if the attachment is possible by adding an <accessory> tag in the .xml file, do you have to attach through Flowgraph? I was hoping to be able to drop the attachment into the scene as an entity and make it able to be picked up and attached.

Any ideas on how to do that?
My Rig

CPU: AMD FX 6100 @ 3.4GHz
MB: Asus M5A97 Rev 2
RAM: G.SKILL ARES 8GB DDR3 @ 1600MHz
GPU: 2x HIS AMD Radeon HD 7770 @ 1000MHz
PSU: Corsair CX600 600W
SSD: Crucial M4 128GB
Case: Zalman Z11 Plus HF1
Duo Oratar
Not my first Rodeo
Not my first Rodeo
 
Posts: 573
Member since: 30.10.2011, 20:24
Likes: 20

Re: [Help] Weapon Attachments!!!

Postby Duo Oratar » 23.08.2012, 03:16

Picking it up is done the same way as any other object of that type I think (Never actually done it) placing in out of the Entity>Item menu and then looking at it and pushing F ingame (you may have to set pickable=True in the entities properties). To attach it you need a menu built in Flash and the Flowgraph, which is really quite complicated to do (particularly seen as the Inventory>GetItem node doesn't seem to work for weapon attachments). The simplest possible attachment menu would be something along the lines of this:

1: Make a Flash UI element with a button linked to a function.
2: Define this function as a flowgraph element using the UIElements XML files.
3: Use the corresponding flownode to cause things to happen when the function is called by the button being pushed. In this case it would first check you have the attachment to attach and then use the Weapon>Accessory node to attach the accessory to the weapon.

Sorry if that description isn't detailed enough but the UI flash elements thing is a subject too large to cover in one post, I'd suggest looking at Richmar1's video tutorials for UI elements on Youtube, that's how I figured this stuff out.
User avatar
chughes27
Not my first Rodeo
Not my first Rodeo
 
Posts: 424
Member since: 17.04.2012, 18:19
Location: Strathmore, Alberta, Canada
Likes: 0

Re: [Help] Weapon Attachments!!!

Postby chughes27 » 23.08.2012, 04:22

So you seriously believe that the only way to attach it is to use a menu? That feels like some very poor functionality to me.

And if that functionality is not there, I suppose it would be safe to assume that it could be programmed.
My Rig

CPU: AMD FX 6100 @ 3.4GHz
MB: Asus M5A97 Rev 2
RAM: G.SKILL ARES 8GB DDR3 @ 1600MHz
GPU: 2x HIS AMD Radeon HD 7770 @ 1000MHz
PSU: Corsair CX600 600W
SSD: Crucial M4 128GB
Case: Zalman Z11 Plus HF1
User avatar
Gaming Arts
Developer
Developer
 
Posts: 211
Member since: 03.04.2012, 14:33
Likes: 0

Re: [Help] Weapon Attachments!!!

Postby Gaming Arts » 23.08.2012, 06:08

Look Can someone just explain the proper way of doing a wepoan attachment. Because all of these posts are confusing me so bad. PLease Guys....
Game Designer
User avatar
chughes27
Not my first Rodeo
Not my first Rodeo
 
Posts: 424
Member since: 17.04.2012, 18:19
Location: Strathmore, Alberta, Canada
Likes: 0

Re: [Help] Weapon Attachments!!!

Postby chughes27 » 23.08.2012, 06:15

Honestly, the amount of time you have spent since the first post you asked about making weapons could have been spent figuring it out yourself. You really REALLY need to just take some time and examine the details of CryENGINE's weapon system to figure it out. I understand the need to ask for help, but you need to also rely on yourself. I can definitely relate to your problem here, the whole concept of weapon attachments has also been a pain in my ass. But I also know that I need to try and figure things out myself.

Just give it a shot, you might surprise yourself :)
My Rig

CPU: AMD FX 6100 @ 3.4GHz
MB: Asus M5A97 Rev 2
RAM: G.SKILL ARES 8GB DDR3 @ 1600MHz
GPU: 2x HIS AMD Radeon HD 7770 @ 1000MHz
PSU: Corsair CX600 600W
SSD: Crucial M4 128GB
Case: Zalman Z11 Plus HF1
User avatar
ceylonfarmer
Senior Developer
Senior Developer
 
Posts: 844
Member since: 11.11.2011, 07:36
Location: Asia
Likes: 2

Re: [Help] Weapon Attachments!!!

Postby ceylonfarmer » 23.08.2012, 06:41

Gaming Arts wrote:Look Can someone just explain the proper way of doing a wepoan attachment. Because all of these posts are confusing me so bad. PLease Guys....

Just take a look at the scar weapon xml in ce3/Crysis 1 i am sure you will find something :))
Image
Role :Texture artist
My skills : Level Designer|Game Designer|Sound Designer|3D Artist|2D Artist|
User avatar
ThunfischArnold
Junior Dev
Junior Dev
 
Posts: 179
Member since: 06.09.2011, 10:18
Location: Ilmenau, Germany
Likes: 2

Re: [Help] Weapon Attachments!!!

Postby ThunfischArnold » 23.08.2012, 09:07

@ Duo Oratar: Thanks for sharing the information, what exactly is needed in your .xml
I'll give it a try and if It's successfull, I'll upload:
the .xml
the attachment model I used
and maybe a small menu
Team: ThunfischGames
Project in development: Meteor


 
Connect and collaborate with CRYENGINE developers in the official Forums.
Visit the Gallery to share what you have created and be inspired by what others are creating with CRYENGINE.
Community