View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

User avatar   Trained Modder Trained ModderMember since: 03.04.2012, 14:33Posts: 211 Likes: 0
 

 Post Topic: [Help] Weapon Attachments!!! {Resolved}
PostPosted 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.....


Game Designer


Last edited by Gaming Arts on 26.08.2012, 10:51, edited 1 time in total.

User avatar   Hardcore Modder Hardcore ModderMember since: 11.11.2011, 07:36Posts: 837Location: Asia Likes: 2
 

 Post Topic: Re: [Help] Weapon Attachments!!!
PostPosted 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   Trainee TraineeMember since: 06.09.2011, 10:18Posts: 177Location: Ilmenau, Germany Likes: 0
 

 Post Topic: Re: [Help] Weapon Attachments!!!
PostPosted 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


Team: ThunfischGames
Project in development: Meteor


Last edited by ThunfischArnold on 22.08.2012, 15:49, edited 1 time in total.
User avatar   Hardcore Modder Hardcore ModderMember since: 11.11.2011, 07:36Posts: 837Location: Asia Likes: 2
 

 Post Topic: Re: [Help] Weapon Attachments!!!
PostPosted 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   Trainee TraineeMember since: 06.09.2011, 10:18Posts: 177Location: Ilmenau, Germany Likes: 0
 

 Post Topic: Re: [Help] Weapon Attachments!!!
PostPosted 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   Hardcore Modder Hardcore ModderMember since: 11.11.2011, 07:36Posts: 837Location: Asia Likes: 2
 

 Post Topic: Re: [Help] Weapon Attachments!!!
PostPosted 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   Uber Modder Uber ModderMember since: 21.10.2011, 23:50Posts: 1731 Likes: 7
 

 Post Topic: Re: [Help] Weapon Attachments!!!
PostPosted 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.
  Experienced Modder Experienced ModderMember since: 30.10.2011, 20:24Posts: 573 Likes: 18
 

 Post Topic: Re: [Help] Weapon Attachments!!!
PostPosted 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   Experienced Modder Experienced ModderMember since: 17.04.2012, 18:19Posts: 424Location: Strathmore, Alberta, Canada Likes: 0
 

 Post Topic: Re: [Help] Weapon Attachments!!!
PostPosted 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
  Experienced Modder Experienced ModderMember since: 30.10.2011, 20:24Posts: 573 Likes: 18
 

 Post Topic: Re: [Help] Weapon Attachments!!!
PostPosted 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   Experienced Modder Experienced ModderMember since: 17.04.2012, 18:19Posts: 424Location: Strathmore, Alberta, Canada Likes: 0
 

 Post Topic: Re: [Help] Weapon Attachments!!!
PostPosted 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   Trained Modder Trained ModderMember since: 03.04.2012, 14:33Posts: 211 Likes: 0
 

 Post Topic: Re: [Help] Weapon Attachments!!!
PostPosted 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   Experienced Modder Experienced ModderMember since: 17.04.2012, 18:19Posts: 424Location: Strathmore, Alberta, Canada Likes: 0
 

 Post Topic: Re: [Help] Weapon Attachments!!!
PostPosted 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   Hardcore Modder Hardcore ModderMember since: 11.11.2011, 07:36Posts: 837Location: Asia Likes: 2
 

 Post Topic: Re: [Help] Weapon Attachments!!!
PostPosted 23.08.2012, 06:41 
Quote by Gaming Arts:
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   Trainee TraineeMember since: 06.09.2011, 10:18Posts: 177Location: Ilmenau, Germany Likes: 0
 

 Post Topic: Re: [Help] Weapon Attachments!!!
PostPosted 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