Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display correct Swift Learner exp bonus in messages #275

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

NovaRain
Copy link

Since the display from non-scripted (engine) cases is already fixed in sfall, I think the scripted message should follow the same suit.

@burner1024
Copy link
Member

Cool, thanks!

@burner1024 burner1024 merged commit bd24269 into BGforgeNet:master Mar 28, 2024
1 check passed
@phobos2077
Copy link

phobos2077 commented Jun 7, 2024

This missed a few places throughout the code where exp is gained without using this macro. They can be found easily by searching "You gain" string in game texts.

Also I guess the modified swift learner bonus is not taken into account? You can change it with set_swiftlearner_mod.

@NovaRain
Copy link
Author

NovaRain commented Jun 7, 2024

Took a quick glance, the missing ones should be:
UP: kcsmily, kstill, obj_dude, scofjack, vault13
RP: abdeathc, abhealer, abmax, ahmonk (these are worse because the numbers are written directly in message lines, need to split them.)

@@ -488,6 +488,6 @@
points he received.
***************************************/
#define give_xp(x) give_exp_points(x); \
display_msg(message_str(SCRIPT_GENERIC,100)+x+message_str(SCRIPT_GENERIC,101))
display_msg(g_mstr(100) + (x + ((x * 5 / 100) * dude_perk(PERK_swift_learner))) + g_mstr(101))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest splitting visible exp calculation to separate macro for use with non-standard messages.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this?

#define calc_display_xp(x)    (x + ((x * 5 / 100) * dude_perk(PERK_swift_learner)))
#define give_xp(x)            give_exp_points(x); \
                              display_msg(g_mstr(100) + calc_display_xp(x) + g_mstr(101))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, or maybe calc_xp_gain_after_perks or get_actual_xp_gain. Or maybe we should really add some new opcode for this ))

NovaRain added a commit to NovaRain/Fallout2_Unofficial_Patch that referenced this pull request Jun 10, 2024
NovaRain added a commit to NovaRain/Fallout2_Restoration_Project that referenced this pull request Jun 10, 2024
(ref. BGforgeNet#275)
(note: there are still missed cases in Abbey scripts.)
NovaRain added a commit that referenced this pull request Aug 27, 2024
Fixed incorrect xp reward for causing Jack the healer to melt.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants