Weekend Server Rate's Modifier

Weekend Server Rate's Modifier 1.4

No permission to download

Foppa

Moderator
Staff member
Messages
724
Likes
68
Points
28
Website
foppasgaming.com
so if I normally pick up 2 stone on the weekdays and I set your config Harvest amount to 5 will I be picking up 10 stones on the weekend or will I be picking up 5 also if I don't want to change my baby mature speed what would I put there please and thank you for the help it would be nice to have a command to Force Trigger or Force cancel so admins can test
Maybe set on a day just temporary and reload config? I think that might be a way to trigger the settings :)
 
Advertisement

Official Game Server Partner

Messages
80
Likes
5
Points
8
As for I have noticed it mess up the config and if you do a regular restart of the server it will be messed up.
But a workaround is just to reload the plugin!

/Foppa
Ya it looks like MOTD when placed in the config file does not show the line breaks "\n" and writes to the config file like it should display in-game:
Line1
Line2
Line3
instead of placing it in the config like like "Line1\nLine2\nLine3".... darn
 
Messages
80
Likes
5
Points
8
So if the server reboots during a weekend event - it messes up the config? Having reports of rates not properly changing sometimes or staying changed after a reboot.
 
Messages
43
Likes
3
Points
8
Just a fair warning for anyone attempting to use this plugin. Make sure your values if lower then 0 have a 0 before the deci... it'll crash your server if you dont.
Example with crash:
"MatingIntervalMultiplier":.25,
Example without crash:
"MatingIntervalMultiplier":0.25,
 

Wikinger

New member
Donators
Messages
7
Likes
1
Points
3
Ya it looks like MOTD when placed in the config file does not show the line breaks "\n" and writes to the config file like it should display in-game:
Line1
Line2
Line3
instead of placing it in the config like like "Line1\nLine2\nLine3".... darn
i can confirm this.
It would be very nice if this get fixed.
 

DrunkMunki

New member
Messages
15
Likes
2
Points
3
Website
www.gamingalliance.net
Does this plugin support the alternate method of rates, the one used to stop server lag...
Code:
HarvestResourceItemAmountClassMultipliers=(ClassName="PrimalItemConsumable_Berry_Amarberry_C",Multiplier=5.0)
we have quite a few of these, is this possible to change instead of the generic HarvestAmountMultiplier
 
Messages
33
Likes
3
Points
8
I'm having problems getting config changes recognised.
Despite using /wrreload on all servers, I'm having to restart the servers for it to actually trigger - I get the message that the config has reloaded.

We don't have a set schedule for bonus rates, so I edit the config each time as required, but the changes aren't taking effect.
 

Sloanstar

New member
Messages
2
Likes
1
Points
1
+1 for adding support for actual time for weekend rates. I'd like to be able to set from Friday at 6PM to Monday at 6AM or something like that.
I'll take a look at the source and see if i can modify it easily enough.
 

Sloanstar

New member
Messages
2
Likes
1
Points
1
Ok, I tried to clear the c++ cobwebs out of my brain... but I'm going to need an assist. Last time I used this was 15+ years ago in college so I'm trying to understand the time constructs and how the check works.

I found the InitConfig (WeekendRatesConfig.h) that parses the JSON imported config file and the variable declaration (WeekendRates.h) easy enough to be comfortable adding the integers for the time structure hour/min.

My initial thought was going to be add a start/end hour and min integer to the config, but based on how the checks are done, I'm not sure that is viable. Or maybe it is if I add the values to the start/end times and don't zero out "now". I'm just not comfortable enough with the time manipulation to make the call.


C++:
inline void WeekendRatesCheck()
{
    AShooterGameMode* GameMode = ArkApi::GetApiUtils().GetShooterGameMode();
    if (!GameMode) return;

    if (TenMinCounter++ == (HasStarted ? 600 : 30))
    {
        HasStarted = true;
        //Collect Raw Time and Store
        time(&RawTime);
        //Convert Raw Time to TimeInfo Structure
        localtime_s(&TimeInfo, &RawTime);

        //Zero out the TimeInfo Hour/Min/Sec... Why?
        TimeInfo.tm_min = 0;
        TimeInfo.tm_hour = 0;
        TimeInfo.tm_sec = 0;

        //Convert the zeroed time structure to a calendar date/time
        const time_t Tm = mktime(&TimeInfo);

        //Set "Now" as the zeroed time value... Why?
        const auto Now = std::chrono::system_clock::from_time_t(Tm);

        //Ok, let's break it down for the non c++ time wizards...
        //StartDay/EndDay are the days of the week beginning with Sunday = 0
        //For this Example We'll use StartDay of Friday (5) and EndDay of Monday (1) Today will be Saturday (6)
        //StartTime = ((5) - (6) + 7) % 7 (take the remainder (6) and multiply by 24) = 144. We're adding those hours to "Now" which was a zeroed value.
        //EndTime = ((1) - (6) + 7) % 7 (Take the remainder (2) and multiply by 24) = 48. We're adding those hours with "Now" which was a zeroed value.
        //The above Example would activate weekend rates.
        
        //Let's look at a Wednesday (3) value.
        // ((5) - (3) + 7 ) % 7 = 2.  2 x 24 = 48
        // ((1) - (3) + 7 ) % 7 = 5.  5 x 24 = 120
        // Ok, so StartTime is not > EndTime and Now is not >= to StartTime since we are adding to it... not sure when this would be true.. Maybe on a Sunday start/stop?

        const auto StartTime = Now + std::chrono::hours((StartDay - TimeInfo.tm_wday + 7) % 7 * 24);
        const auto EndTime = Now + std::chrono::hours((EndDay - TimeInfo.tm_wday + 7) % 7 * 24);
 
Messages
40
Likes
9
Points
8
I too am noticing the /wrreload is not making changes. It said's it reloads but the changes are not taking effect. Also, like some else mentioned, I think adding a time of day would be very useful.
And how exactly are these supposed to work? If my ini file said's =5.0 and I put =2.0 in the plugin, is it supposed to be 5x2 for the weekend rates or 2.0 instead of 5.0? Seems like depending on the multiplier it goes either way.
 

copex

New member
Messages
9
Likes
3
Points
3
Is this plugin working for you all? On my servers its showing event modified MOTD, but rates are not being modified.
 
Top