Player Mount Points Limit
by DavidRM · in Torque Game Engine · 05/22/2002 (4:39 pm) · 12 replies
How many mount points (mount0, mount1, ...) are suppored on the player model in Torque?
Looking at the source code, it looked like there were 32, but I've seen forum posts stating that the limit is 8. Just wanting to know the Final Word on this.
In a related topic, is it possible for an object to mount to multiple points on the player model? Specifically, and object that has multiple mount points (instead of mounting the same object to multiple points on the player). For instance, a rocket launcher could conceivably mount to both hands and the right shoulder. Is this possible?
Thanks!
-David
[http://www.samugames.com]Samu Games[/url]
Looking at the source code, it looked like there were 32, but I've seen forum posts stating that the limit is 8. Just wanting to know the Final Word on this.
In a related topic, is it possible for an object to mount to multiple points on the player model? Specifically, and object that has multiple mount points (instead of mounting the same object to multiple points on the player). For instance, a rocket launcher could conceivably mount to both hands and the right shoulder. Is this possible?
Thanks!
-David
[http://www.samugames.com]Samu Games[/url]
#2
When mounting an object on the player, for instance, it can go on any one of the 32 mount points. But there can be only 8 such objects mounted.
Is that the way it works?
-David
Samu Games
05/24/2002 (3:50 pm)
Thanks, Joel. I think I understand.When mounting an object on the player, for instance, it can go on any one of the 32 mount points. But there can be only 8 such objects mounted.
Is that the way it works?
-David
Samu Games
#3
For images, though, you can only have up to 8 images mounted simultaneously.
05/24/2002 (4:12 pm)
You can mount as many ShapeBase objects onto the player as you like.For images, though, you can only have up to 8 images mounted simultaneously.
#4
How does the player image differ from other object images?
-David
Samu Games
05/27/2002 (1:40 pm)
Now I'm a bit confused.How does the player image differ from other object images?
-David
Samu Games
#5
The Player object is a ShapeBase object. For the purposes of mounting stuff, it has capabilities that are just like any other ShapeBase object. Forget that it is a Player. That has no relevance.
A ShapeBase object can have two kinds of things mounted to it: ShapeBase objects (using mountObject), or ShapeBaseImage objects (using mountImage).
A ShapeBase object can have up to 32 mountpoints.
ShapeBase objects can be mounted to any mountpoint. You can mount as many of them as you like.
ShapeBaseImage objects can be mounted to any mountpoint. You can only mount up to 8 of these at a time, because each mounted ShapeBaseImage object must be associated with a unique "slot" number (indicating which thread resource will be used to drive its state machine), and there are only 8 slots.
05/27/2002 (2:49 pm)
I think something is getting lost in the translation here. :-)The Player object is a ShapeBase object. For the purposes of mounting stuff, it has capabilities that are just like any other ShapeBase object. Forget that it is a Player. That has no relevance.
A ShapeBase object can have two kinds of things mounted to it: ShapeBase objects (using mountObject), or ShapeBaseImage objects (using mountImage).
A ShapeBase object can have up to 32 mountpoints.
ShapeBase objects can be mounted to any mountpoint. You can mount as many of them as you like.
ShapeBaseImage objects can be mounted to any mountpoint. You can only mount up to 8 of these at a time, because each mounted ShapeBaseImage object must be associated with a unique "slot" number (indicating which thread resource will be used to drive its state machine), and there are only 8 slots.
#7
And, either way, how do I up it ?
I noticed in ShapeBase.h /.cc there is a constant called MaxMountedImages. Changing it changes something in the mask bits, but I couldnt really understand the code.
I tried changing it, which made the demo freeze up on load... I also tried hard coding a value wherever MaxMountedImages is used, but leaving it the same for the mask stuff, didnt seem to work...
I cant get anything to mount above 3... So I know it is limited to 4.
Am I missing something ? I need to mount about 16 images.
To change it, what do I need to alter ? What is the mask thing doing ?
06/05/2005 (11:09 am)
Has this been changed to 4 now ? And, either way, how do I up it ?
I noticed in ShapeBase.h /.cc there is a constant called MaxMountedImages. Changing it changes something in the mask bits, but I couldnt really understand the code.
I tried changing it, which made the demo freeze up on load... I also tried hard coding a value wherever MaxMountedImages is used, but leaving it the same for the mask stuff, didnt seem to work...
I cant get anything to mount above 3... So I know it is limited to 4.
Am I missing something ? I need to mount about 16 images.
To change it, what do I need to alter ? What is the mask thing doing ?
enum PublicConstants {
ThreadSequenceBits = 6,
MaxSequenceIndex = (1 << ThreadSequenceBits) - 1,
EnergyLevelBits = 5,
DamageLevelBits = 6,
DamageStateBits = 2,
// The thread and image limits should not be changed without
// also changing the f enum values declared
// further down.
MaxSoundThreads = 4, ///< Should be a power of 2
MaxScriptThreads = 4, ///< Should be a power of 2
[b] MaxMountedImages = 4, ///< Should be a power of 2[/b]
MaxImageEmitters = 3,
NumImageBits = 3,
ShieldNormalBits = 8,
CollisionTimeoutValue = 250 ///< Timeout in ms.
};enum ShapeBaseMasks {
NameMask = Parent::NextFreeMask,
DamageMask = Parent::NextFreeMask << 1,
NoWarpMask = Parent::NextFreeMask << 2,
MountedMask = Parent::NextFreeMask << 3,
CloakMask = Parent::NextFreeMask << 4,
ShieldMask = Parent::NextFreeMask << 5,
InvincibleMask = Parent::NextFreeMask << 6,
SkinMask = Parent::NextFreeMask << 7,
SoundMaskN = Parent::NextFreeMask << 8, ///< Extends + MaxSoundThreads bits
ThreadMaskN = SoundMaskN << MaxSoundThreads, ///< Extends + MaxScriptThreads bits
ImageMaskN = ThreadMaskN << MaxScriptThreads, ///< Extends + MaxMountedImage bits
[b]NextFreeMask = ImageMaskN << MaxMountedImages[/b]
};
#8
06/05/2005 (3:02 pm)
Err.... 19... So I will probably need a max of 32 mounts.
#9
Since I worked long and hard with the mount points I can clear up some confusion.
1. You can have an unlimited number of mount points in your character model.
2. You can only mount an object to points 0-7 (without chinging the engine).
3. You cannot mount to "any" mount point (see item 2).
The reason for the limitation is that mount points 0-7 are hardcoded into the ShapeBaseMask. To get more, you will need to remove them from there and create your own set.
Check out my resource, Mount More Weapons or How to Get More Mask Bits
to increase it over the first 8.
Thanks.
06/05/2005 (9:13 pm)
Greetings,Since I worked long and hard with the mount points I can clear up some confusion.
1. You can have an unlimited number of mount points in your character model.
2. You can only mount an object to points 0-7 (without chinging the engine).
3. You cannot mount to "any" mount point (see item 2).
The reason for the limitation is that mount points 0-7 are hardcoded into the ShapeBaseMask. To get more, you will need to remove them from there and create your own set.
Check out my resource, Mount More Weapons or How to Get More Mask Bits
to increase it over the first 8.
Thanks.
#10
And for the sake of completness. In TGE 1.3 the MaxMountedImages constant is set at 4.
06/06/2005 (3:55 am)
Thank you very much. Hopefully I can figure out what is going on with the code now...And for the sake of completness. In TGE 1.3 the MaxMountedImages constant is set at 4.
#11
Any help would be appreciated,
Thanks.
02/01/2008 (1:45 pm)
Hello chris. I was wondering if you had any success on getting more mountslots. All I really want is to get 8 mount slots.Any help would be appreciated,
Thanks.
#12
10/22/2008 (2:32 pm)
I'm having an issue along the lines of what Chris mentioned. I'm currently experiencing a limit of 4 slots... kinda. I've posted in other places about an issue I'm having where when I use mountImage, regardless of what mount# I use, they all end up at mount0. I've since switched to using mountObject instead and am now having success. However, I'm trying to get the transform of my slots by using the function getSlotTransform. The problem is, although I have several mount points on my object, I only ever get vectors back for the first 4. Anybody else experiencing a mount cap of 4?
Torque 3D Owner Joel Baxter
As for your other question, with the current codebase, no. A mounted shape or image attaches to only 1 mount point.