Monday, September 3, 2012

Excel Random Domain Events

I love excel.

I started building random NPC generators in Excel. They are great even though half finished, but unfrotunatley useless to anyone else because they are in my homebrew rules.

The only problem with excel is that the random formula and conditional functions take a literal age to write out and then it's heinous to make sure they are correct. It would be much easier to copy and paste and make use of already working tables.

So here I have the functions for random domain/realm events. The events are taken from an ancient Dragon Magazine (i can't remember which issue).

Simply put =RANDBETWEEN(0,99) in cell A1 and then paste this formula next to it in cell B2;

=IF(A12<3,"Comet flies across sky",IF(A12<4,"Death of a Ruler or Official",IF(A12<5,"Earthquake",IF(A12<6,"Arcane Explosion",IF(A12<11,"Minor Fires",IF(A12<12,"Major Fire",IF(A12<17,"Flood/Floods",IF(A12<19,"Hurricane or Typhoon ",IF(A12<21,"Market glut",IF(A12<23,"Market shortage",IF(A12<24,"Meteor Strike, major",IF(A12<26,"Minor meteor shower",IF(A12<28,"Plague",IF(A12<30,"Major population change, double normal",IF(A12<31,"Resource lost",IF(A12<32,"Resource found",IF(A12<33,"Sinkhole/landslide",IF(A12<41,"Major storm",IF(A12<43,"Tornado",IF(A12<44,"Loss of trade route",IF(A12<45,"Gain a trade route",IF(A12<46,"Volcanic event",IF(A12<48,"major water based event, tsunami, waterspout, whirpool, spring tide",IF(A12<50,"Assassination",IF(A12<55,"Bandit activity",IF(A12<57,"Birth in ruling family",IF(A12<61,"Border skirmishes",IF(A12<62,"Cultural Discovery",IF(A12<63,"Fanatic Cult",IF(A12<64,"Insurrection",IF(A12<65,"Lycanthropic outbreak",IF(A12<67,"Magical happening or cosmic alignment",IF(A12<68,"Migration",IF(A12<69,"Pretender or ursurper",IF(A12<71,"Raids from other dominion",IF(A12<72,"Minor rebellion",IF(A12<73,"New resident specialists",IF(A12<79,"Spy ring",IF(A12<82,"Traitor",IF(A12<84,"Accidental death of official",IF(A12<85,"VIP visitor",IF(A12<91,"wandering natural monsters!",IF(A12<95,"Undead plague",IF(A12<100,"Daemonic intervention",ERROR))))))))))))))))))))))))))))))))))))))))))))


It should end up looking like this;



So on the left you have your RANDBETWEEN(0,99) function, and then directly next to it you have your FORMULA from above. Drag down once you have the first line and it will copy the cells and make them referential to their own neighbors as opposed to the first cell.

On the other side you can add the names of your domains - as like I had done, or simply use the generator on the fly.

The reason I have used two cells for those of you who are savvy is so that the maths is easier and that my RAND functions aren't dependent on each other (which happens when you internalize to a  function them).

Enjoy!