Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Looking for a way to render MapleStory(GMS v83) Characters offline.

Newbie Spellweaver
Joined
Nov 19, 2018
Messages
24
Reaction score
0
There is Maplestory.io which looks seems good but their API can't be used offline.
Looking for a way to do like what Maplestory.io is doing but offline.
 
Newbie Spellweaver
Joined
Nov 19, 2018
Messages
24
Reaction score
0
Maybe I could use the X and Y coordinates (such as: origin, navel, neck, hand, ...) that are in the "Character.wz" file. But I have no idea how to use these values to make all the body parts on their right place.

I've seen two threads asking the same question I'm asking right now, but none of them provided an answer.

http://forum.ragezone.com/f701/help-character-coordinates-1070935/
So it could be nice to finally have an answer.

I've tried looking at NoLifeStory's "character.cpp" render code, but since I couldn't figure out how to compile the project I couldn't debug the code. Which made it very difficult understanding what's going on...
 
Last edited:
Upvote 0
Experienced Elementalist
Joined
Feb 15, 2010
Messages
201
Reaction score
296
http://forum.ragezone.com/f921/delphi-maplestory-gm-client-1159523/

Code:
 if HasEntry(Path + '/origin') then
    begin
      case MirrorX of
        True:
          begin
            Self.Flip := -1;
            if Owner.InLadder then
              AdjX := 3
            else
              AdjX := 0;
            Origin.X := EquipData[Path + '/origin'].Vector.X - Self.ImageWidth + AdjX;
          end;
        False:
          begin
            Self.Flip := 1;
            Origin.X := -EquipData[Path + '/origin'].Vector.X;
          end;
      end;
      Origin.Y := -EquipData[Path + '/origin'].Vector.Y;
    end;
    
    if HasEntry(Path + '/map/brow') then
    begin
      Brow.X := -EquipData[Path + '/map/brow'].Vector.X * Self.Flip;
      Brow.Y := -EquipData[Path + '/map/brow'].Vector.Y;
      if Image = 'head' then
        HeadBrow := Brow;

      Self.Offset.X := Origin.X + HeadNeck.X - BodyNeck.X - HeadBrow.X + Brow.X - TamingNavel.X;
      Self.Offset.Y := Origin.Y + HeadNeck.Y - BodyNeck.Y - HeadBrow.Y + Brow.Y - TamingNavel.Y;
    end;

    if HasEntry(Path + '/map/neck') then
    begin
      Neck.X := -EquipData[Path + '/map/neck'].Vector.X * Self.Flip;
      Neck.Y := -EquipData[Path + '/map/neck'].Vector.Y;
      if Image = 'body' then
        BodyNeck := Neck;
      if Image = 'head' then
        HeadNeck := Neck;
    end;

    if HasEntry(Path + '/map/hand') then
    begin
      Hand.X := -EquipData[Path + '/map/hand'].Vector.X * Self.Flip;
      Hand.Y := -EquipData[Path + '/map/hand'].Vector.Y;
      if Image = 'arm' then
        ArmHand := Hand;
      if Image = 'body' then
        BodyHand := Hand;
      Self.Offset.X := Origin.X + Hand.X + ArmNavel.X - ArmHand.X - BodyNavel.X;
      Self.Offset.Y := Origin.Y + Hand.Y + ArmNavel.Y - ArmHand.Y - BodyNavel.Y;
    end;

    if HasEntry(Path + '/map/handMove') then
    begin
      HandMove.X := -EquipData[Path + '/map/handMove'].Vector.X * Self.Flip;
      HandMove.Y := -EquipData[Path + '/map/handMove'].Vector.Y;
      if Image = 'lHand' then
        lHandMove := HandMove;

      Self.Offset.X := Origin.X + HandMove.X - lHandMove.X;
      Self.Offset.Y := Origin.Y + HandMove.Y - lHandMove.Y;
    end;

    if HasEntry(Path + '/map/navel') then
    begin
      Navel.X := -EquipData[Path + '/map/navel'].Vector.X * Self.Flip;
      Navel.Y := -EquipData[Path + '/map/navel'].Vector.Y;
      if Image = 'arm' then
        ArmNavel := Navel;
      if Image = 'body' then
        BodyNavel := Navel;

      Self.Offset.X := Origin.X + Navel.X - BodyNavel.X - TamingNavel.X;
      Self.Offset.Y := Origin.Y + Navel.Y - BodyNavel.Y - TamingNavel.Y;
    end;
 
Upvote 0
Newbie Spellweaver
Joined
Nov 19, 2018
Messages
24
Reaction score
0
http://forum.ragezone.com/f921/delphi-maplestory-gm-client-1159523/

