New Starlane Stuff

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderator: Oberlus

Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Post Reply
Message
Author
Doc Tectonic
Krill Swarm
Posts: 10
Joined: Mon Aug 08, 2016 3:24 am

New Starlane Stuff

#1 Post by Doc Tectonic »

I just recently switched from playing v0.4.5 from 2015-09-01 to one of the more recent Test builds (from 2016-08-02, I think?), and I LOVE LOVE LOVE the new starlane techs and the addition of the planetary beacon ship component!

The ability to reconfigure the map is a lot of fun and it opens up so many interesting strategic possibilities! I've been doing things like dragging all my captured Eaxax planets off to the end of a long chain to see if I can get them far enough away from everybody to make them happy (yes, finally), and relocating all my Chato worlds to bright suns, and boring new starlanes to suddenly invade enemy territory from their secure backfield (bwahaha). It's great!

A few thoughts I had to improve things even further:
  1. It would be really handy to have a system option to automatically rename planets when they're moved to a new star. I don't really care about planet names except as an indicator of where they are on the map, so if I move Hawking III from Hawking to Calafia, it can be Calafia-something now. Would this be possible? I was reading something somewhere else that seemed to suggest that renaming things after galaxy creation was undesirable...
  2. New starlanes are great fun, but they often don't end up where I really want them. I thought of two ways to improve their placement, and I think that both should be fairly easy to implement, and that they would be viable together.
    1. Rather than building the shortest starlane with a Starlane Bore, what you really want most of the time is the starlane that gives you the best improvement in travel time. Using the network distance between two stars, you can calculate it as:

      Code: Select all

      (old - new) * old / new
      There are two ways to think about this. First, you say, okay, I want the biggest drop in travel time, which is old minus new. However, that has the problem that if you're at the edge of the galaxy, a big long starlane that runs along the outside has a very large absolute improvement. So you divide by the new length to downweight building really long starlanes. But you also don't want to build little bitty short starlanes that just shorten a path that wasn't all that long in the first place, so you also multiply by the old length to favor starlanes that shorten long paths. Equivalently, you can think of this formula as picking the starlane with the best combination of absolute improvement (the difference between old and new) and relative improvement (the ratio of old to new).

      (There's a further elaboration where you could calculate the total improvement for each star and all their immediate neighbors, but that's a lot of extra work and I don't think it would give you a different answer very often.)
    2. It would also be great to specify where the new starlane should go by hand. I think the best way to do that would be to reuse the Planetary Beacon. It makes sense in terms of game lore and it's easy for the player to understand, because both uses are very similar. It also makes development easy, because it can leverage existing code and assets. And it allows for some interesting strategic scenarios, like needing to get a stealthy ship with a mobile beacon on it into the heart of enemy territory to open up a new starlane to their homeworld.

      If the beacon doing double duty, it probably needs a more general name. Maybe something like "subspace beacon". You then likely want to make it a prerequisite in the tech tree to both Planetary Starlane Drive and Starlane Bore. You could give it to Gravitronics, and make that a prereq for PSD (shifting PSD one tier later). Then Gravitronics is even more overstuffed than it already is, though, so I would shift Scrying Sphere to, say, Mind of the Void to compensate. (Might wanna do that regardless, honestly.) Alternately, if you want to leave PSD where it is, you could put the beacon with Interstellar Lighthouse, change the name and description of Interstellar Lighthouse to be something about gravity waves or subspace radar, and make it a prereq for both PSD and Gravitronics.
    3. A little bit of UI enhancement: once a Starlane Bore is in the queue, it would be nice to see a dotted line on the map showing where it will be built. There are some possible strategic elements here: if other empires have sufficient detection to see buildings on your planets, then they could see the dotted line, too, and possibly respond! This would give another case where planetary building stealth is interesting and useful. It would allow for a scenario where an enemy could see the Starlane Bore under construction and deploy a mobile beacon to redirect it at the last minute.
  3. The Starlane Nexus is pretty keen, but I was disappointed when I built one in a system that was sticking out into the middle of a ring-shaped galaxy and it didn't span all the way across the middle. I guess there's currently a distance limit on the new starlanes? Hopefully the suggestion in 2a would make it easier to handle cases like this; I think a sudden set of new lanes spanning a big gap would be really interesting.

    Anyway, I had a couple of ideas about the nexus concept that I thought were interesting. I haven't thought deeply about these, so they might be a mess, but I wanted to share them in case they caught anybody else's attention. The first is that instead of building the new starlanes all at once, you could have the Starlane Nexus build one new starlane per turn until it runs out of available connection points or its owner shuts it off. Could make for some interesting situations. Another idea is what if instead of building new starlanes, the nexus redirected existing ones to itself? It would be interesting if the effect of a nexus was to force all traffic between stars within some radius (say 100 uu) to pass through the nexus. Or maybe if it built new starlanes to every star in range and then destroyed any existing starlanes that crossed. I'm not at all sure that would be more useful than what it currently does, but it would definitely be interesting!

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: New Starlane Stuff

#2 Post by MatGB »

Doc Tectonic wrote:I just recently switched from playing v0.4.5 from 2015-09-01 to one of the more recent Test builds (from 2016-08-02, I think?), and I LOVE LOVE LOVE the new starlane techs and the addition of the planetary beacon ship component!

The ability to reconfigure the map is a lot of fun and it opens up so many interesting strategic possibilities! I've been doing things like dragging all my captured Eaxax planets off to the end of a long chain to see if I can get them far enough away from everybody to make them happy (yes, finally), and relocating all my Chato worlds to bright suns, and boring new starlanes to suddenly invade enemy territory from their secure backfield (bwahaha). It's great!
Agreed, I put the planetary beacon in specifically because I missed moving planets around (way back in the day there were virtually no empty systems so it was a lot easier) and I'm still having fun doing stupid things with the ability—haven't gotten around to moving all my xenophobes around yet but have been tempted a few times.

The starlane bore/nexus is also new, and hasn't had a balance pass yet, nor has the AI been adapted for it, so it's probably a bit overpowered but, yes, great fun. The only real balancing work we did was to in relation to the Experimentors and even that wasn't massively toning it down.
A few thoughts I had to improve things even further:
  1. It would be really handy to have a system option to automatically rename planets when they're moved to a new star. I don't really care about planet names except as an indicator of where they are on the map, so if I move Hawking III from Hawking to Calafia, it can be Calafia-something now. Would this be possible? I was reading something somewhere else that seemed to suggest that renaming things after galaxy creation was undesirable...
See, I personally want the exact opposite (sorry), I love looking into a system and having all the different names in it—I do, however, see your point. Auto renaming could be scripted in (I think fairly easily), but I'm not 100% sure I personally know how to do it (I'm good at editing scripts, not so good at writing new ones).

