Announcement

Collapse
No announcement yet.

This will be great until A Sava Marquee Waterfall crashes the server ...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • This will be great until A Sava Marquee Waterfall crashes the server ...



    connect_errno) { $output = "Connect failed: " . $mysqli->connect_error; } else { $query = "SELECT * FROM civbe_virtues ORDER BY id ASC"; if ($virtues = $mysqli->query($query)) { $query = "SELECT * FROM civbe_synergies ORDER BY id ASC"; if ($synergies = $mysqli->query($query)) { $output = apDisplayVirtuePicker($virtues,$synergies); $synergies->free(); } /* free result set */ $virtues->free(); } } $mysqli->close(); //file_put_contents($file, $output); } else $output = file_get_contents($file); return $output; function apDisplayVirtuePicker($virtues, $synergies) { $width = 1006; $height = 653; $treeWidth = 230; $tierHeight = 182; $firstX = 119; $firstY = 114; $firstTopSynergyX = 115; $firstTopSynergyY = 69; $firstSideSynergyX = 44; $firstSideSynergyY = 94; $synergyX = 75; $synergyY = 9; $normalX = 60; $normalY = 62; $virtueWidth = 45; $virtueHeight = 43; $synergyWidth = 24; $synergyHeight = 24; $firstTierCounterY = 105; $firstTierCounterX = 70; $tierCounterHeight = 9; $tierCounterWidth = 16; $tierHeight = 182; $tierWidth = 16; $tierGap = 3; $firstCatCounterX = 89; $firstCatCounterY = 95; $catCounterWidth = 15; $catCounterHeight = 11; $catWidth = 225; $catHeight = 11; $catGap = 5; $output = ' '; //$virtuesEnabled = array(); $virtuesLeadTo = array(); $virtuesPrereq = array(); $virtuesLookup = array(); $virtueOutput = ''; while ($virtue = $virtues->fetch_assoc()) { //$virtuesEnabled['virtue' . $virtue['id']] = $virtue['enabled']; $virtuesLeadTo['virtue' . $virtue['id']] = $virtue['enables']; $virtuesPrereq['virtue' . $virtue['id']] = $virtue['prereqs']; $virtuesLookup[$virtue['virtue']] = 'virtue' . $virtue['id']; $category = strtolower($virtue['cat']); if($category === 'might') $tree = 0; else if($category === 'prosperity') $tree = 1; else if($category === 'knowledge') $tree = 2; else if($category === 'industry') $tree = 3; if($virtue['tier'] === '3') $tierClass = ' tier3'; else if($virtue['tier'] === '2') $tierClass = ' tier2'; else if($virtue['tier'] === '1') $tierClass = ' tier1'; else $tierClass = ''; $treeOffset = $firstX + ($tree * $treeWidth); $tierOffset = $firstY + (($virtue['tier'] - 1) * $tierHeight); $xPos = $treeOffset + (($virtue['col'] - 1) * $normalX); $yPos = $tierOffset + (($virtue['row'] - ((($virtue['tier'] - 1) * 3)) - 1) * $normalY); //echo $virtue['virtue'] . ' yPos(' . $yPos . '): toff(' . $tierOffset . ') + (row(' . $virtue['row'] . ') - (((tier(' . $tierOffset . ' - 1) * 3)) - 1) * normalY(' . $normalY . ')
    '; if($virtue['num'] === '1') $isEnabled = ' class="glowBorderEnabled"'; else $isEnabled = ''; $virtueOutput .= '
    ' . $virtue['virtue'] . '

    ' . $virtue['description'] . '
    '; } $synergyOutput = ''; while ($synergy = $synergies->fetch_assoc()) { $type = strtolower($synergy['type']); if($type === 'tier') $num = $synergy['tier']; else $num = ''; $yPos = $firstTopSynergyY; if($type === 'tier') { $xPos = $firstSideSynergyX; $yPos = $firstSideSynergyY + (($synergy['tier'] - 1) * ($tierHeight + 2)) + (($synergy['num'] - ($synergy['virtues'] / 2)) * $synergyY); } else if ($type === 'might') { $xPos = $firstTopSynergyX + (($synergy['tier'] - 1) * $synergyX); } else if ($type === 'prosperity') { $xPos = $firstTopSynergyX + (($synergy['tier'] - 1) * $synergyX) + $treeWidth; } else if ($type === 'knowledge') { $xPos = $firstTopSynergyX + (($synergy['tier'] - 1) * $synergyX) + (2 * $treeWidth); } else if ($type === 'industry') { $xPos = $firstTopSynergyX + (($synergy['tier'] - 1) * $synergyX) + (3 * $treeWidth); } if($synergy['tier'] == 3) $tierClass = ' tier3'; else $tierClass = ''; $synergyOutput .= '
    Synergy: ' . $synergy['name'] . '

    ' . $synergy['kicker'] . '
    '; } $output .= '
    Culture Icon
    Total:
    0
    Next:
    20
    '; $output .= $virtueOutput . $synergyOutput . '
    '; return $output; } function apConvertLeadsTo($array,$lookup) { $newArray = array(); foreach($array as $key => $val) { if($val != '') { $virtues = explode(',',$val); $newArray[$key] = ''; $comma = ''; foreach($virtues as $virtue) { $newArray[$key] .= $comma . $lookup[$virtue]; $comma = ','; } } else { $newArray[$key] = ''; } } return apArrayToJsArray($newArray); } function apArrayToJsArray($array) { $output = '{'; $comma = ''; foreach($array as $key => $val) { $output .= $comma . "'" . $key . "': '" . $val . "'"; $comma = ', '; } $output .= '};'; return $output; } function apBaseUrl() { return 'http://cache.apolyton.net/'; //return 'http://127.0.0.1/apolyton.net/'; } ?>

    I hate vB with a passion ... but it's working now. Let me know if you spot anything weird ...

  • #2
    awesome
    To us, it is the BEAST.

    Comment


    • #3
      I'm going to investigate this further and determine what fun can be had from it.

      Ooh, interesting behavior.

      I'll try not to break anything
      To us, it is the BEAST.

      Comment


      • #4
        When I follow the image link, I get to another screen. On that screen, the list for the "Civ 5 strategy guide" extends down and overlaps the image.


        To us, it is the BEAST.

        Comment


        • #5
          also, the timestamp
          To us, it is the BEAST.

          Comment


          • #6
            The "Prosperity 3" icon does not have any information besides the name.

            Should it have a description? All the others do.

            To us, it is the BEAST.

            Comment


            • #7
              "Gift economy" under Prosperity 1 has a spelling error:

              To us, it is the BEAST.

              Comment


              • #8
                "Ecoscaping" needs to be cleaned up.



                Recommend change:

                +1 Food, +1 Production, and +1 Culture from every Terrascape improvement.
                To us, it is the BEAST.

                Comment


                • #9
                  "Commodisation" (under Industry 1) should perhaps be "commoditization"... or "commoditisation" at the very least

                  no screenshot for that
                  To us, it is the BEAST.

                  Comment


                  • #10
                    Tier 1b, Tier 1c, and Tier 2b have no description text
                    (unsure if this is already known or intended)


                    Everything else seems in order.
                    To us, it is the BEAST.

                    Comment


                    • #11
                      Great feedback! Thanks I'll double check the screenshots for spelling of the commy one. Roues is definitely supposed to be Routes.

                      Prosperity 3 Synergy isn't known yet. Prosperity 3 Virtue's name isn't known yet, just the effect. There seems to be a Prosperity 3 conspiracy

                      The Tier Synergies 1b, 1c, and 2b also aren't known.

                      I'll be further formatting the effects later. Right now they're just simple text, but I get the game "stuff" text to be highlighted and with icons the way they are in the game. For example:

                      Click image for larger version

