[1.0] A RimWorld of Magic

Started by Torann, November 24, 2017, 11:17:05 PM

Previous topic - Next topic

leeadriancatfox

I don't know what causes it but I keep getting this:

Exception ticking Projectile_Teleport(parent=Verse.ThingWithComps at=(-1000, -1000, -1000)): System.ArgumentNullException: Argument cannot be null.
Parameter name: type
  at System.Activator.CheckType (System.Type type) [0x00000] in <filename unknown>:0
  at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0
  at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0
  at Verse.ThingMaker.MakeThing (Verse.ThingDef def, Verse.ThingDef stuff) [0x00000] in <filename unknown>:0
  at TorannMagic.Projectile_Teleport.SingleSpawnLoop (AbilityUser.SpawnThings spawnables, IntVec3 position, Verse.Map map) [0x00000] in <filename unknown>:0
  at TorannMagic.Projectile_Teleport.Impact (Verse.Thing hitThing) [0x00000] in <filename unknown>:0
  at AbilityUser.Projectile_AbilityBase.ImpactSomething () [0x00000] in <filename unknown>:0
  at AbilityUser.Projectile_AbilityBase.Tick () [0x00000] in <filename unknown>:0
  at TorannMagic.Projectile_Teleport.Tick () [0x00000] in <filename unknown>:0
  at Verse.TickList.Tick () [0x00000] in <filename unknown>:0
Verse.Log:Error(String)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()


Which my Arcane Wizard cannot do teleport. every class are working perfectly.

Torann

Yes, that happens when the teleport spell is cast in an invalid location.  You're in luck though, I just updated the mod and the update includes some exceptions that exit out of the spell rather than generate errors when you attempt to cast on an invalid spot.

Torann

Just updated to v1.2.4 - focus of this update was on improving functionality and fixing known bugs:



  • Fixed the bug that would leave behind invisible duplicates when using blink, whirlwind, or valiant charge
  • Fixed a bug where grapple and whirlwind could instantly kill an enemy from the "knockdown" hediff
  • Added exception checking for teleport that will no longer allow you to cast on invalid locations, attempting to do so will still consume mana but will instantly "poof" the teleporter and warn you that the spot is invalid
  • Teleport "portfuel" will no longer explode into massive fires
  • Expanded the level up message to indicate skill points were gained
  • The "Moisturize Ground" spell can now terraform gravel into usable soil (along with sand)
  • The "Dry Ground" spell terraforms shallow water to mud/marsh, and mud/marsh into usable soil
  • Starting traits "Magically gifted" and "physically adept" chance to be assigned to a new pawn has increased by 150%
  • The Arcane Stash event has been temporarily disabled while it's reworked. The event still remains to prevent any errors with existing saves, but the event will no longer trigger at this time.
  • Reduced rate that xp was gained from having full mana/stamina by roughly 40%
  • Reduced xp gain from stamina ability use by 50%
  • Slight increase to skill tree combat spell costs by ~10-20%, utility spells were unchanged
  • Added a new event: arcane bandits!

Magic class - Summoner and Combat class - Sniper are next!

leeadriancatfox

Yeeey! :D What I am hoping now is a trait giving scroll for the untalented~ I want my beloved colonist grow from scratch.

RyanRim

I cant keep up with the updates XD

Meanwhile Im still waiting on a gifted pawn, while Orassans wanna trade me their fire scrolls. Come on, I'm terrible at magic!

✯✯✯✯✯✯✯✯✯✯✯✯✯

henk

If you're reworking the arcane stash event, make sure to add a timer.
Also, I think more of the messages that opp up above a pawn's head should appear at the top of the screen instead, to give more time to read them (And make them appear if you use the Archive mod)

Quote from: RyanRim on December 10, 2017, 03:33:44 AM
Meanwhile Im still waiting on a gifted pawn, while Orassans wanna trade me their fire scrolls. Come on, I'm terrible at magic!

If you have other mods that add traits, getting a magically gifted pawn might be rarer.

Canute

Maybe in combination with the Cult mod.
Adding a new deity Arcana, which allow to add the proper trait for a human sacrifice.

Toketsu

#52
Fair warning: I have no sense of balance.
Here are some ideas (a good part of them will likely already been thought of):

Factions

- Some neutral mage faction with low colony count, new type of caravan that arrives via Teleport and trades in magical items and artefacts. Can use spells to defend themselves, with 1-3 preferred spells per npc. Those 1-3 spells have a chance of having some skill points.


Events

- Rogue mage raid
A small-scale raid by 1-10 rogue mages, depending on your progress. Rogue mages tend to be apprentices, and therefore cannot use magic efficiently, nor use many spells.
Chance to arrive via Teleport.

- Ether moon
Once in a while, the moon will release mana on the world's surface (only happens during the night), making spells cost 50% less mana for the duration. Lasts until the morning.

