mods.thaumcraft.Research.addTab("DREAM", "thaumcraft", "textures/modpack/idream.png", "thaumcraft", "textures/modpack/bgdream.png");
game.setLocalization("en_US", "tc.research_category.DREAM", "[AoB] Somniology");

mods.thaumcraft.Research.addResearch("SPIRITWORLD", "DREAM", "cognitio 10, sensus 10, spiritus 10, auram 10, alienis 10, iter 10", 0, 0, 1, <minecraft:end_portal>);
game.setLocalization("en_US", "tc.research_name.SPIRITWORLD", "The Spirit World");
game.setLocalization("en_US", "tc.research_text.SPIRITWORLD", "[AOB][W] Could all these really be dream?");
mods.thaumcraft.Research.addPage("SPIRITWORLD", "AgeOfBewitchment.research_page.SPIRITWORLD1");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.SPIRITWORLD1", "The spirit world, also known as dream or nightmare world can be accessed through deep sleep.<BR> There are two main ways of reaching such stages of unconsciousness.<BR>One of them is the famous brew of sleeping. Each brew can only be used one time. The other option is sleeping normally near a dream catcher of nightmares which might cause side effects and reverse the effects of other dream catchers.<BR>There are two ways to wake up during deep sleep. The first way is simply dying and the second one involves pricking yourself with an icy needle.");
mods.thaumcraft.Research.addPage("SPIRITWORLD", "AgeOfBewitchment.research_page.SPIRITWORLD2");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.SPIRITWORLD2", "You will be able to transport only two types of items between the two worlds - Icy needles and wispy cotton (and its variant).");
mods.thaumcraft.Research.setRound("SPIRITWORLD", true);

mods.thaumcraft.Research.addResearch("DREAMORES", "DREAM", "cognitio 10, sensus 10, spiritus 10, terra 10, vitreus 10, volatus 10, herba 10", 1, 2, 2, <customthings:block0:13>);
game.setLocalization("en_US", "tc.research_name.DREAMORES", "World Generation");
game.setLocalization("en_US", "tc.research_text.DREAMORES", "[AOB] ...of the spirit world");
mods.thaumcraft.Research.addPage("DREAMORES", "AgeOfBewitchment.research_page.DREAMORES1");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMORES1", "The ore generation in the spirit world is identical to the ordinary one except for four things.<BR>Infused Stone ores will spawn in clusters which contain all six kinds instead of just one per cluster.<BR>Dreamy and Nightmarish stone will also generate although it can be slightly rare, compared to normal stone.<BR>Lethargic stone might generate inside clusters of dreamy stone. Lethargic stone drops sleeping powder which should be useful later.");
mods.thaumcraft.Research.addPage("DREAMORES", "AgeOfBewitchment.research_page.DREAMORES2");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMORES2", "<IMG>thaumcraft:textures/modpack/dream/dreamstone.png:0:0:255:255:0.35</IMG><BR><IMG>thaumcraft:textures/modpack/dream/nightmarestone.png:0:0:255:255:0.30</IMG>");
mods.thaumcraft.Research.addPage("DREAMORES", "AgeOfBewitchment.research_page.DREAMORES3");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMORES3", "While exploring the spirit world, one might notice clouds of peculiar shapes.<BR>They could be just clouds or a cloud with a wavetree which can only be found in the spirit world and unlike ordinary trees, does not have any kind of seed, or sapling.");
mods.thaumcraft.Research.addPage("DREAMORES", "AgeOfBewitchment.research_page.DREAMORES4");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMORES4", "<IMG>thaumcraft:textures/modpack/dream/wavetreee.png:0:0:255:255:0.65</IMG>");
mods.thaumcraft.Research.addPage("DREAMORES", "AgeOfBewitchment.research_page.DREAMORES5");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMORES5", "Most witches travel to the spirit world to collect some wispy cotton (or its variant, disturbed cotton).<BR>Trying to pick up wispy cotton during a nightmare will turn it into disturbed cotton which is still useful but not the same.<BR>Wispy cotton can only be collected during a dream and it can spread if it is planted near a pool of flowing spirit in the dream world.<BR>Both kinds of cotton will remain in your inventory after waking up or going to sleep.");
mods.thaumcraft.Research.addPage("DREAMORES", "AgeOfBewitchment.research_page.DREAMORES6");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMORES6", "<IMG>witchery:textures/blocks/somnianCotton.png:0:0:255:255:0.35</IMG><IMG>witchery:textures/items/ingredient.disturbedCotton.png:0:0:255:255:0.35</IMG>");
mods.thaumcraft.Research.addPrereq("DREAMORES", "SPIRITWORLD", false);
mods.thaumcraft.Research.setRound("DREAMORES", true);
mods.thaumcraft.Research.setConcealed("DREAMORES", true);

