[WIP][A15] Ancestral Spirits

Started by MinutesToWeekend, September 10, 2016, 02:15:49 AM

Previous topic - Next topic

MinutesToWeekend

(For up-to-date documentation/source code/mod itself, go here: https://github.com/MoyTW/MTW_AncestorSpirits)

You Ancestors are watching you, and they are hard to impress. To ignore them would be foolish, though - they're the foundation of your tribal magic, and if they're displeased are more than capable of calling down storms, plagues, and divine punishments. If, on the other hand, you manage to honor and please your ancestors, they can gift you with Magic, which is the basis for all your Rituals - Rituals which can call rain or lightning, or heal sick or injured tribe members.

Build a shrine room:



Once you've established a Shrine, Ancestors will come visit:



Ancestors are immune to basically everything, flames included! Samantha and Nanor are just fiiiine here (and if you find something that can kill them, tell me so I can fix that):



If the Ancestors are pleased, they'll give you Magic, which you can use for Rituals:



The actual petitioning is pretty dull-looking at the moment though:



I'll make a more detailed writeup Sometime Later, when I iron out a lot of these issues and make it more friendly and full-featured and Officially Release It, but you can probably derive how most of it works from the features list.

# Disclaimer

This mod is current very much a work-in-progress! It can be applied to in-progress games, but don't use it on any saves you're not prepared to use.

# Incompatibilities
+ It is incompatible with the Hospitality mod. I intend to patch it to be compatible (see planned features section).

# Planned Features

## DONE Useless Ancestors
+ DONE Ancestors will re-spawn if Shrine is destroyed
+ DONE Ancestor pool is fixed
+ DONE Ancestors have their own faction
+ DONE Ancestors hang around the Shrine(s)

## DONE Picky Ancestors
+ DONE Ancestors get very angry if you have two Shrines
+ DONE Ancestors are very displeased if you have no Shrines
+ DONE Approval score can increase or decrease
+ DONE Semi-random events based on Approval level
  + Flash Storm if Ancestors are angry
  + Drop Pods (change this later) if Ancestors are pleased
+ DONE Magic storage, based on Approval
  + Magic is seasonal (KODP is the reference point here)
  + Subtract from if the Ancestors are displeased
  + Add to Magic if the Ancestors are pleased

## DONE Magical Ancestors
+ DONE Basic weather rituals (use Magic)
  + Rain
  + Wind
+ DONE Advanced weather rituals (use Magic)
  + Warmth (heat wave)
  + Cold (cold snap)
  + End Strange Weather (cancel map conditions, clear weather)

## DONE Joyful Ancestors
+ DONE Ancestors have a Joy need
+ DONE Ancestors will use Joy objects
+ DONE Ancestors will not get stuck in a Joy-object using loop!

## DONE Homebound Ancestors
+ DONE Shrine building creates a "Shrine Room"
+ DONE Ancestors get a happy/sad thought for the Shrine Room
+ DONE Ancestors will get a sad thought if there is no Shrine Room
+ DONE Ancestors will periodically return to their Anchor

## DONE Invincible Ancestors
+ DONE Spirits are invulnerable to everything
+ DONE Ancestors cannot be arrested
+ DONE Ancestors will persist between despawns and saves
+ DONE Ancestors cannot be simply walled-in

# Bonus Planned Features
## Variable-magic rituals
+ Rituals now have a failure chance (Ancestors are indifferent)
+ Rituals can be overbid/underbid to influence failure chances
+ Control magic bid by lighting attached altar buildings

## More Rituals/Punishments
+ Rituals
  + Crop Growth: Your crops grow really fast
  + Instant Healing: Your colonists are instantly healed
  + Ancestral Fury: Lightning strikes your foes
+ Punishments
  + Blight
  + Sickness (various)
  + Ancestral Fury: Lightning strikes your colony/colonists

## Hospitality-style visits
+ Ancestors trickle in/out instead of group spawning
+ Ancestors spawn for "visits" instead of constantly
+ Visits are semi-random but normalized to give same approval+/-
+ Approval changes submitted when Ancestors return to the spirit world
+ Ancestors vanish (huge approval hit) if shrine destroyed while visiting
+ Ancestors will occasionally walk outside of colony
+ Ancestors will get super mad if they can't return to their anchor

## Spritual Ancestors
+ Ancestors are colored differently or transparent or something distinct
+ Ancestors don't have nudist/clothing-based thoughts

## Hospitality Compatibility

# This Stuff Would Be Awesome, But Are Not In Scope Right Now
+ Ancestor Actions
  - Ancestors will hunt down and compliment/insult colonists
  - Ensure Ancestors never do romantic actions?
  - Ancestors will occasionally wander outside the colony
+ Offerings
  - Altar at which you can offer things to your Ancestors to boost Approval
  - Requests from Ancestors that you have to fulfill, or lose Approval
  - Specific Ancestors having likes/dislikes in terms of offerings
+ Ancestor Events
  - Ancestral visit: many Ancestors manifest for a period of time
  - Quiet dead: Ancestors leave your colony for a period of time
+ GODLARP

# Your Code Sucks
+ Stop checking against the literal string "Spirit" to see if you can Do X

MinutesToWeekend

Got the Magical Ancestors rituals done. The weather was kind of a doozy and frankly the hack I put in was incredibly ugly.

Eh, it works.

Next is getting the Ancestors to hang around and use Joy objects, which is very intimidating to me because I haven't a good grasp on the AI.

Master Bucketsmith

Got any of them tasty pictures or screenshots to make us feel all fuzzy in our tummies with anticipation of mod-release? :D

skywyze

Oooh, looks promising! I'd love to be able to influence the random events.

MinutesToWeekend

I'll get some screenshots up when it's more...complete. Right now all the Ancestors do is spawn in and hang around and use your Joy objects. You can do rituals but they're accessed through the right-click menu on the Shrine and it's pretty boring-looking.

This post was kind of just a placeholder so I could link it if I needed to ask questions about how to implement specific things, which so far hasn't been necessary. I'll put up a pretty one when it nears a usable state.

Master Bucketsmith


MinutesToWeekend

So, it's in a Sort-Of-Usable state. That is, Ancestors spawn in and spawn out if you kill the Shrine, they persist across saves without loading errors, the weather rituals work...

I'm not really comfortable with putting it out into the Releases section yet, it still needs some stuff to make it less janky, but I've hit Minimum Viable Mod! Progress!

I took some pictures, but the [img] tag doesn't seem to work. Are images disabled?

Master Bucketsmith

If you go to the URL you put in between the IMG tags, then right click on the image and select Copy image address or open the image in a new tab, you'll get the proper URL to use for use with BBCode IMG tags on the raw.githubusercontent.com domain. :)

Build a shrine room:

[img]https://raw.githubusercontent.com/MoyTW/MTW_AncestorSpirits/master/About/Images/ShrineRoom.jpg[/img]

Once you've established a Shrine, Ancestors will come visit:

[img]https://raw.githubusercontent.com/MoyTW/MTW_AncestorSpirits/master/About/Images/AncestorCard.jpg[/img]

Ancestors are immune to basically everything, flames included! Samantha and Nanor are just fiiiine here (and if you find something that can kill them, tell me so I can fix that):

[img]https://raw.githubusercontent.com/MoyTW/MTW_AncestorSpirits/master/About/Images/AncestorFlames.jpg[/img]

If the Ancestors are pleased, they'll give you Magic, which you can use for Rituals:

[img]https://raw.githubusercontent.com/MoyTW/MTW_AncestorSpirits/master/About/Images/Petitions.jpg[/img]

The actual petitioning is pretty dull-looking at the moment though:

[img]https://raw.githubusercontent.com/MoyTW/MTW_AncestorSpirits/master/About/Images/Petitioning.jpg[/img]

hendrikpfaff

#8
Another mod that gives a bit Magic to Rimworld cant whait! :D

MinutesToWeekend

Thanks Bucketsmith, that did the trick. Post has images now!