Request: an easier way to implement paths (no idea whether this is even possible)
-
Lady}{Diamond wrote:
Not a fan of FL Explorer but this one do the job with the paths. If I remember well, take care if you use it, it can screw up the solar system ini file, so, just copy/paste the slice of text you need.Or do it manually, so good luck, you’re a courageous one
That isn’t so much courageous , but a huge pile of work for little result. I occasionally made some manually. My grasp of math is fairly basic, so I have to keep notes of the begin and end locations in some file, use Pythagoras’ Theorem to calculate the length, similar to how I do Trade Lane traffic zones. And I even use the Trade Lane Calculator to render the angle. But it is much boring work for little gain.
In general it makes more sense to just use Adoxa’s tlfail plugin and make sure that there are likely to be some pirates roaming the area when a trade lane is interrupted. But at the moment I am working with building new systems from existing systems (e.g. mirroring them, enlarging them and replace the entire factions’ context with another one, e.g. Liberty with Rheinland). Occasionally a path will have to go (especially when you enlarge a system, so for the sake of continuity it’d be nice to get some other patrol path instead.
-
You can calculate manually and use whatever theorem you want to, i’d die of boredom doing it that way. Takes a few minutes in FL Explorer and you’re done. You must however understand a bit about patrol paths for them to work properly. I’ve made hundreds of patrol paths with FLE, all work, no crashes, but you must pay attention when making them.
Have a read of Buck Danny’s awesome tutorial, pretty much all you’ll ever need to know about encounters, including patrol paths
-
Thanks. I actually do think that I know how they work though and why they can cause crashes etc. (and I do think that this tutorial, and other posts at the older Lancers Reactor and here helped a lot with that, so kudos to all those folks who figured it out!).
That isn’t the issue; I’ve just grown used to working with xml files. I suppose I could make paths with such an editor and copy to code over to my work file, but iirc there were issues with each and every graphical System designers that were published.
-
adoxa wrote:
Where would I find the Trade Lane Calculator?In your inbox (provided you still use the same email address).
-
Got it, thanks. I’m still not sure if I should do this, though. If I did I’m thinking given [c]pos_begin[/c] and [c]pos_end[/c] a plugin could generate [c]pos[/c] and [c]rotate[/c]; I think with [c]CYLINDER[/c] it could generate the second [c]size[/c], too (i.e. the distance between the points). I might whip something up, if you’re willing to do all the testing…
-
adoxa wrote:
Got it, thanks. I’m still not sure if I should do this, though. If I did I’m thinking given [c]pos_begin[/c] and [c]pos_end[/c] a plugin could generate [c]pos[/c] and [c]rotate[/c]; I think with [c]CYLINDER[/c] it could generate the second [c]size[/c], too (i.e. the distance between the points). I might whip something up, if you’re willing to do all the testing…Are you’re thinking about a standalone tool like the Trade Lane Calculator, that generates the position, rotation and length values for (one leg of) a path? That might be even better probably because the star system .ini files would remain ‘orthodox’?
Of course, I’d be willing to do the testing (provided I can fit it into my working method, because after all those years, it’d be counterintuitive to do it otherwise).
-
Pretty sure adoxa means a plugin that just does a preprocessing pass to the INIs as they’re read by Freelancer. You’d just be able to use pos_begin and pos_end directly in the INIs.
-
A standalone tool would have the advantage of working should the plugin go astray, but a plugin is presumably what you’re really after, and what I’ve done. It will add [c]pos_begin[/c] and [c]pos_end[/c] to [c][Zone] shape = CYLINDER[/c] (they’ll be ignored with other shapes). You don’t even need [c]pos_begin[/c], as it’ll automatically use the previous [c]pos_end[/c]; [c]shape[/c] will automatically use [c]CYLINDER[/c]; and [c]size[/c] will automatically use the previous value (or [c]750[/c]). I’ve done basic testing, roughly converting [c]Zone_Li01_path_navy6_{4,5,6}[/c]:
Before:
pos = 77275, 0, -29852 rotate = -90, -70, 0 shape = CYLINDER size = 750, 8972 pos = 90291, 0, -26487 rotate = 90, -60, 180 shape = CYLINDER size = 750, 19834 pos = 101756, 0, -9864 rotate = 90, -13, 180 shape = CYLINDER size = 750, 23794
After:
pos_begin = 73000, 0, -28000 pos_end = 81000, 0, -32000 pos_end = 99000, 0, -21000 pos_end = 104000, 0, 1500
Have fun…
-
FriendlyFire wrote:
Pretty sure adoxa means a plugin that just does a preprocessing pass to the INIs as they’re read by Freelancer. You’d just be able to use pos_begin and pos_end directly in the INIs.Thanks. That was the original proposal, but a fairly uneducated one I must admit; I actually doubted whether it’d be possible at all!
-
adoxa wrote:
Have fun…
Hey thanks a million!! As always I’m baffled to see how you are able to change seemingly every aspect of the game with a plugin!
It’ll have to wait to (hopefully) this evening (on my part of the globe); got a family event today.
Btw I couldn’t submit my previous message (wrote that before I went to sleep).
adoxa wrote:
converting
It’s not necessary to convert all the vanilla paths into the new format, I hope? :lol: Oh well, I’ll see that (hopefully) tonight.
-
First test.
I’m getting an almost, but not quite, perfect result, and the oddness of where it is not perfect, baffles me:
It would have made more sense to me if all the paths would have their angle mirrored (because that is what seems to be wrong with the 2nd leg), not just one of them.
This is the code (and I also tried with adding a [c]pos_begin[/c] to every leg, which rendered the same result, and with and without CYLINDER in leg 2, 3 an 4) :
[zone] nickname = Zone_Br07_xpath_mollys9_1 shape = CYLINDER size = 750 ;--------------------------------LD-4 pos_begin = 29834, 0, -47360 pos_end = 71125, 0, 3996 ;--------------------------------TLR_47 attack_ids = br07_4 tradelane_attack = 15 sort = 99 toughness = 13 density = 3 repop_time = 90 max_battle_size = 4 pop_type = attack_patrol relief_time = 30 path_label = mollys9, 1 usage = patrol mission_eligible = True faction_weight = fc_m_grp, 10 density_restriction = 1, patroller density_restriction = 1, police_patroller density_restriction = 1, pirate_patroller density_restriction = 4, lawfuls density_restriction = 4, unlawfuls encounter = patrolp_assault, 13, 0.290000 faction = fc_m_grp, 1.000000 visit = 1 [zone] nickname = Zone_Br07_xpath_mollys9_2 shape = CYLINDER size = 750 pos_end = 60000, 0, 9800 attack_ids = br07_4 tradelane_attack = 15 sort = 99 toughness = 13 density = 3 repop_time = 90 max_battle_size = 4 pop_type = attack_patrol relief_time = 30 path_label = mollys9, 2 usage = patrol mission_eligible = True faction_weight = fc_m_grp, 10 density_restriction = 1, patroller density_restriction = 1, police_patroller density_restriction = 1, pirate_patroller density_restriction = 4, lawfuls density_restriction = 4, unlawfuls encounter = patrolp_assault, 13, 0.290000 faction = fc_m_grp, 1.000000 visit = 1 [zone] nickname = Zone_Br07_xpath_mollys9_3 shape = CYLINDER size = 750 pos_end = 61500, 0, 15500 ;--------------------------------TLR_45 attack_ids = br07_4 tradelane_attack = 15 sort = 99 toughness = 13 density = 3 repop_time = 90 max_battle_size = 4 pop_type = attack_patrol relief_time = 30 path_label = mollys9, 3 usage = patrol mission_eligible = True faction_weight = fc_m_grp, 10 density_restriction = 1, patroller density_restriction = 1, police_patroller density_restriction = 1, pirate_patroller density_restriction = 4, lawfuls density_restriction = 4, unlawfuls encounter = patrolp_assault, 13, 0.290000 faction = fc_m_grp, 1.000000 visit = 1 [zone] nickname = Zone_Br07_xpath_mollys9_4 shape = CYLINDER size = 750 pos_end = 79038, 0, 41800 ;--------------------------------Omega=3 Hole attack_ids = br07_4 tradelane_attack = 15 sort = 99 toughness = 13 density = 3 repop_time = 90 max_battle_size = 4 pop_type = attack_patrol relief_time = 30 path_label = mollys9, 4 usage = patrol mission_eligible = True faction_weight = fc_m_grp, 10 density_restriction = 1, patroller density_restriction = 1, police_patroller density_restriction = 1, pirate_patroller density_restriction = 4, lawfuls density_restriction = 4, unlawfuls encounter = patrolp_assault, 13, 0.290000 faction = fc_m_grp, 1.000000 visit = 1
(Btw the disconnected path does not cause a crash. That sounds good but it might actually mean there are now encounters at all. The whole thing is in a huge pop zone; I’ll turn that off in the next test so that I can be sure that any molly that I encounter, is generated by the path. But, that has less priority than reporting this.)
-
adoxa wrote:
Try swapping begin & end (sorry, I meant to mention that).I presume that you mean for the entire path?
On it… (and after that I gotta do some offline things as well (sucks)
-
That renders the first and last leg reversed, but leg 2 and 3 seem to be okay now…
EDIT: No, only leg 2 is okay now (leg 2 and 3 are small so it’s not apparent at first sight) so the results are exacyly opposed to the first test.
-
The paths seem to be in the proper position. So my layman’s assumption is that the issue is with how the angles are calculated. I find it odd that not all the angles are mirrored though…
Btw apparently tests 1 and 2 rendered the exact opposed angles in the paths.
-
Adoxa wait!!
Just noticed that a rotation value in one of the vanilla-style paths got mauled! Maybe that caused the issue!
EDIT, No it matters not. With the error in that vanilla-style-path* corrected, the path-new-style still has the same issie.
*I presume that that path just somehow inherited the value of its predecessor? (Although I once tried to see how much is inherited, and was disappointed.)