Organic hull evolution/mutation

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Message
Author
User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Organic hull evolution/mutation

#16 Post by Oberlus »

Geoff the Medio wrote: Sun Oct 25, 2020 12:44 pm You'd need to elaborate
Sure.

I'd like to have an effect, scoped to ships with ships designs with certain hulls that meet some other conditions (like reaching certain age), with effects
- Create ship design X based on Target ship's ship design (hull and parts). Let's leave aside for now the logic for what ship design to create.
- Create a ship with ship design X.
- Destroy target ship.
- Issue SitRep informing about target ship metamorphosing/mutating/evolving/upgrading/reffiting into the new ship.


Edit: that ship design creation logic could have rules like these:
- If TargetShip.ShipDesign.Hull is X, then NewShipDesign.Hull is Y.
- If TargetShip.ShipDesign includes N copies of part X, then add N+C copies of part Y to NewShipDesign.

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

Re: Organic hull evolution/mutation

#17 Post by Geoff the Medio »

Why not CreateShipDesign + SetShipDesign instead of Destroy + CreateShipDesign + CreateShip ?

Regardless, problems include:
-It shouldn't need to create a new ship design every time this set of effects is to be run
-It would need to somehow track the ID of the new design and pass that to the CreateShip / SetShipDesign effects
-New ship designs would need suitable player-readable names

User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Organic hull evolution/mutation

#18 Post by Oberlus »

Geoff the Medio wrote: Sun Oct 25, 2020 5:25 pm CreateShipDesign + SetShipDesign instead of Destroy + CreateShipDesign + CreateShip
Yes, much better.
I didn't suggest that because I could not find "SetShipDesign" in the code base.

Yes to everything else.

The ID of the new ship design could be based on the combination of hull plus parts.
The effect would compose the ID, check out if the design exists already, and create it if it doesn't.
The name would be based on a predefined name for the hull plus some other string based on the combination of hull plus parts.
The new ship design should show up in the players available ship design, so that the name can be changed (it would, automatically, right? or using some specific commands to add it to an Empire or whatever). But then the rest of the ship design could be changed. The future metamorphosed ships would get the user-modified ship design (I guess), and it would not be a problem (idem).

Moriturus
Space Floater
Posts: 25
Joined: Fri Jan 23, 2015 6:03 pm

Re: Organic hull evolution/mutation

#19 Post by Moriturus »

I think it should be a 'slot type.' Your 'organic hull that matures into a different form' would start off in its base form, but with a couple of things in "latent" slots. These would start out with meters or damage set to zero, and then become active when the hull reaches some level of maturity or goes through some metamorphosis.

I suppose this is actually three new slot types: latent internal, latent external, and latent core.

A few organic-line hulls with pre-filled latent slots should exist, representing additional parts that the ships will be able to use once mature. Maybe fighters or troops (degenerate offspring) are available after sexual maturity or something. And these will be a regular feature of every ship built on that particular hull, unless the player wants to design a ship that has that latent slot assigned to a different ship part.

If the player wants to change the assignment of the latent slots, I think that should take considerable time. So let's say there's an organic hull type that has a latent slot, filled by default with a Deflector Shield. Obviously, that hull type doesn't become available until my empire has deflector shields. Later, when my empire has plasma shields, I make a new design based on that organic hull and I fill the latent slot with something else. But IF I want to enqueue a ship where that particular latent slot is both different from the default hull, AND different from any other mature ships based on that hull that I already own at least two of, THEN the ship takes ten or so extra turns to build per reassigned latent slot.

IOW the genetic tech needs a little time and work to figure out how to get an animal to grow a biological plasma-shield generating organ as it matures, and you have to get a couple grown at least to maturity before the builds can be handled in the routine way.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Organic hull evolution/mutation

#20 Post by Ophiuchus »

Moriturus wrote: Tue Dec 29, 2020 7:27 pm I suppose this is actually three new slot types: latent internal, latent external, and latent core.
I do not think we need this. I think we do not want manual repurposing as this means micromanagement.

For automated/restricted evolution/mutation we could simply relax the current constraints on ship designs for slots and add an arbitrary number of arbitrary parts (although we would not have part positioning in the UI in that case, but i think that would be acceptable).
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Organic hull evolution/mutation

#21 Post by Ophiuchus »

Geoff the Medio wrote: Sun Oct 25, 2020 5:25 pm -It shouldn't need to create a new ship design every time this set of effects is to be run
Make an structural identifier out of ship hull id and sorted ids of the parts. Store that in some kind of hashmap. Check that when applying SetShipDesign effect.
Geoff the Medio wrote: Sun Oct 25, 2020 5:25 pm -It would need to somehow track the ID of the new design and pass that to the CreateShip / SetShipDesign effects
Passing could be simply done by making the CreateShipDesign an parameter to the SetShipDesign effect.

Code: Select all

SetShipDesign ship = Source design = CreateShipDesign baseDesign = Source.design addParts = LB_TENTACLE_LAUNCH_BAY, HG_TENTACLE_HANGAR
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Moriturus
Space Floater
Posts: 25
Joined: Fri Jan 23, 2015 6:03 pm

Re: Organic hull evolution/mutation

#22 Post by Moriturus »

I guess it comes down to whether you want the organic hulls to be ships, full stop, where you have a hull and parts and possibly extra structure points as it matures, or a sort-of-creature that also changes as it matures.

If it's a hull and parts, then the in-game consistency is that the "hull" is some kind of descendant of a living creature, and the various "parts" are all implanted/transplanted/mounted technological devices. In that case it's simple to reassign the slots to different parts as desired but the devices don't get added to the maturing "star-whale hull" until it reaches an appropriately equipped shipyard and a bunch of technicians and star-whale veterinarians perform surgery and transplant or vivisect or whatever the heck they do to force the new part to be implanted. So the star-whale finally got big enough to mount plasma cannon and fire them without injury

If the star-whale is a sort-of-creature that gains a new biological capability as it matures, then in-game consistency makes that impossible or very hard to change. So the mature star-whale hull can generate a plasma discharge equivalent to a plasma cannon, and ANY ship you build based on the star-whale hull gets the plasma-discharge capability when it matures, because that's normal star-whale biology.

I mean, details vary, but in terms of game consistency those are the two sides of the coin that I immediately see.

Post Reply