ModTweaker

ModTweaker

88M Downloads

Thaumcraft Research Parenting Crash

Wyrrrd opened this issue ยท 6 comments

commented

When trying to add Prereqs to my custom Research, the client crashes when opening the edited Thaumonomicon tab.

Everything except the parenting works perfectly when removing the last two "addPrereq"-lines.
The Research appears at the given tab and coordinates in the Thaumonomicon and it is also round and spikey (as some other researches in the BASICS tab).

(EDIT: I should mention this happens in SMP. I tried in Single Player, parenting worked. I changed something in the script. It breaks down again. I am tracing back my steps to find out what I did wrong.)

newresearch

But the strange thing is that there appears a parsing error when just commenting them out.

MT Code:

// ### Knowledge Fragment Doubling ###//

val bala    = <Thaumcraft:ItemShard:6>;
val knowl   = <Thaumcraft:ItemResource:9>;
val knowl2  = <Quadrum:fragmentInfused>;
val knowl3  = <Quadrum:fragmentVibrate>;
val end      = <minecraft:ender_pearl>;

mods.thaumcraft.Aspects.set(knowl2, "cognitio 8, alienis 4, desidia 1");

mods.thaumcraft.Research.addResearch("FRAGMENTDOUBLE", "BASICS", "sensus 1, vitreus 1, alienis 1, desidia 1, cognitio 1, terra 1", 5, -3, 12, knowl3);
game.setLocalization("tc.research_name.FRAGMENTDOUBLE", "Knowledge Expansion");
game.setLocalization("tc.research_text.FRAGMENTDOUBLE", "[GF] Why not both?");
mods.thaumcraft.Research.setConcealed("FRAGMENTDOUBLE", true);
mods.thaumcraft.Research.setSpikey("FRAGMENTDOUBLE", true);
mods.thaumcraft.Research.setRound("FRAGMENTDOUBLE", true);

mods.thaumcraft.Crucible.addRecipe("FRAGMENTDOUBLE", knowl2, knowl, "tenebrae 10, vacuos 10, desidia 10");
mods.thaumcraft.Infusion.addRecipe("FRAGMENTDOUBLE", knowl2, [end,end,end,end,end], "alienis 20, motus 20, potentia 20", knowl3, 5);
mods.thaumcraft.Arcane.addShaped("FRAGMENTDOUBLE", knowl*2, "aqua 20, terra 20, perditio 20, aer 20, ordo 20, ignis 20", [[bala, bala, bala],[bala, knowl3, bala],[bala, bala, bala]]);

mods.thaumcraft.Research.addPage("FRAGMENTDOUBLE","gf.research_page.FRAGMENTDOUBLE");
game.setLocalization("gf.research_page.FRAGMENTDOUBLE", "You got very lazy about finding these Knowledge Fragments lately. But you found a workaround...<LINE>You discovered that simple copying doesn't work out pretty well since you need new parts of knowledge to complete your all new research. First you connect a Fragment to another one in the void. After making them vibrate in synch, you must apply a heavy magical pulling force between them while at the same time maintaining a stabilization of your half of the connection to extract the second Fragment from the vast nothingness.");

mods.thaumcraft.Research.addCruciblePage("FRAGMENTDOUBLE", knowl2);
mods.thaumcraft.Research.addInfusionPage("FRAGMENTDOUBLE", knowl3);
mods.thaumcraft.Research.addArcanePage("FRAGMENTDOUBLE", knowl);
mods.thaumcraft.Warp.addToResearch("FRAGMENTDOUBLE", 1);

mods.thaumcraft.Research.addPrereq("FRAGMENTDOUBLE","INFUSION",true);
mods.thaumcraft.Research.addPrereq("FRAGMENTDOUBLE","KNOWFRAG",false);

Client Crash Report

commented

I just figured out that the Thaumonomicon is handled client-side. Since my scripts are server-sided the client doesn't know how to draw the prereq lines and crashes. Will tell more when I find a workaround.

EDIT: Ah figures! Simply having the scripts on both server and client side fixed it.
Why didn't I think of that?!

commented

UPDATE: I have still no idea what's the problem here...

commented

Could you track down which one of the preRequ is causing it?

commented

I did. And it looks more awesome than it is, it's basically a sepia knowledge fragment with blue "text" and black lines and the enchantment wobble effect ;)

commented

That texture is sexy! You made them?!

commented

Any. As far as I tried, every single line containing a preReq causes a crash when taking a look on the corresponding thaumonomicon page... It only works without every single one of these lines.

(I added some more things from ProjectE to be researched in the book, same issue.)