[REL] Economic Efficiency UI Mod

Discussion in 'Mod Discussions' started by SatanPetitCul, October 8, 2013.

  1. SatanPetitCul

    SatanPetitCul Active Member

    Messages:
    267
    Likes Received:
    197
    I m working on a new colour code. You can find how it works on the table below.

    [​IMG]

    From my point of view:
    • It is always bad to waste metal (so it turns blue immediately)
    • It is bad to over use metal (to have a big metal ratio deficit) because your factories runs slower, so the metal you spend building multiple factories is lost. (better to have 5 factories at 95% that 10 factories at 35%).
    • It is good to be slightly exceeding energy, because energy falls really quick and energy is useful for radar now. So when energy goes under 110% it warns you have to be careful about it by turning yellow. Then it turns orange, and red when you deplete your stock.
    What do you think about my general logic ? do you think it needs some tweak ? do you agree with the limit i put (33%, 50%, 75%, 90%, 110% etc... ) ?
    Last edited: October 14, 2013
  2. Culverin

    Culverin Post Master General

    Messages:
    1,069
    Likes Received:
    582
    If
    Blue = Best

    "When metal storage is full" isn't good because you are not spending enough.

    I don't think this is best? Isn't empty, but not a horrible ratio the best?
    You have it flipped?
  3. SatanPetitCul

    SatanPetitCul Active Member

    Messages:
    267
    Likes Received:
    197
    For the last time Blue doesn't mean best...
    Bastilean likes this.
  4. teddythebear

    teddythebear Member

    Messages:
    50
    Likes Received:
    21
    Just so you're aware, the reason people are so obsessed with the notion that blue is better than green is because that's how World of Warcraft and other mmorpg's do things http://wowpedia.org/Item_Quality and I would guess a Very large percentage of PC gamers are fimiliar with this idea already.
    Is there any reason why a full metal storage can't also have a red color? It seems equally as bad as stalling in my mind and I wouldn't find it out of place to have the same bad (red) color associated with it. Or in other words, does one bad behavior really need its own color to differentiate it from the other behavior when we already have the resource bar we can defer to?
    Last edited: October 15, 2013
  5. zaphodx

    zaphodx Post Master General

    Messages:
    2,350
    Likes Received:
    2,409
  6. Dementiurge

    Dementiurge Post Master General

    Messages:
    1,094
    Likes Received:
    693
    Flashing red, even.

    Code:
    .flashing_border_red
    {
    border: 1px solid #D1D1D1;
    border-radius: 2px;
    -webkit-animation: flashingRedBorder ease-out infinite 600ms alternate;
    }
    
    @-webkit-keyframes flashingRedBorder
    {
    0% { border-color: #FF0000 }
    100% { border-color: #D1D1D1 }
    }
    CSS code that should let you give a comfortably flashing red border to an element, matching the border given to the metal and energy status bars.
  7. SatanPetitCul

    SatanPetitCul Active Member

    Messages:
    267
    Likes Received:
    197
    I decided first to have a different colour for stalling and wasting, because even the both are bad, the solutions are different (opposite actually).
    In the next release i will may be integrate a tool to change the colour code.
  8. SatanPetitCul

    SatanPetitCul Active Member

    Messages:
    267
    Likes Received:
    197
    Final release !
    compatible with everything, OP has been edited !

    Enjoy :)
  9. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    Can I humbly award this mod the best mod award? (jointly with yourlocalmadsci)
    stormingkiwi likes this.
  10. SatanPetitCul

    SatanPetitCul Active Member

    Messages:
    267
    Likes Received:
    197
  11. scar95

    scar95 New Member

    Messages:
    2
    Likes Received:
    0
    Amazing mod, man!
    But it doesn't seem to work on the current build of PA, and I'm pretty sure I installed it correctly (worked fine on previous build; I'm installing manually 'coz the PAMM doesn't work on Linux).
    It'd be great if you could patch it as soon as possible; Planetary Annhilation just doesn't feel as awesome without it :)
  12. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
  13. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    the mod works fine with the current version of pa, as far as I can tell:

    [​IMG]
    cptconundrum likes this.
  14. elitedanzel

    elitedanzel Active Member

    Messages:
    151
    Likes Received:
    137
    Maybe showing your metal income to energy income ratio would be useful in here too?
    I am still terrible at E stalling early gane so any help from the UI is appreciated :)
  15. SatanPetitCul

    SatanPetitCul Active Member

    Messages:
    267
    Likes Received:
    197
    The mod works fine on the current PA version. If you still experiment problem, please show me your file ui_mod_list.js and your ui/mods directory.
    Thanks for the support.
  16. scar95

    scar95 New Member

    Messages:
    2
    Likes Received:
    0
    EDIT:
    Ran it through PAMM and now it works. I guess the problem was between the chair and the keyboard ;)

    Mods directory:
    Code:
    $ ls -R PA/media/ui/mods/
    PA/media/ui/mods/:
    EcoEff  readme.txt  ui_mod_list.js  ui_mod_list.js~
    
    PA/media/ui/mods/EcoEff:
    EcoEff.css  EcoEff.ini  EcoEff.js  img
    
    PA/media/ui/mods/EcoEff/img:
    status_bar_left_endright.png  status_bar_midspan.png  status_bar_right_endleft.png
    
    ui_mod_list.js file:

    Code:
    /* start ui_mod_list */
    var global_mod_list = [
    ];
    
    var scene_mod_list = {
        'connect_to_game': [
    
        ],
        'game_over': [
    
        ],
        'icon_atlas': [
    
        ],
        'live_game': [
    '../../mods/EcoEff/EcoEff.css',
    '../../mods/EcoEff/dMexCount.js',
        ],
        'load_planet': [
    
        ],
        'lobby': [
    
        ],
        'matchmaking': [
    
        ],
        'new_game': [
        ],
        'server_browser': [
    
        ],
        'settings': [
    
        ],
        'special_icon_atlas': [
    
        ],
        'start': [
    
        ],
        'system_editor': [
    
        ],
        'transit': [
        ]
    }
    /* end ui_mod_list */
    
    
    Last edited: October 22, 2013
  17. superouman

    superouman Post Master General

    Messages:
    1,007
    Likes Received:
    1,139
    This is awesome dude! I was hoping for a mod like this. The efficiency percentage is far more imporant to know than how the amount of ressources you gain or lose per second.
    -20 metal if you have 10 in income and 30 in spending is totally different from
    -20 metal if you have 100 in income and 120 in spending.
    evilOlive and stormingkiwi like this.
  18. Bastilean

    Bastilean Active Member

    Messages:
    328
    Likes Received:
    55
  19. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    While working on another mod, I stumbled on something. setInterval normally takes a period argument to say how often it runs, but you have none. Empirically, it seems to be running about every 5ms, while I imagine that once a second (1000ms) would be sufficient. I haven't been able to observe a FPS impact, so it's not a major issue.

    If you ever get the itch to work on it some more:

    Personally I prefer recursive setTimeout to setInterval. It's a little more code, but behaves better during lag and error situations.

    Building on the game's Knockout variables would eliminate the refresh rate entirely - things would update when their inputs changed.

    I could elaborate on any of these if you're interested.
  20. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    The knockout method is certainly the way to go. If @SatanPetitCul isn't around or doesn't want to fix it, one of us should.

Share This Page