Those of us who've done lots of modding and/or those of us that have dug through the data files know that reaction code in Fallout 1 (and Fallout 2 as well?) is quite broken.
For example, in Fallout 1 it only runs once. So if you become a Berzerker, Child-killing piece of shit, their opinion of you won't change if you've already talked to them before.Usually the only way it'll ever change after that is by choosing options in dialog that make them angry.
I am working on a replacement for that. This is IN PROGRESS -- I would like feedback and to work with the community, so that we can hopefully agree on what the new code should be.
1) Check reaction each time dialogue is initiated with any critter or NPC. I believe this is realistic and intuitive.
2) Have good critters dislike bad players and bad critters dislike good players.
3) Have more realistic weight to things like Child-Killer. For example, I think personally that all except the worst Bad Guys would frown upon murdering children -- especially in a recovering wasteland.
4) Cult of Personality working properly.
5) Presence will actually be useful.
6) To have tangible consequences of the various reaction levels -- anywhere from attacking the player on sight, to giving the player large discounts in Barter.
7) Charisma will actually have measurable impact on Reaction, thus no longer being a total throw-away stat.
Here is the original code:
[spoiler:ddad1b02e8]
[/spoiler:ddad1b02e8]
Here is my proposed, work-in-progress code:[spoiler:ddad1b02e8]
[/spoiler:ddad1b02e8]
Unsure: Based on the description of Cult Of Personality, should it only affect the Karma amount (as in the Fallout script files currently) or should it affect the entire reaction amount? In other words, should it be applied after all modifiers, thus making everyone always like you no matter what.
For example, in Fallout 1 it only runs once. So if you become a Berzerker, Child-killing piece of shit, their opinion of you won't change if you've already talked to them before.Usually the only way it'll ever change after that is by choosing options in dialog that make them angry.
I am working on a replacement for that. This is IN PROGRESS -- I would like feedback and to work with the community, so that we can hopefully agree on what the new code should be.
GOALS:Per said:For most characters the reaction system is entirely forgettable. It is in fact impossible to get a bad reaction even with CH 1 unless you have Childkiller or Berserker, have negative karma, or go out of your way to insult people.
This calculation is made only when you first talk to a critter, although things you say to them may nudge the result in either direction. In the vast majority of cases neither approval nor disapproval has any tangible consequences.
With Cult of Personality the resulting karma modifier is always positive. Surprised that the effects of karma and Champion/Berserker are not reversed for evil critters? Well, that's in part because there are no evil critters in the Fallout world as far as the reaction system is concerned: due to what appears to be a huge oversight, none of them is flagged as such. Everyone in the wasteland will respond well to heroes and badly to scoundrels - when it comes to reaction, at any rate.
The factors involved can be summed up like this:
Each point of CH: +5
Each level of the Presence perk: +10
Karma: +amount
Childkiller: -10
Champion: +20
Berserker: -20
1) Check reaction each time dialogue is initiated with any critter or NPC. I believe this is realistic and intuitive.
2) Have good critters dislike bad players and bad critters dislike good players.
3) Have more realistic weight to things like Child-Killer. For example, I think personally that all except the worst Bad Guys would frown upon murdering children -- especially in a recovering wasteland.
4) Cult of Personality working properly.
5) Presence will actually be useful.
6) To have tangible consequences of the various reaction levels -- anywhere from attacking the player on sight, to giving the player large discounts in Barter.
7) Charisma will actually have measurable impact on Reaction, thus no longer being a total throw-away stat.
Here is the original code:
[spoiler:ddad1b02e8]
Code:
procedure get_reaction
begin
if (local_var(2) == 0) then begin
set_local_var(0, 50);
set_local_var(1, 2);
set_local_var(2, 1);
set_local_var(0, local_var(0) + (5 * get_critter_stat(dude_obj, 3)) - 25);
set_local_var(0, local_var(0) + (10 * has_trait(0, dude_obj, 10)));
if (has_trait(0, dude_obj, 39)) then begin
if (global_var(155) > 0) then begin// PLAYER_REPUATION
set_local_var(0, local_var(0) + global_var(155));
end
else begin
set_local_var(0, local_var(0) - global_var(155));
end
end
else begin
if (local_var(3) == 1) then begin
set_local_var(0, local_var(0) - global_var(155));
end
else begin
set_local_var(0, local_var(0) + global_var(155));
end
end
if (global_var(158) >= 2) then begin
set_local_var(0, local_var(0) - 30);
end
if (((global_var(160) + global_var(159)) >= 25) and ((global_var(160) > (3 * global_var(159))) or (global_var(157) == 1))) then begin
set_local_var(0, local_var(0) + 20);
end
if (((global_var(160) + global_var(159)) >= 25) and ((global_var(159) > (2 * global_var(160))) or (global_var(156) == 1))) then begin
set_local_var(0, local_var(0) - 20);
end
call ReactToLevel;
end
end
Here is my proposed, work-in-progress code:[spoiler:ddad1b02e8]
Code:
// Note in vanilla Fallout 1 there's only three "levels": dislike (25 or below), neatural (26 to 74) and positive (75 and up). [ReactionBase]
// Mine will have 9 levels. [ReactionLevel]
// Most of the effects are simply on Barter prices, except the lowest two.
ReactionBase := 50;
ReactionBase := ReactionBase + ((5 * get_critter_stat(dude_obj, CHARISMA)) - 25);// +5 or -5 for each CHA point above or below 5.
if has_trait(dude_obj, CULT_OF_PERSONALITY) then begin
if GoodGuy
if (PLAYER_KARMA less than 0) then
KarmaCultMod = (PLAYER_KARMA * -1);
else KarmaCultMod = PLAYER_KARMA;
end
if BadGuy
if (PLAYER_KARMA more than 0) then
KarmaCultMod = (PLAYER_KARMA * -1);
else KarmaCultMod = PLAYER_KARMA;
end
ReactionBase = (ReactionBase + KarmaCultMod));
end
else (if doesn't have Cult perk)
if GoodGuy
ReactionBase = (ReactionBase + PLAYER_KARMA));// pos Karma good, neg Karma bad
end
if BadGuy
ReactionBase = (ReactionBase - PLAYER_KARMA));// pos Karma bad, neg Karma good (subtracting a negative)
end
end
if (CHILDREN_KILLED equal or greater than 2) then begin
if GoodGuy
ReactionBase = ReactionBase - 40);
end
else if BadGuy
ReactionBase = ReactionBase - 10);
end
end
if Berzerker then
if GoodGuy
ReactionBase = ReactionBase - 20);
end
else if BadGuy
ReactionBase = ReactionBase + 20);
end
end
if Champion then
if GoodGuy
ReactionBase = ReactionBase + 20);
end
else if BadGuy
ReactionBase = ReactionBase - 20);
end
end
//
//CHOOSE LEVEL OF REACTION (This is what's actually used to make effects on barter/talk/'mood')
//
ReactionBase (0 or less) then ReactionLevel = -4
Effect:
Attacks player on sight.
ReactionBase (1 to 9) then ReactionLevel = -3
Effect:
Refuses to speak with player
ReactionBase (10 to 19) then ReactionLevel = -2
Effect:
+50% barter prices (penalty)
ReactionBase (20 to 39) then ReactionLevel = -1
Effect:
+30% barter prices (penalty)
ReactionBase (40 to 60) then ReactionLevel = 0
Effect:
no effect
ReactionBase (61 to 80) then ReactionLevel = 1
Effect:
-10% barter prices (discount)
ReactionBase (81 to 90) then ReactionLevel = 2
Effect:
-20% barter prices (discount)
ReactionBase (91 to 100) then ReactionLevel = 3
Effect:
-30% barter prices (discount)
ReactionBase (101 or more) then ReactionLevel = 4
Effect:
-50% barter prices (discount)
end
// 'Upgrades' to the next 'tier' for each level of Presence the player has. This is a good thing.
ReactionLevel:= ReactionLevel + has_trait(0, dude_obj, 10);
Unsure: Based on the description of Cult Of Personality, should it only affect the Karma amount (as in the Fallout script files currently) or should it affect the entire reaction amount? In other words, should it be applied after all modifiers, thus making everyone always like you no matter what.