PrefabFiles = {
	 "happypeople","kingsshop","ea","kingarmor","archer", "archer_bakuya","archer_sandai" ,"archer_celtic", "archer_cutlass", "archer_excalibur", "archer_kanshou", "archer_katana",   "archer_pearlsword", "archer_pearlspear", "archer_knife", "archer_gsword", "archer_galientsword", "archer_gkatana",  "archer_sanspear", "archer_none", 
"guardcommand",
--"hongling",
--"zyf",
"caster_ring_fx",
--"zg_fx_truefire",
"gate_of_babylon",
}

Assets = {
    Asset( "IMAGE", "images/saveslot_portraits/archer.tex" ),
    Asset( "ATLAS", "images/saveslot_portraits/archer.xml" ),

    Asset( "IMAGE", "images/selectscreen_portraits/archer.tex" ),
    Asset( "ATLAS", "images/selectscreen_portraits/archer.xml" ),
	
    Asset( "IMAGE", "images/selectscreen_portraits/archer_silho.tex" ),
    Asset( "ATLAS", "images/selectscreen_portraits/archer_silho.xml" ),

    Asset( "IMAGE", "bigportraits/archer.tex" ),
    Asset( "ATLAS", "bigportraits/archer.xml" ),
	
	Asset( "IMAGE", "images/map_icons/archer.tex" ),
	Asset( "ATLAS", "images/map_icons/archer.xml" ),
	
	Asset( "IMAGE", "images/avatars/avatar_archer.tex" ),
    Asset( "ATLAS", "images/avatars/avatar_archer.xml" ),
	
	Asset( "IMAGE", "images/avatars/avatar_ghost_archer.tex" ),
    Asset( "ATLAS", "images/avatars/avatar_ghost_archer.xml" ),
	
	Asset( "ATLAS", "images/hud/archertab.xml" ),
	
    Asset("SOUNDPACKAGE", "sound/archer.fev"),
	Asset("SOUND", "sound/archer.fsb"),
	
	Asset( "IMAGE", "bigportraits/archer_none.tex" ),
    Asset( "ATLAS", "bigportraits/archer_none.xml" ),
	
	Asset( "IMAGE", "images/names_gilgamesh.tex" ),
    Asset( "ATLAS", "images/names_gilgamesh.xml" ),

}

RemapSoundEvent( "dontstarve/characters/archer/death_voice", "archer/sound/death_voice" )
RemapSoundEvent( "dontstarve/characters/archer/hurt", "archer/sound/hurt" )
RemapSoundEvent( "dontstarve/characters/archer/talk_LP", "archer/sound/talk_LP" )

local require = GLOBAL.require
local STRINGS = GLOBAL.STRINGS
local resolvefilepath = GLOBAL.resolvefilepath

local Ingredient = GLOBAL.Ingredient
local RECIPETABS = GLOBAL.RECIPETABS
local Recipe = GLOBAL.Recipe
local TECH = GLOBAL.TECH


--Custom Crafting Tab
archerstab = AddRecipeTab("Gate of Babylon", 998, "images/hud/archertab.xml", "archertab.tex", "archerbuilder")

--Recipe
local archer_sandai_recipe = AddRecipe("archer_sandai",
{GLOBAL.Ingredient(GLOBAL.CHARACTER_INGREDIENT.SANITY, 60),GLOBAL.Ingredient(GLOBAL.CHARACTER_INGREDIENT.HEALTH, 10)},
archerstab, TECH.NONE,
nil, nil, nil, nil, nil,
"images/inventoryimages/sandai.xml", "sandai.tex")
archer_sandai_recipe.tagneeded = false
archer_sandai_recipe.builder_tag = "archerbuilder"

local gate_of_babylon_recipe = AddRecipe("gate_of_babylon",
{GLOBAL.Ingredient("goldnugget", 10)},
archerstab, TECH.NONE,
nil, nil, nil, nil, nil,
"images/inventoryimages/gkatana.xml", "gkatana.tex")
gate_of_babylon_recipe.tagneeded = false
gate_of_babylon_recipe.builder_tag = "archerbuilder"

local archer_sanspear_recipe = AddRecipe("archer_sanspear",
{GLOBAL.Ingredient("twigs", 5)},
archerstab, TECH.NONE,
nil, nil, nil, nil, nil,
"images/inventoryimages/sanspear.xml", "sanspear.tex")
archer_sanspear_recipe.tagneeded = false
archer_sanspear_recipe.builder_tag = "archerbuilder"

local archer_galientsword_recipe = AddRecipe("ea",
{GLOBAL.Ingredient("goldnugget", 20),GLOBAL.Ingredient("nightmarefuel", 10),GLOBAL.Ingredient("redgem", 3),GLOBAL.Ingredient("bluegem", 1)},
archerstab, TECH.NONE,
nil, nil, nil, nil, nil,
"images/inventoryimages/galientsword.xml", "galientsword.tex")
archer_galientsword_recipe.tagneeded = false
archer_galientsword_recipe.builder_tag = "archerbuilder"

local archer_celtic_recipe = AddRecipe("archer_celtic",
{GLOBAL.Ingredient("cutgrass", 10)},
archerstab, TECH.NONE,
nil, nil, nil, nil, nil,
"images/inventoryimages/celtic.xml", "celtic.tex")
archer_celtic_recipe.tagneeded = false
archer_celtic_recipe.builder_tag = "archerbuilder"

local archer_cutlass_recipe = AddRecipe("archer_cutlass",
{GLOBAL.Ingredient("goldnugget", 5)},
archerstab, TECH.NONE,
nil, nil, nil, nil, nil,
"images/inventoryimages/cutlass.xml", "cutlass.tex")
archer_cutlass_recipe.tagneeded = false
archer_cutlass_recipe.builder_tag = "archerbuilder"

local archer_pearlspear_recipe = AddRecipe("archer_pearlspear",
{GLOBAL.Ingredient("bluegem",1)},
archerstab, TECH.NONE,
nil, nil, nil, nil, nil,
"images/inventoryimages/pearlspear.xml", "pearlspear.tex")
archer_pearlspear_recipe.tagneeded = false
archer_pearlspear_recipe.builder_tag = "archerbuilder"

local archer_pearlsword_recipe = AddRecipe("archer_pearlsword",
{GLOBAL.Ingredient("redgem",1)},
archerstab, TECH.NONE,
nil, nil, nil, nil, nil,
"images/inventoryimages/pearlsword.xml", "pearlsword.tex")
archer_pearlsword_recipe.tagneeded = false
archer_pearlsword_recipe.builder_tag = "archerbuilder"

local archer_gkatana_recipe = AddRecipe("archer_gkatana",
{GLOBAL.Ingredient("goldnugget",5)},
archerstab, TECH.NONE,
nil, nil, nil, nil, nil,
"images/inventoryimages/gkatana.xml", "gkatana.tex")
archer_gkatana_recipe.tagneeded = false
archer_gkatana_recipe.builder_tag = "archerbuilder"

local archer_gsword_recipe = AddRecipe("archer_gsword",
{GLOBAL.Ingredient("goldnugget",10),GLOBAL.Ingredient(GLOBAL.CHARACTER_INGREDIENT.HEALTH, 10)},
archerstab, TECH.NONE,
nil, nil, nil, nil, nil,
"images/inventoryimages/gsword.xml", "gsword.tex")
archer_gsword_recipe.tagneeded = false
archer_gsword_recipe.builder_tag = "archerbuilder"

local kingarmor_recipe = AddRecipe("kingarmor",
{GLOBAL.Ingredient("armorwood", 1),GLOBAL.Ingredient("goldnugget", 2),GLOBAL.Ingredient("purplegem", 1)},
archerstab, TECH.NONE,
nil, nil, nil, nil, nil,
"images/inventoryimages/kingarmor.xml", "kingarmor.tex")
kingarmor_recipe.tagneeded = false
kingarmor_recipe.builder_tag = "archerbuilder"

local archer_excalibur_recipe = AddRecipe("archer_excalibur",
{GLOBAL.Ingredient("goldnugget", 1),GLOBAL.Ingredient("nightmarefuel", 1)},
archerstab, TECH.NONE,
nil, nil, nil, nil, nil,
"images/inventoryimages/excalibur.xml", "excalibur.tex")
archer_excalibur_recipe.tagneeded = false
archer_excalibur_recipe.builder_tag = "archerbuilder"

local archer_galientsword_recipe = AddRecipe("archer_galientsword",
{GLOBAL.Ingredient("ea", 1),GLOBAL.Ingredient("goldnugget", 15),GLOBAL.Ingredient("gears", 3)},
archerstab, TECH.NONE,
nil, nil, nil, nil, nil,
"images/inventoryimages/galientsword.xml", "galientsword.tex")
archer_galientsword_recipe.tagneeded = false
archer_galientsword_recipe.builder_tag = "archerbuilder"

local archer_knife_recipe = AddRecipe("archer_knife",
{GLOBAL.Ingredient(GLOBAL.CHARACTER_INGREDIENT.SANITY, 5)},
archerstab, TECH.NONE,
nil, nil, nil, nil, nil,
"images/inventoryimages/knife.xml", "knife.tex")
archer_knife_recipe.tagneeded = false
archer_knife_recipe.builder_tag = "archerbuilder"


-- Custom Items Swords(RECIPE_DESC)
STRINGS.RECIPE_DESC.EA = "Used by the Geilgamesh."
STRINGS.RECIPE_DESC.KINGARMOR = "Used by the Geilgamesh."
STRINGS.RECIPE_DESC.ARCHER_BAKUYA = "Used by the Geilgamesh." 
STRINGS.RECIPE_DESC.ARCHER_SANSPEAR = "Used by the Geilgamesh." 
STRINGS.RECIPE_DESC.ARCHER_CELTIC = "Can be Used as a Light" 
STRINGS.RECIPE_DESC.ARCHER_CUTLASS = "Have a higner damage" 
STRINGS.RECIPE_DESC.ARCHER_EXCALIBUR = "Used by the female knight." 
STRINGS.RECIPE_DESC.ARCHER_GALIENTSWORD = "Used by the Geilgamesh." 
STRINGS.RECIPE_DESC.ARCHER_GKATANA = "I can go to anywhere." 
STRINGS.RECIPE_DESC.ARCHER_GSWORD = "Used by a certain someone." 
STRINGS.RECIPE_DESC.ARCHER_KATANA = "Can attack more targets in a time."  
STRINGS.RECIPE_DESC.ARCHER_KNIFE = "Used by a graceful killer."  
STRINGS.RECIPE_DESC.ARCHER_PEARLSPEAR = "Used by a special Gem." 
STRINGS.RECIPE_DESC.ARCHER_PEARLSWORD = "Used by a special Gem." 
STRINGS.RECIPE_DESC.ARCHER_SANDAI = "Can be Used as a tool." 
STRINGS.RECIPE_DESC.GATE_OF_BABYLON = "King's treasures.王之至宝。" 


-- Custom Items Swords(GLOBAL STRING NAMES)
GLOBAL.STRINGS.NAMES.EA = "EA(Not the real name未解放真名)"
GLOBAL.STRINGS.NAMES.KINGARMOR = "KingArmor"
GLOBAL.STRINGS.NAMES.ARCHER_BAKUYA = "Gate of Babylon"
GLOBAL.STRINGS.NAMES.ARCHER_SANSPEAR = "King's Spear"
GLOBAL.STRINGS.NAMES.ARCHER_CELTIC = "A Light Sword"
GLOBAL.STRINGS.NAMES.ARCHER_CUTLASS = "A Hign damage Sword"
GLOBAL.STRINGS.NAMES.ARCHER_EXCALIBUR = "Excalibur"
GLOBAL.STRINGS.NAMES.ARCHER_GALIENTSWORD = "EA"
GLOBAL.STRINGS.NAMES.ARCHER_GKATANA = "Enkidu"
GLOBAL.STRINGS.NAMES.ARCHER_GSWORD = "Treasure's Gate "
GLOBAL.STRINGS.NAMES.ARCHER_KANSHOU = "Archer's Kanshou"
GLOBAL.STRINGS.NAMES.ARCHER_KATANA = "A Katana"
GLOBAL.STRINGS.NAMES.ARCHER_KENDOSTICK = "A Kendostick"
GLOBAL.STRINGS.NAMES.ARCHER_KNIFE = "Shiki's Knife"
GLOBAL.STRINGS.NAMES.ARCHER_LAWSWORD = "Law's Sword"
GLOBAL.STRINGS.NAMES.ARCHER_NANDAO = "A Nandao Sword"
GLOBAL.STRINGS.NAMES.ARCHER_NEEDLE = "Eira's Neddle"
GLOBAL.STRINGS.NAMES.ARCHER_PEARLSPEAR = "Frozen's Spear"
GLOBAL.STRINGS.NAMES.ARCHER_PEARLSWORD = "Firer's Sword"
GLOBAL.STRINGS.NAMES.ARCHER_PIANDAO = "A Piandao Sword"
GLOBAL.STRINGS.NAMES.ARCHER_SANDAI = "Tool Sword"
GLOBAL.STRINGS.NAMES.ARCHER_SHUSUI = "Zoro's Shusui"
GLOBAL.STRINGS.NAMES.GATE_OF_BABYLON = "Gate of Babylon王之财宝"

--Custom Items Swords(DESC)
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.EA = "Used by the Geilgamesh."
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.KINGARMOR = "Used by the Geilgamesh."
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_BAKUYA = "Used by the Geilgamesh." 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_SAN = "Used by the Geilgamesh." 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_CELTIC = "Can be Used as a Light" 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_CUTLASS = "A Hign damage Sword" 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_EXCALIBUR = "Used by the female knight." 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_GALIENTSWORD = "Used by a Geilgamesh." 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_GKTANA = "I can go to anywhere." 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_GSWORD = "Used by a certain someone." 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_KANSHOU = "Used by the redman." 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_KATANA = "A Standard Katana."
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_KENDOSTICK = "A standard Kendostick" 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_KNIFE = "Used by a graceful killer."
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_LAWSWORD = "Used by a Special Surgeon." 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_NANDAO = "A Nandao sword." 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_needle = "Used for sewing." 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_PEARLSPEAR = "Used by a special Gem." 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_PEARLSWORD = "Used by a special Gem." 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_PIANDAO = "A Piandao Sword."
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_SAIDAI = "Can be Used as a tool." 
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER_SHUSUI = "Used by a Pirate Swordsman"
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.GATE_OF_BABYLON= "Gate of Babylon.王之财宝。" 

-- The character select screen lines
STRINGS.CHARACTER_TITLES.archer = "the Hero King"
STRINGS.CHARACTER_NAMES.archer = "Gilgamesh"
STRINGS.CHARACTER_DESCRIPTIONS.archer = "*The Ancient Hero King\n*Love to get interests....\n*Have all the treasures in the worlds"
STRINGS.CHARACTER_QUOTES.archer = "\"Before the Enuma Elish，All the treasures belong to me. \""

-- Custom speech strings
STRINGS.CHARACTERS.ARCHER = require "speech_archer"

-- The character's name as appears in-game 
STRINGS.NAMES.ARCHER = "Esc"

-- The default responses of examining the character
STRINGS.CHARACTERS.GENERIC.DESCRIBE.ARCHER = 
{
	GENERIC = "OH!!My honor to see you, Hero King!",
	ATTACKER = "Bad Gilgamesh!!!",
	MURDERER = "ahhhhhhh!",
	REVIVER = "Archer,what r u doing?",
	GHOST = "My king never died.",
}


AddMinimapAtlas("images/map_icons/archer.xml")

-- Add mod character to mod character list. Also specify a gender. Possible genders are MALE, FEMALE, ROBOT, NEUTRAL, and PLURAL.
AddModCharacter("archer", "MALE")

------------------------------------------------------------------------------
modimport("scripts/king_recipes.lua")