mods.thaumcraft.Research.addResearch("SULFURCRYSTAL", "DREAM", "cognitio 10, spiritus 10, vitreus 10, lucrum 10", 1, 4, 1, <customthings:item:23>);
game.setLocalization("en_US", "tc.research_name.SULFURCRYSTAL", "Sulfurous Crystal");
game.setLocalization("en_US", "tc.research_text.SULFURCRYSTAL", "[AOB] Sulfur!");
mods.thaumcraft.Research.addPage("SULFURCRYSTAL", "AgeOfBewitchment.research_page.SULFURCRYSTAL1");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.SULFURCRYSTAL1", "Sulfurous Crystals are simply diamonds infused with dreaming spirits, brews of flowing spirit and most important of them all, sulfur.");
mods.thaumcraft.Research.addInfusionPage("SULFURCRYSTAL", <customthings:item:23>);
mods.thaumcraft.Research.addPrereq("SULFURCRYSTAL", "DREAMORES", false);
mods.thaumcraft.Research.setConcealed("SULFURCRYSTAL", true);

mods.thaumcraft.Research.addResearch("SULFURTOOLS", "DREAM", "cognitio 10, spiritus 10, instrumentum 10, perfodio 10, telum 10", 3, 7, 2, <customthings:sulfuricPickaxe>);
game.setLocalization("en_US", "tc.research_name.SULFURTOOLS", "Sulfuric Tools");
game.setLocalization("en_US", "tc.research_text.SULFURTOOLS", "[AOB] Better than diamond!");
mods.thaumcraft.Research.addPage("SULFURTOOLS", "AgeOfBewitchment.research_page.SULFURTOOLS1");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.SULFURTOOLS1", "Sulfuric tools are just slightly better than diamond tools in terms of durability, damage and mining speed.<BR>Even though they are slightly better, they are also slightly cheaper.");
mods.thaumcraft.Research.addInfusionPage("SULFURTOOLS", <customthings:sulfuricPickaxe>.withTag({ench: [{lvl: 2 as short, id: 32 as short}]}));
mods.thaumcraft.Research.addInfusionPage("SULFURTOOLS", <customthings:sulfuricShovel>.withTag({ench: [{lvl: 2 as short, id: 32 as short}]}));
mods.thaumcraft.Research.addInfusionPage("SULFURTOOLS", <customthings:sulfuricAxe>.withTag({ench: [{lvl: 2 as short, id: 32 as short}]}));
mods.thaumcraft.Research.addInfusionPage("SULFURTOOLS", <customthings:sulfuricSword>.withTag({ench: [{lvl: 3 as short, id: 17 as short}]}));
mods.thaumcraft.Research.addPrereq("SULFURTOOLS", "SULFURCRYSTAL", false);
mods.thaumcraft.Research.setConcealed("SULFURTOOLS", true);

