664923a057b4c

664923a057f64
1 Guest is here.
 

664923a0584e1Ether Bot

664923a058555
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.

664923a0586ddvoodoo47

664923a058739
I think this is hardcoded.

664923a058b20RoSoDude

664923a058b98
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.

664923a059038Ether Bot

664923a059093
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.

664923a059665RoSoDude

664923a0596bb
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 »

664923a059cffEther Bot

664923a059d55
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.

664923a059e57RoSoDude

664923a059ea5
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.

664923a05a15eEther Bot

664923a05a1b0
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 might come across very disillusioned but I do crossword searches all night.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
664923a05a2a2