Все посты %s в %S - AMK Team
Перейти к контенту

Lost Alpha - Правки и модификации


BFG

Рекомендуемые сообщения

Niko971, gamedata\config\lostalpha\la_skills.ltx, вам нужен этот файл, с содержимым я думаю разберетесь, там ничего сложного.))))))))))

И да, в actor лучше не лазьте.

Изменено пользователем AlienSpawn
  • Спасибо 3

Поделиться этим сообщением


Ссылка на сообщение

Lost Alpha 1.4006-4005

Ремонтники ремонтируют оружие в любом состоянии:

 

Ищем файл inventory_upgrades.script. В нем ищем такую функцию: 

 

Скрытый текст

function can_repair_item( item_name, item_condition, mechanic ) --( string, float, string )
    --if param_ini:line_exist(mechanic_name, "repair_condition_factor") then
    --    local condlist = param_ini:r_string(mechanic_name, "discount_condlist")
    --    local parsed = xr_logic.parse_condlist(db.actor, nil, nil, condlist)
    --    xr_logic.pick_section_from_condlist(db.actor, nil, parsed) 
    --end
    local cond = fixer_conditions[mechanic]
    if cond == nil then
        cond = fixer_conditions["general_fixer"]
    end
    if cond then
       if (item_condition) < cond then        
        return false
        end
    end
    local profit = fixer_profits[mechanic]
    if profit == nil then
        profit = 5
    end
    local price = how_much_repair(item_name, item_condition, profit)
    if db.actor:money() < price then
        return false
    end
    return true
end

 

Делаем так:

 

Скрытый текст

 

function can_repair_item( item_name, item_condition, mechanic ) --( string, float, string )
    --if param_ini:line_exist(mechanic_name, "repair_condition_factor") then
    --    local condlist = param_ini:r_string(mechanic_name, "discount_condlist")
    --    local parsed = xr_logic.parse_condlist(db.actor, nil, nil, condlist)
    --    xr_logic.pick_section_from_condlist(db.actor, nil, parsed) 
    --end
    local cond = fixer_conditions[mechanic]
    if cond == nil then
        cond = fixer_conditions["general_fixer"]
    end
--    if cond then
--        if (item_condition) < cond then        
--        return false
--        end
--    end
    local profit = fixer_profits[mechanic]
    if profit == nil then
        profit = 5
    end
    local price = how_much_repair(item_name, item_condition, profit)
    if db.actor:money() < price then
        return false
    end
    return true
end


 

 

И такую функцию, чтоб она нам не писала нам всякую каку на экране:

 

Скрытый текст

function question_repair_item( item_name, item_condition, can, mechanic ) --( string, float, bool, string )
    local cond = fixer_conditions[mechanic]
    if cond == nil then
        cond = fixer_conditions["general_fixer"]
    end
    if cond then
        if (item_condition) < cond then    
        return game.translate_string("st_no_repair_tip_2")
        end
    end
    local profit = fixer_profits[mechanic]
    if profit == nil then
        profit = 5
    end
    local price = how_much_repair( item_name, item_condition, profit)
    if db.actor:money() < price then
        return game.translate_string("st_upgr_cost")..": "..price.." RU\\n"..game.translate_string("ui_inv_not_enought_money")..": "..price-db.actor:money().." RU"
    end
    return game.translate_string("st_upgr_cost").." "..price.." RU. "..game.translate_string("ui_inv_repair").."?"
end

 

делаем так:

 

Скрытый текст

function question_repair_item( item_name, item_condition, can, mechanic ) --( string, float, bool, string )
    local cond = fixer_conditions[mechanic]
    if cond == nil then
        cond = fixer_conditions["general_fixer"]
    end
--    if cond then
--        if (item_condition) < cond then    
--        return game.translate_string("st_no_repair_tip_2")
--        end
--    end
    local profit = fixer_profits[mechanic]
    if profit == nil then
        profit = 5
    end
    local price = how_much_repair( item_name, item_condition, profit)
    if db.actor:money() < price then
        return game.translate_string("st_upgr_cost")..": "..price.." RU\\n"..game.translate_string("ui_inv_not_enought_money")..": "..price-db.actor:money().." RU"
    end
    return game.translate_string("st_upgr_cost").." "..price.." RU. "..game.translate_string("ui_inv_repair").."?"
end

 

Profit!!! Теперь ремонтники не брезгуют у нас даже откровенным хламом.)))))))

  • Полезно 1

Поделиться этим сообщением


Ссылка на сообщение

Если вас не устраивают цены на ремонт (меня например они не устроили от слова вообще, ибо новое купить в разы дешевле, чем чинить старое) то в том же файле inventory_upgrades.script ищем:


 

Скрытый текст

 

local function how_much_repair(item_name, item_condition, profit)
    local ltx = system_ini()
    local cost = ltx:r_u32(item_name, "cost")
    local class = ltx:r_string(item_name, "class")
    local cof = 0.6
    return math.floor(cost * (1 - item_condition) * cof * cur_price_percent * profit)
end


 

Изменяя переменную  local cof = 0.6 меняем цены, чем меньше значение переменной тем дешевле ремонт.

 

  • Нравится 1
  • Полезно 1

Поделиться этим сообщением


Ссылка на сообщение
  • Недавно просматривали   0 пользователей

    • Ни один зарегистрированный пользователь не просматривает эту страницу.
×
×
  • Создать...