mods.thaumcraft.Research.addResearch("DREAMTOOLS", "DREAM", "cognitio 10, spiritus 10, instrumentum 10, perfodio 10", 5, 6, 1, <customthings:dreamyPickaxe>);
game.setLocalization("en_US", "tc.research_name.DREAMTOOLS", "Dreamy Tools");
game.setLocalization("en_US", "tc.research_text.DREAMTOOLS", "[AOB] Better than sulfuric!");
mods.thaumcraft.Research.addPage("DREAMTOOLS", "AgeOfBewitchment.research_page.DREAMTOOLS1");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMTOOLS1", "Dreamy tools are better versions of sulfuric tools.<BR>They have a higher durability, they are more efficient and they are almost as enchantable as golden tools.");
mods.thaumcraft.Research.addInfusionPage("DREAMTOOLS", <customthings:dreamyPickaxe>);
mods.thaumcraft.Research.addInfusionPage("DREAMTOOLS", <customthings:dreamyAxe>);
mods.thaumcraft.Research.addInfusionPage("DREAMTOOLS", <customthings:dreamyShovel>);
mods.thaumcraft.Research.addPrereq("DREAMTOOLS", "SULFURTOOLS", false);
mods.thaumcraft.Research.setConcealed("DREAMTOOLS", true);

mods.thaumcraft.Research.addResearch("NIGHTMARESWORD", "DREAM", "cognitio 10, spiritus 10, telum 10, tenebrae 10, ira 10", 1, 9, 2, <customthings:nightmarishSword>);
game.setLocalization("en_US", "tc.research_name.NIGHTMARESWORD", "Nightmare Sword");
game.setLocalization("en_US", "tc.research_text.NIGHTMARESWORD", "[AOB] Quite better than sulfuric!");
mods.thaumcraft.Research.addPage("NIGHTMARESWORD", "AgeOfBewitchment.research_page.NIGHTMARESWORD1");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.NIGHTMARESWORD1", "Sadly, dreamy tools don't include a sword so the Nightmare Sword covers that spot.<BR>Just like the dreamy tools, the Nightmare Sword is a slightly better version of the sulfuric sword but it is also highly enchantable.");
mods.thaumcraft.Research.addInfusionPage("NIGHTMARESWORD", <customthings:nightmarishSword>);
mods.thaumcraft.Research.addPrereq("NIGHTMARESWORD", "SULFURTOOLS", false);
mods.thaumcraft.Research.addPrereq("NIGHTMARESWORD", "NIGHTMAREFUEL", false);
mods.thaumcraft.Warp.addToResearch("NIGHTMARESWORD", 2);
mods.thaumcraft.Research.setConcealed("NIGHTMARESWORD", true);


mods.thaumcraft.Research.addResearch("DREAMPENTACLE", "DREAM", "spiritus 10, praecantatio 10, alienis 10, iter 10", 4, 2, 1, <customthings:item:25>);
game.setLocalization("en_US", "tc.research_name.DREAMPENTACLE", "Binding of Spirit and World");
game.setLocalization("en_US", "tc.research_text.DREAMPENTACLE", "[AOB] Translocational");
mods.thaumcraft.Research.addPage("DREAMPENTACLE", "AgeOfBewitchment.research_page.DREAMPENTACLE1");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMPENTACLE1", "This specialized binding seems capable of enabling item transportation between the physical world, and the world of dreams.");
mods.thaumcraft.Research.addCruciblePage("DREAMPENTACLE", <customthings:item:25>);
mods.thaumcraft.Research.addPrereq("DREAMPENTACLE", "DREAMORES", false);
mods.thaumcraft.Research.setConcealed("DREAMPENTACLE", true);


