Aller au contenu

Photo

How to change the Paladin Horse Speed?


  • Veuillez vous connecter pour répondre
40 réponses à ce sujet

#1
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

We all know that the paladin gets different horses at these levels: 5, 8, 11, 15, 25, 30, 35, and 40.

In total there are 8 horses.

 

Is it possible to increase the horse speed gradually according to the paladin level?

 

Example:

 

 4 < PalLevel < 8 = +10% PC default speed

 8 < PalLevel < 11 = +15%


Modifié par WhiteTiger, 07 mai 2014 - 05:18 .


#2
Proleric

Proleric
  • Members
  • 2 345 messages
You can do this with the local variable X3_HORSE_MOUNT_SPEED on the horse.

If I've understood your question correctly, you're happy with the upper speed limit, but even that can be changed, using the fix in the Feb 2014 CCC.
  • WhiteTiger aime ceci

#3
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

I tried to change line 491, file x3_inc_horse, the value 99 to -150 and nothing changed =/



#4
Proleric

Proleric
  • Members
  • 2 345 messages
x3_inc_horse appears in many Bioware scripts, so you'd have to recompile all of them as local copies for that change to take effect.

Much easier to change the local variable on the horse blueprints.
  • Shadooow et WhiteTiger aiment ceci

#5
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

x3_inc_horse appears in many Bioware scripts, so you'd have to recompile all of them as local copies for that change to take effect.

Much easier to change the local variable on the horse blueprints.



It's better to change the blueprints, because each horse have your own speed.



#6
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

You can do this with the local variable X3_HORSE_MOUNT_SPEED on the horse.

 

Is something like this?

 

Edit1.png

 

Edit2.png

 

Edit3.png

 

Edit4.png



#7
Proleric

Proleric
  • Members
  • 2 345 messages
Exactly. You'll need to complete the entry with the Type code for float and a Value of the appropriate field type. An easy way to discover the correct format is to add a local float to a custom template in the toolset, then examine it with your GFF editor.
  • WhiteTiger aime ceci

#8
Shadooow

Shadooow
  • Members
  • 4 465 messages

Exactly. You'll need to complete the entry with the Type code for float and a Value of the appropriate field type. An easy way to discover the correct format is to add a local float to a custom template in the toolset, then examine it with your GFF editor.

adding the variable on summoned horse from script should work too and should be easier


  • WhiteTiger aime ceci

#9
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

Exactly. You'll need to complete the entry with the Type code for float and a Value of the appropriate field type. An easy way to discover the correct format is to add a local float to a custom template in the toolset, then examine it with your GFF editor.

I tried to do, but doesn't work. Is it correct?

 

edit5.png



#10
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

adding the variable on summoned horse from script should work too and should be easier

Witch is the script are you referring to?



#11
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

| X3_HORSE_MOUNT_SPEED | Float | The mount speed inscrease or decrease that should be used with this mount |

 

If the value is 0 then it will use the default value 50 (meaning 50% faster). Valid range is -150 to +50. Out-of-range values are reset to those limits. The Bioware documentation which states that the default is 99 is incorrect.

Is the default speed 0 or 50?



#12
Shadooow

Shadooow
  • Members
  • 4 465 messages

What script are you referring to?

x3_s3_palmount

 

line 64: oMount=HorseSummonPaladinMount(bPHBDuration);

 

then SetLocalInt(oMount,"X3_HORSE_MOUNT_SPEED",X);

 

untested, neither I know how the variable Proleric point out work and what is value you need to input.


  • WhiteTiger aime ceci

#13
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

x3_s3_palmount

 

line 64: oMount=HorseSummonPaladinMount(bPHBDuration);

 

then SetLocalInt(oMount,"X3_HORSE_MOUNT_SPEED",X);

 

untested, neither I know how the variable Proleric point out work and what is value you need to input.

 

I saved with SetLocalFloat(oMount, "X3_HORSE_MOUNT_SPEED", -150.0); (line 65) in the file x3_s3_palmount, but doesn't worked too =/



#14
WhiZard

WhiZard
  • Members
  • 1 204 messages

Is the default speed 0 or 50?

 

Documentation seems wrong on both the lexicon and BioWare.

 

1) The variable you are setting is bounded by a minimum of -100 and a maximum of +50.

2) The variable represents the speed increase as a percentage (e.g. setting a value of +25 will cause the horse to move 25% faster than the base creature speed (mounted appearances move at the "fast" speed). A value of -25 will cause the mount to move at 75% the base creature speed (75% is 25 short of 100%).

3) If the variable is not set the game will assign a value of +50 for the speed increase, so an unset mount will get the maximum speed benefit.

4) Monk and barbarian levels can reduce the speed bonus, but with the bug of speed stacking this will still allow them to move faster than other classes without the speed feat.

5) There is a hardcoded cap on movement speed effects at 50% faster than the base speed.


  • Shadooow et WhiteTiger aiment ceci

#15
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

Documentation seems wrong on both the lexicon and BioWare.

 

1) The variable you are setting is bounded by a minimum of -100 and a maximum of +50.

2) The variable represents the speed increase as a percentage (e.g. setting a value of +25 will cause the horse to move 25% faster than the base creature speed (mounted appearances move at the "fast" speed). A value of -25 will cause the mount to move at 75% the base creature speed (75% is 25 short of 100%).

3) If the variable is not set the game will assign a value of +50 for the speed increase, so an unset mount will get the maximum speed benefit.

4) Monk and barbarian levels can reduce the speed bonus, but with the bug of speed stacking this will still allow them to move faster than other classes without the speed feat.

5) There is a hardcoded cap on movement speed effects at 50% faster than the base speed.

 

How to set the variable?

 

//EDITED

I am going to test this new data when I arrive home, and, then, tell you if it works.


Modifié par WhiteTiger, 06 mai 2014 - 04:51 .


#16
WhiZard

WhiZard
  • Members
  • 1 204 messages

I saved with SetLocalFloat(oMount, "X3_HORSE_MOUNT_SPEED", -150.0); (line 65) in the file x3_s3_palmount, but doesn't worked too =/

 

This is your problem.  The lexicon incorrectly identifies the variable as a float, when it is an integer.  The variable needs to be set as an integer otherwise the game will not recognize the variable.


  • WhiteTiger aime ceci

#17
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

The lexicon incorrectly identifies the variable as a float, when it is an integer.  The variable needs to be set as an integer otherwise the game will not recognize the variable.

 
This doesn't work too. I just set the variable X3_HORSE_MOUNT_SPEED as an integer by two ways (compiling the script and also editting the utc file).  :( 



#18
WhiZard

WhiZard
  • Members
  • 1 204 messages

Okay, I've looked more in depth at this. Without editing includes and recompiling, the paladin script has no way of assigning the variable before it is used to give the horse the speed increase.  Looking at your work on the .utc file, it appears you were trying to set a nameless string on the horse with the value "X3_HORSE_MOUNT_SPEED" and then successfully managed to set a float with the name "X3_HORSE_MOUNT_SPEED" and the value -150.0.  To have this on the horse creature you will need to set it as an integer with the name "X3_HORSE_MOUNT_SPEED" (probably drop the quotes) and the value of something like -50 (this gets the horse moving at half base speed).

 

EDIT: actually if you inserted the variable setting between lines 64 and 65 like so:

 

        if (GetStringLength(sSummonScript)<1)
        { // no summon paladin mount override
            oMount=HorseSummonPaladinMount(bPHBDuration);

            SetLocalInt(oMount, "X3_HORSE_MOUNT_SPEED", -50);
        } // no summon paladin mount override

 

this should work.

 

Wait a minute, that was Shadooow's suggestion.  Well if the script isn't working try the blueprint fix.


  • WhiteTiger aime ceci

#19
Proleric

Proleric
  • Members
  • 2 345 messages
@WhiteTiger - Can you post your script?

I'm fairly sure the speed increase works, provided you have the horse system configured as shown in the Lexicon. I don't have access to the toolset right now to check the Paladin specifics.

How are you measuring success?

P.S. It is a local int. Float is a typo in the Lexicon, so is -150, but I don't have edit access.

Modifié par Proleric, 06 mai 2014 - 10:29 .

  • WhiteTiger aime ceci

#20
Proleric

Proleric
  • Members
  • 2 345 messages
Incidentally, values less than zero will make the horse slower than walking...

60% of the total horse speed is also slower (60% of 150% is only 90%).

If you want 60% of the speed increase, the parameter value is 30 (60% of the default 50%).

Thinking about it, the movement speed variation between levels will not be very significant, unless you break the 50% upper limit using my CCC method mentioned above.

Modifié par Proleric, 06 mai 2014 - 10:45 .

  • WhiteTiger aime ceci

#21
WhiZard

WhiZard
  • Members
  • 1 204 messages

Correct, -100 multiplies speed by zero (thus you move at the minimum speed of 12.5% base with the addition of monk or barbarian speed bonuses).  -50 is half base speed, -25 is three quarters base speed, and 0 is base speed (although don't use this value with horses as it will be interpreted as an unset variable and 50 will be used instead).  The speed effects are multiplication, with the increase allowed to go negative to bypass immunities.


Modifié par WhiZard, 06 mai 2014 - 10:49 .

  • WhiteTiger aime ceci

#22
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

I'm not setting to horse walk about -150% speed, this is just my test. Lately I was testing with the value -40, but my horse is faster than ever. 

 

x3_s3_palmont

//::///////////////////////////////////////////////
//:: Summon Paladin Mount
//:: x3_s3_palmount
//:: Copyright (c) 2008 Bioware Corp.
//:://////////////////////////////////////////////
/*
     This script handles the summoning of the paladin mount.
*/
//:://////////////////////////////////////////////
//:: Created By: Deva B. Winblood
//:: Created On: 2007-18-12
//:: Last Update: March 29th, 2008
//:://////////////////////////////////////////////

/*
    On the module object set X3_HORSE_PALADIN_USE_PHB to 1 as an integer
    variable if you want the duration to match that found in the 3.5 edition
    version of the Player's Handbook.

*/

#include "x3_inc_horse"

void main()
{
    object oPC=OBJECT_SELF;
    object oMount;
    int bPHBDuration=GetLocalInt(GetModule(),"X3_HORSE_PALADIN_USE_PHB");
    int bNoMounts=FALSE;
    string sSummonScript;
    object oAreaTarget=GetArea(oPC); // used for mount restriction checking

    if (!GetLocalInt(oAreaTarget,"X3_MOUNT_OK_EXCEPTION"))
    { // check for global restrictions
        if (GetLocalInt(GetModule(),"X3_MOUNTS_EXTERNAL_ONLY")&&GetIsAreaInterior(oAreaTarget)) bNoMounts=TRUE;
        else if (GetLocalInt(GetModule(),"X3_MOUNTS_NO_UNDERGROUND")&&!GetIsAreaAboveGround(oAreaTarget)) bNoMounts=TRUE;
    } // check for global restrictions

    if (GetLocalInt(GetArea(oPC),"X3_NO_HORSES")||bNoMounts)
    { // no horses allowed in the area
        DelayCommand(1.0,IncrementRemainingFeatUses(oPC,FEAT_PALADIN_SUMMON_MOUNT));
        FloatingTextStrRefOnCreature(111986,oPC,FALSE);
        return;
    } // no horses allowed in the area

    if (GetSpellId()==SPELL_PALADIN_SUMMON_MOUNT)
    { // Paladin Mount Summon
        oMount=HorseGetPaladinMount(oPC);
        if (!GetIsObjectValid(oMount)) oMount=GetLocalObject(oPC,"oX3PaladinMount");
        if (GetIsObjectValid(oMount))
        { // mount already exists
            if (GetIsPC(oPC))
            { // send messages
                if (oMount==oPC) FloatingTextStrRefOnCreature(111987,oPC,FALSE);
                else { FloatingTextStrRefOnCreature(111988,oPC,FALSE); }
            } // send messages
            DelayCommand(1.0,IncrementRemainingFeatUses(oPC,FEAT_PALADIN_SUMMON_MOUNT));
            return;
        } // mount already exists
        sSummonScript=GetLocalString(GetModule(),"X3_PALMOUNT_SUMMONOVR");
        if (GetStringLength(GetLocalString(oPC,"X3_PALMOUNT_SUMMONOVR"))>0) sSummonScript=GetLocalString(oPC,"X3_PALMOUNT_SUMMONOVR");
        if (GetStringLength(sSummonScript)<1)
        { // no summon paladin mount override
            oMount=HorseSummonPaladinMount(bPHBDuration);
            SetLocalInt(oMount, "X3_HORSE_MOUNT_SPEED", -40);
        } // no summon paladin mount override
        else
        { // execute summon script
            ExecuteScript(sSummonScript,oPC);
        } // execute summon script
    } // Paladin Mount Summon
}


#23
WhiZard

WhiZard
  • Members
  • 1 204 messages

WhiteTiger,

 

Could you post your creaturespeed.2da contents.  I am specifically looking for the line labeled "FAST".

 

The normal values for this line are a WALKRATE of 2.25 and a RUNRATE of 4.50.


Modifié par WhiZard, 06 mai 2014 - 11:08 .


#24
Proleric

Proleric
  • Members
  • 2 345 messages
@WhiteTiger - Does dm_dumplocals in game show that the variable is set on the horse?

If not, try a 2 second delay (or queued action) on SetLocalInt. I don't have access to the horse scripts right now, but typically they involve actions / delays which might undo your setting.

The speed increase applies to the Paladin, after mounting.
  • WhiteTiger aime ceci

#25
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

If you want 60% of the speed increase, the parameter value is 30 (60% of the default 50.

 

Exactly. The value 30 you said is for the first horse.

 

Up to 50

 

Level 5: 30

Level 8: 32

Level 11: 35

Level 15: 38

Level 25: 50

Level 30: 50

Level 35, 40: 50

 

Maybe 30 is too much for level 5, I'm rethinking about