You can read and reply to posts and download all mods without registering.
We're an independent and non-profit fan-site. Find out more about us here.
Add the strings to the .nut?
no idea whether that can be done, and I certainly don't know how, even if. maybe ZB would know?//nope, definitely not something simple as replacing ShockGame.AddTranslatableText("WrenchUnused", "misc", "Player"); with print("Whatever");
ShockGame.AddText(Data.GetString("misc", "NoteNew", "Note added to PDA."), null);
Code: [Select]ShockGame.AddText(Data.GetString("misc", "NoteNew", "Note added to PDA."), null);
if (Data.GetString("misc", "WrenchTSkillReq")) { ShockGame.AddTranslatableTextInt("WrenchTSkillReq", "misc", "Player", skillRequired);}else { ShockGame.AddText("Maintaining this device requires a skill of " + skillRequired + ".", null);}
class Wrenchier extends SqRootScript { function OnFrobToolEnd() { ShockGame.PreventSwap(); local fixObj = message().DstObjId; local state, hp, maxHP; local playerMaintSkill = Property.Get("Player", "BaseTechDesc", "Maintain"); local objSkillRequired = Property.Get(fixObj, "ReqTechDesc", "Maintain"); // enforce a minimum skill level if (objSkillRequired == 0) { objSkillRequired = 1; } // guns if (ShockGame.ValidGun(fixObj)) { state = Property.Get(fixObj, "ObjState"); hp = Property.Get(fixObj, "GunState", "Condition (%)"); if (state == eObjState.kObjStateUnresearched) { // do nothing } else if (state == eObjState.kObjStateBroken) { ShockGame.AddTranslatableText("WrenchOnBroken", "misc", "Player"); } else if (playerMaintSkill < objSkillRequired) { ShockGame.AddTranslatableTextInt("WrenchSkillReq", "misc", "Player", objSkillRequired); } else if (hp > 90) { ShockGame.AddTranslatableText("WrenchUnused", "misc", "Player"); } else if (state == eObjState.kObjStateNormal) { // repair gun 10% per point of maint skill hp += playerMaintSkill * 10.0; if (hp > 100.0) { hp = 100.0; } Property.Set(fixObj, "GunState", "Condition (%)", hp); consumeTool(); } } // turrets else if (Object.InheritsFrom(fixObj, "Turrets")) { hp = Property.Get(fixObj, "HitPoints"); maxHP = Property.Get(fixObj, "MAX_HP"); if (playerMaintSkill < objSkillRequired) { ShockGame.AddText(Data.GetString("misc", "WrenchierSkillReq", "Maintaining this device requires a skill of %d."), null); } else if (hp >= maxHP) { ShockGame.AddText(Data.GetString("misc", "WrenchierUnused", "Device already in good condition."), null); } else { // repair turret 5 HP per point of maint skill (default turrets have a max HP of 48) hp += playerMaintSkill * 5; if (hp > maxHP) { hp = maxHP; } Property.SetSimple(fixObj, "HitPoints", hp); consumeTool(); } } // non-repairable else { ShockGame.AddText(Data.GetString("misc", "WrenchierOnNonGun", "Drag tool to a compatible device to use."), null); } } function OnFrobInvEnd() { ShockGame.AddText(Data.GetString("misc", "HelpWrenchier", "Drag to a degraded device to improve condition."), null); } function consumeTool() { // decrease stack count Container.StackAdd(self, -1); if (!GetProperty("StackCount")) { ShockGame.DestroyInvObj(self); } // play success sound Sound.PlayEnvSchema(self, "Event Activate", 0, 0, eEnvSoundLoc.kEnvSoundAmbient); }}
ShockGame.AddTranslatableTextInt("WrenchierSkillReq", "misc", "Player", objSkillRequired);
if (Data.GetString("misc", "WrenchierSkillReq")) { ShockGame.AddTranslatableTextInt("WrenchierSkillReq, "misc", "Player", objSkillRequired);}else { ShockGame.AddText("Maintaining this device requires a skill of " + objSkillRequired + ".", null);}
class Wrenchier extends SqRootScript { function OnFrobToolEnd() { ShockGame.PreventSwap(); local fixObj = message().DstObjId; local state, hp, maxHP; local playerMaintSkill = Property.Get("Player", "BaseTechDesc", "Maintain"); local objSkillRequired = Property.Get(fixObj, "ReqTechDesc", "Maintain"); // enforce a minimum skill level if (objSkillRequired == 0) { objSkillRequired = 1; } // guns if (ShockGame.ValidGun(fixObj)) { state = Property.Get(fixObj, "ObjState"); hp = Property.Get(fixObj, "GunState", "Condition (%)"); if (state == eObjState.kObjStateUnresearched) { addMiscText("WrenchUnresearched", "Cannot maintain unresearched object."); } else if (state == eObjState.kObjStateBroken) { addMiscText("WrenchOnBroken"); } else if (playerMaintSkill < objSkillRequired) { addMiscText("WrenchSkillReq", "", objSkillRequired); } else if (hp > 90) { addMiscText("WrenchUnused"); } else if (state == eObjState.kObjStateNormal) { // repair gun 10% per point of maint skill hp += playerMaintSkill * 10.0; if (hp > 100.0) { hp = 100.0; } Property.Set(fixObj, "GunState", "Condition (%)", hp); consumeTool(); } } // turrets else if (Object.InheritsFrom(fixObj, "Turrets")) { hp = Property.Get(fixObj, "HitPoints"); maxHP = Property.Get(fixObj, "MAX_HP"); if (playerMaintSkill < objSkillRequired) { addMiscText("WrenchierSkillReq", "Maintaining this device requires a skill of %d.", objSkillRequired); } else if (hp >= maxHP) { addMiscText("WrenchierUnused", "Device already in good condition."); } else { // repair turret 5 HP per point of maint skill (default turrets have a max HP of 48) hp += playerMaintSkill * 5; if (hp > maxHP) { hp = maxHP; } Property.SetSimple(fixObj, "HitPoints", hp); consumeTool(); } } // non-repairable else { addMiscText("WrenchierOnNonGun", "Drag tool to a compatible device to use."); } } function OnFrobInvEnd() { addMiscText("HelpWrenchier", "Drag to a degraded device to improve condition."); } function consumeTool() { // decrease stack count Container.StackAdd(self, -1); if (!GetProperty("StackCount")) { ShockGame.DestroyInvObj(self); } // play success sound Sound.PlayEnvSchema(self, "Event Activate", 0, 0, eEnvSoundLoc.kEnvSoundAmbient); } function addMiscText(strID, strDefault = "", dVal = null) { local strText = Data.GetString("misc", strID, strDefault); if (dVal != null) { local s = strText.find("%d"); strText = strText.slice(0, s) + dVal + strText.slice(s + 2); } ShockGame.AddText(strText, "Player"); }}
+ObjProp -585 "RepairDiff"{ "Success %" 20 "Critical Fail %" 0 "Cost" 50.00}
//this dml shouldn't be used as a template for other dml mods - this is evil, evil stuff, and it only works properly because Minstrel is a one mission deal.
I don't want the SCP