Neutronium Supply

Creation, discussion, and balancing of game content such as techs, buildings, ship parts.

Moderators: Oberlus, Committer

Message
Author
Bluehand
Space Floater
Posts: 39
Joined: Sat Feb 21, 2015 7:47 pm

Neutronium Supply

#1 Post by Bluehand »

I played a really long game the other day where I actually researched all the techs and it bugged me that I could build neutronium parts with an extractor halfway across the galaxy, surrounded by enemy fleets. So I dove into FOCS and whipped up a little fix. I don't know how to make an actual patch so I'll just paste the change I made to the part in ship_parts.txt. Tested and works as intended on Mac.

Code: Select all

Part
    name = "AR_NEUTRONIUM_PLATE"
    description = "AR_NEUTRONIUM_PLATE_DESC"
    class = Armour
    capacity = 40
    mountableSlotTypes = External
    buildcost = 15 * [[FLEET_UPKEEP_MULTIPLICATOR]]
    buildtime = 5
    location = And [
        OwnedBy empire = Source.Owner
        Contains Building name = "BLD_NEUTRONIUM_FORGE"
/*        Number low = 1 high = 999 condition = And [
            OwnedBy empire = Source.Owner
            Or [
                Building name = "BLD_NEUTRONIUM_EXTRACTOR"
                Building name = "BLD_NEUTRONIUM_SYNTH"
            ]
*/
	ResourceSupplyConnected empire = Source.Owner condition = And [
            OwnedBy empire = Source.Owner
            Or [
                Building name = "BLD_NEUTRONIUM_EXTRACTOR"
                Building name = "BLD_NEUTRONIUM_SYNTH"
		]	
	]
    ]
    icon = "icons/ship_parts/neutronium_plating.png"
Code or patches I post are released under the CC and GPL licences in use for the FO project.

User avatar
labgnome
Juggernaut
Posts: 833
Joined: Mon Mar 02, 2015 5:57 pm

Re: Neutronium Supply

#2 Post by labgnome »

If you're diving into neutronium, it's also always bothered me that you don't get neutronium extraction until after singularity generation. It really should work the other way around.
All of my contributions should be considered released under creative commons attribution share-alike license, CC-BY-SA 3.0 for use in, by and with the Free Orion project.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Neutronium Supply

#3 Post by Dilvish »

That looks like it's probably a good fix. Sourceforge is having trouble now & changes can't be put in, so be sure to follow up on this with a reminder. Also, although I'm not sure if we would use your exact scripting, for good measure I believe we would want you to indicate your contribution is made pursuant to the appropriate license(s), such as I reference in my sig line.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: Neutronium Supply

#4 Post by MatGB »

I keep planning to work through a lot more neutronium based stuff, I nearly worked out a Neutronium Hull when I was doing the big hull rebalancing thing last year but decided getting the existing stuff costed right was enough work ;-)

It is annoying (and basically pointless) that it's a very end game tech, I almost always find that by the time I've got the tech the game's almost over anyway, so moving it in the queue and expanding on it is definitely something I'd be up for.

But...

Not sure I want to make using it supply dependent. I know it's a level of realism that would make sense but for game balance purposes it'd be a royal pain, and having shipyards stop working on a major project just because one annoying raider cut supply lines for one turn, removing stockpiles and ensuring stuff just works was a Good Choice (and one made before my time), I'd not really want to bring something like that back in, especially with the current balance.

If Neutronium use generally were expanded and getting hold of it also made a bit easier then havign supply connection wouldn't necessarily be a bad thing (bear in mind on this I tend to play Low Planets myself so building an extractor is sometimes close to impossible with the current galaxy generation scripts).

Curious, the science (or psuedo science) is way over my head, why should it be before Singularity Generation?
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
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Neutronium Supply

#5 Post by Dilvish »

MatGB wrote:Not sure I want to make using it supply dependent.
Just to toss out another idea for the long term-- this is reminding me about stockpiles. Right now there is some (unused) code support for empire stockpiles for a handful of predesignated things like Trade or Food or whatnot. It might be nice to have a more flexible support for content-designated stockpile types, like Neutronium. It could be that a Neutronium Extractor could add to the empire stockpile at one rate, a Synthesizer might add to the stockpile at a lower rate, shipyards using it would need to be resource linked to he Capital (the stockpile location) with the stockpile having some minimum level (or perhaps connected to the extractor/synthesizer could still be good enough), and the ships using it could consume some of the stockpile on their turn of construction completion.

With that in mind as a long term idea, a short term adaptation of the connection requirement could be to treat it like there is a 'virtual' stockpile at the capital-- you have to be resource connected to either the source or to the empire capital, but if the shipyard is blockaded from both of those then construction requiring Neutronium stops. Now also though, the AI is whispering in my ear that it shares Mat's sentiment about not wanting to worry about supply connection for this anytime soon, but supply connection to the Capital wouldn't be too bad.
Curious, the science (or psuedo science) is way over my head, why should it be before Singularity Generation?
Neutron stars are formed by an intense gravity field that actually crushes individual atoms, essentially causing all the protons and electrons to combine into neutrons (is my rough take on it). A Black Hole has even more intense gravity, so in one sense it would make sense to deal with Neutron Stars before Black Holes.
But I expect that it would be easier to extract energy from a Black Hole than it would be to manipulate Neutronium. And then of course, FO says "Reality? We don't need no stinkin' Reality!" So we have plenty of leeway all around here I think.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Bluehand
Space Floater
Posts: 39
Joined: Sat Feb 21, 2015 7:47 pm

Re: Neutronium Supply

#6 Post by Bluehand »

MatGB wrote:It is annoying (and basically pointless) that it's a very end game tech, I almost always find that by the time I've got the tech the game's almost over anyway, so moving it in the queue and expanding on it is definitely something I'd be up for.

But...

Not sure I want to make using it supply dependent.
I see your point about it being too annoying. My motivation for getting into scripting is too make the game more challenging and interesting, particularly the later part. So for me its a feature if I have to take a break from steamrolling the galaxy to protect my neutronium supply. Though like you said, it hardly makes a difference at that point anyway.
Dilvish wrote:...stockpiles...
I like that idea. I've been thinking about writing up more strategic resources in the vein of neutronium. Having stockpiles would mitigate the point MatGB brought up about a single raider bringing production to a screeching halt across the entire empire.
Code or patches I post are released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Neutronium Supply

#7 Post by Geoff the Medio »

Dilvish wrote:It could be that a Neutronium Extractor could add to the empire stockpile at one rate, a Synthesizer might add to the stockpile at a lower rate, shipyards using it would need to be resource linked to he Capital (the stockpile location) with the stockpile having some minimum level (or perhaps connected to the extractor/synthesizer could still be good enough), and the ships using it could consume some of the stockpile on their turn of construction completion.
Rather than having stockpiles and the resulting complications, I'd be more inclined to just have each supply of a strategic resource have an output (say 2 or 5) which determines how many things a player can do with that resource. If you want to produce 4 ships simultaneously that require neutronium, then you'd need at least a sum of 4 / turn supply or supplies of neutronium connected to that location. This mechanism would work fine without the need for having accumulation of unused resource with time (stockpiles).

Alternatively, some of the problems with an empire stockpile system (in particular, the location where the stockpile is kept) could be mitigated, while still having much of the interesting complexity it could generate, by having the "stockpile" in effect be always kept at the location of the resource. This would be essentially the same as the above system, with a per-turn extraction rate and requirement to have some number available to use them. But a resource could also have a total capacity that can be extracted, after which it stops producing more of the resource (ie. it's mined out or all harvested). To add complexity, resources could also have extraction rates dependent on what empire techs are researched, or what building or species is present at the resource location. Some resources could naturally replenish, others not.

Bluehand
Space Floater
Posts: 39
Joined: Sat Feb 21, 2015 7:47 pm

Re: Neutronium Supply

#8 Post by Bluehand »

Geoff the Medio wrote:
Dilvish wrote:It could be that a Neutronium Extractor could add to the empire stockpile at one rate, a Synthesizer might add to the stockpile at a lower rate, shipyards using it would need to be resource linked to he Capital (the stockpile location) with the stockpile having some minimum level (or perhaps connected to the extractor/synthesizer could still be good enough), and the ships using it could consume some of the stockpile on their turn of construction completion.
Rather than having stockpiles and the resulting complications, I'd be more inclined to just have each supply of a strategic resource have an output (say 2 or 5) which determines how many things a player can do with that resource. If you want to produce 4 ships simultaneously that require neutronium, then you'd need at least a sum of 4 / turn supply or supplies of neutronium connected to that location. This mechanism would work fine without the need for having accumulation of unused resource with time (stockpiles).

Alternatively, some of the problems with an empire stockpile system (in particular, the location where the stockpile is kept) could be mitigated, while still having much of the interesting complexity it could generate, by having the "stockpile" in effect be always kept at the location of the resource. This would be essentially the same as the above system, with a per-turn extraction rate and requirement to have some number available to use them. But a resource could also have a total capacity that can be extracted, after which it stops producing more of the resource (ie. it's mined out or all harvested). To add complexity, resources could also have extraction rates dependent on what empire techs are researched, or what building or species is present at the resource location. Some resources could naturally replenish, others not.
What about having the stockpile be at the point of (ship) production? In the case of neutronium, that would mean each extractor/synthesizer produces a number of neutronium units per turn and distributes them as evenly as possible among the supply connected forges' stockpiles. Each forge in the empire uses 1 neutronium unit per turn while producing a ship with a neutronium part, which it takes from its stockpile. Then limit stockpiles to some reasonable number.

Seems like the only thing this would need would be an attribute associated with the buildings to act as a counter. Could buildings have an attribute like Fuel associated with them?
Code or patches I post are released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Neutronium Supply

#9 Post by Geoff the Medio »

Bluehand wrote:What about having the stockpile be at the point of (ship) production?
Having stockpiles at multiple locations is even more problematic than single stockpile locations, due to the need to keep track of it all and show it to the player, and the desire to actively control the distribution it would encourage, or potential frustration at the lack of the ability to do so. Using ship production locations is a particularly problematic option, as what locations those are can change frequently.

User avatar
labgnome
Juggernaut
Posts: 833
Joined: Mon Mar 02, 2015 5:57 pm

Re: Neutronium Supply

#10 Post by labgnome »

Dilvish wrote:
MatGB wrote:Curious, the science (or psuedo science) is way over my head, why should it be before Singularity Generation?
Neutron stars are formed by an intense gravity field that actually crushes individual atoms, essentially causing all the protons and electrons to combine into neutrons (is my rough take on it). A Black Hole has even more intense gravity, so in one sense it would make sense to deal with Neutron Stars before Black Holes.
But I expect that it would be easier to extract energy from a Black Hole than it would be to manipulate Neutronium. And then of course, FO says "Reality? We don't need no stinkin' Reality!" So we have plenty of leeway all around here I think.
The "energy" can be harnessed from a black hole is what is called Hawking radiation. It is created by quantum vacuum fluctuations near the event horizon. These fluctuations create pairs of particles and the corresponding anti-particles that quickly annihilate. Normally these cancel each other out repeating the process on endless loop. But near the event horizon what happens is that one of the members of the pair falls into the event horizon, freeing the other particle. As this produces "free" antimatter, it can be used as a very powerful energy source. You would still need to either get well within the gravity well of the black hole, or alternately construct a VERY big shell around a black hole. As the very big shell option would be quite costly (more expensive than terraforming to artificial planets), and I believe the technology is dependent on gravitics anyway, it seems to imply they have to go deep into the gravity well near the event horizon.

While neutronium itself seem like such a far-removed from everyday kind of stuff, once you have some kind of gravity manipulation, manipulating it should be quite easy as it's a superfluid, or a zero-viscosity and zero-entropy fluid. Also neutronium isn't something you can mix with other stuff, so there would be no "neutronium alloys", so also no other needed technological prerequisites. Since you already have gravitics and force fields, keeping it compressed as neutronium should be easy. Also other materials, such as "dwarfstar" electron degeneracy "normal matter" from the surface and "nuclear pasta" might also be harvestable resources from neutron stars. All super-dense, and all possibly having interesting technical applications, even if getting to the juicy neutronium interior is outside your technical capacity.

The nuclear pasta is actually a much better IRL armor candidate than neutronium, as it's composed of varying pasta-shaped clumps of atomic nulcei. Also, neutronium, being a superfluid has all kinds of interesting properties. It could be used as an "entropy sink", as an effectively frictionless material, as a catalyst or even a lubricant inside fusion reactors or as a "perfect" mirror (it's reflective to almost any possible frequency).

Perhaps a general "antigravity extractor" building could replace the singularity generator and neutronium extractor, with differing effects if in a black hole or neutron star system, with the tech requirements to unlock in each system type. So the first tech would unlock in neutron star systems, and work like the neutronium extractor, and the second tech would unlock in a singularity system and work like a singularity reactor.
All of my contributions should be considered released under creative commons attribution share-alike license, CC-BY-SA 3.0 for use in, by and with the Free Orion project.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Neutronium Supply

#11 Post by Dilvish »

labgnome wrote:The "energy" can be harnessed from a black hole is what is called Hawking radiation.
Hawking radiation may be the only EM energy directly released by a black hole at/across it's event horizon, but its gravity field of course extends well beyond that and triggers a significant amount energy release from the infalling matter. Of course, you'd think that anyone who could harvest that energy could come up with a more efficient fission/fusion/whatever method to extract energy from matter without throwing it into a black hole. But maybe you put two black holes into a dual orbit and harvest energy from the gravity waves. Or, just maybe, it's something you and I haven't thought of yet :P
Also, neutronium, being a superfluid has all kinds of interesting properties. It could be used as an "entropy sink", as an effectively frictionless material, as a catalyst or even a lubricant inside fusion reactors or as a "perfect" mirror (it's reflective to almost any possible frequency).
Hmm, normally reflection of EM waves stems from dynamically inducing dipoles (or polarizing existing ones) in the reflective material. Although the quark composition of a neutron suggests it presumably does have some kind of electric dipole, it's my understanding that it is smaller than we are able to measure, surely has an orientation fluctuating far more rapidly than the frequency of visible light and the available energy levels for changing its polarization probably start out with some pretty significant jumps, such that only extremely high energy photons would have a chance of reflection. Whether that would leave neutronium transparent to visible light or essentially perfect black body absorbance at visible wavelengths is apparently a matter of debate, but I would be inclined to say essentially perfect black body absorbance.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Bluehand
Space Floater
Posts: 39
Joined: Sat Feb 21, 2015 7:47 pm

Re: Neutronium Supply

#12 Post by Bluehand »

Geoff the Medio wrote:
Bluehand wrote:What about having the stockpile be at the point of (ship) production?
Having stockpiles at multiple locations is even more problematic than single stockpile locations, due to the need to keep track of it all and show it to the player, and the desire to actively control the distribution it would encourage, or potential frustration at the lack of the ability to do so. Using ship production locations is a particularly problematic option, as what locations those are can change frequently.
All good points. Maybe stockpiles are more trouble than they're worth, at least at this point in time.
Code or patches I post are released under the CC and GPL licences in use for the FO project.

User avatar
labgnome
Juggernaut
Posts: 833
Joined: Mon Mar 02, 2015 5:57 pm

Re: Neutronium Supply

#13 Post by labgnome »

Dilvish wrote:
labgnome wrote:The "energy" can be harnessed from a black hole is what is called Hawking radiation.
Hawking radiation may be the only EM energy directly released by a black hole at/across it's event horizon, but its gravity field of course extends well beyond that and triggers a significant amount energy release from the infalling matter. Of course, you'd think that anyone who could harvest that energy could come up with a more efficient fission/fusion/whatever method to extract energy from matter without throwing it into a black hole. But maybe you put two black holes into a dual orbit and harvest energy from the gravity waves. Or, just maybe, it's something you and I haven't thought of yet :P
True that is a much quicker (and dirtier) way to get energy out of a black hole. However as most black holes encountered in FO are of the solitary variety, and not with companion stars, you would still have to deliberately facilitate the infalling matter approach, and you'd still need a way to harvest that energy. Mind you orbiting planets and space stations could do this by just launching their garbage into the black hole, but you'd still need a petty elaborate setup to make that work in a way you could actually get a net return in energy on. Any station or planet orbiting far enough not to fall into the black hole, would need to expend energy to launch matter into it, and any energy released is going to have to be from much closer, or basically build a Dyson sphere around it.

Also given the way the technologies and building work in game even, I'm still inclined to think they should be in opposite places in the tech tree.
Hmm, normally reflection of EM waves stems from dynamically inducing dipoles (or polarizing existing ones) in the reflective material. Although the quark composition of a neutron suggests it presumably does have some kind of electric dipole, it's my understanding that it is smaller than we are able to measure, surely has an orientation fluctuating far more rapidly than the frequency of visible light and the available energy levels for changing its polarization probably start out with some pretty significant jumps, such that only extremely high energy photons would have a chance of reflection. Whether that would leave neutronium transparent to visible light or essentially perfect black body absorbance at visible wavelengths is apparently a matter of debate, but I would be inclined to say essentially perfect black body absorbance.
It's been a few years since it was explained to me, but if I remember correctly neutronium would be a reflector like a metal, not like glass, with the neutrons all acting like free electrons. Neutrons do also have a detectable magnetic dipole moment that EM waves might interact with. Because of its extremely high density, it would reflect pretty much any form of radiation. Mind you that explanation might be incorrect, but we also don't have any actual neutronium to study to see how it interacts with light.

I do think we could go round and round for ages as to what mechanism a hypothetical advanced civilization might use to get energy or resources out of either of these types of objects. However, I do also think it would be an improvement for later game play to have neutronium earlier, as it's at least useful for ships. It's honestly one thing that does annoy me about a lot of 4x games. You get these cool things that don't happen until the end of the tech tree, but since they are so late game before you can even put them to use, the game is over. I think better gemeplay would be to have the really cool stuff, neutronum armor, artificial planets ect, at the cusp of the mid and late stages of the game, and the big production and research boosters, like singularity generators and the collective thought network for the late game. That way the cool things happen early enough to get them into your production chains, and then the other stuff allows you to make that final push to whatever victory condition you are trying for.
All of my contributions should be considered released under creative commons attribution share-alike license, CC-BY-SA 3.0 for use in, by and with the Free Orion project.

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

Re: Neutronium Supply

#14 Post by Vezzra »

labgnome wrote:I think better gemeplay would be to have the really cool stuff, neutronum armor, artificial planets ect, at the cusp of the mid and late stages of the game, and the big production and research boosters, like singularity generators and the collective thought network for the late game. That way the cool things happen early enough to get them into your production chains, and then the other stuff allows you to make that final push to whatever victory condition you are trying for.
As interesting as those discussions about how things in the real world might be are, these considerations you offer here are which really matter for the kind of game we're making.

And these are ideas well worth considering IMO. Right now we have the problem that resource output growth increases too much and too quickly, so in addition to the advantage of getting to the cool stuff a bit sooner, getting to the especially powerful production boosting techs later might be a good idea in its own right.

One thing though: Moving techs that grant major research boosts to far toward the end of the tech tree doesn't make any sense. What's the point of researching that super cool high end technology that allows me to build moon sized supercomputers which will increase my research output ten-fold if there isn't much left to reseach afterwards...?

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

Re: Neutronium Supply

#15 Post by MatGB »

Vezzra wrote: One thing though: Moving techs that grant major research boosts to far toward the end of the tech tree doesn't make any sense. What's the point of researching that super cool high end technology that allows me to build moon sized supercomputers which will increase my research output ten-fold if there isn't much left to reseach afterwards...?
This, I'm 100% onboard with moving singularity generation further up the tech tree and neutronium down it, Dilvish, how much would it disrupt the AI if we just did it? I know they use black hole generators if they can as I captured one yesterday.

I'm not sold on moving research boosting stuff further away, there aren't many anyway and one of the things I dislike in games of this nature is just what Vezzra describes, I've played a lot of C-Evo recently and I always find by the time I can build Research Labs I'm already in the end game strategically/weapon wise. I think, especially given we have no "end game" techs that just give boosts that you can repeat research ad infinitum, that moving either the collective thought network or enclave of the void any later would be a mistake.

However, awhile ago Dilvish was playing around with the idea of making the research cost multiplier dependent on galaxy size in a similar way to the way he's more recently changed the experimentor start turn, that is almost certainly worth considering, for at least the mid to late game techs if not the very early ones.

I vote move neutronium extraction forward, give the armour a separate ship part tech dependent on extraction being researched (so we can make other parts as well), and move black hole generation later as soon as Dilvish gives the say so, but leave the research boosters where they are for now (but consider moving/changing the balance of these at some point)
Mat Bowles

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

Post Reply