684305c2bba79

Page: « 1 [2] 3 4 »
684305c2bf1dd
1 Guest is here.
 

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

684305c2bfbf5voodoo47

684305c2bfc6c
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 »

684305c2bfdb4voodoo47

684305c2bfe0e
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 »

684305c2bff57voodoo47

684305c2bffaa
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 »

684305c2c00aavoodoo47

684305c2c0154
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 »

684305c2c0f1bRocketMan

684305c2c0f89
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?
684305c2c14ab
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?

684305c2c1655RocketMan

684305c2c16aa
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.

684305c2c1771voodoo47

684305c2c17be
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.

684305c2c18b7voodoo47

684305c2c1904
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 »

684305c2c1a33ZylonBane

684305c2c1a80
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?

684305c2c1b6avoodoo47

684305c2c1bbb
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.

684305c2c1cddZylonBane

684305c2c1d2a
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?

684305c2c1e0evoodoo47

684305c2c1e59
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 »

684305c2c2023ZylonBane

684305c2c20f6
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.

684305c2c221fvoodoo47

684305c2c22c7
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.

684305c2c23a3ZylonBane

684305c2c23f0
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.

684305c2c24e8voodoo47

684305c2c2537
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 »

684305c2c25d7ZylonBane

684305c2c265c
Right, way more moving parts, targeting system, etc.

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

684305c2c2756voodoo47

684305c2c27b7
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 »

684305c2c2881ZylonBane

684305c2c28d2
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.

684305c2c29c2voodoo47

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

684305c2c2baavoodoo47

684305c2c2bfa
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 »

684305c2c2d0avoodoo47

684305c2c2d6a
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.

684305c2c30f7ThiefsieFool

684305c2c3146
Add the strings to the .nut? You only lose localization support, for what is a pretty small mod.
1 Guest is here.
Oooh, ahhh, that's how it always starts. Then later there's running and screaming
Page: « 1 [2] 3 4 »
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
684305c2c3bcf