KillBait / AutoDrive_Course_Editor

A java based course editor for the AutoDrive mod, works with both the FS19 + FS22 versions of the mod
73 stars 13 forks source link

Load xml from "routes" folder directly (FS22) #19

Closed Big-Fool closed 2 years ago

Big-Fool commented 2 years ago

For FS22 route editing, is that possible to initialize load point coordinates .xml file from "Autodrive" folder "\autoDrive\routesManager\routes", instead of loading "AutoDrive_config.xml", Because I use your tool (I love it, thank you!) to edit grape/olive working routes, have to restart the game again and again and again to revise/modify points...

"Autodrive" will only save "AutoDrive_config.xml" whilst game saving, and can only be reloaded by restart the game. Buy its route xml files can be keep updated and loaded anytime without restarting.

KillBait commented 2 years ago

I have to be honest, I didn't even know that was a feature in auto drive, I will take a look into it and see what can be done

Thanks for the suggestion

Big-Fool commented 2 years ago

Thank you for your response. And yes the routes manage feature of AD is very convenient, Lctrl+Lalt+Keypad0 to call it out, save/load routes anytime in game without force restarting, but note avoid to use the default route name "route1", it will mess up sometimes.

Big-Fool commented 2 years ago

Sorry my bad, now on gaming, it's Lctrl+Lalt+Keypad1 to call it out.

Mayk-CLP commented 2 years ago

this would be a very good feature and save a lot of time. I can´t remember how oft I restart the game for testing lol

KillBait commented 2 years ago

I have some encouraging news, i've managed to get the editor to load the network from a saved routes file ( but not the map markers yet), and saving it back to disk is another untested thing i havn't even looked at the yet.

Now comes the decision part, before i continue, there are two directions i can take this

(1) load/save the route directly

(2) Have the same type of manager window that AD has in-game

Option 1 is the quickest for me to implement, but, Option 2 is the most user friendly, but a longer time to impliment

Let me know your opinions.

Big-Fool commented 2 years ago

Thank you! Definitely encouraged news!

Personally I prefer the option(1) (load/save routes directly)

Because I think experienced users should capable of precisely locating the route xml (from that folder with bunch of weird file names) they're going to edit, no matter the beautiful UI or not.

For the CONS of option(1) , I'm wondering if it's possible to bypass the map selecting step (will be my personal activity only, not ask for features), by just dump a map.png to the folder where keeping those routes xlm files, since one FS22 save folder is for one specified map only.

Thanks again!

KillBait commented 2 years ago

what i have working at the moment is, directly load the route xlm through a filechooser ( e.g. fdgdhhfghfg.xml ) and then it loads the routes.xml (from the autodrive folder) and cross references the filename against the entries in it to get the map name and then loads the config and map image. I know this is basically option 1, but i can re-use all of what i have done so far in option 2 also.

Big-Fool commented 2 years ago

Perfect solution, agree yes "routes.xlm" includes all cross references of weird file name + map name . Thank you!

KillBait commented 2 years ago

Sorry for the silence, I have loading and saving of the routes XML working but I've run into a weird issue where AD will crash sometimes on loading the config back into a map, I'm not 100% sure if it's an error on my end or something with AutoDrive

My new job is sucking almost all my time at the moment, but I'm still working on it a bit at a time

Big-Fool commented 2 years ago

Thank you for the following up information. Actually personal I think your tool is already fantastic enough, useable and stable and saved a lot of time when playing with AD.

Fyi, whilst FS22 game on the fly, I've tested many times to use routes SAVE/LOAD function with AD itself and no any crash happens, I also tested few times manually edit route xml (modify waypoints and markers by copy/paste from another route xml produced by TOOL or AD), and load back with AD, seems ok too. Thus I doubt the only glitch could be the TOOL saved route xml format pattern? (not sure, maybe a stupid doubt)

Anyway, I'm enjoy the TOOL, and real life is always important than farming, thanks again.

KillBait commented 2 years ago

Sorry for the lack of updates lately, RL is restricting my time to work on this.

That being said, i have made a lot of progress, but, it has taken a lot more time as i underestimated how long it would take to integrate the different route XML format into the editor and the amount of code changes that were needed.

The current state of my DEV version is i have the routes loading and saving directly and have added an extra option to load the routes.xml and select the route you want to edit from there ( for the ones less familiar with AD internal workings)

Screenshot 2022-01-30 142816

I'm just going through the code to check that i didn't miss anything and left some serious bugs lurking. Hopefully the full update will be out in the next week or so..

KillBait commented 2 years ago

I've released the update. It doesn't have the map image update it wanted to include in this release, but i wanted to get this out without a longer wait.

I've posted a roadmap in the issues section, that should give you an idea of what comes next.

Big-Fool commented 2 years ago

A quick feedback on v0.80.0, to me it's totally a new tool, Routes->Load (Save) RoutesManager XML works great, no need to restart FS22 to renew route anymore! Thank you!

But it always get a warning icon with message "Node Y invalid(-1)", when trying to manually create new node, I guess it's because of the heightmap missing, I understand next versions will engage with this, and it consequently leads my stupid question,

Where can I locate this HeightMap? (for instance, the FS22 Elmcreek one) sorry for ask.

Mayk-CLP commented 2 years ago

It´s in your Savegame Directory.