Path creation and editing question
Path creation and editing question
Ok, so createpath is a great tool for making a waypoint file. I've made many of them. What I'm wondering is if some sort of utility can be made that will run a bot through this new waypoint file step by step. At each step making it possible to adjust the coordinates of the current waypoint with a key press.
Example:
Someone has made a goblin mine waypoint. For some reason the height of the fly path ends up being too high to make it under some door frames/corridor supports. With this proposed utility, the person could go through the waypoint file (like during the createpath run), press keypad 1 to go to the next point in the path until the problem point is reached. Once the point that needs adjustment is reached, they can move to a new position, press keypad 2 and the problem point is now replaced with the new coordinates.
If I had the coding knowhow I would do this myself, but all I can do is come up with ideas.
**EDIT**
Possibly even have an option to insert new points between the current and previous points.
Example:
Someone has made a goblin mine waypoint. For some reason the height of the fly path ends up being too high to make it under some door frames/corridor supports. With this proposed utility, the person could go through the waypoint file (like during the createpath run), press keypad 1 to go to the next point in the path until the problem point is reached. Once the point that needs adjustment is reached, they can move to a new position, press keypad 2 and the problem point is now replaced with the new coordinates.
If I had the coding knowhow I would do this myself, but all I can do is come up with ideas.
**EDIT**
Possibly even have an option to insert new points between the current and previous points.
Scout/Knight/Rogue 70/66/66
Re: Path creation and editing question
It is deffinately possible, I can say that for sure.
I generally just edit the WP manually, if height is to high then I reduce the Y value, if I want to add in another waypoint then I just add it in.
If you were looking at doing it yourself I'll get you started.
to read the WP information such as coords and code and such you need the _filename and then do this.
So within the elements table you are looking at this for the code at a waypoint
for the coords you need this
So you could do this as a test
So that will print any code for the waypoint and the coords.
Well you get the idea anyway.
I generally just edit the WP manually, if height is to high then I reduce the Y value, if I want to add in another waypoint then I just add it in.
If you were looking at doing it yourself I'll get you started.
to read the WP information such as coords and code and such you need the _filename and then do this.
Code: Select all
local root = xml.open(getExecutionPath() .. "/waypoints/".._filename..".xml");
local elements = root:getElements();
for i,v in pairs(elements) do
Code: Select all
local action = v:getValue();
Code: Select all
local x,z,y = v:getAttribute("x"), v:getAttribute("z"), v:getAttribute("y");
Code: Select all
for i,v in pairs(elements) do
local action = v:getValue();
local x,z,y = v:getAttribute("x"), v:getAttribute("z"), v:getAttribute("y");
if action then print(action) end
print("X = "..x..", Z = "..z..", Y = "..y)
end
Well you get the idea anyway.
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Path creation and editing question
O... M... G... I so wish I had your coding talent Lisa. The problem is that you have more ability in the *tip* of your little finger than I ever will. I think this is the point at which I begin kowtowing and chanting "I'm not worthy!"
All I can do is stare at your response and blink a lot.
All I can do is stare at your response and blink a lot.
Scout/Knight/Rogue 70/66/66
Re: Path creation and editing question
Actually I just read that from the waypoint code, want to see example of my idea of coding =)
I use that to convert existing WP into a databse type file of the coords from the WP.
As to the task at hand, basically you would want to rewrite the file using new data that you input with your key presses.
At the end of the day I see that as being more work then just editing the WP manually.
Code: Select all
function convertWPtodatabase(_filename, _table)
if _table == nil then _table = true end
if _filename == nil then print("Need to assign WP name.") end
local root = xml.open(getExecutionPath() .. "/waypoints/".._filename..".xml");
local elements = root:getElements();
filename = getExecutionPath() .. "/database/".._filename..".xml";
file, err = io.open(filename, "w+");
if _table == true then
file:write(_filename.." = {\n")
else
file:write("<".._filename..">\n")
end
local stopnow = 0
for i,v in pairs(elements) do
local connum = 1
local linked = false
local connections
local _conn = false
local _stop = false
local action = v:getValue();
local x,z,y = v:getAttribute("x"), v:getAttribute("z"), v:getAttribute("y");
if _table == true then
file:write("\t["..(i).."]={ X="..x.." , Z="..z..", Y="..y..", Links={")
else
file:write("\t<Point Num="..i.." X=\""..x.."\" Z=\""..z.."\" Y=\""..y.."\" >\n")
end
if i ~= (stopnow + 1) then
if _table == true then
file:write("["..connum.."]={Num="..(i-1).."},")
connum = connum + 1
else
file:write("\t\t<Link Num="..(i-1).."> </Link>\n")
end
end
if action ~= nil then
if string.find(action, "add") then
_conn = true
end
if string.find(action, "stop") then
_stop = true
stopnow = i
end
end
if _stop ~= true then
if _table == true then
file:write("["..connum.."]={Num="..(i+1).."},")
connum = connum + 1
else
file:write("\t\t<Link Num="..(i+1).."> </Link>\n")
end
end
if _conn == true then
for t,d in pairs(elements) do
local action2 = d:getValue();
if t ~= i and action2 == action then
if _table == true then
file:write("["..connum.."]=Num="..t.."},")
connum = connum + 1
else
file:write("\t\t<Link Num="..t.."> </Link>\n")
linked = true
end
end
end
if linked == false and _table ~= true then
file:write("\t\t<Link Num=\"TBA "..action.."\"> </Link>\n")
end
end
if _table == true then
file:write("}},\n")
else
file:write("\t</Point>\n\n")
end
end
if _table == true then
file:write("}")
else
file:write("</".._filename..">\n")
end
file:close()
end
As to the task at hand, basically you would want to rewrite the file using new data that you input with your key presses.
At the end of the day I see that as being more work then just editing the WP manually.
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Path creation and editing question
I usually load a file into excel and create a scatter chart to visualise the path so I can pick the right point to edit. You have to be a bit excel savy to do it though.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Path creation and editing question
I've never used Excel in my life.
Anywhere you can point me for a tutorial or something?
Anywhere you can point me for a tutorial or something?
Scout/Knight/Rogue 70/66/66
Re: Path creation and editing question
I'm tempted to do a vid myself but have never done one before. Not sure how to go about it.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Path creation and editing question
The easiest way I can think of is FRAPS. Either that or Camtasia Studio.
Scout/Knight/Rogue 70/66/66
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest