Status
Not open for further replies.

Darkwaltz4

Former Developer
After you have set up the currencies and events the way that you are happy with, you can apply these settings retroactively to your members using the powerful recalculation features within vBCredits II. You can also apply mass updates outside of your events (such as zeroing out users, checking event settings on existing users as you figure out the best values, and giving out credits to certain users)

First, visit the User/Account Manager in vBCredits II and determine what set of users you wish to modify and the amount to show per page - you can even select everyone. This will take you to a table of results with several attributes of the users, such as their post counts and days registered. It will also list the currency amounts that they have and their permissions to use each currency. You may edit that table direction and click the Update Users button at the top to apply it to them instantly.

If you Show Advanced Options instead, you will expose the mass-recalculation commands which you can apply to the displayed users. For pro users, you can create mathematical formulas which include the data shown on the table (for example P+10 would give them an amount of credits that is their post count plus ten). Using that you can even completely transfer one currency into another by using the variables defined there.

However, if you wish to recalculate past actions for users, you can first select the set of actions and the timespan that you wish to do it for. Actions marked with asterisks do not retain any timestamp data in the database outside of vBCredits, so only their original transactions are known about and will simply be repeated instead of recalculated. Then choose to calculate events.

If you are choosing a range of time where there are already vBCredits transactions there that you wish to remove, choose Prune Existing Transactions. This will allow you to reverse the transactions that it is removing (useful if you are recalculating instead of resetting) as well as pruning transactions outside of the actions and time specified for recalculating, which is useful for completely replacing chunks of time with what you have selected instead of just those parts.

Finally, this process must be done for every page unless you select the option that will calculate all of them for you. This will generally take awhile, depending on the number of users that you have. Just let it run until it says it is done. Also, if you did not enable Immediate Transactions in the general settings for vBCredits, you will then have to go to the Process Pending Transactions function in the Maintenance menu of vBulletin (the completion message at the top of the page will give you a link to go right to it).

Common Scenarios:

Reset everyone to zero
Select the timespan from beginning of board to right now. Select no actions and no for calculate events. Select yes to prune existing transactions, and yes for target any time and action. Select no for reverse before delete. For pro users, you can set 0 for the formula values, for lite users, you have to put a 0 for each user in the list below the form.

Recalculate everyone from zero

Identical to the above, except select the actions you want and yes for calculate events.

Give credits from the beginning
Select the timespan from prior to installation and all of the actions that have defined events. Select yes for calculate events and no for prune existing transactions.

Apply updated event settings
Select the actions that you updated events for. Select the timespan from beginning of board to right now. Select yes to calculate events and yes for prune existing transactions and yes for reverse before delete. Select no for target any time and action.

Tips
Whenever you are finished calculating events, you will be presented with a link to process pending transactions at the top of your screen. Make sure you click and submit the resulting form, and after it has gone through everyone you can verify that the calculations are correct. Also, if you have many pages of results I recommend setting yes to process all pages of users. These two tips are separate should you want to give your server a chance to cool down from these intensive operations.


If you have any questions please ask them here! This system was built to be completely flexible to handle anything you wish to perform, but that also means it has a bunch of settings which you might be scared about at first, but just reading the descriptions should be pretty self explanatory.
 
Last edited:
How do I force calculations of users that have not logged in for a while ? is this the "Process Pending Transactions"?
When I prune existing transactions, am I deleting them from the record permanently ?
If I change an action value, or delete one does it have to be recalculated retroactively ? perhaps a way to ask; Is it better to create a new action to preserve the old amounts if I am going to recalculate?

I thought I did this proper back in Jan, but I continue to have users signing in and having make up transactions that subtract for paychecks that occurred in there absence. I did set up a neg action for extended absence but it was too harsh and I removed it, however it seems it is still occurring for those periods it was active when a user comes back. I also have a few very squirrelly amounts on a few accounts that appear to be negative balances expressed with exponential numbers. Could these be hangovers from the first vb credits install that had more complicated numbers and multipliers for the actions ?
I think I may have deleted some of those original action sets that are no longer in the default install, could i or should I replace them in order to correct the very long numeric results ?

so in other words there welcome back is a slap in the face with a negative bank balance.
 
How do I force calculations of users that have not logged in for a while ? is this the "Process Pending Transactions"?

By calculate you mean.. process their pending transactions, then yes. If you mean recalculate, you can target those users by the last action date.

When I prune existing transactions, am I deleting them from the record permanently ?

Yes; the system relies on a complete and accurate transaction history... otherwise the system is no longer closed.

If I change an action value, or delete one does it have to be recalculated retroactively ? perhaps a way to ask; Is it better to create a new action to preserve the old amounts if I am going to recalculate?

Yes, need to recalculate if you want the new values to replace what was given in the past under the old values, as per the 4th bolded common scenario in the first post. The system re-runs the actions, not the events, during recalculation. So, even if you disable the old one and create a new one, recalculating would always use the new one, making it pointless to keep the old one around for preservation purposes.

Issues with negatives, etc:

There were some fixes to recalculation a few weeks ago, so redownload and apply the files if you have not done so recently. Afterwards I recommend running the "Recalculate everyone from zero" scenario to clear out outdated pending transactions that are still affecting you. Make sure you process pending transactions when it is done to make sure you are completely up to date with no surprises. If you are having trouble seeing where values are coming from, let me know and I will run it for you to monitor for bugs.
 
Status
Not open for further replies.
Back
Top