# Thread: The Programmer

1. ## The Programmer

I just had an idea. If you're an 18th level caster, you can cast spells of up to 6th level into a contingency. Your contingency can have contingency in it. at this level. This is basically the definition of an IF statement in programming. A clever trick would be to use Divine Metamagic to twin your contingencies, resulting in an IF - ELSE logic. For example: Contingency: If I am attacked -> Twinned contingency -> If I say 1 -> Fireball; Else Cone of Cold.

This is just a very basic example, but I'm thinking that with liberal use of Craft Contingent Spell and twinned contingency (possibly a lot of arcane thesis/easy metamagic for contingency), we could write a contingency program that would render a wizard immune to all forms of attack (and hold enough contingencies to replace the used up spells). The main problem I see with this is that anything EVER would blow the contingency, so a contingency would have to be set to reset the contingency, and we're all no doubt very confused at this point.

Using the standard metamagic shenanigans, I believe that an Incantatrix can apply a twin effect to a contingency spell that has already been cast. So let's start with that. You make twinned contingent contingencies, each filled with twinned contingencies. This doesn't do a whole lot except make whatever you filled your contingency with happen twice.

Does anyone have any idea on how to make this work? I don't, but I do find it rightly hilarious.

2. ## Re: The Programmer

Originally Posted by woodenbandman
Using the standard metamagic shenanigans, I believe that an Incantatrix can apply a twin effect to a contingency spell that has already been cast.
Wouldn't do any good, it would still just dispel the first one. With twinned contingencies it's pretty much DM fiat what happens anyway ... personally I'd say 50% random chance of one getting applied and the other simply gets dispelled before it's condition is even checked. Besides, twin duplicates the entire spell ... can't choose different conditions/results.

3. ## Re: The Programmer

I've had similar ideas. While I'd never use them on a PC, I think this would be a great way to make a villain. The PCs will have to fight/research/fool him several times over to gather enough info on his contingent program. Then they have the logic puzzle of actually beating it.

4. ## Re: The Programmer

As a programmer, I _love_ this idea.

However, PinkysBrain sounds correct to me. From the contingency description:
The contingency spell and the companion spell are cast at the same time. ... You can use only one contingency spell at a time; if a second is cast, the first one (if still active) is dispelled.
Twin might be allowed via fiat.

5. ## Re: The Programmer

a twinned contingency would do the same thing twice. That seems a legitimate enough use to me. A twinned contingency to "cast delayed blast fireball on my location if i'm attacked in melee" is really no different than a contingency to "cast a twinned delayed blast fireball on my location if i'm attacked in melee". With enough metamagic shenanigans, though, you ought to be able to twin both the contingency and its encapsulated spell - so you could have a twinned contingency to case a twinned delayed blast fireball, dropping 60d6 of damage on you if you're attacked in melee (we'll assume that you've prepared fire immunity in advance )

6. ## Re: The Programmer

The difference is that delayed blast fireball says nothing about dispelling itself.

7. ## Re: The Programmer

I'm sure there are other ways to get multiple contingencies in there. Still, this looks to open a whole new level of Batman...

8. ## Re: The Programmer

This is awesome. Someone find a way to create a While loop, and DMs across the globe will be driven mad.

9. ## Re: The Programmer

Complete Arcane, page 77. Craft Contingent Spell, it's a feat. Make as many contingencies as you want, no additional hoops to jump through.

And yes, it's as broken as it sounds.

10. ## Re: The Programmer

Originally Posted by Ernir
Complete Arcane, page 77. Craft Contingent Spell, it's a feat. Make as many contingencies as you want, no additional hoops to jump through.

And yes, it's as broken as it sounds.
You can make as many as you want, but each creature can only be under the effects of 1 contingency per HD at a time.

11. ## Re: The Programmer

Originally Posted by PairO'Dice Lost
You can make as many as you want, but each creature can only be under the effects of 1 contingency per HD at a time.
level 18 gives us 18 contigencies to work with.

So the question becomes "What can you do with 18 spells cast at the exact same time?" I would say.

12. ## Re: The Programmer

contingency, if I am injured, cast timestop / celerity...
You win. now add another 17 contingencies...
I love the programming idea but the problem is that a contingency requires another spell cast at the same time, you can contingency a twinned spell, but if you twin the contingency spell itself one will take, and the other will fail (because you only have one spell), maybe with a quicken you could do that but it makes more sense to just cast two separate ones.

if you could develop an if statement contingency it will be interesting, and a great foundation for a magitec technological and industrial revolution.

13. ## Re: The Programmer

Originally Posted by Ernir
Complete Arcane, page 77. Craft Contingent Spell, it's a feat. Make as many contingencies as you want, no additional hoops to jump through.

And yes, it's as broken as it sounds.
No, broken is that each one is a "persistent magical effect" and is thus a valid target for Metamagic Effect. NOW you twin it. Again and again. Int+3 (I think) per day, as many times as you want, with a couple of "reinstalls" so to speak.

EDIT : Ok, so 40 at 20th level. Each is only a single spell, after all ;)

14. ## Re: The Programmer

Originally Posted by Starscream
This is awesome. Someone find a way to create a While loop, and DMs across the globe will be driven mad.
Not me - I'd love it. The caster would for sure forget the exit condition. Wasn't there a movie about that? Somehting about "thank you"?

15. ## Re: The Programmer

Originally Posted by Skorj
Not me - I'd love it. The caster would for sure forget the exit condition. Wasn't there a movie about that? Somehting about "thank you"?
Depends...if they've ever written anything in coding language, you may end up with an overcomplicated Twice Betrayer of Shar, minus the betraying and Shar.

16. ## Re: The Programmer

oh wow, I can just see the DM responding like that...
DM: "ok you have used 18 different contingency loops... to protect yourself against everything... roll on your "craft (programming language)" skill"
PC: My what skill?
DM: right... i thought so, roll an int check...
PC: rolls
DM: oooh, too bad, looks like you had some bugs in your program, lets roll for result...

17. ## Re: The Programmer

Originally Posted by taltamir
oh wow, I can just see the DM responding like that...
DM: "ok you have used 18 different contingency loops... to protect yourself against everything... roll on your "craft (programming language)" skill"
PC: My what skill?
DM: right... i thought so, roll an int check...
PC: rolls
DM: oooh, too bad, looks like you had some bugs in your program, lets roll for result...
Contingent Limited Wish~>PsyRef full ranks in Craft (Computer Program)

18. ## Re: The Programmer

Obviously Contigencies use Pointers. All you need is a few bugs and BAM Seg-Fault

19. ## Re: The Programmer

Even with craft programming, you still can roll 1... 18 contingencies a day, thats 18 rolls... 5% or better chance of failure per roll, you are bound to make a mistake.

so... with this in mind... lets come up with some RESULTS for contingency programming bugs...

what will happen with an infinite loop? how about division by zero?

20. ## Re: The Programmer

Originally Posted by taltamir
Even with craft programming, you still can roll 1... 18 contingencies a day, thats 18 rolls... 5% or better chance of failure per roll, you are bound to make a mistake.

so... with this in mind... lets come up with some RESULTS for contingency programming bugs...

what will happen with an infinite loop? how about division by zero?
Um...I don't think rolling a 1 is an autofail on a skill check, only an attack roll or save.

21. ## Re: The Programmer

Originally Posted by Gralamin
Obviously Contigencies use Pointers. All you need is a few bugs and BAM Seg-Fault
Is that when your body gets segmented and it's your own fault?

22. ## Re: The Programmer

Originally Posted by sonofzeal
Is that when your body gets segmented and it's your own fault?
ha, it is if the spell was of the teleportation variety.

23. ## Re: The Programmer

I so do want to create a while loop. Something like "While I am within sight of X (Designated by an if statement), cast X spell every round."

What about... Contingent Sanctum Greater Arcane Fusion? Make **** up as you go.

24. ## Re: The Programmer

Even better, we need a complier. This, of course, would be an item that makes item's call programs which gives you infinite uses of your If statement

25. ## Re: The Programmer

Originally Posted by woodenbandman
I so do want to create a while loop. Something like "While I am within sight of X (Designated by an if statement), cast X spell every round."

What about... Contingent Sanctum Greater Arcane Fusion? Make **** up as you go.
how would that work? it casts the spell once, and then the contingency is expanded, why would it give you infinite spells?

26. ## Re: The Programmer

For extra credit, prove Turing-completeness of Vancian casting.

27. ## Re: The Programmer

Well Sanctum Greater Arcane Fusion is apparently a 7th level spell that casts a 7th level spell and a 4th level spell. which leads to infinite spells.

What about contingency -> Sanctum Twinned Limited Wish, one wishing for the spell you want, one wishing for another contingency?

28. ## Re: The Programmer

Originally Posted by woodenbandman
Well Sanctum Greater Arcane Fusion is apparently a 7th level spell that casts a 7th level spell and a 4th level spell. which leads to infinite spells.

What about contingency -> Sanctum Twinned Limited Wish, one wishing for the spell you want, one wishing for another contingency?
question, does the arcane fusion not expressly forbid the 7th level spell being cast from being itself?

because otherwise you would just cast one greater arcane fusion which casts a GAF + 4th which casts a GAF + 4th, repeat infinity. or at least till end of battle.

Forget programming a contingency loop, just the use of infinite at will 4th level spells seems broken as hell.

29. ## Re: The Programmer

It seems to me that spell slots would be a real concern with this type of casting. Barring the idea that you somehow have infinite spell slots(at which point, you have enough power that this sort of thing is mostly unnecessary), you'd rather quickly nova through your available spells.

Still useful, sure, but it comes at a price.

I like the idea of magical computing, though...Lets see, if we expand it to a multi-caster idea, it might still be possible. Given enough high level casters with enough contingencies, you certainly could make a processor of sorts, albeit one still limited in speed by the amount of available total slots per day.

And of course, coding errors will be hilarious.

30. ## Re: The Programmer

Is it turing complete?

Where is the Jump/loop?

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•