Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Updated the Forum Rules and Guidelines (02/29/20); Blog post: GIF Roundup (04/11/20)

Pages: [1] 2 3

Author Topic: [0.9.1a] Player Gate Construction  (Read 4803 times)

boggled

  • Captain
  • ****
  • Posts: 356
    • View Profile
[0.9.1a] Player Gate Construction
« on: December 30, 2019, 04:27:30 PM »

[0.9.1a] Player Gate Construction

This mod has been integrated into Terraforming and Station Construction.

This thread can be locked/deleted. Thank you.

https://fractalsoftworks.com/forum/index.php?topic=17094.0
« Last Edit: April 07, 2020, 02:01:13 PM by boggled »
Logged

MesoTroniK

  • Admiral
  • *****
  • Posts: 1569
  • I am going to destroy your ships
    • View Profile
Re: [0.9.1a] Player Gate Construction (v0.8.0)
« Reply #1 on: December 30, 2019, 05:05:27 PM »

Interesting mod Boggled, but I have a request for you so it doesn't harm some extant and also planned mod content :)

A mergeable .csv or .json file that can make it so that your active gate does not replace an inactive one when desired in X star system IDs or Tags. This is important for hidden content and such discoverable things where it should be for story and gameplay reasons hard to reach them.

Harmful Mechanic

  • Admiral
  • *****
  • Posts: 1048
  • For space is wide and good friends are too few.
    • View Profile
Re: [0.9.1a] Player Gate Construction (v0.8.0)
« Reply #2 on: December 30, 2019, 08:16:50 PM »

Probably the most elegant option is to make the gates use Stable Locations. Then, even without tags or other complex methods, there's a simple mechanism for blocking gate access to some systems; no Stable Locations, no gate. We also don't know what inactive gates are going to do in the future vanilla game, so you may have to change this mechanic anyway; might as well get ahead of it now.

I'd make gate use a flat activation cost; a couple hundred Fuel + 5-10 Rare Metals would work. Make it high enough that it's impractical for short distances but attractive for long ones; then, it still makes sense to fly around hyperspace normally, but strategic gate placement and use can still cut down your travel times. Plus, now gates are competing for Stable Locations with things like Nav Buoys, Sensor Arrays, and Comm Relays; scrapping and replacing your built gates seems like a natural progression.

(As far as a gate sprite goes; yeah, I think changing it is a good idea. If nothing else, centering the warp-bubble on the spin axis of the gate would be nice).
Logged
People need societies, but they don't necessarily need nations.

Wispborne

  • Lieutenant
  • **
  • Posts: 78
  • Discord: Wisp#0302
    • View Profile
Re: [0.9.1a] Player Gate Construction (v0.8.0)
« Reply #3 on: January 02, 2020, 12:28:17 PM »

Having a market in the gate station causes ships to appear and disappear from it like any other market. If I remove the market, is there any way to create a realistic appearance of other fleets using the gates?

By appear and disappear, you mean that ships fly to/from there, right? And they'd hover over the gate, trading, then leave again?

Toast and Wispborne - I copied a very small portion of their code relating to performing the actual jump.

Thanks for the credit, especially since what you copied is indeed very small.


Any idea how this mod plays with Gates Awakened? Perusing the code, seems like there would be no interaction, since it is all driven using abilities, not dialog. Looks like you can replace a GA-active gate with a Boggled gate, and cannot jump to a GA-active gate from a Boggled gate (or vice-versa).
I believe that Gates Awakened will detect, on game load, if a gate has been cannibalized by Boggled and will refund the player an activation code.

Right now the gates replace existing inactive gates because it was very easy to implement this (due to orbits, etc.) and sort of makes sense. Should I make the gates buildable anywhere?
Probably the most elegant option is to make the gates use Stable Locations.

I had the same thought about using Stable Locations for the part of Gates Awakened where you can create a gate, but lore-wise, the stable locations are stable in hyperspace, like where it's easier to access hyperspace, rather than "stable orbit" locations. So, I ended up letting the player build anywhere, with restrictions (not too close to planets). PGC is already lore-unfriendly (having the entire sector aware that gates can be built would have huge implications, which is why I sidestepped it in GA), so that might not be an issue.
Code to drop a gate at the location of a given entity: https://github.com/davidwhitman/Gates-Awakened/blob/master/src/main/kotlin/org/wisp/gatesawakened/Common.kt#L88
« Last Edit: January 02, 2020, 12:46:58 PM by Wispborne »
Logged

boggled

  • Captain
  • ****
  • Posts: 356
    • View Profile
Re: [0.9.1a] Player Gate Construction (v0.8.0)
« Reply #4 on: January 03, 2020, 04:27:56 PM »

Interesting mod Boggled, but I have a request for you so it doesn't harm some extant and also planned mod content :)

A mergeable .csv or .json file that can make it so that your active gate does not replace an inactive one when desired in X star system IDs or Tags. This is important for hidden content and such discoverable things where it should be for story and gameplay reasons hard to reach them.

Yeah, this is a valid concern. I think I'm going to rework constructing the gates to avoid deleting content of vanilla/other mods. Thanks for your feedback!

Probably the most elegant option is to make the gates use Stable Locations. Then, even without tags or other complex methods, there's a simple mechanism for blocking gate access to some systems; no Stable Locations, no gate. We also don't know what inactive gates are going to do in the future vanilla game, so you may have to change this mechanic anyway; might as well get ahead of it now.

I'd make gate use a flat activation cost; a couple hundred Fuel + 5-10 Rare Metals would work. Make it high enough that it's impractical for short distances but attractive for long ones; then, it still makes sense to fly around hyperspace normally, but strategic gate placement and use can still cut down your travel times. Plus, now gates are competing for Stable Locations with things like Nav Buoys, Sensor Arrays, and Comm Relays; scrapping and replacing your built gates seems like a natural progression.

(As far as a gate sprite goes; yeah, I think changing it is a good idea. If nothing else, centering the warp-bubble on the spin axis of the gate would be nice).

I think you're right. I'll make it a flat cost and remove the market from it to reduce complexity. I think I'm just going to use the default game sprite but with the warp bubble inside it. Thanks for the ideas!

Having a market in the gate station causes ships to appear and disappear from it like any other market. If I remove the market, is there any way to create a realistic appearance of other fleets using the gates?

By appear and disappear, you mean that ships fly to/from there, right? And they'd hover over the gate, trading, then leave again?

Toast and Wispborne - I copied a very small portion of their code relating to performing the actual jump.

Thanks for the credit, especially since what you copied is indeed very small.


Any idea how this mod plays with Gates Awakened? Perusing the code, seems like there would be no interaction, since it is all driven using abilities, not dialog. Looks like you can replace a GA-active gate with a Boggled gate, and cannot jump to a GA-active gate from a Boggled gate (or vice-versa).
I believe that Gates Awakened will detect, on game load, if a gate has been cannibalized by Boggled and will refund the player an activation code.

Right now the gates replace existing inactive gates because it was very easy to implement this (due to orbits, etc.) and sort of makes sense. Should I make the gates buildable anywhere?
Probably the most elegant option is to make the gates use Stable Locations.

I had the same thought about using Stable Locations for the part of Gates Awakened where you can create a gate, but lore-wise, the stable locations are stable in hyperspace, like where it's easier to access hyperspace, rather than "stable orbit" locations. So, I ended up letting the player build anywhere, with restrictions (not too close to planets). PGC is already lore-unfriendly (having the entire sector aware that gates can be built would have huge implications, which is why I sidestepped it in GA), so that might not be an issue.
Code to drop a gate at the location of a given entity: https://github.com/davidwhitman/Gates-Awakened/blob/master/src/main/kotlin/org/wisp/gatesawakened/Common.kt#L88

Yes, with regard to the market. Ships just sort of appear and disappear from planets/stations when trading which would make it look like they were using the gate.

I think you're correct about the interaction with Gates Awakened. In light of feedback received here, I'm going to change the mechanism for where the gates can be built. I'm thinking it would be ideal to make them buildable in higher orbit around planets, which will avoid any issues of conflicting with other mods by deleting content or taking up stable location slots.

I took a look at the code you linked regarding placing an entity. As far as I'm aware, the orbital period of an object is entirely dependent on the mass of the focus and the distance from the focus. The orbit period calculation in that code includes a random element, so you could easily end up with the gate having the same radius but a different period than a nearby object. Maybe I've played too much Kerbal Space Program but this would bother me enough that I think putting it in orbit around a planet is a better idea. Your code is much cleaner than mine though; I'm guessing you're a professional programmer!
Logged

Wispborne

  • Lieutenant
  • **
  • Posts: 78
  • Discord: Wisp#0302
    • View Profile
Re: [0.9.1a] Player Gate Construction (v0.8.0)
« Reply #5 on: January 03, 2020, 04:40:36 PM »


I took a look at the code you linked regarding placing an entity. As far as I'm aware, the orbital period of an object is entirely dependent on the mass of the focus and the distance from the focus. The orbit period calculation in that code includes a random element, so you could easily end up with the gate having the same radius but a different period than a nearby object. Maybe I've played too much Kerbal Space Program but this would bother me enough that I think putting it in orbit around a planet is a better idea. Your code is much cleaner than mine though; I'm guessing you're a professional programmer!

Good catch; I copied+modified the code from vanilla, I believe, which included the random element. I hadn't at all thought about how a stable orbit requires a certain velocity for the object's mass + distance, obvious now that you point it out. And yeah, I get paid to code, which technically means I'm a professional ;)

Just to be sure MesoTroniK's point wasn't missed, he probably wants modders to be able to blacklist whole systems from having working gates in them. He made the same request of me for Gates Awakened; the player is simply unable to activate a gate in a blacklisted system (although I never really tested it...) and randomly activated gates won't ever get placed in a blacklisted system. I simply replaced anywhere that I called getSector().getStarSystems() with my own call, which filters out the blacklisted systems.

MesoTroniK

  • Admiral
  • *****
  • Posts: 1569
  • I am going to destroy your ships
    • View Profile
Re: [0.9.1a] Player Gate Construction (v0.8.0)
« Reply #6 on: January 03, 2020, 06:13:28 PM »

Yea, just I know I have some plans for literally "gated" content. Where there will be things like blockades, and disconnected from hyperspace systems and other story related things where mods such as this would totally ruin them heh.

So, being able to block mods like this from doing things to X star system IDs for handmade ones, and Y star system Tags for ones that might be proc genned is very important! And you can be sure other modders have plans for similar story related things and would thus benefit from the same stuff I requested for the same reasons.

boggled

  • Captain
  • ****
  • Posts: 356
    • View Profile
Re: [0.9.1a] Player Gate Construction (v0.8.0)
« Reply #7 on: January 04, 2020, 09:05:19 AM »

Yea, just I know I have some plans for literally "gated" content. Where there will be things like blockades, and disconnected from hyperspace systems and other story related things where mods such as this would totally ruin them heh.

So, being able to block mods like this from doing things to X star system IDs for handmade ones, and Y star system Tags for ones that might be proc genned is very important! And you can be sure other modders have plans for similar story related things and would thus benefit from the same stuff I requested for the same reasons.

Ok, I will make sure the 1.0 release allows certain systems to be blacklisted. Those blockaded systems sound very cool!
Logged

Wispborne

  • Lieutenant
  • **
  • Posts: 78
  • Discord: Wisp#0302
    • View Profile
Re: [0.9.1a] Player Gate Construction (v0.9.0)
« Reply #8 on: January 07, 2020, 11:56:49 AM »

FYI I've made it possible for players to jump from a Gates Awakened gate to one of your player-constructed gates. I'm not expecting the same, totally fine if you don't, but just in case, I tag all activated gates with
Code
GatesAwakened__gate_activated
(double underscore because I screwed up and am too lazy to fix it).

boggled

  • Captain
  • ****
  • Posts: 356
    • View Profile
Re: [0.9.1a] Player Gate Construction (v0.9.0)
« Reply #9 on: January 07, 2020, 01:38:31 PM »

