requirements for build. research, shipyard and techtree(xterium)

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • requirements for build. research, shipyard and techtree(xterium)

    this is a snipped to show the requirements od buildings/researches and ships in xterium

    insert in to the pages
    class.showbuildings.php
    class.showresearch.php
    class.shipyard.php
    class.showdmdeff.php
    class.showdmhangar.php
    class.showdmtech.php

    in this files search for this parts, sometimes more then one

    Display Spoiler

    PHP Source Code

    1. foreach($Elements as $ID => $Element)
    2. {
    3. if($pricelist[$Element]['special_type'] == 1 && $PLANET['capture_option'] != 1)
    4. continue;
    5. $AllTech = array();
    6. $GetAll = $GLOBALS['DATABASE']->query("SELECT * FROM `uni1_vars_requriements` WHERE elementID = ".$Element." ;");
    7. if($GLOBALS['DATABASE']->numRows($GetAll)>0){
    8. while($x = $GLOBALS['DATABASE']->fetch_array($GetAll)){






    and insert after that

    Display Spoiler

    PHP Source Code

    1. if($x['requireID'] <= 99){
    2. $x['rlevel'] = $PLANET[$resource[$x['requireID']]];
    3. }else{
    4. $x['rlevel'] = $USER[$resource[$x['requireID']]];
    5. }



    .

    in whole it should look like this
    Display Spoiler

    PHP Source Code

    1. foreach($Elements as $ID => $Element)
    2. {
    3. if($pricelist[$Element]['special_type'] == 1 && $PLANET['capture_option'] != 1)
    4. continue;
    5. $AllTech = array();
    6. $GetAll = $GLOBALS['DATABASE']->query("SELECT * FROM `uni1_vars_requriements` WHERE elementID = ".$Element." ;");
    7. if($GLOBALS['DATABASE']->numRows($GetAll)>0){
    8. while($x = $GLOBALS['DATABASE']->fetch_array($GetAll)){
    9. $GetAll1 = $GLOBALS['DATABASE']->query("SELECT * FROM `uni1_planets` WHERE ".$Element." = ".$Element." ;");
    10. if($x['requireID'] <= 99){
    11. $x['rlevel'] = $PLANET[$resource[$x['requireID']]];
    12. }else{
    13. $x['rlevel'] = $USER[$resource[$x['requireID']]];
    14. }
    15. $AllTech[] = $x;
    16. }
    17. }
    18. $infoEnergy = "";
    Display All



    in the related tpl files us search for
    (page.buildings.tpl
    page.dmbuild.tpl
    page.research.tpl
    page.dmship.tpl
    page.dmdeff.tpl
    page.dmtech.tpl
    page.shipyard.tpl
    page.techtree.tpl
    )
    Display Spoiler

    Smarty-Template

    1. <div class="text" > {$i.requireLevel}</div>





    and replace it with

    Display Spoiler
    <div class="text" style="{if $i.rlevel < $i.requireLevel}color:red; {else} color:green; {/if}"> {$i.rlevel}/{$i.requireLevel}</div>





    thats it
  • to make the xterium design fit the code these is tpl
    I remain at your disposal on the forum for any questions or help.

    A help is of course not a creation of a mod



    -------------------------------------------------------
    Spaccon 1.0 will be version 3.0 of 2moons that I'm coding
    Demo and coding 2moons 2.0
  • only that ? just modify the files in the template / game files tpl and change the design?

    i have all versions of xterium design based on 2moons or xgp but with bugs i just want to learn how to get from those and put the original 2moons 1.9
    the best Ogame clone :P
    Dark-Space.ga
  • to change a design you have to change the whole CSS part, images, Tpl to fit your verion
    I remain at your disposal on the forum for any questions or help.

    A help is of course not a creation of a mod



    -------------------------------------------------------
    Spaccon 1.0 will be version 3.0 of 2moons that I'm coding
    Demo and coding 2moons 2.0