Congratulations and thanks to Nerevar for finding this problem. I never use the extractor, and had no idea this script was such a disaster area. killap made some fixes to allow consideration of security bots in the past, but it's still a mess. In addition to the problem Nerevar found about not getting a brain, there were a number of other serious problems in wsterm4b.int:
--Dex, Kitsune, and Cat Jules were not included in the functionality at all.
--Goris could be killed in the extractor, but no organs could be extracted from him.
--If the extractor was used on someone previously, using the extractor again would re-assess an additional karma penalty for corpses already in the chamber. Also, only the presence of the "no brain given" bug prevented the expression of another blatant bug allowing the extraction of multiple brains from already brainless corpses.
--The extractor was not even attempting to check if the species setting (lvar 1) matched the victim in the chamber.
-- The extractor would always extract a brain regardless of the organ selection setting (lvar 0).
--The extractor clearly states 'Canine' is a valid species category, but would not extract organs from any dogs.
--The extractor would attempt to extract all sorts of organs from robots, who have no none.
--Result reporting was unhelpfully vague even in cases where the report matched the result (which was often not the case).
There were a few other issues, but as I write this I've already forgotten what they were.
In any case, here's a much more rigorous version with all bugs fixed as far as I can tell, that others may find useful either for standard play or as a base for further modding. I made a few judgement calls-- Goris, dogs, and Lenny give "abnormal" brains since their physiology is different (in the case of Lenny, his brain is irradiated and rotten). Marcus gives a human brain. No brain can be extracted from any variant of Robobrain, because Robobrain is already a jury-rigged contraption and further tampering might cause him to collapse in a pile of bolts, and also because the procedure for removing an animal brain would not be valid ("Step 1: Cut open the skull... oh wait, there is no skull! I don't have a procedure for using a screwdriver, either!").
Finally, for truly vicious rat-bastards it is not possible to kill someone in the chamber (either in combat, or by extracting an organ) and then go back later to extract the brain (or additional organs) from their corpse. We can presume the tissue deteriorated due to blood/oxygen loss or the brain was violently damaged while extracting a different organ, but the practical reason is that this sort of functionality would require a significant re-design of the script and the addition of new map variables to the map to track how each individual died; all that work is just plain silly in order to cater to such obscure functionality. If Fallout had functionality like Jagged Alliance where you could drag the corpse of a fallen comrade into the chamber such an addition would be worthwhile, but it doesn't so it's not.
Files available here:
wsterm4b for killap's FO2 Restoration Project (version 3 or greater).
The zip includes four files:
--wsterm4b.int (put this script file in your folder Fallout2\data\scripts, overwriting whatever is already there.)
--wsterm4b.msg (put this dialogue file in your folder Fallout2\data\text\english\dialog, overwriting whatever is already there.)
--wsterm4b.ssl (my updated script, decompiled in Noid's/Ruby format, if you'd like to examine it. This file is not necessary to play the game. Those interested in learning scripting might profit from comparing this file to the
decompiled original version that Nerevar posted earlier in this discussion.)
--readthis.txt (RTFM, as always; not needed to play the game)
The script should work fine with any existing saved game you have, even if your character is already standing next to the Brain Extractor and has previously used the extractor.
Offhand, I can't think of any reason this script would not also work perfectly with killap's UP, previous versions of the RP, or Fallout 1.02d, but since I don't have installations of any of those to check I can't say with certainty. MIB88 uses a different process in his Megamod for this script (doesn't kill security bots, party members mustn't be 'waiting' perhaps because it's daft to take a nap in the extraction chamber), so don't use this on that.
I tested a number of variant circumstances, but if anyone finds additional bugs in the script please post them here and I will fix them.
Enjoy.