FYI I've made it possible for players to jump from a Gates Awakened gate to one of your player-constructed gates. I'm not expecting the same, totally fine if you don't, but just in case, I tag all activated gates with
Code
GatesAwakened__gate_activated
(double underscore because I screwed up and am too lazy to fix it).

I just added support for active gates. The next update will include the changes. Thanks for your help!
Logged

Wispborne

  • Lieutenant
  • **
  • Posts: 78
  • Discord: Wisp#0302
    • View Profile
Re: [0.9.1a] Player Gate Construction (v0.9.0)
« Reply #10 on: January 07, 2020, 02:15:28 PM »

FYI I've made it possible for players to jump from a Gates Awakened gate to one of your player-constructed gates. I'm not expecting the same, totally fine if you don't, but just in case, I tag all activated gates with
Code
GatesAwakened__gate_activated
(double underscore because I screwed up and am too lazy to fix it).

I just added support for active gates. The next update will include the changes. Thanks for your help!

Cool, thank you!

And small correction, my mod is Gates Awakened, which is a fork of Active Gates - I know, the names are way too similar.
Active Gates uses the tag "gate_activated" (no prefix) for its active gates.

boggled

  • Captain
  • ****
  • Posts: 356
    • View Profile
Re: [0.9.1a] Player Gate Construction (v0.9.0)
« Reply #11 on: January 07, 2020, 02:25:09 PM »

FYI I've made it possible for players to jump from a Gates Awakened gate to one of your player-constructed gates. I'm not expecting the same, totally fine if you don't, but just in case, I tag all activated gates with
Code
GatesAwakened__gate_activated
(double underscore because I screwed up and am too lazy to fix it).

I just added support for active gates. The next update will include the changes. Thanks for your help!



Cool, thank you!

And small correction, my mod is Gates Awakened, which is a fork of Active Gates - I know, the names are way too similar.
Active Gates uses the tag "gate_activated" (no prefix) for its active gates.

I know your mod is Gates Awakened! I wrote "active gates" because that's the name of the tokens for your gates!

Gates Awakened basically superseded Active Gates right? So there's not much point adding support for the Active Gates mod because everyone has moved to yours?
Logged

Wispborne

  • Lieutenant
  • **
  • Posts: 78
  • Discord: Wisp#0302
    • View Profile
Re: [0.9.1a] Player Gate Construction (v0.9.0)
« Reply #12 on: January 07, 2020, 02:39:51 PM »

FYI I've made it possible for players to jump from a Gates Awakened gate to one of your player-constructed gates. I'm not expecting the same, totally fine if you don't, but just in case, I tag all activated gates with
Code
GatesAwakened__gate_activated
(double underscore because I screwed up and am too lazy to fix it).

I just added support for active gates. The next update will include the changes. Thanks for your help!



Cool, thank you!

And small correction, my mod is Gates Awakened, which is a fork of Active Gates - I know, the names are way too similar.
Active Gates uses the tag "gate_activated" (no prefix) for its active gates.

I know your mod is Gates Awakened! I wrote "active gates" because that's the name of the tokens for your gates!

Gates Awakened basically superseded Active Gates right? So there's not much point adding support for the Active Gates mod because everyone has moved to yours?

People seem to prefer mine and recommend it over Active Gates, but there's no way for me to tell, really. If the player wants to be able to activate a lot of gates (without editing my config files), they'd want to keep using Active Gates.
I added support for Active Gates just because it was fairly easy to do - once you have the code to support another mod, adding one more is generally straightforward.

Chewzie

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: [0.9.1a] Player Gate Construction (v1.0.1)
« Reply #13 on: January 18, 2020, 11:37:37 PM »

I've just noticed a drop in FPS while skillbar with PGC skills is active.
Logged

boggled

  • Captain
  • ****
  • Posts: 356
    • View Profile
Re: [0.9.1a] Player Gate Construction (v1.0.1)
« Reply #14 on: January 19, 2020, 06:25:13 AM »

I've just noticed a drop in FPS while skillbar with PGC skills is active.

It is expected that there will be some level of performance impact, as with any mod that adds significant content. How bad is the FPS drop? What are your computer specs?
Logged
Pages: [1] 2 3