HomePortalFAQSearchMemberlistUsergroupsRegisterLog in
Making threads to link to banned members content grants an automatic ban
Meet the new KITO admins & hear their plans here.
You can use google search to find threads and posts here now. Example

Share | 
 

 Body Selector Walkthrough

View previous topic View next topic Go down 
Go to page : 1, 2  Next
AuthorMessage
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 483
Join date : 2014-02-09
Age : 19

PostSubject: Body Selector Walkthrough   Tue May 05, 2015 3:02 am

I've seen a lot of people trying to implement this into 6.0 and not having any idea how, so here's a runthrough of what needs to be changed/added and where.

Credit to Hamilton for the original source and thanks for giving me permission to make this

Gonna do this by file. I have tested it from a fresh source, but I did a lot of editing along the way, so let me know if something breaks.

use CTRL:F to find the original codes then replace them with what is provided

MagixCharScreenManager.h
Spoiler:
 
MagixCharScreenManager.cpp
Spoiler:
 

MagixExternalDefinitions.h
Spoiler:
 

MagixExternalDefinitions.cpp
Spoiler:
 

MagixConst.h
Spoiler:
 

MagixUnit.cpp
Spoiler:
 

MagixUnit.h
Spoiler:
 

GameConfig.h
Spoiler:
 

conga rats you've got a rad new body selector
Spoiler:
 

________________________________
Back to top Go down
http://azoptaos.boards.net/
Rutzdus

avatar

Posts : 4
Join date : 2015-03-26
Age : 27

PostSubject: Re: Body Selector Walkthrough   Tue May 05, 2015 2:05 pm

Holy beans, you've gone above and beyond with sharing this. This'll save people a ton of time -- I was starting to go through the files with KDiff but you've made the process beyond easy!

I can't thank you enough! Works like a charm, btw!
Back to top Go down
Claire
Very Helpful
Very Helpful
avatar

Game username : SoftMoon | MissDiealot
Server : Vaellerios (admin) | Lair of the Wolf (admin) | Journey Kingdom (dev)
Female Posts : 325
Join date : 2015-03-03
Age : 16

PostSubject: Re: Body Selector Walkthrough   Tue May 05, 2015 2:11 pm

Holy doodley, thanks alot Hyper for sharing that tut!

But I have one problem, or two:
I have followed each step, and replaced/added every code, but it seems that when I want to select the deer body (Body 2), it keeps the first body.
So I switched to the next page and found the head selector had "tuft" written instead of head, but when I clicked the arrow to change the head/tuft it was replaced with the body selector. But the tail, wing and tuft selector text was replaced by the marking text; but it was still switching the tail and tuft etc.
Weird, mind helping me? ;o


NEVERMIND!
I just didn't read everything properly, I'm sorry xD


Last edited by Softie on Wed Jun 17, 2015 6:45 pm; edited 1 time in total
Back to top Go down
http://missdiealot.deviantart.com/
Rutzdus

avatar

Posts : 4
Join date : 2015-03-26
Age : 27

PostSubject: Re: Body Selector Walkthrough   Tue May 05, 2015 2:25 pm

I had that problem too, all of it was solveable on the MagixCharScreenManager.cpp file.

If you have Hamilton's old source code, I'd suggest getting Kdiff and copy/pasting both the new source and their source side-by-side. My issues were all just copying over things wrong, such as in the numbers of the pages (make sure everything is 1-5 or however many Hyper lists,) and this code in specific:
Code:
else if(page==PAGE_CUSTOM1||page==PAGE_PRESET1)
 {
 changeTrait(buttonNo,buttonIsRight);
 }
 else if(page==PAGE_CUSTOM2||page==PAGE_PRESET2)
 {
 changeTrait(buttonNo+1,buttonIsRight);
 }
 else if(page==PAGE_CUSTOM3||page==PAGE_PRESET3)
 {
 changeTrait(buttonNo+5,buttonIsRight);
 }
 else if(page==PAGE_CUSTOM4)

Once I double-checked, everything worked out. :>
Back to top Go down
ShadoWolfozo

avatar

Game username : ShadoWolfozo
Server : GROWL: Spirits
Male Posts : 875
Join date : 2012-01-22
Age : 21
Location : Australia

PostSubject: Re: Body Selector Walkthrough   Tue May 05, 2015 2:52 pm

Great tutorial Hyper!

