674327345972b

674327345a5e6
1 Guest is here.
 

674327345aabcEther Bot

674327345ab24
I've tried looking around to see if any mods exist out there that remove the nanite cost from healing via medical beds or resurrection stations in SS2, to be more in line with the first game, but couldn't find anything. There are dml based mods for changing the nanite cost of a lot of things that I've found and even some that add items to vending machines and such, so it seems like it should be fairly simple to create. Is there a mod already to achieve this? Thanks in advance for any pointers or help.

674327345ac25voodoo47

674327345ac74
I think this is hardcoded.

674327345aef1RoSoDude

674327345af42
Healing station nanite cost is hardcoded in the HealingStation script. In Rebalanced Skills and Disciplines I have a replacement script based on the one from SCP which scales the nanite cost with difficulty. To remove the nanite cost, you would simply copy that replacement script and edit the nanite cost out.

QBRs are the same story, only it's probably not feasible to replace the vanilla script controlling player respawning.

674327345b241Ether Bot

674327345b29e
Healing station nanite cost is hardcoded in the HealingStation script. In Rebalanced Skills and Disciplines I have a replacement script based on the one from SCP which scales the nanite cost with difficulty. To remove the nanite cost, you would simply copy that replacement script and edit the nanite cost out.

QBRs are the same story, only it's probably not feasible to replace the vanilla script controlling player respawning.

Huh... not confident I've figured this out.  I'm assuming you mean the healingstation section of the rsdScript.nut file? Thank you for the response, as it was definitely helpful in getting me in the right direction. But I'm not sure how this script works (i think it multiplies the difficulty number with 5?), and more importantly, I don't know how to get the game to load a custom .nut code even if I did understand that. Coding isn't really my strong suit, although I have a passing familiarity. When it comes to stuff like this I tend to look for documentation but it's been hard finding really anything at all explaining how SS2 mods are made (maybe because its the same engine as Thief?). I'd really appreciate more info on how this all ticks if any of you have links or the time to explain any of it.

674327345b6d8RoSoDude

674327345b731
Ether BotIn your working directory create a file called \sq_scripts\etherScript.nut which consists of the following:
Code: [Select]
// ================================================================================
// SCPb4: Enhanced HealingStation script
// - Now removes toxins.
// - Removes radiation (and toxins) when player at full health.
// - Displays message when player doesn't need healing.
// When using this remove NVDetoxTrap from player object.
// RSD: Nanite cost removed for Ether Bot
class etherHealingStation extends SqRootScript {
static healCost = 5; // possibly make this based on difficulty
function OnFrobWorldEnd() {
local Frobber = message().Frobber;
local hp = Property.Get(Frobber, "HitPoints");
local hpMax = Property.Get(Frobber, "MAX_HP");
local newHealCost = diffHealCost(); //RSD: newHealCost
if (hpMax > hp || Property.Get(Frobber, "RadLevel") > 0 || Property.Get(Frobber, "Toxin") > 0) {
if (ShockGame.PayNanites(newHealCost) == S_OK) { //RSD: newHealCost
// restore HP
PostMessage(Frobber, "FullHeal");
// remove radiation
Property.SetSimple(Frobber, "RadLevel", 0);
ShockGame.OverlayChange(kOverlayRadiation, kOverlayModeOff);
// remove toxins
Property.SetSimple(Frobber, "Toxin", 0);
ShockGame.OverlayChange(kOverlayPoison, kOverlayModeOff);
// notify healing complete
scp.AddText("MedBedUse", "misc", "", newHealCost); //RSD: newHealCost
Sound.PlayEnvSchema(self, "Event Activate", self, 0, eEnvSoundLoc.kEnvSoundAtObjLoc);
}
else {
scp.AddText("NeedNanites", "misc");
}
}
else {
scp.AddText("MedBedUnused", "misc", "Patient already in good condition.");
}
}

//RSD: no more heal cost
function diffHealCost() {
return 0;
}
}

Then create a file in your working directory called gamesys.dml consisting of the following:
Code: [Select]
DML1

////Removes Med Bed nanite cost
//Script adapted from scpScript.nut in SCP Beta 4
+ObjProp -961 "Scripts" //Med Bed
{
    "Script 0" "etherHealingStation" //was HealingStation
}
+ObjProp -4584 "Scripts" //MedBedActivate
{
    "Script 0" "etherHealingStation" //was HealingStation
}

Compress gamesys.dml and \sq_scripts\etherScript.nut together as a .7z or .zip file. Then load that archive with the mod manager.

It will print "0 nanites used in healing". If you don't want that, just remove or comment out this line:
Code: [Select]
scp.AddText("MedBedUse", "misc", "", newHealCost);  //RSD: newHealCost[/cost]
« Last Edit: 17. May 2021, 04:57:08 by RoSoDude »

674327345bb64Ether Bot

674327345bbb5
RoSoDude
Oh wow, yes thank you. This definitely works, although I'm not sure how to apply this info towards an attempt to do the same with the QBR, or how to apply it at all in any other context haha. You mentioned that it should be "the same story" but that it wouldn't be feasible, without elaborating, so idk exactly what to make of that.

674327345bc96RoSoDude

674327345bce0
Since nanite cost for both med beds and QBRs are hardcoded in their scripts, the only way to modify the nanite cost is to rewrite the entire script from scratch. This was already done in SCP, but I am skeptical as to whether it is feasible for QBRs, since you'd seemingly have to write a custom replacement script that performs all the player respawning tasks without any access to the original script, meaning a lot of guesswork if it's even possible.

674327345bf01Ether Bot

674327345bf50
RoSoDude
Ohh okay, thank you for the explanation, I do understand what you mean. I guess I hope they do eventually release the SS2 source code, like they did with the first game. I wonder if it is possible to reverse engineer a code for respawning the player, but definitely not at my skill level.
1 Guest is here.
I hope this doesn't affect my White House petition to bring back "She's the Sheriff".
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
674327345c773