View unanswered posts | View active topics It is currently Mon May 21, 2018 6:30 am



Reply to topic  [ 10 posts ] 
 Leg dismemberment only when facing Left??... 
Author Message
User avatar

Joined: Fri Sep 13, 2013 1:39 am
Posts: 155
Location: ᴱᵛᵉʳʸʷʰᵉʳᵉ
Reply with quote
Post Leg dismemberment only when facing Left??...
Been working on offsets for a while on this character. Everything is perfect, until you turn left and flying... When facing the right direction everything is working as i want it to do... I've been messing around with the whole code just to fix this damn problem, but everything in vain. Would truly appreciate any solvers.
Image


Fri Jan 09, 2015 4:58 pm
Profile
User avatar

Joined: Fri Sep 13, 2013 1:39 am
Posts: 155
Location: ᴱᵛᵉʳʸʷʰᵉʳᵉ
Reply with quote
Post Re: Leg dismemberment only when facing Left??...
Bump. Can't improve my CC mod-making skills if I don't know the problem. :???: :-(


Sat Jan 17, 2015 11:46 pm
Profile
User avatar

Joined: Wed Nov 22, 2006 3:19 pm
Posts: 2045
Reply with quote
Post Re: Leg dismemberment only when facing Left??...
Well, you kind of need to upload the mod so people who are willing to help can take a look and try to fix the problem.
Problems like these aren't really solvable through pictures.


Sat Jan 17, 2015 11:58 pm
Profile
User avatar

Joined: Fri Sep 13, 2013 1:39 am
Posts: 155
Location: ᴱᵛᵉʳʸʷʰᵉʳᵉ
Reply with quote
Post Re: Leg dismemberment only when facing Left??...
Oh.. Ah yes sorry, i should have figured that out... :roll:

Anyways here the .rte


Attachments:
Adjoint Mage.zip [483.38 KiB]
Downloaded 69 times
Tue Jan 20, 2015 2:54 pm
Profile

Joined: Fri Nov 23, 2012 5:42 am
Posts: 142
Reply with quote
Post Re: Leg dismemberment only when facing Left??...
Arms don't work quite right either, depending on the weapon being held, all though this may be less of a problem depending on what exactly you're planning:



The problem you have is basically that you tried to do things differently than the norm, your arm and legs sprites are done completely different than the way they are normally done in the base factions (and most mods). It is possible to do things differently, but it is a lot more complicated and better modders than you or I have failed at this kind of stuff before (see this thread for an example).

To fix this I recommend altering your arm and leg sprites to follow the basic format that the base factions (and, again, most mods) use, i.e. make your sprites look like this:



usually 4 or 5 frames, with the first one being fully contracted (folded together) and the last one fully extended.

Oh, and 2 other possible small issues:

-You're still using a sound from your scrap mod as the painsound, you'll want to change that at some point.
-The actor is very tall, too tall in fact to fit inside a standard size bunker module.


Tue Jan 20, 2015 5:41 pm
Profile
User avatar

Joined: Fri Sep 13, 2013 1:39 am
Posts: 155
Location: ᴱᵛᵉʳʸʷʰᵉʳᵉ
Reply with quote
Post Re: Leg dismemberment only when facing Left??...
clunatic wrote:
Arms don't work quite right either, depending on the weapon being held, all though this may be less of a problem depending on what exactly you're planning:


The character arent supposed to hold weapons. Its a mage it has it spells for that, Arms are put exactly to seem like spell position(Or like it.(In my opinion)). But i understand the confusion.

clunatic wrote:
The problem you have is basically that you tried to do things differently than the norm, your arm and legs sprites are done completely different than the way they are normally done in the base factions (and most mods). It is possible to do things differently, but it is a lot more complicated and better modders than you or I have failed at this kind of stuff before (see this thread for an example).


That doesn't explain the fact it works on the right side, considering ive done minor mods with only one frame and it worked perfectly :-(

Looking into the matter even more i found the problem...(I've been busy doing the spells for the mage so i havent looked before.)
One of the leg's sprite were too long in comparison to the other, and now its working

Illustration:
Image
Image

clunatic wrote:
-You're still using a sound from your scrap mod as the painsound, you'll want to change that at some point.
-The actor is very tall, too tall in fact to fit inside a standard size bunker module.


And yes i have things coming from the SCRAP mod too, Haven't changed it. Thinking about using the SCRAP's painsound or just make a new sound for that(After all it's an Adjoint SCRAP unit).

Tall? Yep.
I have made a custom Bunker module for that purpose ;P. My idea is that their not supposed to use normal bunkers.



I thank you for your helping effort. As always i highly appreciate this, cause i rather not disturb others with these kind of lame problems :roll:.


Tue Jan 20, 2015 8:27 pm
Profile

Joined: Fri Nov 23, 2012 5:42 am
Posts: 142
Reply with quote
Post Re: Leg dismemberment only when facing Left??...
RandomCoderZ wrote:
That doesn't explain the fact it works on the right side, considering ive done minor mods with only one frame and it worked perfectly :-(

Looking into the matter even more i found the problem...(I've been busy doing the spells for the mage so i havent looked before.)
One of the leg's sprite were too long in comparison to the other, and now its working

Illustration:
Image
Image


Heh, I did see that, I just didn't think that would be the problem, since I've used frames with different sizes before without problems. And it still doesn't explain why it only worked when facing right :???:

RandomCoderZ wrote:
I thank you for your helping effort. As always i highly appreciate this, cause i rather not disturb others with these kind of lame problems :roll:.


No problem, especially since nothing I said actually helped you solve the problem ;)


Tue Jan 20, 2015 10:53 pm
Profile
User avatar

Joined: Wed Nov 22, 2006 3:19 pm
Posts: 2045
Reply with quote
Post Re: Leg dismemberment only when facing Left??...
Well, I haven't done this in quite a while.

Anyway,
First thing I see is sprite size inconsistency.

If you have an animated sprite (000,001, etc.) then it is highly recommended to have consistent size, say, a 10x10px sprite on all frames.

This is a must because there is a variable called 'SpriteOffset' that is used to determine the 'center of gravity' of the sprite, thus, if you will set it right for the first frame (SpriteOffset is X/2 Y/2 of the sprite size (Except some special occasions), so for the 10x10px example, the SpriteOffset will be 5x5), on the second frame the 'center of gravity' and the actual position of the sprite may shift due to the size of the sprite being different.
For example, if your 000 sprite is 10x10px (5x5 SpriteOffset), and the 001 sprite is 12x10px, when animated you will see a shift of 2px on the X axis due to the fact that 5x5 is not the center for the 001 sprite.

So once you get the sprite sizes corrected, you will need to set the correct SpriteOffsets (Remember, X/2 Y/2).
You might see some factions with offset variables like X=1.5 Y=1.5, and although these will not crash your game, they will actually contribute to nothing at all because there really isn't a thing such as 'half a pixel'... It's like 'half an atom' and that doesn't really work (Well, technically it does... But not in this scenario), so try keeping the variables as wholes (for example: If you have a 13x13px sprite, just set it to 6x6 or 7x7).

The second problem I see is JointOffsets.

Joint offsets are used to determine the point on the sprite which will be the fixed rotation point.
To set correct jointOffsets, you must first set correct SpriteOffsets.
When setting JointOffsets, be aware the the SpriteOffset you set will be the X=0/Y=0 values of the JointOffset.
For example, on a 10x10px sprite the SpriteOffset will be X=5/Y=5, a JointOffset with X=0/Y=0 values will set the rotation point to the center of the sprite.

And finally the ParentOffsets on the attachables.

ParentOffsets determine the position of the object on the parent (i.e. The position of the head/leg/arm on the body).

Another thing to be aware of the X/Y axis in Cortex Command are reversed.
That means that on the X axis, anything LEFT of the center will be a positive value and anything RIGHT of the center will be negative.
Same goes for the Y axis, anything UP is negative, anything DOWN is positive.
Although there are some variables (Like X axis on some ParentOffsets) where that doesn't apply and the values behave like they should.

By the way your actor is quite larger than standard actor size so that does make it a little bit more difficult to get all the offsets correct.
Also the fact that it is larger and the arms are longer, the position of the hand is incorrect and I couldn't really recall what needs to be done to shift it's position.
But since you don't need the hand it doesn't matter.

Attachment:
Adjoint Mage.rte.rar


Please look through the sprite files and the 3 offset variables and try to understand exactly what I did there.
The body shape is quite weird so I might have set the leg offsets quite as you intended them.
You can edit the ParentOffset values on the body for better results.
Also, you should add at least one more frame to the leg sprite animation for walking to look a little bit more natural.

I hope this is understandable enough and helps you with future mod making.


Wed Jan 21, 2015 1:06 am
Profile
Forum Moderator
User avatar

Joined: Fri Feb 02, 2007 3:53 pm
Posts: 1896
Location: in my little gay bunker
Reply with quote
Post Re: Leg dismemberment only when facing Left??...
If I recall correctly, half pixel values affect some of the physics calculations, while you might not SEE a difference in sprite position, it could have a minute impact on rotation.


Wed Jan 21, 2015 1:38 am
Profile
User avatar

Joined: Fri Sep 13, 2013 1:39 am
Posts: 155
Location: ᴱᵛᵉʳʸʷʰᵉʳᵉ
Reply with quote
Post Re: Leg dismemberment only when facing Left??...
I'm always amused about how detailed and long your replies are. You all really put much work in helping others and that is very cool, I have always liked this game because it's pretty easy to mod and its such a powerful engine. (Love that you can destroy everything)

Anyway, Thanks everyone for their replies and help! As you know i always appreciate every reply! :)


Sat Jan 24, 2015 1:18 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: Bing [Bot]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.023s | 15 Queries | GZIP : Off ]