Skip to content

Add spore reproduction#6930

Open
dligr wants to merge 39 commits intomasterfrom
spore_reproduction
Open

Add spore reproduction#6930
dligr wants to merge 39 commits intomasterfrom
spore_reproduction

Conversation

@dligr
Copy link
Copy Markdown
Member

@dligr dligr commented Apr 26, 2026

Brief Description of What This PR Does

Adds a spore reproduction method for the multicellular stage. With it, the player spawns as a spore cell (choosable in the editor) and can turn into a normal cell, capable of growing a colony, by using an ability.

Related Issues

A roadmap item

Progress Checklist

Note: before starting this checklist the PR should be marked as non-draft.

  • PR author has checked that this PR works as intended and doesn't
    break existing features:
    https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
    (this is important as to not waste the time of Thrive team
    members reviewing this PR). This includes gameplay testing by the PR author.
  • Initial code review passed (this and further items should not be checked by the PR author)
  • Functionality is confirmed working by another person (see above checklist link)
  • Final code review is passed and code conforms to the
    styleguide.

Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.

@hhyyrylainen hhyyrylainen removed this from the Release 1.1.0 milestone Apr 30, 2026
@dligr dligr marked this pull request as ready for review April 30, 2026 14:35
@dligr dligr requested review from a team April 30, 2026 14:35
Comment thread src/general/mutation_points/MulticellularSpeciesComparer.cs Outdated
Comment thread src/general/mutation_points/MulticellularEditsFacade.cs Outdated
Comment thread src/microbe_stage/MicrobeStage.tscn Outdated
Comment thread src/multicellular_stage/MulticellularSpecies.cs Outdated
@Accidental-Explorer
Copy link
Copy Markdown
Contributor

One game design thought applying to this and any other reproduction types that use specific custom cell types:

Instead of labelling one of the cell types in the normal list as "the spore", it might eventually make more sense to have the spore cell type be an exclusive type that is shown only on the reproduction tab with its "edit" button located on there as well.

Not sure if that would require a different back-end.

@hhyyrylainen
Copy link
Copy Markdown
Member

It would. And at least backend-wise it would be a lot cleaner to ensure that the species list of cell types must always contain the spore. Though we could add additional restrictions like being unable to place that type in the body plan. And well the GUI would need a lot of duplication and special logic if the spore type would be shown in a very special way so I would like (if that is done) that to be totally separated to its own PR so that its UX merits and code effects can be reviewed in isolation.

Comment thread src/multicellular_stage/MulticellularReproductionMethod.cs Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file change absolutely necessary or? I could also resave this on my computer and see what happens then.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary for this PR; it's just that this change fixes the constant warnings that Godot was printing

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I should try saving this on my computer as well (as I make the Thrive releases it's usually best if the UIDs as cached on my computer are used as things sometimes get out of sync). I'll try to remember to do this a bit later once this PR is close to being merged.

@hhyyrylainen
Copy link
Copy Markdown
Member

hhyyrylainen commented May 4, 2026

Reading the way more specialization effects PR that this spore to real cell transformation needs to re-apply the correct specialization bonus for the cell.

Edit: and for example this code in the MicrobeStage needs to take into account the main cell after exiting the editor not necessarily being the right one due to spore type, I think I don't remember seeing this code being updated in this PR:

            environmentalEffects.ApplyEffects(resolvedTolerances,
                earlySpeciesType.MulticellularCellType.SpecializationBonus *
                earlySpeciesType.Species.GetAdjacencySpecializationBonus(0), ref bioProcesses);

Comment thread simulation_parameters/Constants.cs Outdated
Comment thread src/multicellular_stage/MulticellularSpecies.cs Outdated
@hhyyrylainen
Copy link
Copy Markdown
Member

One more thing I just noticed when modifying some other code is that I think this needs to modify MulticellularGrowthHelpers.GetCompoundsNeededForNextCell as it has special handling for budding reproduction right now.

Comment on lines +524 to +528
ReproductionMethod = ((MulticellularSpecies)species).ReproductionMethod;
UpdateReproductionMethodChoice();

SporeCellType = ((MulticellularSpecies)species).ModifiableSporeCellType;
UpdateSporeCellDropdown();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't these two things logically belong into UpdateGUIAfterLoadingSpecies ?

UpdateCellTypesSecondaryInfo();
}

public void OnReproductionMethodSelected(int selectedOption)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these two are GUI callbacks? So they should go into CellBodyPlanEditorComponent.GUI.cs rather than this main partial class file.

}
}

private void UpdateReproductionMethodChoice()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also these two seem to be about updating the GUI state again so should go into CellBodyPlanEditorComponent.GUI.cs

@hhyyrylainen
Copy link
Copy Markdown
Member

I think the code is almost perfect now (just some comments about moving code around).

I know that this is already a big change but I had one more functionality thought: I assume that AI members of the player species spawn fine (either as spore or a more grown colony), and as a result I think the microbe AI should trigger the germination action under some conditions, right? Though I guess if AI members of the species can spawn in as fully grown colonies it is not absolutely necessary to right away update the microbe AI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

4 participants