674350997dd8d

Page: « 1 [2] 3 4 »
674350997f2bb
1 Guest is here.
 

Topic: SS2 Repairman WIP/RC
Page: « 1 [2] 3 4 »
Read 13069 times  

674350997fac7voodoo47

674350997fb33
eh, not quite - bloody Minstrel. should work properly now (RC5). if someone is running through Minstrel with rc4, he's encouraged to update (it's ok to update mid game as long as the turret in the reactor room hasn't been destroyed yet).


//daamit, if I knew how much pita those three Minstrel turrets would impose, I would have just blocked Minstrel in the Repairman mod completely and be done with it - the amount of big bad voodoo I had to pull to make everything work was just ridiculous. anyway, everything should finally, positively work now (RC6+redownload Minstrel 1.03 - had to fix one object and I'm not going to bump the version number because of that). maybe.
« Last Edit: 21. February 2017, 15:21:41 by voodoo47 »

674350997fc4cvoodoo47

674350997fc9c
naah, not done yet - rc7 is up;

-repairing the turret is now accompanied by a visual and sound effect ("nanites doing their thing")
-broken medbeds are now repairable (skill 2 required. also this is fairly useless, as it will only result in an incomplete medbed, and those are quite plentiful anyway, but it was easy to do, so why not)
-lowered the skill requirements for the slug turret, as it really stands out as the weakest of the bunch. now requires hack 3, repair 3 for restoring a destroyed turret, and repair 2 for fixing a broken port after critically failing a hack
« Last Edit: 03. March 2017, 18:18:45 by voodoo47 »

674350997fd90voodoo47

674350997fdda
and yaay, rc8;

-it's now possible to detach a medbed key by repairing it (repair skill 5 required. inspired by Secmod, but the setup is completely different). also full FM support, hopefully. in vanilla, there is a 4 second delay before the freshly attached key can be selected and detached again (had to do this to allow the activation sound to play fully), and the corpsing effect might be noticeable, but things should work well enough.

considering the amount of rc7/8 changes, it would be great if someone could give latest version a very thorough pounding.
« Last Edit: 03. March 2017, 19:41:51 by voodoo47 »

674350997feabvoodoo47

674350997fef4
bleh, rc9;

-fixed a bug that prevented detaching a key from a complete bed that started out as complete when running SCP
-fixed a (very, very evil) bug that made pre-placed incomplete medbeds self-destroy after activation when running SCP
-removed the working stat monitoring screen from the broken medbed model to make it look more broken/inactive
-returned the slug turret requirements to the original values. didn't like the discrepancy after all
« Last Edit: 05. March 2017, 09:37:49 by voodoo47 »

67435099801a7RocketMan

67435099801f6
It's a pretty big deal to be able to remove keys from medbeds in earlier, easier levels and take them with you, say, to the Rick.  Shouldn't this require a skill of greater than 2?  I know repair is underutilized but health is so critical later in the game that I feel the spammy nature of it should come at a greater cost.  A side benefit would be that you would also be able to repair more weapons.  What was your logic for the skill of 2?
6743509981bae
It's a pretty big deal to be able to remove keys from medbeds in earlier, easier levels and take them with you, say, to the Rick.  Shouldn't this require a skill of greater than 2?  I know repair is underutilized but health is so critical later in the game that I feel the spammy nature of it should come at a greater cost.  A side benefit would be that you would also be able to repair more weapons.  What was your logic for the skill of 2?

Agree. Should perhaps be a max level thing. Although from Voodoo's description it looks to be a level 5 feature, not 2?

6743509981ca6RocketMan

6743509981d06
Did I screw that up?  I was reading page 1 description.

EDIT:

Ahh shit, I was reading the wrong line.  Maybe I need more sleep.  2 is for medbed repair.

6743509981ddbvoodoo47

6743509981e2d
yep.

the reasoning behind level 5 is that I really don't see anyone going for level 6 for just a couple of extra medbed keys. 5 maybe (especially if they have 4 to fix the turrets), but not 6.

6743509981f65voodoo47

6743509981fc0
allright, time for some experimental stuff - the turret_fixer mod will add the ability to fix up damaged turrets with maintenance tools. you need maintenance 3 for von Braun turrets and 4 for Rick turrets, currently heals 5hp per one skill level.

load as a standalone mod, with higher priority than Repairman. the Repairman mod is recommended, but not required. should work with vanilla, SCP and all FMs, but only SCP has received (minimal) testing, so maintain away and report whatever weird stuff you find. //RC attached to the first post.
« Last Edit: 17. September 2017, 17:00:44 by voodoo47 »

67435099820e1ZylonBane

674350998212e
How can this work seamlessly with the vanilla wrench script, since it displays an error message when you try to use a maintenance tool on a not-gun object?

674350998221dvoodoo47

674350998226a
because I have managed to use squirrel to generate an extra message that is sent to the object that consumes the tool. once I had that, it was very easy to use NVscript to make all the shenanigans happen the way I wanted.

it might not be very elegant, but it's simple, and does what needs to be done - feel free to explore, it's pretty much just two NVRemovePropertyTrap scripts swapping around GunState and HitPoints.

6743509982373ZylonBane

67435099823bc
Oh wait, I see... so your Squirrel script is just replacing the vanilla wrench script. That seems vulnerable to OSM load order. While the Squirrel version of wrench will probably have priority, there's no guarantee that it will. I'd rename the script and use a DML to replace the existing script on the maint tool archetype. Or is that not possible?

Either way, since you're already overriding the original script with a custom script, wouldn't it make more sense to discard all the NVScript trickery and implement everything in the script itself?

6743509982498voodoo47

67435099824e0
yes and yes, but with my current squirrel editing capability, you can consider it a small miracle that I have somehow managed to make it generate that message just by randomly copy pasting stuff over from the sample squirrel code. this is as far as I go in the land of squirrels for a really long while.

but yeah, I'll probably rename the script and dml load it instead of vanilla, that should work just fine and make things safer like you mentioned. //yeah, works fine, next RC will have the change implemented - thanks.
« Last Edit: 17. September 2017, 15:41:03 by voodoo47 »

674350998269fZylonBane

67435099826ea
Well, does this script work for you? Should make all the NVScripting unnecessary.
Code: [Select]
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.AddTranslatableTextInt("WrenchSkillReq", "misc", "Player", objSkillRequired);
}
else if (hp >= maxHP) {
ShockGame.AddTranslatableText("WrenchUnused", "misc", "Player");
}
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.AddTranslatableText("WrenchOnNonGun", "misc", "Player");
}
}

function OnFrobInvEnd() {
ShockGame.AddTranslatableText("HelpWrench", "misc", "Player");
}

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);
}
}
This adds 5 HP per maint skill level when a maint tool is used on turrets.

Either way, I suppose it's inevitable that this mod will stomp on any SCP enhancements to the wrench script.

67435099827devoodoo47

6743509982828
yes, it indeed does work perfectly (though I'd probably boost the heal a bit, someone with Maintenance skill of 5 should be able to fullheal with one tool). NVscript party pooper.

well, it kind of depends on what we want to do with the script - it can be included with SCP, or the Repairman mod, or both, or none (as being able to maintain slightly defeats its purpose of making the Repair skill more useful), or it can be its own thing. anyway, the new RC is in the first post now.

67435099828c9ZylonBane

6743509982911
In vanilla even someone with maxed maintenance can't take a weapon from condition 1 to 10 with a single tool, can they? And turrets are a lot bigger and more complex than guns.

6743509982a0dvoodoo47

6743509982a57
actually, turrets are probably less complex - no need for small parts and precision, just a spray and pray thing that is as simple as possible so it would require little maintenance, a bunch of cheap servos and a bottom of the barrel targeting system slapped on top to keep the unit's cost low, everything packed in an armored crust to make things complicated for anyone dumb enough to tackle it without AP rounds.

buy two and get a third 50% off, that's the TriOptimum way!
« Last Edit: 17. September 2017, 18:07:14 by voodoo47 »

6743509982af1ZylonBane

6743509982b3f
Right, way more moving parts, targeting system, etc.

Anyway, your mod, easy to tweak the repair amount.

6743509982c29voodoo47

6743509982c74
what I tried to say is that I'm seeing the SS2 turret as a cheap alternative to a guard with a weapon - something someone would just buy, stick into a corner and leave it there for half an eternity, with any regular maintenance man being able to fix it without calling a weapon specialist. think AK47 on a stick that can shoot on its own.

I'll maybe bump the heal to something like 7, but leaving it at 5 for now.
« Last Edit: 17. September 2017, 18:54:34 by voodoo47 »

6743509982d1bZylonBane

6743509982d63
BTW, this script will happily let you fix a turret while it's shooting at you. I wonder if that's worth blocking, or if it's a problem that takes care of itself.

6743509982e06voodoo47

6743509982e4e
nope, you should be able to fix a hostile turret if you so desire, so that's fine as it is.

6743509982fccvoodoo47

6743509983018
rc2 is up, modified strings and the script so turrets would not be referenced as weapons by any of the hud tips;

-right clicking the tool in inventory now prints "Drag to a degraded device to improve condition." instead of "weapon"
-trying to apply a tool to a turret while not having enough skill will print "Maintaining this device requires a skill of X." instead of "weapon" (but still prints "weapon" if doing the same to a weapon)
-trying to apply a tool to a device that is not a ranged weapon or turret will print "Drag tool to a compatible device to use."
-trying to apply a tool to an undamaged turret while having enough skill will print "Device already in good condition." instead of "weapon" (but still prints "weapon" if doing the same to a weapon)

it is ok to apply or update the mod mid-game. and yaay, I actually did something! also, I see no other things that could be improved, so unless some bugs are found, rc2 wil be merged with Repairman and released as Repairman 1.1 (I think that's the way to go for the time being).
« Last Edit: 21. September 2017, 13:45:49 by voodoo47 »

6743509983129voodoo47

6743509983173
well, rc2 makes things slightly incompatible with FMs, as the modified MISC.STR will override their custom strings, making some of the custom descriptions incorrect. that means either reverting to rc1, or updating all FMs manually.

daamit.

67435099833a0ThiefsieFool

67435099833f0
Add the strings to the .nut? You only lose localization support, for what is a pretty small mod.
1 Guest is here.
Strange times are back.
Page: « 1 [2] 3 4 »
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
6743509984184