Page 1 of 2 1 2 LastLast
Results 1 to 20 of 29

Thread: Power Loss

  1. #1
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,539
    Blog Entries
    8

    Default Power Loss

    This is the second time we have been told about weird power drop issues, the first time I thought it was just a fluke with a single player. Since it has been reported again I have to look at some stuff.

    The first thing I have done is change the offline power loss. Previously we had that set at 48 hours. If you dont login for 48 hours then you start losing 10 power per day, up to a maximum of 130 power loss.

    I have changed that to 7 days (168 hours). I dont want to disable it entirely as then people will abuse the war functions by never logging in.

    What I think is happening is this:

    Every player has a power level, and a max power limit. The plugin adds all your faction members up and comes up with the total faction power and the total max faction power.

    It has to update these levels every time someone's power level changes. So when your power goes up via time in game, it updates. When you log in or out, it updates. When you get killed, it updates.

    However I do not think it is updating properly when you lose power for being offline. So if you are offline for 7 days, you lose 50 power (previous setting of 48 hour grace period). But I dont think it is updating the faction totals properly when that power drops, unless someone gets killed. This is why its showing your faction with a bunch of power, but when someone dies the faction power level is dropping by a lot. If you have 2-3 members who have not signed in for 3-4 days, that number can add up quickly.

    I think the plugin is working properly for claiming land during war, it just isnt displaying accurate power information when you check it using the /f power command.

    The change from 2 days to 7 days should eliminate most of this as people wont be losing power. In the next day or two I will setup some stuff on the test server and see if I can confirm my theory, and if so then I will get with Musty and go through the code to see if we can fix it.

  2. #2
    Pat89's Avatar Northman™
    Join Date
    Feb 2008
    Location
    Netherlands
    Posts
    14,742

    Default Re: Power Loss

    Good to see you're working on it

  3. #3
    Musthavename's Avatar Bunneh Ressurection
    Join Date
    Jun 2008
    Location
    Somewhere in the room you're currently in.
    Posts
    7,590

    Default Re: Power Loss

    Quote Originally Posted by GrnEyedDvl View Post
    However I do not think it is updating properly when you lose power for being offline. So if you are offline for 7 days, you lose 50 power (previous setting of 48 hour grace period). But I dont think it is updating the faction totals properly when that power drops, unless someone gets killed.
    Unless that total is stashed somewhere, whenever it needs a factions total it just sums everyone's power. There should be zero delay in updating it to the faction itself.

    It might be possible though that it might not update you when you're offline, so individual players totals don't actually move until they log back in. In which case we need to rethink the code anyway, since it's intended to stop inactivity in wars from stopping someone from claiming land.

    Edit: One thing I could do in any new build would be to show the player a message in the event of the power changing function decreasing their power by a large margin. That might at least help diagnose the issue, or at least stop it happening in the future.

    Double Edit: Actually, I don't think it's that, or it would update the last login time before it checked to see if it was over the threshold. It should also only be causing an offline power drop if you're at war with someone.
    Last edited by Musthavename; February 22, 2012 at 12:51 PM.
    Give a man a fire, and he'll be warm for the rest of the day.
    Set a man on fire, and he'll be warm for the rest of his life.


  4. #4
    Mangerman's Avatar Only the ladder is real
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    4,385

    Default Re: Power Loss

    Quote Originally Posted by Musthavename View Post
    It might be possible though that it might not update you when you're offline, so individual players totals don't actually move until they log back in. In which case we need to rethink the code anyway, since it's intended to stop inactivity in wars from stopping someone from claiming land.
    Players losing power due to inactivity seems to update fine, even though they're offline.
    Last edited by Mangerman; February 23, 2012 at 06:24 PM.

  5. #5
    Magister Militum Flavius Aetius's Avatar Aetī Avēas!
    Civitate

    Join Date
    Mar 2010
    Location
    Rock Hill, SC
    Posts
    16,040
    Tournaments Joined
    1
    Tournaments Won
    0

    Default Re: Power Loss

    What about losing power from monsters/dying when you're not at war? That seems to happen a lot.
    Quote Originally Posted by Roma_Victrix
    Well then Attila just got delicious.
    Under the Patronage of Pikestance

  6. #6
    Musthavename's Avatar Bunneh Ressurection
    Join Date
    Jun 2008
    Location
    Somewhere in the room you're currently in.
    Posts
    7,590

    Default Re: Power Loss

    That's working as intended. Cause of death is irrelevant to power loss.
    Give a man a fire, and he'll be warm for the rest of the day.
    Set a man on fire, and he'll be warm for the rest of his life.


  7. #7

    Default Re: Power Loss

    If it's a display error, there's an issue with war declarations, because in that case my manpower should've been far below the 50% threshold required to make a war declaration. Which may mean the issue might not be that it doesn't update properly per se, but that it doesn't update at the right time. That is, once war is declared, I get a huge manpower loss out of the blue. That or it's tied to the fact that I was killed. I don't know which.
    You're forgetting, Lindsay, that as a psychiatrist, I was a professional twice over - an analyst and a therapist. The world's first "analrapist".

  8. #8
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,850

    Default Re: Power Loss

    My person power has fallen.

    Last night it dropped from 131 to 130 (odd drop) without me dying.
    Then today it has dropped to 11. (I'm guessing it was in fact 10 due to time)

    The only thing I did was declare MOTN neutral, otherwise I have no idea what could have caused this.

    I ain't been lemming jumping.
    Last edited by The Hedge Knight; February 24, 2012 at 12:37 PM.

  9. #9
    Aanker's Avatar Concordant
    Join Date
    Apr 2009
    Location
    Sweden
    Posts
    6,890

    Default Re: Power Loss

    Quote Originally Posted by The Hedge Knight View Post
    My person power has fallen.

    Last night it dropped from 131 to 130 (odd drop) without me dying.
    Then today it has dropped to 11. (I'm guessing it was in fact 10 due to time)

    The only thing I did was declare MOTN neutral, otherwise I have no idea what could have caused this.

    I ain't been lemming jumping.
    Our enemy clearly has access to invisible, top-secret manpower siphon machinery, Josst.

    Quote Originally Posted by Adar View Post
    Russia have managed to weaponize the loneliest and saddest people on the internet by providing them with (sometimes barechested) father figures whom they can adhere to in order to justify their hatred for the current establishment and the society that rejects them.

    UNDER THE PROUD PATRONAGE OF ABBEWS
    According to this poll, 80%* of TGW fans agree that "The mod team is devilishly handsome" *as of 12/10

  10. #10
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,850

    Default Re: Power Loss

    Update.

    Checked our whole factions power. Somthing is very wrong IMO:

    http://pastebin.com/hKwnkq6j

  11. #11

    Default Re: Power Loss

    It's also been confirmed with other factions. The Northman have stated that at one point they lost 600 manpower in an instant, I believe when at war with the Wicked Men. I can also confirm it happened with the Dwarves. I declared war back against the Dwarves, which would require their manpower be above 50%. I killed 5 Dwarves, yet their manpower went from above 50% to 37%. Which means their manpower went from at least 1425 to 1054 when it should have dropped only 50. to Over this period of time, they did not lose any members, they were not dying outside of war at all, or at least not enough to explain the huge drop. There is no plausible reason why their manpower could have dropped by 400 other than some kind of glitch.

    EDIT: Posted in moderation reports
    Last edited by Dr. Tobias Fünke; February 24, 2012 at 05:55 PM.

  12. #12
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,539
    Blog Entries
    8

    Default Re: Power Loss

    Musty coded something up that spits an entry into the log every time someones manpower changes so we can track a few things down. I just got it installed and its working just fine. I will let it run 24 hours or so and then look for big changes in manpower.

  13. #13
    Daily's Avatar Flingin' ma mace son
    Content Emeritus

    Join Date
    Aug 2010
    Location
    Snowy tops of Norway
    Posts
    3,129

    Default Re: Power Loss

    Wait a minute. You lose manpower if you are Offline for a set time? So basically you punish people for not playing Minecraft?

    I do not like!
    Proud patron of Confederate Jeb and FalconPilot
    View how Grouchy makes a Hoplon shield!

  14. #14
    Musthavename's Avatar Bunneh Ressurection
    Join Date
    Jun 2008
    Location
    Somewhere in the room you're currently in.
    Posts
    7,590

    Default Re: Power Loss

    Quote Originally Posted by Daily View Post
    Wait a minute. You lose manpower if you are Offline for a set time? So basically you punish people for not playing Minecraft?

    I do not like!
    This happens if the faction you're in is at war. It will not happen if you're at peace. The idea is to punish inactive factions during wartime, who could otherwise avoid defeat by simply not logging on.
    Give a man a fire, and he'll be warm for the rest of the day.
    Set a man on fire, and he'll be warm for the rest of his life.


  15. #15
    Pat89's Avatar Northman™
    Join Date
    Feb 2008
    Location
    Netherlands
    Posts
    14,742

    Default Re: Power Loss

    It's doing that thing during peace time too though...

  16. #16
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,539
    Blog Entries
    8

    Default Re: Power Loss

    Quote Originally Posted by Pat89 View Post
    It's doing that thing during peace time too though...
    Possibly it is. But only if you have been offline for 168 consecutive hours. 7 days.

  17. #17
    Daily's Avatar Flingin' ma mace son
    Content Emeritus

    Join Date
    Aug 2010
    Location
    Snowy tops of Norway
    Posts
    3,129

    Default Re: Power Loss

    Quote Originally Posted by GrnEyedDvl View Post
    Possibly it is. But only if you have been offline for 168 consecutive hours. 7 days.
    It was 48 hours? I feel this is wrong since not everyone can be as active as some of us and for example new guys or friends who are getting into a new server might not be that active and in the long run you have to consider kicking them since your faction manpower is dropping. I understand this is a way to lower the manpower so that a faction with a lot of inactive players won't have a surplus of manpower, but still.
    Proud patron of Confederate Jeb and FalconPilot
    View how Grouchy makes a Hoplon shield!

  18. #18
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,539
    Blog Entries
    8

    Default Re: Power Loss

    Ok I figured out at least one issue thanks to the custom logging that Musty coded. Here is one example:

    Line 5161: 2012-02-29 07:31:10 [INFO] [Factions v1.6.3_dev] losePowerFromBeingOffline has called alterPower on 10greenbottles with loss of 131.06589270833334
    Line 5162: 2012-02-29 07:31:10 [INFO] [Factions v1.6.3_dev] alterPower called on 10greenbottles, old power = 131.06589270833334, change = -131.06589270833334
    As you can see above, it claims 10greenbottles was offline long enough that he should have lost 131 power which effectively set him to 0. This should have been impossible.

    He should only lose 10 per day, which would mean 13+ days offline AFTER the 7 day grace period, and the max you are supposed to be able to lose like this is 130 so it blew right past the cap too.

    So the entire function appears to be broken in some instances. Its possible it has to do with him being at war, and it isnt calculating right for that reason.

    I have completely disabled the power loss for being offline for now. A couple of other people had similar instances, and I went through and manually added some manpower back to those players. Its definitely possible that I missed a few though.

    If you think your manpower is screwed up then post here and I will look for your name in the logs.


    EDIT: The power loss for being offline when at war is designed to prevent a faction from sitting out the war by simply not logging in. Obviously for now that is disabled, but do not try to exploit this while we get it fixed.
    Last edited by GrnEyedDvl; March 02, 2012 at 08:52 PM.

  19. #19
    Pat89's Avatar Northman™
    Join Date
    Feb 2008
    Location
    Netherlands
    Posts
    14,742

    Default Re: Power Loss

    Great job on finding that one

  20. #20
    High Chunker Greens's Avatar Protector Domesticus
    Join Date
    Aug 2007
    Location
    UK
    Posts
    4,509

    Default Re: Power Loss

    I TOLD you I lost manpower, Pat Thanks for finding that one, GED.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •