Author Topic: How to change the Paladin Horse Speed?  (Read 983 times)

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #15 on: May 06, 2014, 05:38:49 pm »


               


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.


               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #16 on: May 06, 2014, 07:11:42 pm »


               

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).  '<img'> 



               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #17 on: May 06, 2014, 11:04:14 pm »


               

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.



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #18 on: May 06, 2014, 11:19:00 pm »


               @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 .
                     
                  


            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #19 on: May 06, 2014, 11:32:57 pm »


               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 .
                     
                  


            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #20 on: May 06, 2014, 11:44:06 pm »


               

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 .
                     
                  


            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #21 on: May 06, 2014, 11:49:38 pm »


               

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
}

               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #22 on: May 07, 2014, 12:00:35 am »


               

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 .
                     
                  


            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #23 on: May 07, 2014, 12:42:49 am »


               @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.
               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #24 on: May 07, 2014, 01:12:30 am »


               


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



               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #25 on: May 07, 2014, 04:32:28 am »


               


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.




 


done



if (GetStringLength(sSummonScript)<1)
        { // no summon paladin mount override
            oMount=HorseSummonPaladinMount(bPHBDuration);
            DelayCommand(2.0, SetLocalInt(oMount, "X3_HORSE_MOUNT_SPEED", -40));
        }

compiled and no changes in the horse speed =/



               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #26 on: May 07, 2014, 04:40:32 am »


               


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




 


Oh, we have not creaturespeed.2da custom. I'd like to say that the horse continues with the default speed (50) when I said "My horse is faster than ever"  '<img'>


               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #27 on: May 07, 2014, 05:43:54 am »


               


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.




 


yes, it was Shadooow's suggestion. thank you for correcting me.  I changed it to float because it's saying on the lexicon that X3_HORSE_MOUNT_SPEED variable is float.


 


//DelayCommand(2.0, SetLocalInt(oMount, "X3_HORSE_MOUNT_SPEED", -40)); //disabled for blueprinting solution


 



 Well if the script isn't working try the blueprint fix.



 


 


Edit6.png


 


does not work


 


//////////////////////////////////////////////////////////////////////////////


//Edited


//////////////////////////////////////////////////////////////////////////////


Also with the value -50 we got the same


 


Edit7.png


 


Note: Surely dropped in the override folder and PC is "4 < PalLevel < 8".


 


//////////////////////////////////////////////////////////////////////////////



               
               

               


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


            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #28 on: May 07, 2014, 06:00:15 pm »


               

Has someone changed the horse speed or only am I unable to do?



               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
How to change the Paladin Horse Speed?
« Reply #29 on: May 07, 2014, 08:34:45 pm »


               

Is the paladin doing the summoning already hasted? I haven't looked at the relevant code, but if it uses the function I think it does, there's probably a stacking issue with haste.


 


Funky