mods.thaumcraft.Research.addResearch("DREAMVARIANTS", "DREAM", "cognitio 10, sensus 10, spiritus 10, desidia 10, infernus 10, tenebrae 10, vacuos 10", -1 as int, 2, 3, <minecraft:bed>);
game.setLocalization("en_US", "tc.research_name.DREAMVARIANTS", "Variants of the Spirit World");
game.setLocalization("en_US", "tc.research_text.DREAMVARIANTS", "[AOB][W] There is more!");
mods.thaumcraft.Research.addPage("DREAMVARIANTS", "AgeOfBewitchment.research_page.DREAMVARIANTS1");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMVARIANTS1", "Everyone's first trip to the spirit world will most likely put them in a nightmare.<BR>During nighrmares, hostile creatures will spawn all the time, the sky will have a greenish tint and most importantly, you will be constantly chased by your own nightmares. These creatures are able to remove your armor and they become invincible for a few seconds after being attacked. They can be killed though and they usually drop Mellifluous Hunger.<BR>Also wispy cotton will only drop disturbed cotton during a nightmare.");
mods.thaumcraft.Research.addPage("DREAMVARIANTS", "AgeOfBewitchment.research_page.DREAMVARIANTS2");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMVARIANTS2", "<IMG>thaumcraft:textures/modpack/dream/nightmare.png:0:0:255:255:0.60</IMG>");
mods.thaumcraft.Research.addPage("DREAMVARIANTS", "AgeOfBewitchment.research_page.DREAMVARIANTS3");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMVARIANTS3", "Placing a dream weaver of nightmares, a pool of flowing spirit and/or wispy cotton around yourself when entering deep sleep will increase the chances of getting a dream rather than a nightmare.<BR>During dreams, the sun will always be up, the sky will have a magenta tint and you will be able to collect wispy cotton normally.<BR>The best thing about these kinds of dreams is that you don't have to worry about your own nightmares coming after you.");
mods.thaumcraft.Research.addPage("DREAMVARIANTS", "AgeOfBewitchment.research_page.DREAMVARIANTS4");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMVARIANTS4", "<IMG>thaumcraft:textures/modpack/dream/dream.png:0:0:255:255:0.60</IMG>");
mods.thaumcraft.Research.addPage("DREAMVARIANTS", "AgeOfBewitchment.research_page.DREAMVARIANTS5");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMVARIANTS5", "In the other hand, nightmares can become even more terrifying and painful.<BR>In order to achieve this, one must sleep near a pool of flowing spirit, a dream weaver of nightmares and fire while listening to a beating demon heart.<BR>A hellish nightmare is basically an ordinary nightmare with a red sky, demons spawning randomly and fire falling from the sky.");
mods.thaumcraft.Research.addPage("DREAMVARIANTS", "AgeOfBewitchment.research_page.DREAMVARIANTS6");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMVARIANTS6", "<IMG>thaumcraft:textures/modpack/dream/helldream.png:0:0:255:255:0.60</IMG>");
mods.thaumcraft.Research.addPage("DREAMVARIANTS", "AgeOfBewitchment.research_page.DREAMVARIANTS7");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMVARIANTS7", "<IMG>thaumcraft:textures/modpack/dream/nightmaremob.png:0:0:255:255:1.10</IMG>");
mods.thaumcraft.Research.addPage("DREAMVARIANTS", "AgeOfBewitchment.research_page.DREAMVARIANTS8");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMVARIANTS8", "<IMG>thaumcraft:textures/modpack/evil/face2.png:0:0:255:255:0.70</IMG>");
mods.thaumcraft.Research.addPrereq("DREAMVARIANTS", "SPIRITWORLD", false);
mods.thaumcraft.Research.setRound("DREAMVARIANTS", true);
mods.thaumcraft.Warp.addToResearch("DREAMVARIANTS", 1);
mods.thaumcraft.Research.setConcealed("DREAMVARIANTS", true);

mods.thaumcraft.Research.addResearch("DREAMWEAVER", "DREAM", "cognitio 10, spiritus 10, tutamen 10, vinculum 10", -1 as int, 4, 2, <witchery:ingredient:6>);
game.setLocalization("en_US", "tc.research_name.DREAMWEAVER", "Dreamweaver of Nightmares");
game.setLocalization("en_US", "tc.research_text.DREAMWEAVER", "[AOB][W] Protection against our own fears...");
mods.thaumcraft.Research.addPage("DREAMWEAVER", "AgeOfBewitchment.research_page.DREAMWEAVER1");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.DREAMWEAVER1", "This dream weaver can transform a nightmare into a pleasant dream during deep sleep.<BR>But when somebody sleeps on a bed near such a dream weaver,they will wake up tiered. Also, effects from other dream weavers will turn negative.");
mods.thaumcraft.Research.addArcanePage("DREAMWEAVER", <witchery:ingredient:6>);
mods.thaumcraft.Research.addPrereq("DREAMWEAVER", "DREAMVARIANTS", false);
mods.thaumcraft.Research.setConcealed("DREAMWEAVER", true);

mods.thaumcraft.Research.addResearch("NIGHTMARECHARM", "DREAM", "cognitio 10, spiritus 10, tutamen 10, tenebrae 10, sano 20", -3 as int, 4, 2, <witchery:ingredient:110>);
game.setLocalization("en_US", "tc.research_name.NIGHTMARECHARM", "Charm of Fanciful Thinking");
game.setLocalization("en_US", "tc.research_text.NIGHTMARECHARM", "[AOB][W] Further protection against nightmares");
mods.thaumcraft.Research.addPage("NIGHTMARECHARM", "AgeOfBewitchment.research_page.NIGHTMARECHARM1");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.NIGHTMARECHARM1", "The Charm of Fanciful Thinking is a rather simple item which prevents nightmares from undressing you as long as it is in your inventory.");
mods.thaumcraft.Research.addArcanePage("NIGHTMARECHARM", <witchery:ingredient:110>);
mods.thaumcraft.Research.addPrereq("NIGHTMARECHARM", "DREAMWEAVER", false);
mods.thaumcraft.Research.setConcealed("NIGHTMARECHARM", true);

mods.thaumcraft.Research.addResearch("NIGHTMAREFUEL", "DREAM", "cognitio 10, spiritus 10, ignis 10, tenebrae 10, potentia 10", -1 as int, 7, 1, <customthings:item:21>);
game.setLocalization("en_US", "tc.research_name.NIGHTMAREFUEL", "Nightmare Fuel");
game.setLocalization("en_US", "tc.research_text.NIGHTMAREFUEL", "[AOB] Alternative energy source?");
mods.thaumcraft.Research.addPage("NIGHTMAREFUEL", "AgeOfBewitchment.research_page.NIGHTMAREFUEL1");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.NIGHTMAREFUEL1", "All those nightmares might have made you wonder about other uses of the Mellifluous Hunger.<BR>The term nightmare fuel has been around for quite a while but it has never been used with a literal sense. Maybe it is time to change that.");
mods.thaumcraft.Research.addArcanePage("NIGHTMAREFUEL", <customthings:item:21>);
mods.thaumcraft.Research.addInfusionPage("NIGHTMAREFUEL", <customthings:item:35>);
mods.thaumcraft.Research.addPrereq("NIGHTMAREFUEL", "DREAMWEAVER", false);
mods.thaumcraft.Warp.addToResearch("NIGHTMAREFUEL", 3);
mods.thaumcraft.Research.setConcealed("NIGHTMAREFUEL", true);


mods.thaumcraft.Research.addResearch("MANDRAKEOIL", "DREAM", "cognitio 10, sensus 10, spiritus 10, herba 10, desidia 10", 0, -2 as int, 1, <customthings:item:30>);
game.setLocalization("en_US", "tc.research_name.MANDRAKEOIL", "An old recipe");
game.setLocalization("en_US", "tc.research_text.MANDRAKEOIL", "[AOB] ...for extra sleep");
mods.thaumcraft.Research.addPage("MANDRAKEOIL", "AgeOfBewitchment.research_page.MANDRAKEOIL1");
game.setLocalization("en_US", "AgeOfBewitchment.research_page.MANDRAKEOIL1", "Some whitches found the recipe for the brew of sleep to be too complicated for such a simple potion, so, with some inspiration, the invented a new recipe which involves mandrakes and some ingredients from the spirit world.");
mods.thaumcraft.Research.addCruciblePage("MANDRAKEOIL", <customthings:item:30>);
mods.thaumcraft.Research.addArcanePage("MANDRAKEOIL", <witchery:ingredient:95>);
mods.thaumcraft.Research.addPrereq("MANDRAKEOIL", "SPIRITWORLD", false);
mods.thaumcraft.Research.setConcealed("MANDRAKEOIL", true);