But I still think people should be slowing down and learning simpler things that'll actually make their server worth looking at (custom items, maps, prey, etc) rather than jumping the gun and going straight to things like this. Every server has this now.... you guys gotta come up with something original. Originality is what succeeds.
Back to top Go down
Rutzdus

avatar

Posts : 4
Join date : 2015-03-26
Age : 27

PostSubject: Re: Body Selector Walkthrough   Tue May 05, 2015 5:36 pm

Originality is super important -- tbh I doubt a public server would go very far if it was the same as every other server as it is!

Though to be fair, I don't think that using a multiple body source code necessarily implies being unoriginal, and getting your code straight from the beginning is still important -- after all, it can be used to work with new, original bodies for the game, so it's just a small hurdle passed that much quicker to get worked out in the new code for people who DO know how to do the detail work! (:
Back to top Go down
kaisa

avatar

Game username : kaisa
Posts : 6
Join date : 2015-05-01
Age : 26

PostSubject: Re: Body Selector Walkthrough   Tue May 05, 2015 5:58 pm

Oh man, thanks so much for making this! We were dreading trying to reverse engineer all of that ourselves, haha. ;w; So excited to get all our code straight so we can finally start work on content Like a Star @ heaven
Back to top Go down
http://ignisalatus.tumblr.com
Claire
Very Helpful
Very Helpful
avatar

Game username : SoftMoon | MissDiealot
Server : Vaellerios (admin) | Lair of the Wolf (admin) | Journey Kingdom (dev)
Female Posts : 325
Join date : 2015-03-03
Age : 16

PostSubject: Re: Body Selector Walkthrough   Tue May 05, 2015 6:24 pm

Rutzdus wrote:
I had that problem too, all of it was solveable on the MagixCharScreenManager.cpp file.

If you have Hamilton's old source code, I'd suggest getting Kdiff and copy/pasting both the new source and their source side-by-side. My issues were all just copying over things wrong, such as in the numbers of the pages (make sure everything is 1-5 or however many Hyper lists,) and this code in specific:
Code:
else if(page==PAGE_CUSTOM1||page==PAGE_PRESET1)
 {
 changeTrait(buttonNo,buttonIsRight);
 }
 else if(page==PAGE_CUSTOM2||page==PAGE_PRESET2)
 {
 changeTrait(buttonNo+1,buttonIsRight);
 }
 else if(page==PAGE_CUSTOM3||page==PAGE_PRESET3)
 {
 changeTrait(buttonNo+5,buttonIsRight);
 }
 else if(page==PAGE_CUSTOM4)

Once I double-checked, everything worked out. :>

Nope, still bugs with the chara creation windows. I can switch body from the body selector page tho', but the other pages still bug.


Last edited by Softie on Wed Jun 17, 2015 6:48 pm; edited 1 time in total
Back to top Go down
http://missdiealot.deviantart.com/
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 483
Join date : 2014-02-09
Age : 19

PostSubject: Re: Body Selector Walkthrough   Tue May 05, 2015 8:07 pm

Have you read through it again and checked your work? Sounds like the selectors may have gotten mixed up - with (almost?) every part of implementing this, Body goes on top of the rest of the parts (aka above Head)

________________________________
Back to top Go down
http://azoptaos.boards.net/
EmeraldPlague

avatar

Game username : EmeraldPlague
Female Posts : 4
Join date : 2015-05-10
Location : My Desk

PostSubject: Re: Body Selector Walkthrough   Thu May 14, 2015 1:48 am

I did everything... But there's no body selector on my game :c
Back to top Go down
http://www.youtube.com/user/122firedragon
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 483
Join date : 2014-02-09
Age : 19

PostSubject: Re: Body Selector Walkthrough   Thu May 14, 2015 2:22 am

did you build the solution?

________________________________
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Body Selector Walkthrough   Thu May 14, 2015 10:27 am

I would use this
If I had 6.0
I still use 5.5
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 483
Join date : 2014-02-09
Age : 19

PostSubject: Re: Body Selector Walkthrough   Thu May 14, 2015 11:39 am

It should be about the same Cloud, except the cpps and headers are combined and some things might be in different places. You'd also leave out MagixWhatever:: in front of functions. If you use ctrl:f you shouldnt have much trouble with it

________________________________
Back to top Go down
http://azoptaos.boards.net/
-INACTIVE-
Texture Artist
Texture Artist


Male Posts : 447
Join date : 2014-05-03

PostSubject: Re: Body Selector Walkthrough   Thu May 14, 2015 11:44 am

Thank ya,Hyper. Its great tutorial (:
Back to top Go down
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Body Selector Walkthrough   Thu May 14, 2015 9:59 pm

Okay.. I'll try fiddling with it xD I started with 5.5. Hopefully it's the same, I really don't want to start over with a new body source.



EDIT: So just as clarification, even with 5.5 using these codes should work? I'm no coder, though I'd like to learn in the future though.
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 483
Join date : 2014-02-09
Age : 19

PostSubject: Re: Body Selector Walkthrough   Fri May 15, 2015 1:29 am

Yes, they should. The only real differences between 5.5 and 6.0 when pertaining to this code is that the header and cpp files are not separate in 5.5, and you won't need to put MagixWhatever:: in front of your functions

I believe the MagixConst code is also in a different file for 5.5? But as I said, ctrl:F is your friend and you should be able to navigate where to add stuff using it

________________________________
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Body Selector Walkthrough   Fri May 15, 2015 10:28 am

I'll take a shot at it. Still a bit confused, I can deal with different locations of codes but not positive about the other stuff. Thanks c:
Back to top Go down
ЩΛЯ

avatar

Game username : ThisIsWar
Server : Eclipse
Female Posts : 373
Join date : 2015-03-02
Age : 17

PostSubject: Re: Body Selector Walkthrough   Sat May 16, 2015 9:16 am

Worked but when I try to customize my character like the colours It changed the wings?
Back to top Go down
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Body Selector Walkthrough   Sat May 16, 2015 3:01 pm

So far everything's working! Thanks Hyper Very Happy
Back to top Go down
TheImpressiveAnimals

avatar

Posts : 3
Join date : 2015-06-21

PostSubject: Re: Body Selector Walkthrough   Mon Jun 22, 2015 1:49 am

not caught, could explain better please ??? :3
Back to top Go down
Gingerlove

avatar

Posts : 15
Join date : 2015-09-16

PostSubject: Re: Body Selector Walkthrough   Sun Oct 04, 2015 5:15 am

Hyper wrote:
I've seen a lot of people trying to implement this into 6.0 and not having any idea how, so here's a runthrough of what needs to be changed/added and where.

Credit to Hamilton for the original source and thanks for giving me permission to make this

Gonna do this by file. I have tested it from a fresh source, but I did a lot of editing along the way, so let me know if something breaks.

use CTRL:F to find the original codes then replace them with what is provided

MagixCharScreenManager.h
Spoiler:
 
MagixCharScreenManager.cpp
Spoiler:
 

MagixExternalDefinitions.h
Spoiler:
 

MagixExternalDefinitions.cpp
Spoiler:
 

MagixConst.h
Spoiler:
 

MagixUnit.cpp
Spoiler:
 

MagixUnit.h
Spoiler:
 

GameConfig.h
Spoiler:
 

conga rats you've got a rad new body selector
Spoiler:
 

Hyper, I got a question I re checked all, seems fine but there is only 1 error it says
32 IntelliSense: class "MagixUnit" has no member "replaceBodyMesh"

And when I click it it only underlines this: "replaceBodyMesh"

The whole code is this:

Code:

   //body
   if (iID == 0)
   {
      bodyID += (increment ? 1 : -1);
      if (bodyID<0)bodyID = mDef->maxBodies - 1;
      if (bodyID >= mDef->maxBodies)bodyID = 0;
      applyRestrictions("Body", increment);
      mUnit->[u]replaceBodyMesh[/u](mSceneMgr, meshName("Body", bodyID), (page == PAGE_PRESET1 || page == PAGE_PRESET2 || page == PAGE_PRESET3));
   }
   
   //head
   if (iID == 1)
   {

any ideas why?
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 483
Join date : 2014-02-09
Age : 19

PostSubject: Re: Body Selector Walkthrough   Sun Oct 04, 2015 5:53 pm

you didn't add the replaceBodyMesh function in Unit

________________________________
Back to top Go down
http://azoptaos.boards.net/
Gingerlove

avatar

Posts : 15
Join date : 2015-09-16

PostSubject: Re: Body Selector Walkthrough   Sun Oct 04, 2015 8:34 pm

Hyper wrote:
you didn't add the replaceBodyMesh function in Unit
Yea, but how wxactly I fix this?
I tried changing this in MagixUnitccp

Code:
void MagixUnit::replaceBodyMesh(SceneManager *sceneMgr, const String &meshName, bool resetMaterial)
{
   if (!mBodyEnt)return;
   Entity *tBody = sceneMgr->createEntity("Bodytemp", meshName + ".mesh");
   mBodyEnt->getAllAnimationStates()->copyMatchingState(tBody->getAllAnimationStates());

   mObjectNode->detachObject(mBodyEnt);
   if (sceneMgr->hasEntity("Body" + StringConverter::toString(unitID)))sceneMgr->destroyEntity(mBodyEnt);
   mBodyEnt = sceneMgr->createEntity("Body" + StringConverter::toString(unitID), meshName + ".mesh");
   mObjectNode->attachObject(mBodyEnt);
   mBodyEnt->getSkeleton()->setBlendMode(ANIMBLEND_CUMULATIVE);
   mBodyEnt->getSkeleton()->getBlendMode();
   mBodyEnt->setQueryFlags(UNIT_MASK);

   tBody->getAllAnimationStates()->copyMatchingState(mBodyEnt->getAllAnimationStates());
   sceneMgr->destroyEntity(tBody);
   if (resetMaterial)setMaterial(matGroupName);
}

void MagixUnit::replaceHeadMesh(SceneManager *sceneMgr, const String &meshName, bool resetMaterial)
{
That was not included and on MagixUnit.h is this
Code:
void replaceBodyMesh(SceneManager *sceneMgr, const String &meshName, bool resetMaterial = false);
   void replaceHeadMesh(SceneManager *sceneMgr, const String &meshName, bool resetMaterial = false);
I tried to check but it keeps underlining
mUnit->replaceBody.Mesh(mSceneMgr, meshName("Body", bodyID), (page == PAGE_PRESET1 || page == PAGE_PRESET2 || page == PAGE_PRESET3));

I checked the Unit and it seems fine but it keeps underlining it.
I am sorry for asking so much ><
Back to top Go down
Slain (Side)

avatar

Game username : The-Hunted
Server : Shadow Legacy (Owner/Creator)
Female Posts : 8
Join date : 2015-02-01

PostSubject: Re: Body Selector Walkthrough   Wed Nov 25, 2015 2:13 am

Code:
void MagixUnit::replaceBodyMesh(SceneManager *sceneMgr, const String &meshName, bool resetMaterial)
  {
      if(!mBodyEnt)return;
      Entity *tBody = sceneMgr->createEntity("Bodytemp",meshName+".mesh");
      mBodyEnt->getAllAnimationStates()->copyMatchingState(tBody->getAllAnimationStates());

      mObjectNode->detachObject(mBodyEnt);
      if(sceneMgr->hasEntity("Body"+StringConverter::toString(unitID)))sceneMgr->destroyEntity(mBodyEnt);
      mBodyEnt = sceneMgr->createEntity("Body"+StringConverter::toString(unitID), meshName+".mesh");
      mObjectNode->attachObject(mBodyEnt);
      mBodyEnt->getSkeleton()->setBlendMode(ANIMBLEND_CUMULATIVE);
      mBodyEnt->getSkeleton()->getBlendMode();
      mBodyEnt->setQueryFlags(UNIT_MASK);

      tBody->getAllAnimationStates()->copyMatchingState(mBodyEnt->getAllAnimationStates());
      sceneMgr->destroyEntity(tBody);
      if(resetMaterial)setMaterial(matGroupName);
  }

This is the replace body function.
What error are you getting? I might be able to help, feel free to message my main account (Slain) no bio signs.

Do excuse my old reply, but heh, why not.
Back to top Go down
Lylac

avatar

Game username : Lylac
Server : Rise of Creation
Female Posts : 15
Join date : 2016-11-07
Location : 'Murica beyotches!!

PostSubject: Re: Body Selector Walkthrough   Wed Nov 16, 2016 4:55 am

This is awesome thank you so much Very Happy
Back to top Go down
http://riseofcreation.boards.net/
 
Body Selector Walkthrough
View previous topic View next topic Back to top 
Page 1 of 2Go to page : 1, 2  Next

Permissions in this forum:You cannot reply to topics in this forum
Keeping I.T. Open :: DOWNLOADABLE CONTENT :: Programming Features-
Jump to: