Me:SetVelocity in anomaly

ThyQ

Member
Hi
I am experiencing a problem in using Me:SetVelocity.
Ship scans the anomaly, makes a bookmark of anomaly, warps to it in certain range, then start aligning to safespot. It should set velocity of ship to certain percent from MaxVelocity but it doesn't.
Here is the script:

Code:
if ${Entity["Cosmic Anomaly"].Distance} < ${Config.Coords.RangeToAlignFromCenterOfAnomaly}
                    {
                        if !${Aligning}                         {
                            Entity["${Config.Coords.AlignText}"]:Align
                            This.Aligning:Set[TRUE]
                            variable int CoordSpeedPCT = ${Config.Coords.AlignSpeedPCT}
                            Me:SetVelocity[${CoordSpeedPCT}] 
                            UI:UpdateConsole["Aligning to ${Config.Coords.AlignText} current speed set to : ${CoordSpeedPCT} %"] 
                        }
                    }
Where :
${Config.Coords.AlignText} is bookmark of SafeSpot which i am aligning to
${Config.Coords.AlignSpeedPCT} (varies between 1 -100) in evebotgui i can change this variable instead of getting into the script or change it dynamically in the script itself ( i even tried to give it directly to Me:SetVelocity ) but it seems like it ignores the variable and doesn't change the speed of alignment. This function is called just once yet in fight function of ratter it checks if ship should align or not, using ${Aligning} variable. Sometimes it doesn't ignore the AlignSpeedPCT, but i really can't see the reason when it is ignored. For example it works fine if i restart eve completely until first rewarp (e.g. neutral entering the Solar System) after that if i rerun evebot it still ignores that variable.
It aligns perfectly except the speed, so my ship always fly faster than NPC Battleships and get out of range.
What am i doing wrong?
Please help.
P.S: UI:UpdateConsole["Aligning to ${Config.Coords.AlignText} current speed set to : ${CoordSpeedPCT} %"] gives me corret result of ${CoordSpeedPCT} perfectly as well (returns the correct number)
 
Last edited by a moderator:

CyberTech

Second-in-Command
Staff member
Sometimes it doesn't ignore the AlignSpeedPCT, but i really can't see the reason when it is ignored. For example it works fine if i restart eve completely until first rewarp (e.g. neutral entering the Solar System) after that if i rerun evebot it still ignores that variable.
I can't help debug private EVEBot mods, as my psychic powers were damaged in a fight with an 11-dimensional warthog. It sounds to me like you have a bug in some portion of your modification.
 

ThyQ

Member
At least an advise where to look?

I can't help debug private EVEBot mods, as my psychic powers were damaged in a fight with an 11-dimensional warthog. It sounds to me like you have a bug in some portion of your modification.
At least an advise how to debug it. Please
I really have no idea how to track it or where Me:SetVelocity interrupts/changes
It is called just once each time when ship warped into anomaly. (to bookmark)
I just can't get it even logically how can it start aligning without setting Velocity as bth are in same function.
Code:
function AlignTo()
{
        if ${Config.Coords.AlignManeuvering}
        {
            if ${Align}
            {
                    if ${Entity["Cosmic Anomaly"].Distance} < ${Config.Coords.RangeToAlignFromCenterOfAnomaly}
                    {
                        if !${Aligning} 
                        {
                            Entity["${Config.Coords.AlignText}"]:Align
                            This.Aligning:Set[TRUE]
                            variable int CoordSpeedPCT = ${Config.Coords.AlignSpeedPCT}
                            Me:SetVelocity[${CoordSpeedPCT}] 
                            UI:UpdateConsole["Align Maneuvering is ON - Aligning to ${Config.Coords.AlignText} current speed set to : ${CoordSpeedPCT} %"] 
                        }
                    }
                    else
                    {
                        if ${Aligning}
                        {
                            UI:UpdateConsole["Distance to Cosmic Anomaly more then ${Config.Coords.RangeToAlignFromCenterOfAnomaly} ShipStop"] 
                            Aligning:Set[FALSE]
                            EVE:Execute[CmdStopShip]
                        }
                    }
            }
        }
 
Last edited by a moderator:

CyberTech

Second-in-Command
Staff member
At least an advise how to debug it. Please
I really have no idea how to track it or where Me:SetVelocity interrupts/changes
That one's easy. I checked my source for EVEBot, and Me:SetVelocity isn't called. :halo:
 

ThyQ

Member
It's probably the fact you're calling align and setvelocity in the same frame.
This script is based on Ratter ProcessState algorythm and uses same Evebot.iss ( i didn't make any changes in it )

*crashing my head on table*

If i understand correctly this should fix this, but it didn't:

if ${Entity["Cosmic Anomaly"].Distance} < ${Config.Coords.RangeToAlignFromCenterOfAnomaly}
{
if !${Aligning} /* || ${Me.ToEntity.Velocity} < ${Math.Calc[${Me.ToEntity.MaxVelocity} * 0.7]} */
{
Entity["${Config.Coords.AlignText}"]:Align
This.Aligning:Set[TRUE]
variable int CoordSpeedPCT = ${Config.Coords.AlignSpeedPCT}
waitframe
Me:SetVelocity[${CoordSpeedPCT}]
UI:UpdateConsole["Align Maneuvering is ON - Aligning to ${Config.Coords.AlignText} current speed set to : ${CoordSpeedPCT} %"]
}
}
 
Last edited:

ThyQ

Member
May be SetVelocity method contains of something special in it? can someone help with more info about that method how it works? what might be the problem?
It works only when game is loaded first time, until it is called again. It aligns always when needed, but speed doesn't change after rewarps (on low tank, cap, when social is not safe). even restarting evebot doesn't help. Only after i reload whole game >>> ext isxeve >>> run bot/evebot then it works perfect until we need to warp out.

i can't insert any catch message inside this method as i don't have possibility to enter that method. to see its' inner side. The script. Like: "SetVelocity Called" to see when and where it changes.
 
Last edited:

ThyQ

Member
At least tell me the command and i will study it. Just i don't know how SetVelocity works inside, please any other way to change velocity of ship?
For exaple to set fixed speed
 
Last edited:

tinyromeo

Active Member
I have a couple theories for you since I cannot stand your anguish anymore... I can't guarantee a magical fix, but this is how I would approach the situation.
I see you used Cyber's first suggestion with the waitframe, but you may have taken it to literally, try extending the wait, "wait 1", or even better "wait 10".
Second you can always debug using the echo command i.e.
Code:
 echo "${Me.ToEntity.Velocity} < ${Math.Calc[${Me.ToEntity.MaxVelocity} * 0.7]}"
will allow you to compare any variables or conditions you feel may not be checking correctly, just make sure you have the console open to read what it has to say.
Next try using a static number for the velocity and see if you are entering numbers correctly, so instead of
Code:
Me:SetVelocity[${CoordSpeedPCT}]
try out
Code:
Me:SetVelocity[70]
, or
Code:
Me:SetVelocity[0.7]
or whatever numbers you can think to represent your 70% instead of using a variable that may or may not contain the correct number.
Finally, when all else fails you can use the dirty little tricks I like in my own personal scripts.
Code:
Mouse:SetPosition[x,y]
Mouse:LeftClick
Which you can make manually set the velocity by clicking on your speed bar.
And come to think of it I think there is a decrease speed keybind in EVE, so you could just use
Code:
Keyboard:Press[A]
or whatever key it is instead of A.
When I get more time maybe I will play around with SetVelocity, but I honestly have no clue why it would be necessary ANYWHERE.
So my final suggestion to you would be to not get to hung up on a slower ship when the main goal is to align or approach, both of which work just fine at 100% velocity. I have banged my head off of too many walls trying to get something neat to work, when the main point already works.
 

ThyQ

Member
Thank you!
I just forgot that i can click on any place >.<
everything else i already tried. I usually track everything with messages as well. will wait till it'll be clear with SetVelocity about how it works but now i will have to use clicker.
 
Top Bottom