Question about boosting speed while holding a certain weapon

Results 1 to 12 of 12
  1. #1
    Member bloodywarcraft2 is offline
    MemberRank
    Jul 2009 Join Date
    70Posts

    Question about boosting speed while holding a certain weapon

    Which attribute can i use in the zitem.xml to make me move faster ingame?
    i tried limitspeed bot 20, -20 +20 -120... lol idk everything just gives me negative speeds :/ and they slow me down lol I can't figure it out, help if you can, if not i guess i'll live without it ^_^


  2. #2
    "I'm old, not obsolete" SKNeoDio is offline
    MemberRank
    Feb 2007 Join Date
    PortugalLocation
    248Posts

    Re: Question about boosting speed while holding a certain weapon

    Limitspeed="3000" used to give max speed on the BR client's zitem...I was actually the one who figured that out on my server, and "-" or "+" won't help you much if you're just editing the xml's

    What client are you using btw? If you're using the 1.5 ijji client I don't think anyone has figured out how to give speed to items, however, since there are acceleration vials on the 1.5 client, it's just the matter of seeing their code on the source and applying it to other items, we're already testing that on my server.

  3. #3
    Member bloodywarcraft2 is offline
    MemberRank
    Jul 2009 Join Date
    70Posts

    Re: Question about boosting speed while holding a certain weapon

    I'm using 2008 files, and how fast will 3000 make me? :O i only want a slight boost, I don't want to move out of control.
    Thanks tho! :] i'll test it now ^_^

  4. #4
    "I'm old, not obsolete" SKNeoDio is offline
    MemberRank
    Feb 2007 Join Date
    PortugalLocation
    248Posts

    Re: Question about boosting speed while holding a certain weapon

    I never tested that on the 2008 ijji client, only on the 2007 BR client, so it might work or not.

    Anyway, limitspeed="100" should be the regular speed, so if you set something below that value like limitspeed="50" it will give you -50% speed, while if you set limitspeed="150" it should give you +50% speed.

    However, I'm not sure if that works on the client you are using, but just test it and you will see.
    Last edited by SKNeoDio; 04-09-12 at 08:04 PM. Reason: forgot a 1

  5. #5
    Member bloodywarcraft2 is offline
    MemberRank
    Jul 2009 Join Date
    70Posts

    Re: Question about boosting speed while holding a certain weapon

    Alright will do, I will let you know the outcome, thanks ^_^ I think i'll try it out tomorrow sometime, I apreciate your help.

  6. #6
    Enthusiast xStephanM is offline
    MemberRank
    May 2012 Join Date
    OLD ACC BACKLocation
    39Posts

    Re: Question about boosting speed while holding a certain weapon

    Just keep in mind that the regular speed is 100.

  7. #7
    Member bloodywarcraft2 is offline
    MemberRank
    Jul 2009 Join Date
    70Posts

    Re: Question about boosting speed while holding a certain weapon

    Quote Originally Posted by xStephanM View Post
    Just keep in mind that the regular speed is 100.
    I realized that, Thanks tho xStephan & NeoDio I tried it and it didn't work, but i'll do without it, I just thought that it would be fun to be slightly faster than was all ^_^

  8. #8
    Aristrum Mark is offline
    MemberRank
    Aug 2007 Join Date
    United KingdomLocation
    474Posts

    Re: Question about boosting speed while holding a certain weapon

    If I remember correctly positive limitspeed values were disabled at some point. I think they're enabled in 07, but disabled in 08.

    Looking in the 1.5 source confirms this:

    Code:
    float ZCharacter::GetMoveSpeedRatio()
    {
    	float fRatio = 1.f;
    
    	MMatchItemDesc* pMItemDesc = GetSelectItemDesc();
    
    	if(pMItemDesc)
    	{
    		if( pMItemDesc->m_nLimitSpeed.Ref() <=100)		//Á¤»ó À¯Àúµé..
    			fRatio = pMItemDesc->m_nLimitSpeed.Ref()/100.f;
    		else					//ÇØÄ¿µé...Áë³» °³ ´À·ÁÁú²¬..¤»¤»¤»¤»
    			fRatio = 0.1f;
    	}
    
    	return m_pModule_Movable->GetMoveSpeedRatio()*fRatio;
    }
    As we can see, if limitspeed is greater than 100, the movement speed ratio gets set to 0.1f, making you 10 times slower.

    So, we need to disable this limitation. In the source, it would be as simple as removing the if statement, and the else block, like so:

    Code:
    float ZCharacter::GetMoveSpeedRatio()
    {
    	float fRatio = 1.f;
    
    	MMatchItemDesc* pMItemDesc = GetSelectItemDesc();
    
    	if(pMItemDesc)
    	{
    		//if( pMItemDesc->m_nLimitSpeed.Ref() <=100)		//Á¤»ó À¯Àúµé..
    			fRatio = pMItemDesc->m_nLimitSpeed.Ref()/100.f;
    		//else					//ÇØÄ¿µé...Áë³» °³ ´À·ÁÁú²¬..¤»¤»¤»¤»
    		//	fRatio = 0.1f;
    	}
    
    	return m_pModule_Movable->GetMoveSpeedRatio()*fRatio;
    }
    However, since you're using the 08 runnable, we're going to need to do some ASM.

    First, I found the relevant function here:

    Code:
    00477FB0   /.  55                              PUSH EBP
    00477FB1   |.  8BEC                            MOV EBP,ESP
    00477FB3   |.  51                              PUSH ECX
    00477FB4   |.  D905 D82D6200                   FLD DWORD PTR DS:[622DD8]
    00477FBA   |.  56                              PUSH ESI
    00477FBB   |.  57                              PUSH EDI
    00477FBC   |.  D955 FC                         FST [LOCAL.1]
    00477FBF   |.  8BF9                            MOV EDI,ECX
    00477FC1   |.  8D77 6C                         LEA ESI,DWORD PTR DS:[EDI+6C]
    00477FC4   |.  85F6                            TEST ESI,ESI
    00477FC6   |.  74 54                           JE SHORT Repack_3.0047801C
    00477FC8   |.  8BCE                            MOV ECX,ESI
    00477FCA   |.  DDD8                            FSTP ST
    00477FCC   |.  E8 5F530000                     CALL Repack_3.0047D330
    00477FD1   |.  85C0                            TEST EAX,EAX                                                         ;  kernel32.BaseThreadInitThunk
    00477FD3   |.  74 44                           JE SHORT Repack_3.00478019
    00477FD5   |.  8BCE                            MOV ECX,ESI
    00477FD7   |.  E8 54530000                     CALL Repack_3.0047D330
    00477FDC   |.  8BC8                            MOV ECX,EAX                                                          ;  kernel32.BaseThreadInitThunk
    00477FDE   |.  E8 9D600900                     CALL Repack_3.0050E080
    00477FE3   |.  85C0                            TEST EAX,EAX                                                         ;  kernel32.BaseThreadInitThunk
    00477FE5   |.  74 32                           JE SHORT Repack_3.00478019
    00477FE7   |.  8B40 6C                         MOV EAX,DWORD PTR DS:[EAX+6C]
    00477FEA   |.  83F8 64                         CMP EAX,64
    00477FED   |.  8945 FC                         MOV [LOCAL.1],EAX                                                    ;  kernel32.BaseThreadInitThunk
    00477FF0   |.  7F 15                           JG SHORT Repack_3.00478007
    00477FF2   |.  DB45 FC                         FILD [LOCAL.1]
    00477FF5   |.  8B47 68                         MOV EAX,DWORD PTR DS:[EDI+68]
    00477FF8   |.  5F                              POP EDI                                                              ;  kernel32.753A339A
    00477FF9   |.  5E                              POP ESI                                                              ;  kernel32.753A339A
    00477FFA   |.  D80D 442E6200                   FMUL DWORD PTR DS:[622E44]
    00478000   |.  D848 58                         FMUL DWORD PTR DS:[EAX+58]
    00478003   |.  8BE5                            MOV ESP,EBP
    00478005   |.  5D                              POP EBP                                                              ;  kernel32.753A339A
    00478006   |.  C3                              RETN
    00478007   |>  8B47 68                         MOV EAX,DWORD PTR DS:[EDI+68]
    0047800A   |.  D905 342E6200                   FLD DWORD PTR DS:[622E34]
    00478010   |.  D848 58                         FMUL DWORD PTR DS:[EAX+58]
    00478013   |.  5F                              POP EDI                                                              ;  kernel32.753A339A
    00478014   |.  5E                              POP ESI                                                              ;  kernel32.753A339A
    00478015   |.  8BE5                            MOV ESP,EBP
    00478017   |.  5D                              POP EBP                                                              ;  kernel32.753A339A
    00478018   |.  C3                              RETN
    00478019   |>  D945 FC                         FLD [LOCAL.1]
    0047801C   |>  8B47 68                         MOV EAX,DWORD PTR DS:[EDI+68]
    0047801F   |.  D848 58                         FMUL DWORD PTR DS:[EAX+58]
    00478022   |.  5F                              POP EDI                                                              ;  kernel32.753A339A
    00478023   |.  5E                              POP ESI                                                              ;  kernel32.753A339A
    00478024   |.  8BE5                            MOV ESP,EBP
    00478026   |.  5D                              POP EBP                                                              ;  kernel32.753A339A
    00478027   \.  C3                              RETN
    Now to remove the limit, we need to edit this line:

    Code:
    00477FF0      7F 15                           JG SHORT Repack_3.00478007
    To never jump, by replacing it with NOPs:

    Code:
    00477FF0       90                              NOP
    00477FF1       90                              NOP
    I haven't tested it, but that should work. Report back with results :).

    Edit: The value for limitspeed is a percentage of normal speed, so 100% = 1 times normal speed, 3000% = 30 times normal speed, etc.

  9. #9
    "I'm old, not obsolete" SKNeoDio is offline
    MemberRank
    Feb 2007 Join Date
    PortugalLocation
    248Posts

    Re: Question about boosting speed while holding a certain weapon

    Quote Originally Posted by bloodywarcraft2 View Post
    I realized that, Thanks tho xStephan & NeoDio I tried it and it didn't work, but i'll do without it, I just thought that it would be fun to be slightly faster than was all ^_^
    Well, sorry it didn't work out the "simple way" mate, but you have the full explanation above my post :]

    Quote Originally Posted by Mark View Post
    (((had to cut the quote or I couldn't post, strange bug giving me access denied while posting with your full quote ~NeoDio)))
    Hello Aristrum, first of all, Homie told me he was asking you some questions lately, I appreciate it, thanks!

    I was mainly convinced that limitspeed above 100 only worked on the 2007/BR client, only now I am certain that it does not work on the 2008 client, although I never did actually use the 2008 client to be honest, only the 2007/BR and now the 1.5

    And well, one simple thing can already be done regarding speed on the 1.5 client because the acceleration vials already have speed enabled by default and as their name obviously implies ...We already managed with a basic zitem edit to increase the speed duration on that same item to how much time we want.
    However, we are currently trying to apply that so called "haste damagetype" to other items, but so far with no success.

    Thank you for the explanation on how to break the limitspeed on the 2008 runnable, I or we will surely try it on the 1.5 runnable, since the 1.5 client already has some items like machine guns and rockets that have lower speed, maybe higher speed can be unlocked the same way, thanks!!

  10. #10
    Aristrum Mark is offline
    MemberRank
    Aug 2007 Join Date
    United KingdomLocation
    474Posts

    Re: Question about boosting speed while holding a certain weapon

    Quote Originally Posted by NeoDio View Post
    Well, sorry it didn't work out the "simple way" mate, but you have the full explanation above my post :]



    Hello Aristrum, first of all, Homie told me he was asking you some questions lately, I appreciate it, thanks!

    I was mainly convinced that limitspeed above 100 only worked on the 2007/BR client, only now I am certain that it does not work on the 2008 client, although I never did actually use the 2008 client to be honest, only the 2007/BR and now the 1.5

    And well, one simple thing can already be done regarding speed on the 1.5 client because the acceleration vials already have speed enabled by default and as their name obviously implies ...We already managed with a basic zitem edit to increase the speed duration on that same item to how much time we want.
    However, we are currently trying to apply that so called "haste damagetype" to other items, but so far with no success.

    Thank you for the explanation on how to break the limitspeed on the 2008 runnable, I or we will surely try it on the 1.5 runnable, since the 1.5 client already has some items like machine guns and rockets that have lower speed, maybe higher speed can be unlocked the same way, thanks!!
    No problem, in regards to Homie :).

    I think they added this edit to stop MRS hackers in the official version, since no MAIET items have a limitspeed above 100, and when you think of it, it's original intention was to limit speed :P.

    However, with the source edit that I posted above (second code box, just commenting 3 lines) and the ASM edit for 08 above, it should remove the restriction.

    In regards to the acceleration vials, you can also see how they work in that snippet of code I posted:

    Code:
    float ZCharacter::GetMoveSpeedRatio()
    {
        float fRatio = 1.f;
    
        MMatchItemDesc* pMItemDesc = GetSelectItemDesc();
    
        if(pMItemDesc)
        {
            if( pMItemDesc->m_nLimitSpeed.Ref() <=100)        //Á¤»ó À¯Àúµé..
                fRatio = pMItemDesc->m_nLimitSpeed.Ref()/100.f;
            else                    //ÇØÄ¿µé...Áë³» °³ ´À·ÁÁú²¬..¤»¤»¤»¤»
                fRatio = 0.1f;
        }
    
        return m_pModule_Movable->GetMoveSpeedRatio()*fRatio;
    }
    If you look at the red/bold part, that is where the acceleration vial's effects take place. Following that call brings you to these functions:

    Code:
    void ZModule_Movable::SetMoveSpeedRestrictRatio(float fRatio, float fDuration) 
    { 
        ...
    }
    
    void ZModule_Movable::SetMoveSpeedHasteRatio(float fRatio, float fDuration, int nItemId)
    { 
            ...
    }
    
    float ZModule_Movable::GetMoveSpeedRatio()
    {
        // °¨¼Ó°ú °¡¼Ó ºñÀ²À» ÇÕÀ¸·Î ó¸®ÇÑ´Ù
        float fRestrict(0.f), fHaste(0.f);
        
        if (m_bRestrict.Ref())
            fRestrict = m_fRestrictRatio.Ref() - 1.f;
        if (m_bHaste.Ref())
            fHaste = m_fHasteRatio.Ref() - 1.f;
    
        return 1.f + fRestrict + fHaste;
    }
    So here we can see the function that gets the ratio, which is modified by two variables, fRestrict and fHaste. The values for these variables are set by the two functions above. The haste one is only called by haste potions (acceleration vials), but the restrict setting is changed by skills and cold damage.

    So, if you wanted to apply a speed increase to the equipped weapon, removing limitspeed as above should do the trick, along with setting the limitspeed value. If not, look around the code I showed above and you should be able to get something going :).

  11. #11
    "I'm old, not obsolete" SKNeoDio is offline
    MemberRank
    Feb 2007 Join Date
    PortugalLocation
    248Posts

    Re: Question about boosting speed while holding a certain weapon

    You just most likely made me, my staff and a whole 6 year old community very very happy since they are crazy about 5%, 10% and 15% speed items :]

    Thank you very much, I do not know much about c++/asm myself, that was never my area of study, I've been only trying to learn c++ basics by reading some code snippets here on Ragezone, and learning through either logic or just comparing how each function or snippet just connects to another...but I guess my developers can handle this.

    You should actually make your own thread here on Ragezone about "solving" the mystery of speed items on the 1.5 source...And your thread should be added to the compilations of 1.5 code snippets.

    Thanks a lot again! Cheers :]

  12. #12
    Member bloodywarcraft2 is offline
    MemberRank
    Jul 2009 Join Date
    70Posts

    Re: Question about boosting speed while holding a certain weapon

    I will try it later tonight or this weekend, I'll be busy today, Thanks alot guys.



Advertisement