View unanswered posts | View active topics It is currently Mon Dec 30, 2024 9:15 pm



Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
 Offsets for Dummies 
Author Message
User avatar

Joined: Wed Feb 14, 2007 5:37 am
Posts: 350
Reply with quote
Post Offsets for Dummies
Due to large amounts of requestsone, I am going to make a guide about how to use offsets correctly and not just guess and hope to get lucky. I'm not the best at explaining things, so bear with me. If you don't know the basics of modding or even what offsets are, get out. Seriously.

OFFSETS

Image
What you see here is the X and Y axis for Cortex Command

-X = Right
+X = Left

-Y = Down
+Y = Up


The first thing you'll probably notice is that the X axis is switched. Rather than -X meaning left like in
the conventional grid, the kind you'll see in Algebra and the sorts, -X mean right and vice versa.

The most time you're probably going to need this is when you're changing offsets for that new gun you've just sprited. Most people try not to sprite actors larger or smaller than usual.

Image

Imagine that this is your new weapon you've just sprited. You want it so that your clone will hold it properly. Meaning you'll need to fill out these key chucks of code. (the meanings will be in parenthesis)

Code:
   SpriteOffset = Vector (This sets the origin of the sprite, should be in the very middle of your sprite)
      X = ?
      Y = ?


Code:
   JointOffset = Vector (The placement of the main hand)
      X = ?
      Y = ?


Code:
   StanceOffset = Vector (The placement of the shoulder when carrying the gun)
      X = ?
      Y = ?
   SharpStanceOffset = Vector (The above but when aiming down sights)
      X = ?
      Y = ?
   SupportOffset = Vector (Placement of secondary hand)
      X = ?
      Y = ?

Code:
   Magazine = Magazine
      CopyOf = Magazine SMG
      ParentOffset = Vector (Where the magazine goes)
         X = ?
         Y = ?


Code:
   MuzzleOffset = Vector (Where the bullets fire from)
      X = ?
      Y = ?
   EjectionOffset = Vector (Where the shells, if any, eject)
      X = ?
      Y = ?


So, how are we going to find the correct coordinates?

Easily.


First of all, we'll need to set the Sprite offset.
Our sprite here is 18 by 10 pixels.

Therefore...
Code:
   SpriteOffset = Vector
      X = -9
      Y = -5

Just take half of your sprites dimensions, negate it, and plug it in. That's all you need to know for Sprite Offsets. Simple, right? This bit of code will help you a lot later on.
Note: If your sprite Offset has a decimal, just round up. There's no such thing as half a pixel.


Now, lets move onto the Joint offset.

This will be where the main hand goes. Setting this one up is a bit more trickier.
First, make a mark off where you're Sprite offset is, which should be in the middle
Image


This is where we will start counting. Start marking how far you want your hand to the left or right.
Image

I counted 4.

Code:
   JointOffset = Vector
      X = 4
      Y = ?

Remember, +X means left and -X means right.

Now count how much you want to go up or down.
Image

I counted 3.

Code:
   JointOffset = Vector
      X = 4
      Y = -3


And for whatever reason, JointOffsets and Parent Offsets (Which is what we are currently working on) need to be the opposite of what you want. Why, I do not know.

So:
Code:
   JointOffset = Vector
      X = -4
      Y = 3


There, you're done. That's all you have to do to set an Offset.

Things you might have missed:
  • After setting the Coordinates for JointOffsets and Parent Offsets, negate them. (Negatives turn to positives, and vice versa)
  • The -X mean right and +X means left
  • If you've followed this tutorial and the Offset still doesn't match up, negate for good measure.

If you're still confused reread it.
If you've just reread it and are still confused, then post what you're confused about.

~No_0ne


Last edited by No_0ne on Tue Nov 27, 2007 3:07 am, edited 3 times in total.



Mon Nov 26, 2007 11:00 pm
Profile WWW
User avatar

Joined: Fri Dec 29, 2006 7:42 pm
Posts: 1871
Location: UK
Reply with quote
Post Re: Offsets for Dummies
Instead of counting, use the offset editor program.


Mon Nov 26, 2007 11:08 pm
Profile
User avatar

Joined: Thu Aug 09, 2007 6:37 pm
Posts: 889
Location: Not Jewtown.
Reply with quote
Post Re: Offsets for Dummies
TrouserDemon wrote:
Instead of counting, Take the easy way out.

Counting = exact measurements. A program can easily ♥♥♥♥ it up if a single number is off.


