Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
function Recipe.OnGiveXP.Tailoring10(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Tailoring, 10);
end
-- On recipe add this
OnGiveXP:Recipe.OnGiveXP.Tailoring10,
-- to add 10 exp for what your recipe is doing to tailoring
player:getXp():AddXP(Perks.Blacksmith, 25);
end
-- on recipe add for example to invoke the one that gives 10 MetalWelding
OnGiveXP:Recipe.OnGiveXP.MetalWelding10,
-- to call that existing fuction.
player:getXp():AddXP(Perks.MetalWelding, 10);
end
function Recipe.OnGiveXP.MetalWelding15(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.MetalWelding, 15);
end
function Recipe.OnGiveXP.MetalWelding20(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.MetalWelding, 20);
end
function Recipe.OnGiveXP.MetalWelding25(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.MetalWelding, 25);
end
function Recipe.OnGiveXP.Blacksmith10(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Blacksmith, 10);
end
function Recipe.OnGiveXP.Blacksmith15(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Blacksmith, 15);
end
function Recipe.OnGiveXP.Blacksmith20(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Blacksmith, 20);
end
----------- these exist by default
function Recipe.OnGiveXP.DismantleElectronics(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Electricity, 2);
end
function Recipe.OnGiveXP.None(recipe, ingredients, result, player)
end
function Recipe.OnGiveXP.SawLogs(recipe, ingredients, result, player)
if player:getPerkLevel(Perks.Woodwork) <= 3 then
player:getXp():AddXP(Perks.Woodwork, 3);
else
player:getXp():AddXP(Perks.Woodwork, 1);
end
end
function Recipe.OnGiveXP.WoodWork5(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Woodwork, 5);
end
function Recipe.OnGiveXP.Cooking3(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Cooking, 3);
end
function Recipe.OnGiveXP.Cooking10(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Cooking, 10);
end
Inside the recipe block next to the usual stuff like Result, Time, etc, add this:
"OnGiveXP:Recipe.OnGiveXP.YOURFUNCTIONNAMEHERE,"
Then create a .lua file with a custom name in media/lua/server in your mod folders. Inside put:
"require 'recipecode';
function Recipe.OnGiveXP.YOURFUNCTIONNAMEHERE(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Tailoring, 2);
end"
Adjust the number at the end to increase the exp amount.
Happy modding!
And who knows, maybe I'll eventually make sheets be more of a resource rather than a simple tool to cover windows :p.