-
Notifications
You must be signed in to change notification settings - Fork 128
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
Add feature for automatic calculation of barter money #311
base: main
Are you sure you want to change the base?
Add feature for automatic calculation of barter money #311
Conversation
@alexbatalov please, have a look. |
0d50964
to
0e806d9
Compare
The code looks good, but I have some reservation about the feature. What if I (for whatever reason) want to gift money to the trader? Can I add more money this way? Usually with sfall features like this are either optional or implemented via some mod. Although in this case you can argue it's essential QoL improvement. But often there are some use cases that features like this might break, so you need to think it through. I think more "vanilla-friendly" way would be to show the window like before, but pre-fill it with the "recommended" amount of money. |
imo the popup for the amount should always show up. Could be pre-filled with a break-even amount in case of bottle caps, I guess, but that's as far as I would go. Also would be good to have an option somewhere to define more protos as money-type, in case mods are adding multiple currencies. |
In future we could move this to script-based mod. I agree about multiple currencies. Even though the engine is filled with |
It's still possible to select quantity manually eitehr move mony second time (first move - added needed amount, second move - open popup) or move money as first item. |
The caps/money id is hardcoded and it's used to display money in small left screen in dialogs and check money in scripts. If someone wants to use several currencies it will be breaking changes. |
We already have mods for that in Fo2, it's not impossible to do. I think moving money twice to get the popup is an unnecessary inconvenience. |
I think to show popup with a pre-filled amount should work for everyone, is it not? We can always replace it later with some mod (when we have proper tools for that), but for now seems like a good compromise. |
Yes, the pre-filled quantity is possible. I can add this. @Lexx2k in which modes there are used several currencies? I'm playing in Nevada there are no caps but the money item have valid MONEY id. |
Personal mod that hasn't been released (yet). It's old, though, and I'm not sure when it will be released. |
The feature works in any direction to move from/to player/npc and from/to inventory/table
@phobos2077 @Lexx2k |
Added demo video with the usage of the feature: |
I like it, looks "vanilla" enough (as you still need to drag money around instead of complete money automation) but alleviates the most annoying part of calculating numbers. Now I want this in sfall! :D Should probably be possible to implement via script. I think Stalin's Inventory Filter solves this problem in somewhat different way. Can use similar approach to match the behavior of this PR. Or not, if we can't manipulate the item count popup window via script. |
I implemented this into sfall. And I think this feature should be optional. Maybe some people like to do these math calculations in their head. There's a new INI setting in related PR, but better wait until it's merged to have the same INI keys if possible. |
Calculate barter change money automatically.
It's still possible to chose quantity of money manually.
Demo:
https://m.youtube.com/watch?v=jK6BukxqeW0
Rationalization:
Even the mouse button is pressed and not released the loop is ended:
https://github.com/alexbatalov/fallout2-ce/blob/main/src/inventory.cc#L5629
the mouse event is reset.
These points make it difficult to trade with NPCs on android devices.