Jump to content

Trixer

Members
  • Content Count

    37
  • Donations

    $0.00 
  • Joined

  • Last visited

  • Days Won

    1

Trixer last won the day on July 8 2018

Trixer had the most liked content!

2 Followers

Recent Profile Visitors

2,004 profile views

Single Status Update

See all updates by Trixer

  1. HOW TO: Make a vanity pet system (kinda)

     

    Hello anyone who might be reading this. I am still pretty new to the intersect engine (today is my second day on it) but it seems straight forward.

     

    I have been reading around the forums and noticed everyone mentioning pets, and pet systems.  I think I might have a way to give developers something to "get them buy" until the source code officially releases.  My apologies if this has been posted else where or something.

    Getting Started

     

    1.  First we need to add a new equipment slot for a player to equip the pet. So shutdown your server and open up the config.xml file in the server resources directory. 

      
    2. Find the section that looks like the following 

     <Equipment>
        <WeaponSlot>2</WeaponSlot>
        <ShieldSlot>3</ShieldSlot>
        <Slot0>Helmet</Slot0>
        <Slot1>Armor</Slot1>
        <Slot2>Weapon</Slot2>
        <Slot3>Shield</Slot3>
        <Slot4>Boots</Slot4>
      </Equipment>

     

    Modify it so that it looks like this 

     

     <Equipment>
        <WeaponSlot>2</WeaponSlot>
        <ShieldSlot>3</ShieldSlot>
        <Slot0>Helmet</Slot0>
        <Slot1>Armor</Slot1>
        <Slot2>Weapon</Slot2>
        <Slot3>Shield</Slot3>
        <Slot4>Boots</Slot4>
        <Slot5>Pet</Slot5>
      </Equipment>

     

    Awesome now save it! This adds a new equip slot for out pet. You can also use this method to add equip slots for other places too.

    3.  Now we need to tell the engine how to display the paper doll for the pet.    The next section in the file is just for this. Change it to look like the following 

     

    <Paperdoll>
        <Up>
          <!--Paperdoll is rendered in the following order when facing up. If you want to change when each piece of equipment gets rendered simply swap the equipment names.-->
          <Slot0>Helmet</Slot0>
          <Slot1>Armor</Slot1>
          <Slot2>Weapon</Slot2>
          <Slot3>Shield</Slot3>
          <Slot4>Boots</Slot4>
          <Slot5>Pet</Slot5>
        </Up>
        <Down>
          <!--Paperdoll is rendered in the following order when facing down. If you want to change when each piece of equipment gets rendered simply swap the equipment names.-->
          <Slot0>Helmet</Slot0>
          <Slot1>Armor</Slot1>
          <Slot2>Weapon</Slot2>
          <Slot3>Shield</Slot3>
          <Slot4>Boots</Slot4>
          <Slot5>Pet</Slot5>
        </Down>
        <Left>
          <!--Paperdoll is rendered in the following order when facing left. If you want to change when each piece of equipment gets rendered simply swap the equipment names.-->
          <Slot0>Helmet</Slot0>
          <Slot1>Armor</Slot1>
          <Slot2>Weapon</Slot2>
          <Slot3>Shield</Slot3>
          <Slot4>Boots</Slot4>
          <Slot5>Pet</Slot5>
        </Left>
        <Right>
          <!--Paperdoll is rendered in the following order when facing right. If you want to change when each piece of equipment gets rendered simply swap the equipment names.-->
          <Slot0>Helmet</Slot0>
          <Slot1>Armor</Slot1>
          <Slot2>Weapon</Slot2>
          <Slot3>Shield</Slot3>
          <Slot4>Boots</Slot4>
          <Slot5>Pet</Slot5>
        </Right>
      </Paperdoll>

     

    4. Ok that's it for the server config. Save it close it and restart your server! 

     

    5. Before you open your editor and client! Go to the resources folder of the editor/client and under the enities folder find the one that looks like a bat. Copy that file into the paperdolls folder  (We are gonna make a bat pet for this tutorial but you can use any sprite you want) 

    6.  Ok! Now open the editor and go to items. Make a new item call it "Bat Pet" and set it to equipment type. Then where it equips set it to "Pet".    At the bottom set the male and female paper dolls to the bat image we copied before.

    7. Spawn the item in game and equip it.  Blam! You have a bat following you around. (kinda)


    The bat sprite sheet isn't really made for a pet system because the bat sprite is centered on the sprite frame. If you wanted the bat to appear off to the side of you for up and down views you would need to adjust the bat so he doesn't stick in the center of the image.  Same with side views it might be good to move the bat up.

    Each pet will take some adjusting and pixel arting to make it look good in the system, but this could serve at very least as a place holder for your game until source can be released and we can do a proper pet system from the NPC system.


    If you guys liked this tutorial or thought it was helpful please leave a like, follow me, and leave a comment and I will try and do more tutorials as I discover how to do more things with the engine!

    1. Show previous comments  2 more
    2. emptyaccount

      emptyaccount

      I believe everyone can post tutorials there @jcsnider am I right or am I wrong? :664_crystal_ball: :35_thinking:

    3. Trixer

      Trixer

      Well I posted this one there! So if no one says anything I will start posting more there. 

    4. jcsnider

      jcsnider

      Nah the tutorials board is the way to go @Trixer and @Moon status updates get lost over time :)  

       

      nice tut!

       

×
×
  • Create New...