Create-a-Weapon System Help
by Byron Johnson · in Technical Issues · 12/29/2007 (7:14 pm) · 10 replies
So I've been rolling around the idea of making a system for making custom weapons, that in practice works very much like the Gummi Ship construction process for Kingdom Hearts, being that you take parts, and arrange them in a way that works, with different parts having different statistical or ability modifiers, and then that set-up is used in-game with all the parts mounted together.
That's the simple end of it.
The problem is I'm having trouble with the programming part of it. once I actually have more of an idea what I should do, I'll take off like a rocket, but right now, the way I'm seeing it is that each part has one or more mount points in the model, and they are connected like a skeleton. Then, an ingame editor allows the player to piece them together, and a table is saved with a Item ID and the Locations and Rotation data of each part, and then at run-time they are used and there you have it, the Custom weapon is complete.
another obstacle is, I'm a programming newb, and still have trouble translating Ideas into actual code. So I am extending a plea for some help with this. I will say this will almost certainly be submitted as a resource, even though it seems highly specified, I could see this being adapted to work just like the Gummi Ships, or even farther.
That's the simple end of it.
The problem is I'm having trouble with the programming part of it. once I actually have more of an idea what I should do, I'll take off like a rocket, but right now, the way I'm seeing it is that each part has one or more mount points in the model, and they are connected like a skeleton. Then, an ingame editor allows the player to piece them together, and a table is saved with a Item ID and the Locations and Rotation data of each part, and then at run-time they are used and there you have it, the Custom weapon is complete.
another obstacle is, I'm a programming newb, and still have trouble translating Ideas into actual code. So I am extending a plea for some help with this. I will say this will almost certainly be submitted as a resource, even though it seems highly specified, I could see this being adapted to work just like the Gummi Ships, or even farther.
About the author
#2
One way to do the 3D object is to build a base object with mount points where you intend to mount all the objects. Then create blend animations that only effect the bone/mountpoint to be rotated. Then use manual setting of the threads to control rotations. The last one may require some C++ to do. Another option is rotating the objects relative to the mount point. That may be able to be done in script. I know if I mess up the vehicle mount scripts the player will re-collide with the object and get mounted at a slightly different angle. It is a strange thing, but it made me think there might be a way to do this on purpose. Actually, I remember using an AIplayer object and mounted a player to that object as a quick and dirty turret. I could rotate the AIplayer object relative to the DTS shape it was mounted to.
12/29/2007 (10:22 pm)
Are you trying to do a KOTOR type editor? It is just a GUI that allows you to add pieces to an item.One way to do the 3D object is to build a base object with mount points where you intend to mount all the objects. Then create blend animations that only effect the bone/mountpoint to be rotated. Then use manual setting of the threads to control rotations. The last one may require some C++ to do. Another option is rotating the objects relative to the mount point. That may be able to be done in script. I know if I mess up the vehicle mount scripts the player will re-collide with the object and get mounted at a slightly different angle. It is a strange thing, but it made me think there might be a way to do this on purpose. Actually, I remember using an AIplayer object and mounted a player to that object as a quick and dirty turret. I could rotate the AIplayer object relative to the DTS shape it was mounted to.
#3
12/29/2007 (11:51 pm)
Yes Frank's method of attaching pieces to a weapon 'base' would work well, not quite as customizable as the gummi ship option of course, but easier. You may wish to opt in that direction.
#4
I would gladly accept your help with the editor! I appreciate it!
Would you like me to whip up some test parts in Blender over the next few days to mess around with?
12/30/2007 (12:23 pm)
I am thinking the base object with mount points and rotating them relative to the mount point would be just as good a way to go.I would gladly accept your help with the editor! I appreciate it!
Would you like me to whip up some test parts in Blender over the next few days to mess around with?
#5
12/30/2007 (2:11 pm)
Yeah that would be good, I'm not very good at modeling. I'll take a look at the source code to see if you can mount things to weapons, if not I'm sure I can work it out.
#6
12/30/2007 (3:12 pm)
Well as expected, you can't, in fact they are an entirely different system altogether. I think I have a handle on how to do it, but you're going to have to give me a bit of time. The weapon or base object should have mount points named mount0, mount1 , etc just like the player.
#7
12/30/2007 (4:41 pm)
Alright, Take your time.
#8
so things aren't too painful what I'm now thinking of doing is placing all the objects relative to the player. So they wouldn't be mounted onto the object, but I would be writing a way to essentially make mount points on the fly so you could make one at any offset to the player you wanted.
I think this will probably get the best results we'll see how it turns out!
01/10/2008 (6:03 pm)
Man I think I might have gotten in over my head here. I'm making progress, but with winter quarter starting up its going to be slow. Torque doesn't have any system for doing this so it's from the ground up for the most part.so things aren't too painful what I'm now thinking of doing is placing all the objects relative to the player. So they wouldn't be mounted onto the object, but I would be writing a way to essentially make mount points on the fly so you could make one at any offset to the player you wanted.
I think this will probably get the best results we'll see how it turns out!
#9
I've already worked on those parts, and can have them to you whenever you are ready.
03/01/2008 (8:46 pm)
Ah, I see! Like I said, no rush.I've already worked on those parts, and can have them to you whenever you are ready.
#10
I've already worked on those parts, and can have them to you whenever you are ready.
03/02/2008 (12:42 am)
Ah, I see! Like I said, no rush.I've already worked on those parts, and can have them to you whenever you are ready.
Torque Owner Dracola
If you are still up to it I can help you with the editor, I have a fair amount of experience with those.
If you are unsure I could perhaps elaborate on why putting this contraption into the game would be so difficult. I was a bit brief in my initial description, and if you don't mind having the gun not be rotated than this would be very doable, though I expect that would be a killer.