What do others think? While I like the conglomerate systems I sometimes end up with I can see the appeal of an auto rename so don't have a strong objection, just a preference.
[*]New starlanes are great fun, but they often don't end up where I really want them. I thought of two ways to improve their placement, and I think that both should be fairly easy to implement, and that they would be viable together.
  1. Rather than building the shortest starlane with a Starlane Bore, what you really want most of the time is the starlane that gives you the best improvement in travel time. Using the network distance between two stars, you can calculate it as:

    Code: Select all

    (old - new) * old / new
    There are two ways to think about this. First, you say, okay, I want the biggest drop in travel time, which is old minus new. However, that has the problem that if you're at the edge of the galaxy, a big long starlane that runs along the outside has a very large absolute improvement. So you divide by the new length to downweight building really long starlanes. But you also don't want to build little bitty short starlanes that just shorten a path that wasn't all that long in the first place, so you also multiply by the old length to favor starlanes that shorten long paths. Equivalently, you can think of this formula as picking the starlane with the best combination of absolute improvement (the difference between old and new) and relative improvement (the ratio of old to new).
The Bore was Geoff's work and I only just manage to read the code, so whether this is even possible is beyond me. Anyone?
[*] It would also be great to specify where the new starlane should go by hand. I think the best way to do that would be to reuse the Planetary Beacon. It makes sense in terms of game lore and it's easy for the player to understand, because both uses are very similar. It also makes development easy, because it can leverage existing code and assets. And it allows for some interesting strategic scenarios, like needing to get a stealthy ship with a mobile beacon on it into the heart of enemy territory to open up a new starlane to their homeworld.
I've been thinking very similar thoughts actually, manually chosing the starlane exist would make things a lot easier and the Beacon would be the perfect part for it, good idea.

I think we can add this to the 'to do' list, but definitely not before the next Release as it'll need balancing and probably the AI will need a warning.
If the beacon doing double duty, it probably needs a more general name. Maybe something like "subspace beacon". You then likely want to make it a prerequisite in the tech tree to both Planetary Starlane Drive and Starlane Bore. You could give it to Gravitronics, and make that a prereq for PSD (shifting PSD one tier later). Then Gravitronics is even more overstuffed than it already is, though, so I would shift Scrying Sphere to, say, Mind of the Void to compensate. (Might wanna do that regardless, honestly.) Alternately, if you want to leave PSD where it is, you could put the beacon with Interstellar Lighthouse, change the name and description of Interstellar Lighthouse to be something about gravity waves or subspace radar, and make it a prereq for both PSD and Gravitronics.
This could work, I've been planning to make the Lighthouse a prereq for the Drive anyway, simply because using the Drive without one is such an insanely stupid thing to do and I keep forgetting to research it.

Of course, back in the last Release Gravitonics was a do-nothing prerequisite, and I agree it's already overloaded (plus the Sphere could/ought to be earlier given it's already a special).
[*] A little bit of UI enhancement: once a Starlane Bore is in the queue, it would be nice to see a dotted line on the map showing where it will be built. There are some possible strategic elements here: if other empires have sufficient detection to see buildings on your planets, then they could see the dotted line, too, and possibly respond! This would give another case where planetary building stealth is interesting and useful. It would allow for a scenario where an enemy could see the Starlane Bore under construction and deploy a mobile beacon to redirect it at the last minute.[/list]
Ooh, I definitely like that idea, not requiring the Bore target your own Beacon (and go for the closest valid beacon or the closest valid system if no beacon?)
[*]The Starlane Nexus is pretty keen, but I was disappointed when I built one in a system that was sticking out into the middle of a ring-shaped galaxy and it didn't span all the way across the middle. I guess there's currently a distance limit on the new starlanes? Hopefully the suggestion in 2a would make it easier to handle cases like this; I think a sudden set of new lanes spanning a big gap would be really interesting.
When originally coded, there was no limit, I put it in. For the most part, trust me, it was needed, especially in a Ring galaxy. If you go into your Default/Scripting/Buildings folder in the game directory the file starlane_nexus.focs.txt is editable,

Code: Select all

BuildingType
    name = "BLD_STARLANE_NEXUS"
    description = "BLD_STARLANE_NEXUS_DESC"
    buildcost = 1000
    buildtime = 8
    location = Planet
    effectsgroups = [
        EffectsGroup
            scope = Object id = Source.SystemID
            effects = AddStarlanes endpoint = And [
                System
                WithinDistance distance = 250 condition = Source
                CanAddStarlanesTo condition = Source
            ]
        EffectsGroup
            scope = Source
            effects = Destroy
    ]
    icon = "icons/tech/n-dimensional_structures.png"
If you put a comment in front of the WithinDistance line like this

Code: Select all

                // WithinDistance distance = 250 condition = Source 
and then reload from save at the turn before it kicks in you'll see why
Anyway, I had a couple of ideas about the nexus concept that I thought were interesting. I haven't thought deeply about these, so they might be a mess, but I wanted to share them in case they caught anybody else's attention. The first is that instead of building the new starlanes all at once, you could have the Starlane Nexus build one new starlane per turn until it runs out of available connection points or its owner shuts it off. Could make for some interesting situations.
Agreed, I'd have some balance concerns re The Experimentors as it would probably keep trying to reopen their lane, but that would possibly be a cooler/more interesting way to do it.
Another idea is what if instead of building new starlanes, the nexus redirected existing ones to itself? It would be interesting if the effect of a nexus was to force all traffic between stars within some radius (say 100 uu) to pass through the nexus. Or maybe if it built new starlanes to every star in range and then destroyed any existing starlanes that crossed. I'm not at all sure that would be more useful than what it currently does, but it would definitely be interesting![/list]
Not sure about these ideas, but might be worth trying as options.

I think given how much fun I (and you, obviously) have messing around with starlanes and planet locations that More Of This Sort Of thing is to be encouraged in the next cycle, ideas very much appreciated.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Doc Tectonic
Krill Swarm
Posts: 10
Joined: Mon Aug 08, 2016 3:24 am

Re: New Starlane Stuff

#3 Post by Doc Tectonic »

MatGB wrote: When originally coded, there was no limit, I put it in. For the most part, trust me, it was needed, especially in a Ring galaxy. If you go into your Default/Scripting/Buildings folder in the game directory the file starlane_nexus.focs.txt is editable. If you put a comment in front of the WithinDistance line and then reload from save at the turn before it kicks in you'll see why
I believe you. :) Just from your explanation, I can see what I got wrong: I was picturing just a handful of lanes crossing the ring, not EVERY ACCESSIBLE STAR, which, duh, is what it would do if it were completely unlimited.

Here's an approach that might be worth trying out: rather than a range limit, what if the Nexus had a limit on the total length of new lanes it could build? Assuming that the starlane selection algorithm I suggested for the Bore in 2a works as intended, a Nexus could just repeat sequentially placing the best starlane it can until it runs out of total length. So for a ring galaxy, the first one would probably be somewhere on the other side of the ring, then the next one would be somewhere off to one side (since across is now well-connected), then off to the other side, etc. If the budget was right, I expect it would give a handful of lanes spanning large voids like across a ring galaxy or between arms of a spiral galaxy or chunks of a cluster galaxy, while in normally-dense parts of the galaxy, it would add a bunch more lanes but help keep them from getting crowded.

