Resource values are integers !

Discussion in 'Mapping' started by Ducky, Jun 26, 2012.

  1. Ducky

    Ducky 2D Artist

    Messages:
    158
    Likes Received:
    0
    Trophy Points:
    0
    Some recent (fuel) and not so recent (palmbay, manticore, tropicvendatta) maps have refineries and/or cappoints, which are supposed to give a fractional amount of resources per second.

    However, I have recently wondered about the lower than expect resflow during some local testing:
    The problem seems to be, that empires is using the values as integers when calculating the refinery income, that means they are rounded down to a whole number (both for refineries and cappoints).
    This happens before they are added up, so 3 refs with 1.5 res/sec are only worth 3 res/sec instead of the expected 4.5 .

    And it doesn't even seem to be a bug: In the empires.fgd the resource related properties (ResourcesSecond for emp_resource_point and resToGiveNF/BE for caps, also for the emp_info_params inputs) are defined as integers (whole numbers) - so it's basically the mappers doing it wrong.

    As maps are mostly balanced "in the field" this may not be a big problem, but something a mapper should consider when balancing areas for their res value or labeling the minimap.

    Tested on a local server with the current steam and dev versions, corrections are welcome.
     
  2. A-z-K

    A-z-K Member

    Messages:
    3,241
    Likes Received:
    215
    Trophy Points:
    0
    clever ducky
     
  3. ViroMan

    ViroMan Black Hole (*sniff*) Bully

    Messages:
    8,382
    Likes Received:
    4
    Trophy Points:
    0
    clever ducks don't get shot.
     
  4. blizzerd

    blizzerd Member

    Messages:
    10,552
    Likes Received:
    60
    Trophy Points:
    0
    i thought this was common knowledge, never use halves in those
     
  5. Ducky

    Ducky 2D Artist

    Messages:
    158
    Likes Received:
    0
    Trophy Points:
    0
    Maybe it once was, none of the older maps have fractional res (until about tropicvendetta or so...?) but then knowledge got lost during the dark mapping ages, about the time when rainbowroad came out...
     
  6. ViroMan

    ViroMan Black Hole (*sniff*) Bully

    Messages:
    8,382
    Likes Received:
    4
    Trophy Points:
    0
    lol "the dark mapping ages", like it was a time of great evil.
     
  7. Ducky

    Ducky 2D Artist

    Messages:
    158
    Likes Received:
    0
    Trophy Points:
    0
    There was... this rainbowroad-on-a-square map...
     
  8. w00kie

    w00kie Mustachioed Mexican

    Messages:
    3,863
    Likes Received:
    13
    Trophy Points:
    0
    ..that was based from emp_swastika :headshot:
     
  9. Ducky

    Ducky 2D Artist

    Messages:
    158
    Likes Received:
    0
    Trophy Points:
    0
    Really? One shudders to imagine what imhuan thoughts lie behind that map... :gasmask:
     
  10. w00kie

    w00kie Mustachioed Mexican

    Messages:
    3,863
    Likes Received:
    13
    Trophy Points:
    0
    I was wrong, name was emp_rainbowpeace and ukgamer created it. He says he doesn't have it anymore. ^^
     

Share This Page