Mon Nov 26, 2007 11:09 pm
Profile WWW
User avatar

Joined: Sat May 05, 2007 6:04 pm
Posts: 2901
Reply with quote
Post Re: Offsets for Dummies
Add this to ultimate modding thing please, it's good.


Mon Nov 26, 2007 11:11 pm
Profile
User avatar

Joined: Fri Dec 29, 2006 7:42 pm
Posts: 1871
Location: UK
Reply with quote
Post Re: Offsets for Dummies
Not this offset editor, it was made specifically for CC.


Mon Nov 26, 2007 11:15 pm
Profile
User avatar

Joined: Wed Feb 14, 2007 5:37 am
Posts: 350
Reply with quote
Post Re: Offsets for Dummies
TrouserDemon wrote:
Not this offset editor, it was made specifically for CC.


And where might this mystical program be?


Mon Nov 26, 2007 11:19 pm
Profile WWW
User avatar

Joined: Fri Dec 29, 2006 7:42 pm
Posts: 1871
Location: UK
Reply with quote
Post Re: Offsets for Dummies
I'd post it, but I wouldn't know who to credit, ask iwcy.


Mon Nov 26, 2007 11:20 pm
Profile

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post Re: Offsets for Dummies
I MEANT ACTOR OFFSETS!

Oh whatever, this guide will sure help the other who are lost in the gun offsets.
Great work! : )


Mon Nov 26, 2007 11:38 pm
Profile
User avatar

Joined: Tue Dec 12, 2006 1:09 am
Posts: 698
Location: Plymouth, NC
Reply with quote
Post Re: Offsets for Dummies
The guy who made the offset editor is long gone. I believe his name was ScottC, but I'm not completely sure.

Here it be.


Attachments:
OffsetEditor.rar [2.41 MiB]
Downloaded 319 times
Mon Nov 26, 2007 11:40 pm
Profile
User avatar

Joined: Wed Dec 27, 2006 9:52 pm
Posts: 688
Location: California
Reply with quote
Post Re: Offsets for Dummies
The offset editor is unreliable and never worked once for me. I don't recommend it being used. Just follow these oh so helpful guidelines.


Mon Nov 26, 2007 11:45 pm
Profile
User avatar

Joined: Tue Dec 12, 2006 1:09 am
Posts: 698
Location: Plymouth, NC
Reply with quote
Post Re: Offsets for Dummies
It's completely reliable when you learn how to use it.


Mon Nov 26, 2007 11:53 pm
Profile
User avatar

Joined: Wed Feb 14, 2007 5:37 am
Posts: 350
Reply with quote
Post Re: Offsets for Dummies
numgun wrote:
I MEANT ACTOR OFFSETS!

Oh whatever, this guide will sure help the other who are lost in the gun offsets.
Great work! : )


The offsets still apply to actors.

The only difference is that Joint Offsets define at what point the sprite rotates on.


Last edited by No_0ne on Tue Nov 27, 2007 3:09 am, edited 1 time in total.



Tue Nov 27, 2007 12:08 am
Profile WWW
User avatar

Joined: Sat Jan 27, 2007 4:47 am
Posts: 221
Location: In a box
Reply with quote
Post Re: Offsets for Dummies
Awesome tutorial! This should be stickied! Great Job.


Tue Nov 27, 2007 12:35 am
Profile
User avatar

Joined: Sat Dec 02, 2006 4:00 am
Posts: 343
Location: Devil's Advocate
Reply with quote
Post Re: Offsets for Dummies
No_0ne wrote:
First of all, we'll need to set the Sprite offset.
Our sprite here is 18 by 10 pixels.

Therefore...
Code:
   SpriteOffset = Vector
      X = -9
      Y = -4

Just take half of your sprites dimensions, negate it, and plug it in. That's all you need to know for Sprite Offsets. Simple, right? This bit of code will help you a lot later on.
Note: If your sprite Offset has a decimal, just round up. There's no such thing as half a pixel.[/size]


10 / -2 = -4?


Tue Nov 27, 2007 2:22 am
Profile WWW
User avatar

Joined: Wed Feb 14, 2007 5:37 am
Posts: 350
Reply with quote
Post Re: Offsets for Dummies
purple wrote:
10 / -2 = -4?


Whoops, typo.


Tue Nov 27, 2007 3:02 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 24 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users


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.047s | 14 Queries | GZIP : Off ]