673f9aae6c06c

673f9aae6d5a0
1 Guest is here.
 

673f9aae6db94Ether Bot

673f9aae6dc0c
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.

673f9aae6dd5evoodoo47

673f9aae6ddb8
I think this is hardcoded.

673f9aae6e167RoSoDude

673f9aae6e1cf
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.

673f9aae6e5acEther Bot

673f9aae6e5e7
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.

673f9aae6ea94RoSoDude

673f9aae6eaec
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 »

673f9aae6efc0Ether Bot

673f9aae6f01a
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.

673f9aae6f16cRoSoDude

673f9aae6f1c2
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.

673f9aae6f457Ether Bot

673f9aae6f4a7
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.
The price of a dream - and some dreams can be "too" expensive.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
673f9aae7045e