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

Add localised reinforcement decay. #87

Closed
wants to merge 12 commits into from

Conversation

okx-code
Copy link

Closes #56

@wingzero54
Copy link

I didn't see a config option for decay time, does it utilize the global_decay_timer and global_decay_multiplier that are currently in the config?

@okx-code
Copy link
Author

okx-code commented May 24, 2021

Yes, it uses those values. It just changes the last activity time.

@okx-code
Copy link
Author

okx-code commented Jun 1, 2021

bump

@wingzero54
Copy link

wingzero54 commented Jun 7, 2021

A couple config comments: Can you add a config option for using the local decay, or defaulting back to the global decay? So this version of Citadel can be maintained with the feature even if users don't want to have local decay.

Also, does this just work on top of the global decay? As in, does this local decay just have the opportunity to update the decay time earlier than the global decay? Just checking to see if you can seamlessly switch between the local and global

@okx-code
Copy link
Author

okx-code commented Jun 7, 2021

Yeah you can switch betwen local and global seamlessly as long as you set the activity-default option to the current time (unix seconds). This default is used when the group has been active after the default time but not entered the area yet.

You can also disable local decay entirely by having it enabled on no worlds:

activity-map-worlds: []

@wingzero54
Copy link

Will the activity-default override all current group decay? For example, there are groups which are currently decayed. Will enabling this with activity-default set to now cause currently decayed groups to be reset to not decayed?

@okx-code
Copy link
Author

No, the activity-default is used if a player on a group has not entered an area yet but a player on said group has logged in past the activity-default timestamp. If nobody on the group has logged in since the time set by activity-default, their last activity time is used.

@wingzero54
Copy link

wingzero54 commented Jul 11, 2021

I tested and if you add this code and set activity-map-worlds: [] so it's 'disabled' it will still make the decay localized

}, 20 * 30, 20 * 30);

try (Connection connection = source.getConnection()) {
connection.createStatement().executeUpdate(CREATE_TABLE);
Copy link
Member

Choose a reason for hiding this comment

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

Should be a migration

Copy link
Author

Choose a reason for hiding this comment

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

explain?

Copy link
Member

Choose a reason for hiding this comment

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

https://github.com/CivClassic/Citadel/blob/master/src/main/java/vg/civcraft/mc/citadel/model/CitadelDAO.java#L108

We have a system in place specifically for adding/modifying tables. This allow better tracking of when things break and modifying tables later on.

@okx-code okx-code closed this Jul 25, 2023
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.

Localized reinforcement decay
5 participants