Jump to content

Giving character access to Magic tab


Recommended Posts

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 hereend

but 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

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

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	end

Science 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 by DarkXero
Link to comment
Share on other sites

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	end

Science 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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...