腐爛國(guó)度PC版 武器數(shù)據(jù)修改方法教程 怎么改武器
- 來(lái)源:3DM論壇-lcsy
- 作者:wuyan
- 編輯:ChunTian
引用ch87819 關(guān)于武器耐久的修改
耐久是LUA腳本,CE有LUA腳本編輯功能,物品不損的語(yǔ)句在item.lua里面
相關(guān)語(yǔ)句
function Item.Server:OnHit(hit)
local explosionOnly=tonumber(self.Properties.bExplosionOnly or 0)~=0;
local hitpoints = self.Properties.HitPoints;
if (hitpoints and (hitpoints > 0)) then
local destroyed=self.item:IsDestroyed()
if (hit.type=="repair") then
self.item:OnHit(hit);
elseif ((not explosionOnly) or (hit.explosion)) then
if ((not g_gameRules:IsMultiplayer()) or g_gameRules.game:GetTeam(hit.shooterId)~=g_gameRules.game:GetTeam(self.id)) then
self.item:OnHit(hit);
if (not destroyed) then
if (hit.damage>0) then
if (g_gameRules.Server.OnTurretHit) then
g_gameRules.Server.OnTurretHit(g_gameRules, self, hit);
end
end
if (self.item:IsDestroyed()) then
if(self.FlowEvents and self.FlowEvents.Outputs.Destroyed)then
self:ActivateOutput("Destroyed",1);
end
end
end
end
end
end
end
紅字部分我目測(cè)就是物品損壞的代碼,
替換掉
if(self.FlowEvents and self.FlowEvents.Outputs.Destroyed)then
self:ActivateOutput("Destroyed",1);
或者刪除物品估計(jì)就不會(huì)壞了
另外車輛不損在這里scripts\entities\vehicles\implementations\xml
搜damageMax=就出來(lái)各個(gè)部件的傷害上限,后面的數(shù)值多加幾個(gè)0車就基本不會(huì)壞了
還有比較好的辦法是
這種東西用批量替換,把數(shù)值全部變成0.0,這是傷害的公式,"bullet" multiplier就是受到子彈(這里是傷害*1000倍,因?yàn)檫@個(gè)是油箱的),"collision" multiplier撞擊傷害*,"melee" multiplier近戰(zhàn)傷害
這些數(shù)值改成0后,受到的傷害就全部乘以0了,測(cè)試有效,不過(guò)要做車輛不損MOD要所有車的屬性都修改,太麻煩了,等苦力弄。
感謝各位專家專修改教程的完善,看來(lái)我成功達(dá)到拋磚引玉的效果了!
玩家點(diǎn)評(píng) (0人參與,0條評(píng)論)
熱門評(píng)論
全部評(píng)論