- Mana sickness
Illness that lowers consciouness by 10% and mana regeneration by 90%. Casting spells during this have a 40% chance to backfire, and injure the caster. Can only be treated with Heal, each cast has a 10% chance to cure it, or after 10-20 days. Doesn't affect pawns that cannot use magic.


Mental breaks

- Casting spree
Randomly casts any spells available to the pawn, ends when the pawn cannot cast spells anymore due to lack of mana. Pawn may seek mana potions to further cast spells. Doesn't drink more than one potion. Requires the pawn to be influenced by mana potion addiction. May happen even when on high mood.

Traits

- Rhabdophobe (according to google, rhabdophobia is what 'magic phobia' is)
Pawns with this trait will do one of these actions when seeing magic being cast:
Develop a Hide in room mental break, get downed due to shortness of breath, initiate a social fight, or cause the pawn to gain -30% consciouness (nausea). Magically gifted pawns can have this trait. This trait can be cured with (needs some ideas here).

- Rhabdophile
Pawns with this trait will gain a +5 mood buff for 12 hours whenever they see someone casting magic. If the pawn is a mage, they will receive a permanent +20 mood buff.


Spells

- Telepathy (Unnatributed/Scroll)
Utility spell that can be used like a Comms console, but from anywhere and without electricity. Possible to call for backup when raiding enemy bases.

- Lightning speed (Thunder/Scroll)
Increases movement speed by 300% for 10 seconds, gives slight injury to both legs once the effect is over.

- Transmute (Unnatributed/Scroll)
Targetted spell that transmutes a stack of raw metal (steel, plasteel, etc) into silver.

- Meteor (Gravity/Fire/Scroll)
Targetted spell that drops a meteor double the size of the Meteorite event's meteor. has a large miss radius. Will always be some kind of rock, and never ore.

- Calm (Paladin/Scroll)
Spell that calms the target's mind, increasing prisoner recruit chance or animal tame chance, depending on wether it's a prisoner or a wild animal (includes pawns that can be 'tamed' due to mental breaks). No effect on pawns that don't have any of those options.

- Drain (Unnatributed/Scroll)
Drains the target's Mana and adds 50% of the amount drained to yours. Target must be a mage for the effects to work.

- Illusion (Unnatributed/Scroll)
Summons an illusionary monster that you can control. Anyone that sees it gains -10 mood for 12 hours, and enemies will try to kill the illusion on sight, with top priority. The illusion can only move, and not attack. Illusion disappears after 30 seconds or after 'dying'. Stats should be similar to that of a megasloth. The caster is immobile while the illusion is alive.


Mage types

- Chaos
Chaos mages like to gamble with their spells, making it so no one can foresee what will happen upon usage.
Examples of spells:

Controlled chaos shot
Targetted spell that casts any offensive spell on target area.

Chaotic mind
Usable on a pawn under the effects of a mental break. 50% chance to remove the mental break, 50% chance to worsen the effects, turning the break into something more dangerous.

Chaos portal
Summons a trap on target location that teleports anyone who steps on it randomly across the current map. 100% activation rate, be it enemy or player pawns. Portal closes after 30 seconds or after being used 3 times.

Utter chaos (Master)
This spell requires a pawn target, and will use any 3 spells on them, be it Heal or Firestorm. Low chance of triggering an Orbital power beam on the spot.


- Nature
Nature mages like to play with debuffs like poison, as well as plant control.

Examples of spells:

Poison thorn
Shoots a thorn imbued with poison magic, that lowers enemy conciousness by 30% and slowly deals damage to the body part hit, for up to 5 damage over 15 seconds.

Plant growth
Targetted area spell that causes plants in the area to skip 24 hours of growth. High mana cost.

Overgrowth
Causes a medium-sized area to be covered in trees for 1 minute. Once the duration ends, the trees rot, and disappear.

Toxic Fallout (Master)
Casting this spell causes a Toxic Fallout event to happen, which lasts for 48 hours.


- Gravity
Gravity mages mess with the gravity of an area or pawn, usually to their advantage.

Examples of spells:

Crushing gravity
Causes a small area to be affected by intense gravity for 20 seconds, reducing any pawn's movement speed and melee dodge chance by 70%, and increasing melee and ranged cooldowns as well as mass by 50%.

Antigravity (couldn't think of a better name)
Reduces target's mass by 90%. Affects anything they're carrying. Can be cast on pawns, as well as Transport Pods. Lasts 12 in-game hours.

Weight of the heavens (Master)
Targetted spell that crushes a single target, leaving every body part with 1 hp. No bleeding, but adds 50% blood loss. 10% chance to misfire and hit a random pawn across the map (including the caster).

Black Hole (Master)
Summons a blackhole at target spot. After 30 seconds, the black hole will start expanding until it covers half of the current map's size. Destroys anything that touches it, instantly, as well as reduces movement speed of everyone on the map by 90%. Once at max size, the black hole will shrink until it disappears. The user has a 50% chance to lose his magic powers upon usage, and gaining a trait that makes him take more damage from magic attacks.


Items

Wands and Staves
These can be crafted out of wood or metal. Equipping as a weapon decreases mana usage by 5-20% depending on material. Can be crafted along a rare Magic stone, which also amplifies the effects of spells by 5-20% depending on the material.

Magic accessories
These can be crafted out of Plasteel and Magic stones, and can be equipped on the accessory slot (same slot as energy shields/smokepop belts).
Different accessories provide different effects. Some effects could possibly be:
Mana usage reduction, Cooldown reduction, Spell effect amplifier, Mana regeneration increase, Global learning factor increase, Global work speed increase, among others.

Clothing
Robes could be both enchanted (providing some sort of effect), or unenchanted, which would be just a normal piece of cloth. Includes hats and hoods. Also could include gloves and boots if you're feeling like it.

Magic stones
These are rare stones, only obtainable from Mage stash event or Mage caravans. Used in a variety of magical things.

Scrolls (one-use spells)
These scrolls would function in a similar way to how artefacts work. Would be possible to carry on hand as well, like the Orbital beam. Any pawn, even those which cannot use magic, can use these scrolls. Does not cost mana. Scroll is consumed upon use.

Philosopher's stone
Very rare item that can make a pawn gain the Magically gifted trait. Obtained via quest rewards, trading or Arcane stash event.


Buildings

Stable magic portal
Same as the Teleport spell's portal, but can be used to go anywhere in the world. Has a 30 days cooldown. Costs one Magic stone to fully fuel. Can be used without triggering cooldown, as long as you teleport to another colony you own, that has a portal.

Mana emanator
Much like the Psychic emanator, but increases mana regeneration by 50% to anyone in the area of effect. Crafting one costs a bit of metal and Magic stones.

Mana drain machine
Assign prisoners (or any other pawn you have some control over) to one of these machines, and it will slowly drain the target's mana and convert to power. Draining beyond 10% mana left has a small chance of giving brain injuries. Has a toggle that allows you to set what mana % the machine should stop working at. Idea came from another mod, that adds a special cryptosleep casket that generates power when pawns are inside.

henk

You're right, you have no sense of balance.

In all seriousness, I like the idea of events that affect mages, but not normal pawns. How about Mana sickness be :

Pawns gain toxicity relative to their current mana level. Pawns who aren't magically attuned, or who have low mana remaining, lose toxicity over time.

As for magic, spells like black hole, which have no counters, should be avoided, even if they come with side effects. Since gaining spells does not come with any downside, spells should be limited in power.

Toketsu

Quote from: henk on December 14, 2017, 04:15:11 PM
In all seriousness, I like the idea of events that affect mages, but not normal pawns. How about Mana sickness be :

Pawns gain toxicity relative to their current mana level. Pawns who aren't magically attuned, or who have low mana remaining, lose toxicity over time.

Seems good too.

Quote from: henk on December 14, 2017, 04:15:11 PM
As for magic, spells like black hole, which have no counters, should be avoided, even if they come with side effects. Since gaining spells does not come with any downside, spells should be limited in power.

I personally think that the fact that the pawn has a good chance to never be able to use magic again, and receive extra damage from it if that happens, is already enough. But if that's too mild, what about a one-off scroll that, instead of teaching the magic, it casts it, similar to vanilla artefacts?

henk

Scrolls, and craftable one-shot spells, sounds great. I think they're in the plans for an indeterminate future.

Canute

QuotePawns gain toxicity relative to their current mana level. Pawns who aren't magically attuned, or who have low mana remaining, lose toxicity over time.

I don't think you should go this way, traits and mana are a natural things, if that would be that poisonous/lethal all the owner of these traits wouldn't survived that long to give these traits to their next generation.

I would suggest to add these poison toxic at the use of magic. Very slow natural degrade of the toxicity and an expensive craftable potion to lower/remove it.
Or magic use works as drug and can cause an addiction.


henk

I was thinking that the toxicity would only apply to pawns that can cast spells, not those that are gifted but not attuned. Combating the toxicity would require keeping mana low.

Torann

Some really great idea's, Toketsu.  I particularly like the events and traits and will look to implement those in the next update.  I really want to include some immersion for the mod that brings good (and bad) events that emphasizes the rimworld as a place that has nurtured magic.   I also like the drain spell (though I might call it siphon); I think it would also be nice to have as a way for a stronger mage to siphon from a weaker mage (at least until AI casting is in).

It looks like druid (with skills very similar to those you listed) will be the next class I'll introduce.
I've also been looking at making something like a void mage or physics-based? mage of some kind.  Mostly because I want a spell where the mage launches himself into space then comes crashing down into groups of enemies and scatters them like chaff in the wind. 

Torann

Just updated the mod to v1.4
Includes the summoner and sniper classes, new stand-alone spell "summon minion" and several bug fixes.

Mod is now translation friendly - please let me know if you're interested in translating the mod.

Special thanks to DrMrEd for the elemental art - if you're interested in seeing your own art in the mod, let me know, I'm open to graphic improvements for existing icons/spells/creatures or new graphics for spells you'd like to see.