The Starlane Nexus
Moderators: Oberlus, Committer
The Starlane Nexus
First use, um, it might be adding slightly too many lanes:
I am kinda glad I build a Transformer there so I can use the new Spatial Distortion mechanics
(why yes, I did deliberately play Clusters to try the new bore and nexus mechanics, isn't it obvious )
Got two more of these babies about to complete. Need to play through clusters or Spiral on High starlanes to see how much they are then...
The effects description says it should cross an existing lane or go too close to an existing one, I'd say at the very least the lane that skims past Silk (with the pale blue fleet) and deeper into enemy space, as well as the lane 3 steps anticlockwise that also crosses through the system circle are too much.I am kinda glad I build a Transformer there so I can use the new Spatial Distortion mechanics
(why yes, I did deliberately play Clusters to try the new bore and nexus mechanics, isn't it obvious )
Got two more of these babies about to complete. Need to play through clusters or Spiral on High starlanes to see how much they are then...
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: The Starlane Nexus
Try adding a NumberOf clause to limit the number of lanes generated? And distance limits?MatGB wrote:it might be adding slightly too many lanes
Try adjustingMatGB wrote:The effects description says it should cross an existing lane or go too close to an existing one, I'd say at the very least the lane that skims past Silk (with the pale blue fleet) and deeper into enemy space, as well as the lane 3 steps anticlockwise that also crosses through the system circle are too much.
Code: Select all
const float MIN_PERP_DIST = 10
Code: Select all
const float MAX_LANE_DOT_PRODUCT = 0.98f;
If they are working correctly, the first should be a minimum distance in uu, and the second should be a limit on how close in angle the lanes can be to existing lanes connected to either system with lower being a more-different angle. It's quite possible I have (more) mistakes in the relevant math, though.
I suggest also trying the Black Hole Collapser...
Re: The Starlane Nexus
This'd need recompiling, I'm backing up my autosave from last turn so I can test various iterations.Geoff the Medio wrote:Try adding a NumberOf clause to limit the number of lanes generated? And distance limits?MatGB wrote:it might be adding slightly too many lanesTry adjustingMatGB wrote:The effects description says it should cross an existing lane or go too close to an existing one, I'd say at the very least the lane that skims past Silk (with the pale blue fleet) and deeper into enemy space, as well as the lane 3 steps anticlockwise that also crosses through the system circle are too much.andCode: Select all
const float MIN_PERP_DIST = 10
in Condition.cppCode: Select all
const float MAX_LANE_DOT_PRODUCT = 0.98f;
If they are working correctly, the first should be a minimum distance in uu, and the second should be a limit on how close in angle the lanes can be to existing lanes connected to either system with lower being a more-different angle. It's quite possible I have (more) mistakes in the relevant math, though.
It's being researched, but not as sure of the use case, my only black hole is deep in my territory and making them is a long job, if I find somewhere appropriate I'll give it a go.I suggest also trying the Black Hole Collapser...
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: The Starlane Nexus
Artificial black holes should also work...MatGB wrote:...my only black hole is deep in my territory and making them is a long job, if I find somewhere appropriate I'll give it a go.
Re: The Starlane Nexus
I think a distance limit in the script sounds like a very reasonable solution here, especially with the handy new mapscale circle feature (I keep meaning to make a patch to let that be enabled/disabled from the right-click menu...)
All my code and content provided herein or on GitHub is released under the GPL 2.0 and/or CC-BY-SA 3.0, as appropriate.
Re: The Starlane Nexus
alt+c does it FWIW, adding stuff to that menu is beyond me but figuring out how to set a hotkey was something I was just able to do in C++wheals wrote:I think a distance limit in the script sounds like a very reasonable solution here, especially with the handy new mapscale circle feature (I keep meaning to make a patch to let that be enabled/disabled from the right-click menu...)
As to a distance limit? Um, yeah, y'know how I barely know how to actually script stuff? I gave up and instead set a max number of 10, which worked for the specific location in the picture.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: The Starlane Nexus
Something likeMatGB wrote:As to a distance limit? Um, yeah, y'know how I barely know how to actually script stuff? I gave up and instead set a max number of 10, which worked for the specific location in the picture.
Code: Select all
EffectsGroup
scope = Object id = Source.SystemID
effects = AddStarlanes endpoint = And [
System
WithinDistance distance = 200 condition = Source
CanAddStarlanesTo condition = Source
]
Re: The Starlane Nexus
That works, I'd been trying to use directdistancebetween because that's used in the code but it's a different thing, so I think I know where I was going wrong.
200 was too little for that place, 300 slightly too much, so I've put 250 into mine and I'll try it in more places (and more maps).
Related: Clusters galaxy map definitely has some issues in the generation, I suspect my current game would've been deathly dull without all the Bores I've used to open up new lines of attack. Which is fun, but a little unfair on the unsuspecting AI.
200 was too little for that place, 300 slightly too much, so I've put 250 into mine and I'll try it in more places (and more maps).
Related: Clusters galaxy map definitely has some issues in the generation, I suspect my current game would've been deathly dull without all the Bores I've used to open up new lines of attack. Which is fun, but a little unfair on the unsuspecting AI.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Re: The Starlane Nexus
I got it researched and decided to simply plug it into my generator to see what it does. Fun.Geoff the Medio wrote: I suggest also trying the Black Hole Collapser...
Completely cutoff a cluster except for a lane I'd Bored out earlier, and it's too slow for strategic use for the way I play, but it's nice to see effects you can play with, might have to work on other things that can move actual systems around.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Re: The Starlane Nexus
The Starlane Nexus still produces too many starlanes and too close to other systems (even crossing over them).
- Attachments
-
- StarlaneNexusExcessive.png (801.54 KiB) Viewed 2231 times
Re: The Starlane Nexus
Part of the problem here is that the dot product code that tests for angles is only testing for two starlanes that share an endpoint in common. In your diagram the code never checks the angle between the two starlanes:
Ster B --> Zosma A and
Deep Space system near Ster B --> Ra A, as these starlanes do not share an endpoint in common.
The proximity of Ster B to that Deep Space system makes the Ster B --> Deep Space look quite close to Ster B --> Zosma A, but if you imagine that line from Ster B --> Deep Space extending out, you can imagine that by the time it got to Zosma A, there would be a fair distance between the two starlanes.
Simplest solution is to cut the distance and/or increase the minimum angle. What Geoff suggested here:
The cosine of the dot product is the angle between the starlanes, so currently the minimum angle allowed is arccos(.98) = 11.5 degrees. In theory this allows up toGeoff the Medio wrote: ↑Sun Aug 23, 2015 6:20 pm Try adjusting
andCode: Select all
const float MIN_PERP_DIST = 10
in Condition.cppCode: Select all
const float MAX_LANE_DOT_PRODUCT = 0.98f;
[Edited for a computational error and some additional minor clarification.]
Re: The Starlane Nexus
I've tested your suggestion. The number of starlanes is quite more saner indeed. The other problem you pointed out (not testing the angle with starlanes that does not share an end-point) is still there.
Would it be solved if the code would test for starlanes with same "start-point"? That starlane to the empty space, that was there before Nexus, has an angle well below 10 degrees to the newly created starlane Ster beta <-> Zosma
(I attach also a screenshot before Starlane Nexus is built.)
Edit: it's Zosma alpha, not beta.
Edit2: Maybe the problem is in ObjectTooCloseToLane(). I think it should be vetoing the starlanes Ster beta - Ra alpha and Ster bets - Zosma alpha. Going to try increasing MIN_PERP_DIST also.
- Attachments
-
- BeforeNexus.png (840.9 KiB) Viewed 2212 times
-
- StarlaneNexusExcessive087.png (663.13 KiB) Viewed 2214 times
Re: The Starlane Nexus
Attached an screenshot of the result using
Some could argue 30 distance is too much, because it vetoes (by a slim margin) the starlane between Ster beta and Ra delta (the system NE of Ra alpha). But I actually like this. It allows the starlane between Ster beta and Ra gamma.
What do you (anyone) think?
Edit: Notice the absent starlane between Ster beta and the pale blue empty system in the SW corner.It is just outside of the maximum distance (250). Does anyone thing it should be connected?
Edit 2: no, it's not outside the maximum distance, it was connected when using MIN_PERP_DIST = 10 and MAX_LANE_DOT_PRODUCT = 0.87. I don't understand why increasing MIN_PERP_DIST forbids that starlane.
Code: Select all
MIN_PERP_DIST = 30
MAX_LANE_DOT_PRODUCT = 0.87f
What do you (anyone) think?
Edit: Notice the absent starlane between Ster beta and the pale blue empty system in the SW corner.
Edit 2: no, it's not outside the maximum distance, it was connected when using MIN_PERP_DIST = 10 and MAX_LANE_DOT_PRODUCT = 0.87. I don't understand why increasing MIN_PERP_DIST forbids that starlane.
- Attachments
-
- StarlaneNexus_MIN_PERP_30_MAX_LANE_087.png (804.16 KiB) Viewed 2187 times
Re: The Starlane Nexus
Definitely looks better.
https://github.com/mmoderau
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556
Re: The Starlane Nexus
With MIN_PERP_DIST = 20 we get that Ster beta - blue pale empty space, but we also get Ster beta - Ra gamma (which I'd like to avoid).Oberlus wrote: ↑Tue Nov 05, 2019 9:57 amNotice the absent starlane between Ster beta and the pale blue empty system in the SW corner.
It's not outside the maximum distance, it was connected when using MIN_PERP_DIST = 10 and MAX_LANE_DOT_PRODUCT = 0.87. I don't understand why increasing MIN_PERP_DIST forbids that starlane.
I've tried reducing MAX_LANE_DOT_PRODUCT down to .50 but that removes the starlanes to Sulafat and Altair alpha (which I think are right) while Ster beta - Ra gamma is still allowed.
So I'm going with this:
Code: Select all
MIN_PERP_DIST = 20
MAX_LANE_DOT_PRODUCT = 0.87f