Discussion in 'Scripts (LavishScript)' started by Xeon, Jun 27, 2007.

  1. Xeon

    Xeon Active Member

    Messages:
    469
    This is a new thread to talk about how to map with VGCraftbot.

    Also talk about how VGCraftBot movement and bugs associated with all that.

    This is a post Spudman made on the old thread:


    3) VGcraftbot - LavNav mapping 101 - your map is broken down into 'spheres' and 'connections' amongst those spheres. When mapping mode is on it works like this, It checks if your current location is contained within a sphere, if it is, fine, if not it creates a new sphere based around your current loc and attaches it (connects it) to the last 'sphere' you were in. Connections are created anytime you move from one sphere to another and connections are created 2 way.

    3a) So what does this mean? It means to map an area nicely you should run across it from all directions. i.e. in a general area, run N/S around the area, then run E/W around the area to create cross connections of the sphere, then run diagonally SW/NE and SE/NW. This will create a nice 'mesh' of connection that happen in all different directions and help make your bot run paths more realistically.

    3b) The mapping doesnt' take into account jumping, etc. so basically don't do it. Keep a few feet away from fences and other obstacles so that spheres don't overlap them and then the bot thinks it can traverse them. NEVER jump over a fence in mapping mode, since it WILL connect spheres on both sides and think that it can walk right through it.

    3c) Pathing vs. moving to an object. There's actually 2 phases to pathing in vgcraftbot. 1st is navigating the map to get to the closest 'sphere' to a target, 2nd is getting within the 'target precision' of that target once you are close. This means you don't have to map right up next to a target. You can map close to it, such that there's no obstacles in your way to the target, then the 1st nav portion will get you 'close' then the 2nd nav portion will move you to the object.

    4) Doors/Tight spaces - This is where I really suggest you do #2. Then you can see when a new box has been added. Doors are a property of a given sphere.

    4a) When dealing with a door, first make sure you are connected to your 'mesh' by running around the area outside the door a little bit in mapping mode. Then align yourself with the door and move slowly toward it until you see the debug msg that a new box has been added. Once you see that the new box has been added, hit the add door button. This will add the 'door' property to the spheres. Now move slowly toward it some more and when you see another box added, hit the add door button again. Keep doing this to every new box that it adds while going through the door. What the script does is while traving spheres that have the 'door' attribute it spams the 'usedooretc' function of VG. So it's somewhat important to have all your spheres both leading into and away from the door to have the 'door' attribute (because connections are made both ways).

    4c) I would not map my way back through the door once I've got it mapped once. Personally, once I map a door I turn mapping mode off when i come back through it. This is because i want one and only one way to get through that door and that's the original way i went through the door. If I leave mapping mode on, it's possible it will add more spheres on the return trip and if i'm not paying attention those boxes won't have the door att.

    4d) Related to 4c, tight spaces. Sometimes crafting stations, etc. are locating in some pretty tight spots inside buildings, etc. I take a similar approach to these as i do to doors. I run one single path VERY SLOWLY through the tight spaces and then i turn mapping mode off. In tight spaces I don't want a big mesh of a map, I want essentially a straight line that he will follow every time. If I leave mapping mode on it can take the chance of adding unwanted spheres/paths that I don't want to have when having to a) go through a door to a building, then b) navigate sharp corners to c) get to a crafting station that's in a tiny cubbyhole. If even one connection is accidentally made through a wall, it will hose the bot. so run the path ONE TIME and turn mapping mode off, then go back to meshed area and turn it back on.
  2. Leopardfist

    Leopardfist Well-Known Member

    Messages:
    36
    This post does not have his #2 comments, and searching this forum I could not find his original post. Could someone place a link here or post the info in full?

    This post was very educational for me, as it helps me to understand a lot of the problems I am having. One question I would like to know is, ONCE we map an area, and have problems, how can we delete those map spheres and such? I never used debug to map, and reading this definitely made me believe it will be better.

    The reason I want to delete my current map spheres is that I have problems where my guy hangs on a corner, and no matter how many times I map thru that specific area, it doesnt get fixed. The specific area is an outpost on Qalia, east of Ahgram. The tent that has the stations has a doorway, but no door, and my guy hangs on the post right beside the mailbox when he is exitting the tent.

    Also, if I delete one characters map, but another character is mapped for that area, will it fix it or will I need to delete the maps for all characters?
  3. Xeon

    Xeon Active Member

    Messages:
    469
    #2 was just Turn on Debug

    All your characters share the "map" file, as there is only one for each Chunk.

    Just be careful then you are mapping in and out of the tent to stay in the middle of the path, farther away from the "problem pole" and you should be fine.

    I botted from level 20-40 at that outpost.
  4. spudman

    spudman Active Member

    Messages:
    186
    Xeon, did you implement the isMapping wasMapping suggestion in the newest version? Without that, turning mapping mode on and off is actually a bad thing! I'm still running .9999 myself. One of these days when I'm not so busy I hope to get updated and also update the mapping programs.
  5. Xeon

    Xeon Active Member

    Messages:
    469
    No, but I now do distance and Collision checks before connecting regions.

    Connected Regions can have no more than 10m distance between them and it also does a VG.CollisionCheck(From,To) and VG.CollisionCheck(To,From).
  6. milamber

    milamber Active Member

    Messages:
    72
    Could you elaborate on that?
    If I have a path and turn on mapping and after a while get withing 10m of one of the spheres that already exist - it automatically connects it?

    Is it wiser to start vgcraftbot and let it run along its path a while and then pause it and start mapping so that you actually continue from an existing sphere?
  7. Xeon

    Xeon Active Member

    Messages:
    469
    There is a function called ConnectOnMove that is always running. It checks to see if the CurrentSphere is different than the LastSphere, if so, then it calls a ShouldConnect function which checks for Collisions between the two center points. If there are none, then it checks distance. If the distance is less than 10m, then it connects them.

    So it only connects spheres when you leave one and enter another that does not already have a connection (and is closer than 10m and does not have a collision check).
  8. Smyrk

    Smyrk Active Member

    Messages:
    107
    Is this only when the Mapping Mode box is checked or is it truly all the time?
  9. Xeon

    Xeon Active Member

    Messages:
    469
    Both when the Mapping box is checked and when the bot is moving (under it's own power)

    The later is to map out the paths it takes when trying to catch moving task masters.
  10. Smyrk

    Smyrk Active Member

    Messages:
    107
    Excellent, thanks for the clarification.
  11. spudman

    spudman Active Member

    Messages:
    186
    Cool, glad to hear. I need to get up to date to see the latest functionality. So what happened with the CTNav stuff? Is it a no go now? And what was the reasoning behind going to sphere's vs boxes? Just out of curiosity.
  12. Xeon

    Xeon Active Member

    Messages:
    469
    Vicks 44? How long has it been since I said "Not going to fix any map/move stuff because I'm waiting for new code"?

    Boxes are sooo 5 minutes ago!

    No reason really, just that spheres seemed nice and round and since I'm using the center point as the move target, just seemed cleaner, as the defined area is... well, more defined :D

    Plus, this
    Code (Text):
    LNavRegion[${This.CurrentRegion}]:AddChild[sphere,"auto",-unique,100,${Me.X},${Me.Y},${Me.Z}]
     
    is much nicer looking than:
    Code (Text):
    ;LNavRegion[${This.CurrentRegion}]:AddChild[box,"auto",-unique,${Math.Calc[${Me.X}-100]},${Math.Calc[${Me.X}+100]}, ${Math.Calc[${Me.Y}-100]}, ${Math.Calc[${Me.Y}+100]}, ${Math.Calc[${Me.Z}-50]},${Math.Calc[${Me.Z}+100]}]
  13. Leopardfist

    Leopardfist Well-Known Member

    Messages:
    36
    Thanks Xeon. Can you tell me what the filename is that I could delete to reset my mapping? I don't need the exact filename, as it sounds like there is one for each chunk, but maybe just an example that I could use for search?
  14. Xeon

    Xeon Active Member

    Messages:
    469
    In your Innerspace\Scripts\VGCraft\VGPaths folder is where the XML map files are stored.
  15. spudman

    spudman Active Member

    Messages:
    186
    Craftbot Visual Mapper

    initial adjustment for new sphere mapping, let me know of problems

    Attached Files:

  16. Wassup

    Wassup Active Member

    Messages:
    10
    I tried this... other than the command button turning huge once you load the xml it seems to map fine, but not entirely sure what I should be seeing.
  17. spudman

    spudman Active Member

    Messages:
    186
    you're looking for connections that are 'strange'. the connections should generally only connect to spheres next to each other, not stretch over 3 other spheres to connect to another one. When you map an area you should get a general feel for how this map would overlay the area your mapping. now you said in the craftbot thread that you guy would always run toward the wall. Considering the code is set up to follow those circles and the lines connecting them, how is it going 'through' the wall? Are there connections, i.e. lines, going through what you would consider to be the walls that they are running into? If so, that's bad and could be your cause for issues. this is just an aid to help you see your 'hidden' map visually. that's all. The 'names' of the objects it creates, i.e. spheres and lines are named the same as in the .xml file, so if you see bad connections, etc. you can into the xml file and delete them.
  18. Wassup

    Wassup Active Member

    Messages:
    10
    I see many smaller green circles, a few blue circles which I assume are the door connections, 1 red circle, which I do not know what it may be, and 1 huge green circle which is 'behind' a large number of the other small circles, but not all of them.

    I do not see any connections from the sphere in the building to a sphere outside of the building at all. They all appear to be connected properly.
    Last edited: Nov 8, 2007
  19. spudman

    spudman Active Member

    Messages:
    186
    Wassup, a few things.

    First, i don't suggest you stay in martok long. not sure how faction works in cities since the faction bonus changes, but before outposts gave better faction and also WO's max out in cities earlier. Outposts are generally better.

    Second, please go to the beginning of this thread and read the first page of posts for details about how to map your area.

    Your Martok issue is several fold.

    vgcraftbot finds the nearest station irregardless of the one you actually selected, UNLESS it can't find 'any' station in it's range. Then it will go the location where you originally selected a station and find one from there. Because of this. You are starting your bot and it's selecting the 'nearest' workstation it can find. Your navigation map is so incomplete that it gets as close as it can to the station (which when i tested it was at the crafting supply vendor - because this is the closest point to the station that it found) and then tries to b-line to it from there, but there's a wall in the way. doh!

    If you are insistent on crafting in martok, delete your map file.

    - Start up vgcraftbot and you will be in mapping mode even if the check box isn't checked. Check it for sanity's sake. Start outside the suppliers house.

    - turn debug output on so you can see as it creates boxes.

    - there's only one door you need in martok, so do that last!

    - Start running around BOTH crafting houses - finishing and refining. Run near each and every crafting station, including the ones outside the suppliers house. Set the proper ones for your move tab. Just because you select a specific station doesn't mean it will use it. It will only use that specific station if it can't find a closer one. As you run around you should see it slapping navigation spheres down like crazy. HINT, there are 2 crafting stations right next to the suppliers house.

    - once you've traveled near each and every crafting station, go around to your different WO suppliers and select them on the move tab.

    - Now that you've done all of that go back to the suppliers house and do the door points going to him (see details in beginning of this thread). Select him on the move tab and then uncheck the mapping mode.

    Then click start. Should work. It's going to most likely find the crafting station right outside the suppliers house, but since you walked very close to those stations earlier, it should now find a better path to them and walk 'out' the house and around to the station.

    If you continue to have issues post what it's saying with debug on.
  20. spudman

    spudman Active Member

    Messages:
    186
    This pic should give you a better idea of what i'm talking about.

    Attached Files:

  21. Xeon

    Xeon Active Member

    Messages:
    469
    Damn Spudman, that is some nice mapping :D
  22. Bottingass999

    Bottingass999 Active Member

    Messages:
    14
    Bot was running well for almost 3h then this happened.

    http://video.google.com/videoplay?docid=6073269408645250044&hl=en

    02:09:58::VG: Called SupplyNeeded
    02:09:58::VG:recipe requires: Cleaner :: 40 :: 40
    02:09:58::VG:recipe requires: Softener :: 40 :: 40
    02:09:58::VG:recipe requires: Cleaner :: 40 :: 80
    02:09:58::VG:recipe requires: Softener :: 40 :: 80
    02:09:58::VG:recipe requires: Cleaner :: 40 :: 120
    02:09:58::VG:recipe requires: Softener :: 40 :: 120
    02:09:58::VG: SupplyNeeded should buy : Cleaner @ 252
    02:09:58::VG: Now moving to Supply NPC: Sondra Grayseal
    02:09:58::FindMoveTarget: Sondra Grayseal
    02:09:58::VG: FindMoveTarget: Pawn:Target(exists): Sondra Grayseal
    02:09:58::VG:MoveTargetPath called: Sondra Grayseal :: 335007449752
    02:09:58::bNav: X: -40808.000000 Y: 13016.000000 Z: 47696.777344
    02:09:58::bNav: Names: 597 :: 1553
    02:09:58::bNav:MovetoTargetName: Found Path to auto-4717F544-407.Southwatch with 4 hops from auto-46EA621B-123.Southwatch
    02:09:59::bNav: FastMove CheckCollision retured TRUE

    Attached Files:

    Last edited: Nov 25, 2007
  23. spudman

    spudman Active Member

    Messages:
    186
    Simple reason is because you have connections going all over the friggin place. How that happened, I don't know. Possibly by turning mapping mode on and off several times (perhaps while you paused it?) and moving a long distance while doing it. If/When you map it with the excel program, there should never be lines stretching more than once circle away. If there are, they are bad. If you look at your map there are several that go all over.

    A long time ago I posted a way around the turning mapping mode on and off. Afterward Xeon added collision check functionality instead. I don't trust the collision checking since it's not always 100%, which is part of the reason I run my own customized version.

    However, I don't see any case, where if you start a new map, run to all the places you need (stay a decent distance from fences, etc.), set up your workstation and npc options and then turn mapping off that it shouldn't work fine. I'll look at the code again at some point and see if there is anything that would 'add' connections, but I doubt it.

    If you did, NEVER jump a fence while in mapping mode. I don't think this is what happened, but it bears repeating. For that matter, never jump anything while mapping.

    Once again, i'll attach pictures as reference so you can see what I mean. swboxgood is showing my map of SW (ignore that it's boxes) and you'll see no lines jumping over gaping white space (unless is connecting a successive box) and they should all be connected in sequence. The swspherebad is the one you posted and it has several connections that cross a lot of white space (most likely through fences and other obstacles). The arrows I added are pointing to most likely bad connections. The red arrow is the connection that specifically was causing the problem in this case.

    Attached Files:

  24. spudman

    spudman Active Member

    Messages:
    186
    Don't assume that because it ran for 3 hours that the problem wasn't always there either. It could simply be a matter of your bot never finished a transaction with a taskmaster near that specific spot until after it ran for three hours. Before that it may have only dealt with your taskmaster at other places no where near the bad connection, hence it never would have used it until then. Usually in SW your coming form the open area near the wagon. At least in my experience you are.

    Personally I am not a proponent of full afk botting and to be 'stuck' for more than 8 minutes without 'noticing' that your guy was always in the same place, well... yeah.
  25. Bottingass999

    Bottingass999 Active Member

    Messages:
    14
    sw worked pretty well might just be a bad checkbox/map construction yeah, but for outfitters u ll have to map quite much there. And it also depends with what speed u are running. If u get buffed up with speed buffs or use other hacks increasing ur speed it might become stuck.

    No matter:)P i am warned now:)p i always hated southwatch in any way it just too flooded and crappy for bots:)
  26. spudman

    spudman Active Member

    Messages:
    186
    Sorry been away a bit as of late. Yes, you don't want speed buffs if at all possible. Pretty sure that's outlined in the notes for mapping somewhere. I've crafted all types of crafters at SW with my maps, so it can be done without problems. Now with crafting stations at some player housing areas and all the outposts available, the only problems i ran into in SW was that it ended up 'waiting for taskmaster to return' to often, but other than that it wasn't all that bad.

Share This Page