Code:
 if HasEntry(Path + '/origin') then
    begin
      case MirrorX of
        True:
          begin
            Self.Flip := -1;
            if Owner.InLadder then
              AdjX := 3
            else
              AdjX := 0;
            Origin.X := EquipData[Path + '/origin'].Vector.X - Self.ImageWidth + AdjX;
          end;
        False:
          begin
            Self.Flip := 1;
            Origin.X := -EquipData[Path + '/origin'].Vector.X;
          end;
      end;
      Origin.Y := -EquipData[Path + '/origin'].Vector.Y;
    end;
    
    if HasEntry(Path + '/map/brow') then
    begin
      Brow.X := -EquipData[Path + '/map/brow'].Vector.X * Self.Flip;
      Brow.Y := -EquipData[Path + '/map/brow'].Vector.Y;
      if Image = 'head' then
        HeadBrow := Brow;

      Self.Offset.X := Origin.X + HeadNeck.X - BodyNeck.X - HeadBrow.X + Brow.X - TamingNavel.X;
      Self.Offset.Y := Origin.Y + HeadNeck.Y - BodyNeck.Y - HeadBrow.Y + Brow.Y - TamingNavel.Y;
    end;

    if HasEntry(Path + '/map/neck') then
    begin
      Neck.X := -EquipData[Path + '/map/neck'].Vector.X * Self.Flip;
      Neck.Y := -EquipData[Path + '/map/neck'].Vector.Y;
      if Image = 'body' then
        BodyNeck := Neck;
      if Image = 'head' then
        HeadNeck := Neck;
    end;

    if HasEntry(Path + '/map/hand') then
    begin
      Hand.X := -EquipData[Path + '/map/hand'].Vector.X * Self.Flip;
      Hand.Y := -EquipData[Path + '/map/hand'].Vector.Y;
      if Image = 'arm' then
        ArmHand := Hand;
      if Image = 'body' then
        BodyHand := Hand;
      Self.Offset.X := Origin.X + Hand.X + ArmNavel.X - ArmHand.X - BodyNavel.X;
      Self.Offset.Y := Origin.Y + Hand.Y + ArmNavel.Y - ArmHand.Y - BodyNavel.Y;
    end;

    if HasEntry(Path + '/map/handMove') then
    begin
      HandMove.X := -EquipData[Path + '/map/handMove'].Vector.X * Self.Flip;
      HandMove.Y := -EquipData[Path + '/map/handMove'].Vector.Y;
      if Image = 'lHand' then
        lHandMove := HandMove;

      Self.Offset.X := Origin.X + HandMove.X - lHandMove.X;
      Self.Offset.Y := Origin.Y + HandMove.Y - lHandMove.Y;
    end;

    if HasEntry(Path + '/map/navel') then
    begin
      Navel.X := -EquipData[Path + '/map/navel'].Vector.X * Self.Flip;
      Navel.Y := -EquipData[Path + '/map/navel'].Vector.Y;
      if Image = 'arm' then
        ArmNavel := Navel;
      if Image = 'body' then
        BodyNavel := Navel;

      Self.Offset.X := Origin.X + Navel.X - BodyNavel.X - TamingNavel.X;
      Self.Offset.Y := Origin.Y + Navel.Y - BodyNavel.Y - TamingNavel.Y;
    end;

Hello, thanks for the code!
I've tried calculating with it the body and the arm, but this is what I got:
It's close but not exactly in the right place where it should be.
Here are my calculations:

TamingNavel.X = 0; // I guess?
TamingNavel.Y = 0; // I guess?
MirrorX = 0;
// I skipped "map/hand" and "map/neck" because they don't do anything in this case, I think.
Body:
Origin.X = -16;
Origin.Y = -31;
Navel.X = -(-8) = 8;
Navel.Y = -(-21) = 21;
BodyNavel = Navel;
Offset.X = Origin.X + Navel.X - BodyNavel.X - TamingNavel.X = -16 + 8 - 8 - 0 = -16;
Offset.Y = Origin.Y + Navel.Y - BodyNavel.Y - YamingNavel.Y = -31 + 21 - 21 - 0 = -31;

Arm:
Origin.X = -5;
Origin.Y = -9;
Navel.X = -(-13) = 13;
Navel.Y = -(-1) = 1;
Offset.X = Origin.X + Navel.X - BodyNavel.X - TamingNavel.X = -5 + 13 - 8 - 0 = 0;
Offset.Y = Origin.Y + Navel.Y - BodyNavel.Y - TamingNavel.Y = -9 + 1 - 21 - 0 = -29;

Drawing(The 100 is just so I can see the sprites): // Am I drawing right?
draw(100 + -16, 100 + - 31, body); // 100 + Offset.X, 100 + Offset.Y
draw(100 + 0, 100 + -29, arm); // 100 + Offset.X, 100 + Offset.Y

------------------
Thanks!
 
Upvote 0
Experienced Elementalist
Joined
Feb 15, 2010
Messages
201
Reaction score
296
Can't explain it or put it into words at least that formula work fine for me. The only way is to try other action such as walk, stand, rope, prone...etc then see what happen, correct or not.
 
Upvote 0
Newbie Spellweaver
Joined
Nov 19, 2018
Messages
24
Reaction score
0
Can't explain it or put it into words at least that formula work fine for me. The only way is to try other action such as walk, stand, rope, prone...etc then see what happen, correct or not.

Apparently I used the images of the body and the arm from frame 1 of state "stand1" and values from frame 0...
I changed to the images from frame 0 and it's now in the right place! Thank you!
Though when I tried to draw the head it was not in the right place for some reason...
 
Upvote 0
Initiate Mage
Joined
Jun 11, 2021
Messages
2
Reaction score
0
hi, I am looking a way, too. I dont know the way to put this images together, do you have any github project for you work? And kangqiang.w@gmail is my email, Thanks for you work!
 
Upvote 0
Initiate Mage
Joined
Jun 11, 2021
Messages
2
Reaction score
0
as I see, you did nothing wrong according to the code, but i use the value to draw, they did not in the right place.
 
Upvote 0
Back
Top