Jump to content

Recommended Posts

I want to make certain mod items to be only created by mod character.

 

 

Whenever I put these codes in master_postinit, DST did not work.

 

 

I know that certain characters like webber have a speical ability to create his own Item even it's code exist in common_postinit.

 

 

How can I do this on mod character?  

 

Edited by Conker446

In the common_postinit. If you want the recipes to be moved to the top of the section, you can use this method:

	local nest_recipe = Recipe("spidereggsack", {Ingredient("silk", 12), Ingredient("spidergland", 6), Ingredient("papyrus", 6)}, RECIPETABS.TOWN, TECH.NONE)	nest_recipe.sortkey = -nest_recipe.sortkey

The reason you can't just set the sortkey to 1 anymore is that the game uses the sortkey to tell the server what to build, so it has to be unique.

In the common_postinit. If you want the recipes to be moved to the top of the section, you can use this method:

	local nest_recipe = Recipe("spidereggsack", {Ingredient("silk", 12), Ingredient("spidergland", 6), Ingredient("papyrus", 6)}, RECIPETABS.TOWN, TECH.NONE)	nest_recipe.sortkey = -nest_recipe.sortkey

The reason you can't just set the sortkey to 1 anymore is that the game uses the sortkey to tell the server what to build, so it has to be unique.

 

So kind, so cool, so wonderful!!!!!!!!!!!!!!!!!!

In the common_postinit. If you want the recipes to be moved to the top of the section, you can use this method:

	local nest_recipe = Recipe("spidereggsack", {Ingredient("silk", 12), Ingredient("spidergland", 6), Ingredient("papyrus", 6)}, RECIPETABS.TOWN, TECH.NONE)	nest_recipe.sortkey = -nest_recipe.sortkey

The reason you can't just set the sortkey to 1 anymore is that the game uses the sortkey to tell the server what to build, so it has to be unique.

 

uh... can I ask one more thing about this??

 

If I do what you told me to do, other guest's character(not mod character) can not create mod item, am I right? - It is what I wanted to do.

 

Then, how can I arrange my mod item in creating taps?

 

I actually thought that sortkey is usually used to arrange item list.

Edited by Conker446

@Conker446, Sortkey is used to arrange them in the list, but now it's also used for the networking.

 

But yes, if you put it in the common_postinit of webweb, then only webwebs will be able to make them. 

 

Wow.. I respect your knowledge...

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
×
  • Create New...