XirmiX Posted May 31, 2014 Share Posted May 31, 2014 So I'm making a mod, as I mentioned before. All that my mod does is changes the amount of stuff you need to craft something and changes what you need as well. But one problem: when I install my mod and click on Science tab the game crashes. Here's the error: Here's my Science part in modmain: --SCIENCERecipe("researchlab", {Ingredient("goldnugget", 4),Ingredient("log", 6),Ingredient("rocks", 10),Ingredient("rope", 1),Ingredient("gears", 2),Ingredient("twigs", 6),Ingredient("transistor"), 1}, RECIPETABS.SCIENCE, TECH.NONE, "researchlab_placer")Recipe("researchlab2", {Ingredient("boards", 4),Ingredient("cutstone", 9), Ingredient("transistor", 2),Ingredient("gears", 3),}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE, "researchlab2_placer")Recipe("transistor", {Ingredient("goldnugget", 2), Ingredient("cutstone", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE)Recipe("winterometer", {Ingredient("boards", 2), Ingredient("goldnugget", 2)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE, "winterometer_placer")Recipe("rainometer", {Ingredient("boards", 2), Ingredient("goldnugget", 2), Ingredient("rope",2)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE, "rainometer_placer")Recipe("gunpowder", {Ingredient("rottenegg", 1), Ingredient("charcoal", 1), Ingredient("nitre", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_TWO)Recipe("lightning_rod", {Ingredient("goldnugget", 4), Ingredient("cutstone", 1), Ingredient("lightninggoathorn", 1), Ingredient("marble")},RECIPETABS.SCIENCE, TECH.SCIENCE_ONE, "lightning_rod_placer")Recipe("firesuppressor", {Ingredient("gears", 2),Ingredient("ice", 15),Ingredient("transistor", 2),Ingredient("cutstone", 8)}, RECIPETABS.SCIENCE, TECH.SCIENCE_TWO, "firesuppressor_placer") Please help me figure out the error, I really want to get into mod making. Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/ Share on other sites More sharing options...
Minik435 Posted May 31, 2014 Share Posted May 31, 2014 Do you can post modmain.lua file here? It will be easier to fix. Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491683 Share on other sites More sharing options...
Silentdarkness1 Posted May 31, 2014 Share Posted May 31, 2014 Did you define the following in modmain? RECIPETABS = GLOBAL.RECIPETABSRecipe = GLOBAL.RecipeIngredient = GLOBAL.IngredientTECH = GLOBAL.TECH or something to that effect? Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491719 Share on other sites More sharing options...
XirmiX Posted May 31, 2014 Author Share Posted May 31, 2014 (edited) Did you define the following in modmain? RECIPETABS = GLOBAL.RECIPETABSRecipe = GLOBAL.RecipeIngredient = GLOBAL.IngredientTECH = GLOBAL.TECH or something to that effect? Yes I do have it, but I only used that for Purple gem refining. Question: Why do I need it? What difference does it make? For the purple gem I needed it, all tho I didn't even change the Purple gem recipe! All tho I did put it in Magic section (yes, I DID rename SCIENCE_ONE for it to MAGIC_[whatever prestihatitator prototyper is called]) And I don't want to post all of my modmain, because someone might steal my mod. Edited May 31, 2014 by XirmiX Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491749 Share on other sites More sharing options...
Minik435 Posted May 31, 2014 Share Posted May 31, 2014 I got it @XirmiX! Done! (Change extension)modmain.txt Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491754 Share on other sites More sharing options...
debugman18 Posted May 31, 2014 Share Posted May 31, 2014 Yes I do have it, but I only used that for Purple gem refining. Question: Why do I need it? What difference does it make? For the purple gem I needed it, all tho I didn't even change the Purple gem recipe! All tho I did put it in Magic section (yes, I DID rename SCIENCE_ONE for it to MAGIC_[whatever prestihatitator prototyper is called]) And I don't want to post all of my modmain, because someone might steal my mod. VARIABLE = GLOBAL.VARIABLE Those are needed because they are global variables, and they need to be declared in your modmain so that the game knows what you mean when you say stuff like DoThings(VARIABLE) since otherwise, VARIABLE is nil, and you can't do something with nothing. If you won't post your code, then we can't help you much. That's also a very confusing stance to have, since your mod will be open source when you release it. Up and Away, for instance, has been visible since it's inception, and nobody stole it. Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491758 Share on other sites More sharing options...
Minik435 Posted May 31, 2014 Share Posted May 31, 2014 (edited) @debugman18, I already solved the problem... really...EDIT: 123rd post xD Edited May 31, 2014 by Minik435 Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491762 Share on other sites More sharing options...
XirmiX Posted May 31, 2014 Author Share Posted May 31, 2014 @debugman18, I already solved the problem... really...EDIT: 123rd post xDWhat are you talking about? I checked your thing and you didn't do anything from what I already got in the Science tab! What did you do then? Explain. Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491764 Share on other sites More sharing options...
debugman18 Posted May 31, 2014 Share Posted May 31, 2014 @debugman18, I already solved the problem... really...EDIT: 123rd post xD I didn't see that. That's besides the point though, nobody answered his question about why he needed to declare GLOBAL variables like that. Teach a man to fish, etc. Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491765 Share on other sites More sharing options...
Minik435 Posted May 31, 2014 Share Posted May 31, 2014 (edited) @debugman18 but he only changes recipes and look here:Recipe("researchlab", {Ingredient("goldnugget", 4),Ingredient("log", 6),Ingredient("rocks", 10),Ingredient("rope", 1),Ingredient("gears", 2),Ingredient("twigs", 6),Ingredient("transistor"), 1}, RECIPETABS.SCIENCE, TECH.NONE, "researchlab_placer") Ingredient("transistor"), 1 --> Ingredient("transistor", 1) Edited May 31, 2014 by Minik435 Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491767 Share on other sites More sharing options...
XirmiX Posted May 31, 2014 Author Share Posted May 31, 2014 (edited) @debugman18 but he only changes recipes and look here:Recipe("researchlab", {Ingredient("goldnugget", 4),Ingredient("log", 6),Ingredient("rocks", 10),Ingredient("rope", 1),Ingredient("gears", 2),Ingredient("twigs", 6),Ingredient("transistor"), 1}, RECIPETABS.SCIENCE, TECH.NONE, "researchlab_placer") Ingredient("transistor"), 1 --> Ingredient("transistor", 1)!£$^$%*()^*&)*(_^&&$£^%(%^$^&^&$%!!! Edited May 31, 2014 by XirmiX Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491771 Share on other sites More sharing options...
debugman18 Posted May 31, 2014 Share Posted May 31, 2014 (edited) @debugman18 but he only changes recipes and look here:Recipe("researchlab", {Ingredient("goldnugget", 4),Ingredient("log", 6),Ingredient("rocks", 10),Ingredient("rope", 1),Ingredient("gears", 2),Ingredient("twigs", 6),Ingredient("transistor"), 1}, RECIPETABS.SCIENCE, TECH.NONE, "researchlab_placer") Ingredient("transistor"), 1 --> Ingredient("transistor", 1) That's true, but he still had a question that needed to be answered about a fairly important bit of information for a modder. That bit with GLOBAL is used all of the time, so knowing why it's important is, well, important. Your fix is correct. He was passing the ingredient name correctly, but was passing the quantity outside of it. Edited May 31, 2014 by debugman18 Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491772 Share on other sites More sharing options...
Minik435 Posted May 31, 2014 Share Posted May 31, 2014 !£$^$%*()^*&)*(_^&&$£^%(%^$^&^&$%!!!Killed me with that xD That's true, but he still had a question that needed to be answered about a fairly important bit of information for a modder. That bit with GLOBAL is used all of the time, so knowing why it's important is, well, important. Your fix is correct. He was passing the ingredient name correctly, but was passing the quantity outside of it.Okay, I'll left it to do for you Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491776 Share on other sites More sharing options...
debugman18 Posted May 31, 2014 Share Posted May 31, 2014 Killed me with that xD Okay, I'll left it to do for you @XirmiXYour screenshot contains something you probably don't want getting out to everybody. Just a friendly heads-up. Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491781 Share on other sites More sharing options...
XirmiX Posted May 31, 2014 Author Share Posted May 31, 2014 Allright, allright, that Poker face thing was only a joke. Anyways, so how should I write my Science bit? It still crashes. I do have this at the beginning of the file: local Ingredient = GLOBAL.Ingredientlocal RECIPETABS = GLOBAL.RECIPETABSlocal STRINGS = GLOBAL.STRINGSlocal Recipe = GLOBAL.Recipelocal TECH = GLOBAL.TECHlocal recipe = Recipelocal tuning = Tuning Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491783 Share on other sites More sharing options...
Minik435 Posted May 31, 2014 Share Posted May 31, 2014 That's because somebody in Wizardry 8 ... is not good in english... change "trinknet" to "trinket"... Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491785 Share on other sites More sharing options...
debugman18 Posted May 31, 2014 Share Posted May 31, 2014 Allright, allright, that Poker face thing was only a joke. Anyways, so how should I write my Science bit? It still crashes. I do have this at the beginning of the file: local Ingredient = GLOBAL.Ingredientlocal RECIPETABS = GLOBAL.RECIPETABSlocal STRINGS = GLOBAL.STRINGSlocal Recipe = GLOBAL.Recipelocal TECH = GLOBAL.TECHlocal recipe = Recipelocal tuning = Tuning What is the specific error you are getting? Also, what are you using these variables for? local recipe = Recipelocal tuning = Tuning Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491786 Share on other sites More sharing options...
XirmiX Posted May 31, 2014 Author Share Posted May 31, 2014 (edited) What is the specific error you are getting? Also, what are you using these variables for? local recipe = Recipelocal tuning = Tuning I don't even know what it does! Minik453 just told me to write it and didn't give a reason why. I'm guessing that's something to do with functioning stuff... idk. It was mainly for fixing Purple gem bug which happened without a reason. And I don't know how to post my modmain so you can download it. Edited May 31, 2014 by XirmiX Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491788 Share on other sites More sharing options...
Minik435 Posted May 31, 2014 Share Posted May 31, 2014 I said, try to use my modmain in 5th post... I posted repaired modmain from our private chat with trinkets in recipes. And thoselocal recipe = Recipelocal tuning = TuningI posted because it crashed without it :/ Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491802 Share on other sites More sharing options...
MaxStrategy Posted May 31, 2014 Share Posted May 31, 2014 Good luck with the mod! Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491810 Share on other sites More sharing options...
XirmiX Posted May 31, 2014 Author Share Posted May 31, 2014 (edited) Yeah, well never mind trinkets (Actually thanks for doing that) I tried to have my program without the trinkets and it still crashed. I think the problem is that having so many items required to craft something just crashes the game or even just modifying Science tab recipes makes the game crash: the question is why and how to fix this. EDIT: hei the mod actually works now! Wow! I do not know what was the problem before, but it sure works now! I tried to test this and created a science machine (obviously debug spawned stuff) and then hammered it to see if it crashes or of it drops half of the stuff I required as recipes for it and it worked as well! I decided to remove the doodad for Science machine, I don't even know why I added it for it sinse you need Science machine to actually build the doodad itself, lol. Edited May 31, 2014 by XirmiX Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491832 Share on other sites More sharing options...
XirmiX Posted May 31, 2014 Author Share Posted May 31, 2014 (edited) There are two things I just want to add for this mod: 1) add more loot to drop from mobs and stuff2) make it so the recipes look more like this (basically have all items in the craft thing show smaller and for the first item to start at the left side and continue to the right up until the 6th item and then go a row down): Edited May 31, 2014 by XirmiX Link to comment https://forums.kleientertainment.com/forums/topic/37016-harder-recipes-mod-need-help/#findComment-491853 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now