Reminder: Internet Explorer 6 or below are NOT supported.





There are currently 43 users playing Freelancer on
39 servers. | January. 19, 2021 |
The Starport Forum Index
>
The Shipyard
>
Speciality Modding
>
Request: an easier way to implement paths (no idea whether this is even possible)
Browsing this Thread:
1 Anonymous Users
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2010/2/22 0:47 Group:
Registered Users $$$ Supporters $$$ Senior Members
Posts:
928
![]() |
With
, flip added, the second leg of the path is properly connected now:![]() Code: [zone] Significant (to me at least) is that leg 1, 3 and 4 all go from upper-left to lower-right, while leg 2 (which was the one that was skrewed up in the first tests) goes from upper-right to lower-left. Btw As they now show up as they should, I think we can assume they are treated by the game as any other path encounter. So, whether or not ships show up, whether or not they actually attack Trade Lane Rings etc. is not something governed by ZonePos.dll and hence not relevant (Adoxa correct me if this assumption is wrong).
Posted on: 2018/12/4 14:37
|
|||
|
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2009/8/16 2:58 From Qld, Aus.
Group:
Registered Users FLServer Admins Trusted Speciality Developers Senior Members
Posts:
1958
![]() |
Quote: [...] A I could, but the VB6 decompilers I had didn't work, which is why I just changed the number. I've now got a new decompiler, so here's how to remove the visit line altogether: 2E74 12->00 77B9 0C->11 7C2A 0C->11 That replaces something like str += "visit = 1" + vbCRLF with str += "" + "" .Quote: Significant (to me at least) is that leg 1, 3 and 4 all go from upper-left to lower-right, while leg 2 (which was the one that was skrewed up in the first tests) goes from upper-right to lower-left. Attached is a new version which should flip automatically. To summarize usage: the first leg should define shape , size (first value), pos_begin and pos_end , whilst subsequent legs should only need pos_end . It may still need tweaking if there are any paths across the Y plane.
Posted on: 2018/12/5 2:12
|
|||
|
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2010/2/22 0:47 Group:
Registered Users $$$ Supporters $$$ Senior Members
Posts:
928
![]() |
Thanks!! It'll have to wait until late in the evening though.
Posted on: 2018/12/5 5:57
|
|||
![]() |
||||
|
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2009/8/16 2:58 From Qld, Aus.
Group:
Registered Users FLServer Admins Trusted Speciality Developers Senior Members
Posts:
1958
![]() |
There's a few more settings I could automatically duplicate: nickname (add 1), sort, toughness, density, repop_time, max_battle_size, pop_type, relief_time, path_label (add 1), usage, mission_eligible, density_restriction (multiple), encounter, faction (multiple). Alternatively, take the TLC approach and instead have a standalone utility that takes a few parameters and generates all the zones.
Posted on: 2018/12/5 6:16
|
|||
|
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2010/2/22 0:47 Group:
Registered Users $$$ Supporters $$$ Senior Members
Posts:
928
![]() |
Quote:
Both approaches would be great assets, I suppose. The first one (the extended / enhanced ZonePos) would have as advantage that it would make the creation of more complex systems, like the House Systems, exponentially more easy! It would become possible to, almost intuitively, alter the course of a patrol_path by changing a single set of coordinates! (One would almost be temped to re-write all the paths in the vanilla files according to this new ZonePos format, to create the ultimate SDK! But that'd be hard labour... Oh btw, would these new-style coordinates be parsed by RimShot's System Calculator?) The second one (the standalone 'TLC style' utility) would have as advantage that it would render 'orthodox' code, indistinguishable from the vanilla paths. As a layman I'd presume that, the less plugins, the better, to avoid possible conflicts; then again your plugins do not seem to trigger any conflict anyway, so this presumption might be baseless. A standalone tool would btw also have an unintended second function that the TLC lacks: it could be used to calculate a trade_lane's traffic zone. This isn't that difficult, but it takes some time doing it manually. A path calculator would be able to do that faster, and more accurately (although a trade_lane differs in several aspects from a typical patrol_path, the pos, rotate and size (length) work the same.)
Posted on: 2018/12/5 20:30
|
|||
|
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2010/2/22 0:47 Group:
Registered Users $$$ Supporters $$$ Senior Members
Posts:
928
![]() |
Quote:
The new version works fine, both without and with , flip added (I tested that to see whether that parameter could still be used. It didn't cause a crash but it also didn't do anything so I wonder if it would work when somehow the path would actually need to be flipped?)
Posted on: 2018/12/5 20:46
|
|||
|
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2010/2/22 0:47 Group:
Registered Users $$$ Supporters $$$ Senior Members
Posts:
928
![]() |
Posted on: 2018/12/5 20:50
|
|||
|
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2009/8/16 2:58 From Qld, Aus.
Group:
Registered Users FLServer Admins Trusted Speciality Developers Senior Members
Posts:
1958
![]() |
Quote: Oh btw, would these new-style coordinates be parsed by RimShot's System Calculator? That's a good point - none of the system readers (e.g. FLE, Studio) or ini error checkers would recognize them, so the standalone utility is probably the way to go. Bugger, I didn't really want to write one. Quote: [...] then again your plugins do not seem to trigger any conflict anyway, so this presumption might be baseless. Actually, I'm still amazed that there's only been one (known) conflict (EngClass & MultiCruise).
Posted on: 2018/12/6 1:15
|
|||
|
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2009/8/16 2:58 From Qld, Aus.
Group:
Registered Users FLServer Admins Trusted Speciality Developers Senior Members
Posts:
1958
![]() |
Quote: The new version works fine, both without and with Only the point is read, everything else is again ignored. It would, of course, be better to fix the generator rather than require manual flipping (it was uncertainty on my part that I did that). Oh, you might also want to check the direction is right (i.e. ships go from start to end, not end to start). Is there a better way of testing that than just waiting for a patrol to show up and join it? Or is direction implied by the sequence of paths?
Posted on: 2018/12/6 1:29
|
|||
|
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2010/2/22 0:47 Group:
Registered Users $$$ Supporters $$$ Senior Members
Posts:
928
![]() |
Quote:
Interesting question from the point of view of trying to understand the game engine, but of little practical consequence: there is no use tracing a ship from the start til the end of a path anyway. So, if the ships reverse midway, it has little consequence (unless the other legs aren't used because of it). A path imho should:
The ZonePos path that I'm using to test the plugin with, does all that, even it they would hypothetically be less functional than the vanilla paths, which they likely aren't anyway. I've always assumed that path-legs are bi-directional, mostly because it would be awfully inconvenient if they weren't; if there even is a preferred direction, I assume it would be governed by the order of the path legs as expressed in the path_label (e.g. path_label = mollys9, 1 , path_label = mollys9, 2 etc.), and not by an individual leg's rotation values. Theoretically we could test that by swapping a few labels inside a multi-legged vanilla path, but I have a bit of a hangover now and don't want to look at the game crashing ![]() In a broader sense, which of the following assumptions do think better describes an encounter / pop zone (they are almost but not quite identical)?
So, is the zone primarily a property of a certain area in the system that gets 'alive' by the player's ship approaching, or a condition of the player's ship being in a certain area? (Of course, these are hard to distinguish between, and I'm not even 100% sure whether I fully comprehend what I'm asking ![]()
Posted on: 2018/12/6 11:48
|
|||
|
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2009/8/16 2:58 From Qld, Aus.
Group:
Registered Users FLServer Admins Trusted Speciality Developers Senior Members
Posts:
1958
![]() |
Quote: I've always assumed that path-legs are bi-directional, mostly because it would be awfully inconvenient if they weren't [...] Yeah, makes sense. Quote: So, is the zone primarily a property of a certain area in the system that gets 'alive' by the player's ship approaching, or a condition of the player's ship being in a certain area? (Of course, these are hard to distinguish between, and I'm not even 100% sure whether I fully comprehend what I'm asking Sounds like you're asking is there traffic because of where you are or what you can see. A quick experiment suggests the former (from Manhattan I went 21K straight up, outside New York's NW ambient zone, and the traffic stopped). That makes sense, too, because where you are is a lot easier to test than what you can see.
Posted on: 2018/12/7 1:19
|
|||
|
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2010/2/22 0:47 Group:
Registered Users $$$ Supporters $$$ Senior Members
Posts:
928
![]() |
Quote:
Well... for me personally it wouldn't actually matter that much, because I mainly have used the System Calculator because creating paths was such a drag — which ZonePos has now fixed. To elaborate: On a few occasions I used an existing system as a basis for a new one. To make it look different enough, I changed its size with FLSysCalc, and semi-manually left-right-mirrored it. Then, I replaced the Faction constellation i.e. Rheinland Navy + Hessians with Bretonia Navy and Mollys. But now that paths can be generated a whole lot easier, this approach is now redundant. FLSysCalc might still be usable if all pos_begin and pos_end entries are changed into just pos? Each path would have two pos entries then; not sure whether one would be ignored? Also, afterwards all the _begin and _end suffices must be restored. The main error checker that I use is FLScan, mainly to eliminate those very obvious yet overlooked errors (e.g. missing base files, undefined archetypes and loadouts etc.) Afaik FLScan doesn't even check whether the legs of a path properly connect. So, no real loss here.
Posted on: 2018/12/8 10:04
|
|||
|
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2009/8/16 2:58 From Qld, Aus.
Group:
Registered Users FLServer Admins Trusted Speciality Developers Senior Members
Posts:
1958
![]() |
I should be able use two
pos values, if you like (although then you'd have to supply both, as there's now way to tell if begin is missing). There's also the option that having the plugin deliberately prevents the patrol paths from being read. Well, not really a big deal with paths, but if there was a similar trade lane plugin, it would hide those from things like Companion.I've had the thought of using a separate file, allowing all your custom patrol paths and trade lanes to be stored in a single file (per system), The tool would then take that file and generate the equivalent FL version, which you would then (manually, possibly automatically) insert into the system file.
Posted on: 2018/12/8 14:58
|
|||
|
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2010/2/22 0:47 Group:
Registered Users $$$ Supporters $$$ Senior Members
Posts:
928
![]() |
Quote:
Sounds great, I suppose, but I do not fully comprehend.
Posted on: 2018/12/9 0:08
|
|||
|
Re: Request: an easier way to implement paths (no idea whether this is even possible) |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2009/8/16 2:58 From Qld, Aus.
Group:
Registered Users FLServer Admins Trusted Speciality Developers Senior Members
Posts:
1958
![]() |
I'm not entirely sure of exactly how I'll format it, but given something like:
Code: [PathPatrol] you would end up with a file (or maybe stdout or clipboard) containing the proper Freelancer zones/objects.
Posted on: 2018/12/9 0:23
|
|||
|