Raksen Posted April 21, 2015 Share Posted April 21, 2015 I'm trying to make it so my character can access the first tier of Magic tech without having to use a research lab. Right now I'm just using the magic_bonus variable like this...local master_postinit = function(inst) -- stuff here inst.components.builder.magic_bonus = 1 -- other stuff hereendbut it only lets him use the Magic tab when he's standing next to a research machine of some kind.Ideally I'd also like to make it so he only can access the first tier of Magic without a machine, rather than giving him a bonus to magic and letting him craft Shadow Manipulator stuff at the Prestihatitator. Is there any possible way to do this? Link to comment Share on other sites More sharing options...
DarkXero Posted April 21, 2015 Share Posted April 21, 2015 inst.components.builder.magic_bonus = 2 Link to comment Share on other sites More sharing options...
Raksen Posted April 21, 2015 Author Share Posted April 21, 2015 inst.components.builder.magic_bonus = 2 Well that's one way to fix it, but it still allows him to prototype every single magic recipe just by standing next to a Science Machine. Is there any way to allow him access to tier 1 magic while still requiring a Shadow Manipulator for tier 2? Link to comment Share on other sites More sharing options...
DarkXero Posted April 21, 2015 Share Posted April 21, 2015 (edited) local myrecipes = { "nightmarefuel", "purplegem", "researchlab3", "resurrectionstatue", "panflute", "onemanband", "nightlight", "amulet", "blueamulet", "icestaff"} if inst.components.builder then for k, v in pairs(myrecipes) do inst.components.builder:AddRecipe(v) end endScience gives +1 magic, presti gives +2, manipulator +3.So +2 bonus, +1 of science = +3 magic, you are right.With +1 bonus, you get +2 in science, and +3 in presti. Edited April 21, 2015 by DarkXero Link to comment Share on other sites More sharing options...
Raksen Posted April 21, 2015 Author Share Posted April 21, 2015 local myrecipes = { "nightmarefuel", "purplegem", "researchlab3", "resurrectionstatue", "panflute", "onemanband", "nightlight", "amulet", "blueamulet", "icestaff"} if inst.components.builder then for k, v in pairs(myrecipes) do inst.components.builder:AddRecipe(v) end endScience gives +1 magic, presti gives +2, manipulator +3.So +2 bonus, +1 of science = +3 magic, you are right.With +1 bonus, you get +2 in science, and +3 in presti. Well... that is a rather straightforward way of doing it. Thanks! Link to comment Share on other sites More sharing options...
DarkXero Posted April 21, 2015 Share Posted April 21, 2015 Well... that is a rather straightforward way of doing it. Thanks! The other way would be to move the shadow manipulator stuff one tier up, so that with the +2 bonus you get:Science +1 with bonus +2 = +3 < 4.Presti +2 with bonus +2 = 4 = 4. And edit the shadow manipulation to have 4, instead of 3. But I think the myrecipes has the advantage because it even allows you to pick certain things out of the tier1 list you may not like. Link to comment Share on other sites More sharing options...
Doctor Donna Posted August 9, 2015 Share Posted August 9, 2015 how to unlock the ice staff recipe without any engine? Thanks Link to comment Share on other sites More sharing options...
DarkXero Posted August 9, 2015 Share Posted August 9, 2015 @EulenMarie:local function OnNewSpawn(inst) inst.components.builder:AddRecipe("icestaff")endlocal function master_postinit(inst) -- other code of yours inst.OnNewSpawn = OnNewSpawnendin iceking.lua. Link to comment 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