Thread: [Hyperion] Changing the players' animation IDs

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 [Hyperion] Changing the players' animation IDs 
    Registered Member
    Join Date
    Dec 2011
    Posts
    793
    Thanks given
    204
    Thanks received
    176
    Rep Power
    173
    Short backstory / explanation of methodology:

    I've changed Hyperion's PlayerUpdateTask to properly handle players whose appearances are set to that of an NPC. Along with that, the ::pnpc command is operational, taking an NPC ID as its argument.

    The problem:

    It all works well and good, save for the model deformation than results from using the human player model's animation IDs with ... well, anything that isn't the human player model.



    The difference is obvious, and becomes more so when the model is actually animating to any great degree (i.e. attacking or running instead of idling).

    The question:

    How can I pull a certain NPC's animation IDs and substitute them for the player's?

    and/or

    How can I substitute alternate animation IDs for the player's own?

    Thanks.
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Dec 2012
    Posts
    2,999
    Thanks given
    894
    Thanks received
    921
    Rep Power
    2555
    The id of the animation you send is also in the appearance block (referred to as render id)

    You can grab an NPCs 'render' id from npc definitions (I don't think it's in the cache)
    Attached image
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Dec 2011
    Posts
    793
    Thanks given
    204
    Thanks received
    176
    Rep Power
    173
    Quote Originally Posted by Kaleem View Post
    The id of the animation you send is also in the appearance block (referred to as render id)

    You can grab an NPCs 'render' id from npc definitions (I don't think it's in the cache)
    Thanks for your reply.

    NPC definitions were the first place I looked. Here's a sample of the definition for NPC 1000 (the one in the example image):

    Code:
    <npcDefinition>
       <id>1000</id>
       <name>Holthion</name>
       <examine>One of the guardians of Iban.</examine>
       <combat>91</combat>
       <size>3</size>
       <attackable>true</attackable>
       <aggressive>false</aggressive>
       <retreats>false</retreats>
       <poisonous>false</poisonous>
       <respawn>10</respawn>
       <maxHit>1</maxHit>
       <hitpoints>10</hitpoints>
       <attackSpeed>4000</attackSpeed>
       <attackAnim>64</attackAnim>
       <defenceAnim>65</defenceAnim>
       <deathAnim>67</deathAnim>
       <attackBonus>13</attackBonus>
       <defenceMelee>13</defenceMelee>
       <defenceRange>13</defenceRange>
       <defenceMage>0</defenceMage>
      </npcDefinition>
    The attack, defence, and death animations are specified here. But where would the idle and walk animations be?

    I know they exist, and to some degree, are used. When the NPC is spawned, it idles with the correct animation, and if attacked, it will follow with its walk animation.

    I just need to know how to get them.
    Reply With Quote  
     

  4. #4  
    Registered Member
    thim slug's Avatar
    Join Date
    Nov 2010
    Age
    28
    Posts
    4,132
    Thanks given
    1,077
    Thanks received
    1,137
    Rep Power
    5000
    Quote Originally Posted by Psychotic View Post
    Thanks for your reply.

    NPC definitions were the first place I looked. Here's a sample of the definition for NPC 1000 (the one in the example image):

    Code:
    <npcDefinition>
       <id>1000</id>
       <name>Holthion</name>
       <examine>One of the guardians of Iban.</examine>
       <combat>91</combat>
       <size>3</size>
       <attackable>true</attackable>
       <aggressive>false</aggressive>
       <retreats>false</retreats>
       <poisonous>false</poisonous>
       <respawn>10</respawn>
       <maxHit>1</maxHit>
       <hitpoints>10</hitpoints>
       <attackSpeed>4000</attackSpeed>
       <attackAnim>64</attackAnim>
       <defenceAnim>65</defenceAnim>
       <deathAnim>67</deathAnim>
       <attackBonus>13</attackBonus>
       <defenceMelee>13</defenceMelee>
       <defenceRange>13</defenceRange>
       <defenceMage>0</defenceMage>
      </npcDefinition>
    The attack, defence, and death animations are specified here. But where would the idle and walk animations be?

    I know they exist, and to some degree, are used. When the NPC is spawned, it idles with the correct animation, and if attacked, it will follow with its walk animation.

    I just need to know how to get them.
    The walking animations are in the cache.
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Dec 2012
    Posts
    2,999
    Thanks given
    894
    Thanks received
    921
    Rep Power
    2555
    Quote Originally Posted by Psychotic View Post
    Thanks for your reply.

    NPC definitions were the first place I looked. Here's a sample of the definition for NPC 1000 (the one in the example image):

    Code:
    <npcDefinition>
       <id>1000</id>
       <name>Holthion</name>
       <examine>One of the guardians of Iban.</examine>
       <combat>91</combat>
       <size>3</size>
       <attackable>true</attackable>
       <aggressive>false</aggressive>
       <retreats>false</retreats>
       <poisonous>false</poisonous>
       <respawn>10</respawn>
       <maxHit>1</maxHit>
       <hitpoints>10</hitpoints>
       <attackSpeed>4000</attackSpeed>
       <attackAnim>64</attackAnim>
       <defenceAnim>65</defenceAnim>
       <deathAnim>67</deathAnim>
       <attackBonus>13</attackBonus>
       <defenceMelee>13</defenceMelee>
       <defenceRange>13</defenceRange>
       <defenceMage>0</defenceMage>
      </npcDefinition>
    The attack, defence, and death animations are specified here. But where would the idle and walk animations be?

    I know they exist, and to some degree, are used. When the NPC is spawned, it idles with the correct animation, and if attacked, it will follow with its walk animation.

    I just need to know how to get them.
    Being the idiot I am I forgot about them spawning properly - so yeah they're found in the cache
    Attached image
    Reply With Quote  
     

  6. #6  
    Registered Member
    Andys1814's Avatar
    Join Date
    Feb 2013
    Posts
    974
    Thanks given
    688
    Thanks received
    455
    Rep Power
    727
    Post your pnpc command.
    Reply With Quote  
     

  7. #7  
    Donator

    Join Date
    Jul 2010
    Posts
    276
    Thanks given
    0
    Thanks received
    1
    Rep Power
    26
    The walk/stand/run are in the cache I believe, and are set by default from there.
    Reply With Quote  
     

  8. #8  
    Member [Hyperion] Changing the players' animation IDs Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    you have to send the walk/run anims as the npc's walk/run anims etc

    Attached imageAttached image
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Dec 2011
    Posts
    793
    Thanks given
    204
    Thanks received
    176
    Rep Power
    173
    Quote Originally Posted by TheBest1 View Post
    The walk/stand/run are in the cache I believe, and are set by default from there.
    Quote Originally Posted by Luke132 View Post
    you have to send the walk/run anims as the npc's walk/run anims etc
    Quote Originally Posted by Poohcan View Post
    The walking animations are in the cache.
    Quote Originally Posted by Kaleem View Post
    Being the idiot I am I forgot about them spawning properly - so yeah they're found in the cache
    Thanks guys. I'm relatively unacquainted with the RS client and cache ... so how would I pull them out of the cache and reference them in my code? So I can set them as the player's own.

    Quote Originally Posted by Trystan View Post
    Post your pnpc command.
    My pnpc command calls this method:

    Code:
    	/**
    	 * Sets the NPC state of our player.
    	 * @param id The NPC ID.
    	 */	
    	public void setPnpc(int id) {
    		this.npcId = id;
    		this.npcState = id > -1 ? true : false;
    		getUpdateFlags().flag(UpdateFlag.APPEARANCE);
    	}
    It just uses update flags, doesn't re-set animations. Which is what I need it to do.

    Thanks to all of you!
    Reply With Quote  
     

  10. #10  
    Member [Hyperion] Changing the players' animation IDs Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    the animations are in the code that shows the player display, armour, weapons etc

    Attached imageAttached image
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 10
    Last Post: 04-25-2012, 07:27 AM
  2. Replies: 1
    Last Post: 05-25-2010, 09:59 PM
  3. Replies: 1
    Last Post: 05-01-2010, 06:32 PM
  4. What is the crying anim id?
    By John Smithh in forum Help
    Replies: 1
    Last Post: 11-08-2009, 02:15 PM
  5. how do i change the player options
    By mrprostat in forum Help
    Replies: 7
    Last Post: 03-11-2009, 06:57 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •