[TUTO] Addition of a new building

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

    • [TUTO] Addition of a new building

      Here is the tutorial as promised which allows you to added a new building to your game.

      We are going to need to do some manipulation in the php file and the database

      To start we will add it in our database at several places

      Before doing by sql queries we will add them directly by phpMyAdmin

      We will have to add our building in 3 tables
      • uni1_planets
      • uni1_vars
      • uni1_vars_requriements (Not required if you do not want a condition to unlock the building)
      We start of course where there are all our tables we look for this table



      Once we got back to our table



      Then we go down the bottom of our page to get here



      We arrive then on this page



      We do not need all the fields alone as that which I have filled is enough



      Keep in mind the name of your building because it must be identical in the table vars

      Once saved we see it all at the bottom of our page in the structure



      Now that this is done we move to the other table which is the vars
      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
      • Uni Xterium Comming Soon
      • Uni Ogame Comming Soon
    • To start we go to our table uni1_vars



      Then we look at the ElementID that we can recover
      • Me ElementID -> 7


      We will fill only it is part of it that interests us to add our building



      • ElementID is the building id that we will find in our php file for me = 7
      • name is the name we chose in the planets table for me = bank
      • the class corresponds to the chosen type 0 = building
      • onPlanetType is to know where you want with this building 1 = planets, 3 = moon, 1 and 3 planets and moon. me = 1
      • onePerPlanet matches to just have 1 so let the number be 0
      • factor corresponds to the multiple for each new level for the price of the latter. me = 1.50
      • maxLevel is of course the maximum level number that the building can have. me = 255
      • cost901, cost902, cost903 is the price in metal, crystal, deuterium of your building you can add if you want it of the black matter (cost921)


      Once the information is filled, we just have to save it



      To see the information of your building go to the last page



      So we have our building in our table planets as well as our table vars
      For the last table I show you how to add conditions to unlock the building my I do not for my building (uni1_vars_requriements)
      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
      • Uni Xterium Comming Soon
      • Uni Ogame Comming Soon
    • We start by going to our table uni1_vars_requriements



      Then we will insert one or more lines as you want



      So we will come to this page that allows us to enter the values that want



      What is the 3 columns
      • elementID corresponds to your id that you chose in the table vars for me = 7
      • requireID matches the building id or search to unlock the sample building -> Metal Mine = ID 1, Crystal Mine ID = 2
      • requiereLevel is the minimum level required to unlock the building


      These are the prerequisites are set up

      We finished with the database so we go to the php file
      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
      • Uni Xterium Comming Soon
      • Uni Ogame Comming Soon
    • To put it simply there is just 1 file to add is the lang file (you must add it in all your lang files) TECH.php

      PHP Source Code: TECH.php

      1. $LNG['tech'] = array(
      2. 0 => 'Buildings',
      3. 1 => 'Metal Mine',
      4. 2 => 'Crystal Mine',
      5. 3 => 'Deuterium Refinery',
      6. 4 => 'Solar Power plant',
      7. 6 => 'University',
      8. 12 => 'Deuterium Power Plant',
      9. 14 => 'Robot Factory',
      10. 15 => 'Nanite Factory',
      11. 21 => 'Shipyard',
      12. 22 => 'Metal Storage',
      13. 23 => 'Crystal Storage',
      14. 24 => 'Deuterium Storage',
      15. 31 => 'Research Lab',
      16. 33 => 'Terraformer',
      17. 34 => 'Alliance Depot',
      18. 44 => 'Missile Silo',
      19. 7 => 'Bank', //Addon
      Display All

      after we add the descriptions

      PHP Source Code: TECH.php

      1. $LNG['shortDescription'] = array(
      2. 1 => 'Used in the extraction of metal ore, metal mines are of primary importance to all emerging and established empires.',
      3. 2 => 'Crystals are the main resource used to build electronic circuits and form certain alloy compounds.',
      4. 3 => 'Deuterium is used as fuel for spaceships and is harvested in the deep sea. Deuterium is a rare substance and is thus relatively expensive.',
      5. 4 => 'Solar power plants absorb energy from solar radiation. All mines need energy to operate.',
      6. 6 => 'Shortens research time each level by 8%.',
      7. 12 => 'The fusion reactor uses deuterium to produce energy.',
      8. 14 => 'Robotic factories provide construction robots to aid in the construction of buildings. Each level increases the speed of the upgrade of buildings',
      9. 15 => 'This is the ultimate in robotics technology. Each level cuts the construction time for buildings, ships, and defenses',
      10. 21 => 'All types of ships and defensive facilities are built in the planetary shipyard',
      11. 22 => 'Provides storage for excess Metal.',
      12. 23 => 'Provides storage for excess Crystal.',
      13. 24 => 'Provides storage for excess Deuterium',
      14. 31 => 'A research lab is required in order to conduct research into new technologies.',
      15. 33 => 'The Terraformer increases the usable area on the planet.',
      16. 34 => 'The Alliance Depot offers the possibility to supply fuel to friendly fleets in orbit.',
      17. 41 => 'The moon has no atmosphere therefore a lunar base must be built before the settlement of other buildings.',
      18. 42 => 'The sensor array allows you to monitor fleet movements. The higher the stage, the greater is the range of the phalanx.',
      19. 43 => 'Jump gates are huge transmitters that are able to send large fleets without loss of time through the universe.',
      20. 44 => 'missile silos used for storage of rockets.',
      21. 7 => 'The bank allows you to put resources in the shelter',
      Display All

      PHP Source Code: TECH.php

      1. $LNG['longDescription'] = array(
      2. 1 => 'Used in the extraction of metal ore, metal mines are of primary importance to all emerging and established empires.',
      3. 2 => 'Crystals are the main resource used to build electronic circuits and form certain alloy compounds.',
      4. 3 => 'Deuterium is used as fuel for spaceships and is harvested in the deep sea. Deuterium is a rare substance and is thus relatively expensive.',
      5. 4 => 'Solar power plants absorb energy from solar radiation. All mines need energy to operate.',
      6. 6 => 'Shortens research time each level by 8%.',
      7. 12 => 'The fusion reactor uses deuterium to produce energy.',
      8. 14 => 'Robotic factories provide construction robots to aid in the construction of buildings. Each level increases the speed of the upgrade of buildings',
      9. 15 => 'This is the ultimate in robotics technology. Each level cuts the construction time for buildings, ships, and defenses',
      10. 21 => 'All types of ships and defensive facilities are built in the planetary shipyard',
      11. 22 => 'Provides storage for excess Metal.',
      12. 23 => 'Provides storage for excess Crystal.',
      13. 24 => 'Provides storage for excess Deuterium',
      14. 31 => 'A research lab is required in order to conduct research into new technologies.',
      15. 33 => 'The Terraformer increases the usable area on the planet.',
      16. 34 => 'The Alliance Depot offers the possibility to supply fuel to friendly fleets in orbit.',
      17. 41 => 'The moon has no atmosphere therefore a lunar base must be built before the settlement of other buildings.',
      18. 42 => 'The sensor array allows you to monitor fleet movements. The higher the stage, the greater is the range of the phalanx.',
      19. 43 => 'Jump gates are huge transmitters that are able to send large fleets without loss of time through the universe.',
      20. 44 => 'missile silos used for storage of rockets.',
      21. 7 => 'The bank allows you to put resources in the shelter',
      Display All
      That's it for the lang file

      The you are going to tell me I still do not see in my game, no panic it just sufi you connect to your admin panel and emptied the cache of your game



      go to your building page is down you will have your building that is visible



      To add an image to your building just put it in styles\theme\gow\gebaeude\7.gif

      Enjoy
      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
      • Uni Xterium Comming Soon
      • Uni Ogame Comming Soon
    • If you have added a condition to unlock your building it will of course not be visible in the building page requiere

      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
      • Uni Xterium Comming Soon
      • Uni Ogame Comming Soon