But I guess it really depends on what the point of the Nexus is. Like, why do they get built? I can think of a few different uses that lend themselves to different implementations of the basic idea. And probably a lot of the uses won't be clear until trade and diplomacy exist, so it may not want too much fussing with until later...

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: New Starlane Stuff

#4 Post by MatGB »

Hah, found a screenshot I took.
FreeOrion • View topic - The Starlane Nexus

And the current point of the Nexus is "Geoff coded something cool, here's a use-case", this is frequently how some of the best features started out ;-)

Like I said, it'll need a balance pass at some point and some work justifying it/clarfiying effects.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

dbenage-cx
Programmer
Posts: 389
Joined: Sun Feb 14, 2016 12:08 am

Re: New Starlane Stuff

#5 Post by dbenage-cx »

MatGB wrote:
A few thoughts I had to improve things even further:
  1. It would be really handy to have a system option to automatically rename planets when they're moved to a new star...
See, I personally want the exact opposite (sorry), I love looking into a system and having all the different names in it—I do, however, see your point. Auto renaming could be scripted in ...

What do others think? While I like the conglomerate systems I sometimes end up with I can see the appeal of an auto rename so don't have a strong objection, just a preference.
If these were a one-shot move, I'd opt for them taking the new name. In rare cases, I'll move a planet in this manner (e.g. black hole).
As they stand, I mostly use them to move a ship building planet and an asteroid belt around as a sort of FOB/mobile factory. The unique name helps in selecting them in this case.

Renaming is easily scripted, not sure about checking if it was renamed already though (user custom name). Would be annoying to constantly rename a planet each move.
Maybe a right click option to rename all system planets to default? (just that planet would be preferred, but the orbits may be bumped around after moving)

Need to look into it as I never think of lighthouse being beneficial with the ship part, but have not lost a planet yet when moving via ship (no lighthouses). Hopefully that is just blind luck.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: New Starlane Stuff

#6 Post by Vezzra »

MatGB wrote:What do others think? While I like the conglomerate systems I sometimes end up with I can see the appeal of an auto rename so don't have a strong objection, just a preference.
Hard to say. Both variants have their own kind of (potential) annoyances, and it's very much a matter of personal taste (and probably your preferred way of using the PSD) which option you prefer.

User avatar
The Silent One
Graphics
Posts: 1129
Joined: Tue Jul 01, 2003 8:27 pm

Re: New Starlane Stuff

#7 Post by The Silent One »

Doc Tectonic wrote:[*] It would also be great to specify where the new starlane should go by hand. I think the best way to do that would be to reuse the Planetary Beacon.
That's something I have been thinking about as well. A different option would be to make it possible to select (some specific) buildings, and assign them to a system. For the starlane bore, that would mean the "building" stays until it has been assigned to a valid system; then it creates the starlane and self-destructs on the next turn. There would be other uses for this feature, like far-range big bertha system cannons, or the planetary starlane drive ofc.
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.

dbenage-cx
Programmer
Posts: 389
Joined: Sun Feb 14, 2016 12:08 am

Re: New Starlane Stuff

#8 Post by dbenage-cx »

The Silent One wrote:A different option would be to make it possible to select (some specific) buildings, and assign them to a system...
Hmm, a small panel for completed buildings just to the left of the sidepanel? Something just wide enough for the building icon, a menu tree button, and space for indicator/special icons.

Not discounting the notion of reusing beacon, but this touches on the larger UI issue when focus is used due to few options.
Any content posted should be considered licensed GNU GPL 2.0 and/or CC-BY-SA 3.0 as appropriate.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: New Starlane Stuff

#9 Post by MatGB »

Aye, I'd love to see focus switching removed from the use of some/all of the 'effects' that it currently is used for (or at the very least have the option to do so), I dislike the focus switching needed for stuff like stargates in particular.

But I have zero clue how to proceed with that and leave UI design to those, well, able to actually code stuff.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
The Silent One
Graphics
Posts: 1129
Joined: Tue Jul 01, 2003 8:27 pm

Re: New Starlane Stuff

#10 Post by The Silent One »

dbenage-cx wrote:Hmm, a small panel for completed buildings just to the left of the sidepanel? Something just wide enough for the building icon, a menu tree button, and space for indicator/special icons.
I'd do it similar to how it is done for fleets: left click building icon on sidepanel (fleet wnd closes, fleets deselect), colored frame appears around building indicating selection. Move mouse over a system: draw a line between system the building is located in and target system, draw some marker around target system. Right click adds some indicator to the building icon that shows it has been assigned to a system, and deselects it. Left-clicking building icon again shows previous "assignment line" to target system and allows reassignment. Right click menu allows to un-assign the building. Maybe show "assignment lines" all the time, unobstrusively? I could do some concept pictures if there's interest.
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.

Post Reply