Name:	ecoscaping.jpg
Views:	1
Size:	130.7 KB
ID:	9101206

                      I'll figure out a better method for keeping the tooltips in the Virtue panel. In the game it works hanging out, but on a dark background in the forums I agree it doesn't look right.

                      Comment


                      • #12
                        Originally posted by Sava View Post
                        When I follow the image link, I get to another screen. On that screen, the list for the "Civ 5 strategy guide" extends down and overlaps the image.
                        Ah, yah. That's a problem. You're on fixed width, or just a narrow screen/window?

                        I was going to work out a way to make it responsive to viewport size later.

                        Comment


                        • #13
                          Originally posted by Sava View Post
                          "Commodisation" (under Industry 1) should perhaps be "commoditization"... or "commoditisation" at the very least

                          no screenshot for that
                          Commodisation sounds like what happened to Kuci's house. Commoditization is the proper spelling according to Firaxis.

                          That, the "Roues" and "Military Industiral Complex" have been fixed. The layout stuff will have to wait till later.

                          Comment


                          • #14
                            Originally posted by Aeson View Post
                            Ah, yah. That's a problem. You're on fixed width, or just a narrow screen/window?

                            I was going to work out a way to make it responsive to viewport size later.
                            I think I'm on a fixed width, yes.
                            To us, it is the BEAST.

                            Comment


                            • #15
                              Originally posted by Aeson View Post
                              Commodisation sounds like what happened to Kuci's house. Commoditization is the proper spelling according to Firaxis.

                              That, the "Roues" and "Military Industiral Complex" have been fixed. The layout stuff will have to wait till later.
                              To us, it is the BEAST.

                              Comment

                              Working...
                              X