ошибка в создание предмета

  • Автор темы Автор темы fiolka
  • Дата начала Дата начала

fiolka

Новичок
23 Авг 2023
1
0
только учусь создавать кастомки и дошел до предметов. Думал сделать улучшение предметов при помощи покупки рецепта. Написал код предмет в игре есть рецепт отображается но нельзя купить его в консоль выдает ошибку.

Cannot create an entity because entity class is NULL -1
Attempt to purchase 'item_recipe_ultimate_orb_two' failed
Client (account 252239639) tried to execute invalid order (33). Purchase order specified an invalid or missing item.

даже не понимаю в чем ошибка. код вроде бы правильно написан.
//=================================================================================================================
// Recipe: Ultimate Orb 2
//=================================================================================================================
"item_recipe_ultimate_orb_two"
{
// General
//-------------------------------------------------------------------------------------------------------------
"BaseClass" "item_recipe_ultimate_orb_two" // unique ID number for this item. Do not change this once established or it will invalidate collected stats.
"AbilityTextureName" "item_recipe"
"Model" "models/props_gameplay/recipe.mdl"


// Item Info
//-------------------------------------------------------------------------------------------------------------
"ItemCost" "500"
"ItemShopTags" ""


// Recipe
//-------------------------------------------------------------------------------------------------------------
"ItemRecipe" "1"
"ItemResult" "item_ultimate_orb_two"
"ItemRequirements"
{
"01" "item_ultimate_orb"

}
}
 
ты хотел сказать что BaseClass может быть либо "ability_lua" с последующей строкой с адресом на файл, либо уже существующим классом предмета/абилки в доте. Так ведь?
У предметов, BaseClass может быть:
Наследуемым - т.е. наследовать уже существующий предмет
item_lua - с указанием скрипта предмета - оно же свойство ScriptFileI
item_datadriven - где все модификаторы и спекалы указываются непосредственно в самом txt

Если предмету указать ability_lua - то у тебя крашнет доту, как только ты с ним взаимодействуешь
 
только учусь создавать кастомки и дошел до предметов. Думал сделать улучшение предметов при помощи покупки рецепта. Написал код предмет в игре есть рецепт отображается но нельзя купить его в консоль выдает ошибку.

Cannot create an entity because entity class is NULL -1
Attempt to purchase 'item_recipe_ultimate_orb_two' failed
Client (account 252239639) tried to execute invalid order (33). Purchase order specified an invalid or missing item.

даже не понимаю в чем ошибка. код вроде бы правильно написан.
//=================================================================================================================
// Recipe: Ultimate Orb 2
//=================================================================================================================
"item_recipe_ultimate_orb_two"
{
// General
//-------------------------------------------------------------------------------------------------------------
"BaseClass" "item_recipe_ultimate_orb_two" // unique ID number for this item. Do not change this once established or it will invalidate collected stats.
"AbilityTextureName" "item_recipe"
"Model" "models/props_gameplay/recipe.mdl"


// Item Info
//-------------------------------------------------------------------------------------------------------------
"ItemCost" "500"
"ItemShopTags" ""


// Recipe
//-------------------------------------------------------------------------------------------------------------
"ItemRecipe" "1"
"ItemResult" "item_ultimate_orb_two"
"ItemRequirements"
{
"01" "item_ultimate_orb"

}
}

Пример моего рецепта, попробуй использовать. Еще переделал твой рецепт.

"item_recipe_heart2"
{
"BaseClass" "item_datadriven"
"Model" "models/props_gameplay/recipe.vmdl"
"AbilityTextureName" "recipe"
"ItemRecipe" "1"
"ItemCost" "1500"
"ItemResult" "item_desolator_3"
"ItemRequirements"
{
"01" "item_heart;item_desolator_2"
}
}


"item_recipe_ultimate_orb_two"
{
"BaseClass" "item_datadriven"
"Model" "models/props_gameplay/recipe.vmdl"
"AbilityTextureName" "recipe"
"ItemRecipe" "1"
"ItemCost" "500"
"ItemResult" "ultimate_orb_two"
"ItemRequirements"
{
"01" "item_ultimate_orb"
}
}
 
Реклама: