Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cult data model refactoring #343

Closed
wake42 opened this issue Aug 24, 2022 · 0 comments · Fixed by #529
Closed

Cult data model refactoring #343

wake42 opened this issue Aug 24, 2022 · 0 comments · Fixed by #529
Assignees
Labels
🚩 breaking Will need migration script and wiki update type: enhancement Improvement to existing feature. Use "feat: " commit message
Milestone

Comments

@wake42
Copy link
Collaborator

wake42 commented Aug 24, 2022

Why: Is your feature request related to a problem?

The current model can't handle sub cults in a good way.

What: Describe the solution you'd like

Add a deity property that is used to tie joinedCults together
Add a joinedCults array that can hold JoinedCult objects that represent (sub)cults.

For example "Waha" would have one joinedCult {"Waha", "The Butcher", "laymember"} and deity "Waha"
"Orlanth Rex" would have a joinedCults {"Orlanth Rex", "the king...", "Initiate"} and deity "Orlanth"

export interface CultDataSourceData { 
	deity: string | undefined; // For cults with subcults (like Orlanth) 
	descriptionRqidLink: RqidLink;  
	runePoints: Resource; 
	holyDays: string;  
	gifts: string;  
	geases: string;  
	runes: string[];
        // commonRuneMagic: string[] // TODO List of runemagic that should be embedded when you join the cult (rqids).
	// cultSkills: string[]; // TODO Link to system wide id...  
	// favouredPassions: string[]; // TODO Link to system wide id...  
	// cultSpiritMagic: string[]; // TODO Link to system wide id...  
	// prohibitedCultSpiritMagic: string[]; // TODO Link to system wide id...  
	// cultRuneMagic: string[]; // TODO Link to system wide id...  
	// cultEnchantments: string[]; // TODO Link to system wide id...  
	joinedCults: JoinedCult[];  // Even cults without specific sub cults needs an entry here.
}

export class JoinedCult {  
	cultName: string;  
	tagline: string;  
	rank: CultRankEnum;  // TODO You can be a Rune Lord and Priest!
}

Embedding a cult in actor:

if (there already is a cult with same `deity`) {
	// copy the `joinedCults` to the actors `joinedCults` (checking for collisions) 
} else {
	// embed the new cult in the "normal" way
}

A cult items name can be constructed like: (simplified)

const joinedCultNames = joinedCults.map(c => c.cultName + ', ');
const name = `${joinedCultNames} (${deity})`;

So for example:

  • Vinga (Orlanth)
  • Vinga, Orlanth Rex (Orlanth)
  • Orlanth Adventurous, Orlanth Thunderous (Orlanth)
  • Youth, the Warrior, the Elder (Yelm)
  • Storm Bull
  • Etyries
  • Lhankor Mhy

Additional context

  • Seven Mothers is not a cult with several subcults, it's separate cult and the "Other Lunar Cults" are not subcults of it.
  • Yelm has subcults
    • Youth (Yelm)
    • the Archer (Yelm)
    • the Warrior (Yelm)
    • the Teacher (Yelm)
    • the Elder (Yelm)
  • Orlanth has subcults
    • Orlanth Adventurous (Orlanth)
    • Orlanth Thunderous (Orlanth)
    • Orlanth Rex (Orlanth)
    • Vinga (Orlanth)
@wake42 wake42 added the type: enhancement Improvement to existing feature. Use "feat: " commit message label Aug 24, 2022
@wake42 wake42 added this to the 1.17.0 milestone Aug 24, 2022
@wake42 wake42 added the state: discussing More discussion / investigation is needed label Aug 24, 2022
@wake42 wake42 modified the milestones: 1.18.0, 1.19.0 Sep 8, 2022
@wake42 wake42 self-assigned this Apr 22, 2023
@wake42 wake42 removed the state: discussing More discussion / investigation is needed label May 6, 2023
@wake42 wake42 closed this as completed in f34625e May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚩 breaking Will need migration script and wiki update type: enhancement Improvement to existing feature. Use "feat: " commit message
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant