Pinned [V1.X.X] New Star Сlassic

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

    • It depends of what you want @sixu

      Let me clarify first a thing, for ids 800-899 you must create a new reslist class, because they do not exist on vanilla 2moons. You can handle and edit most of vars requests through uni1_vars table and VarsBuildCache.class.php file.

      To create a class, go to the end of the VarsBuildCache file, add a case called 800 and tell $reslist['newclass'][] = $elementID.

      But if that elemtns you want to split are class 100 (Research) with those IDs (800-820), then on your new page file use a foreach(range(800,820) as $id).
    • Yeah I figured that would be where I needed to look at expanding the research options a bit. Thanks so much for the feedback. Really appreciated. Will look at it today and get back to you!
    • Если правильно понял:
      1. \includes\vars\General.php
      Прописать
      $reslist['tech2'] = array(106,108);
      2. Скопировать:
      ShowResearchPage.class.php
      3. Переименовать:
      ShowResearchPage.class.php --> ShowResearch2Page.class.php
      4. В файле: ShowResearch2Page.class.php
      Изменить это
      class ShowResearchPage extends AbstractGamePage
      На это:
      class ShowResearch2Page extends AbstractGamePage
      5. Заменить все $reslist['tech'] в ShowResearch2Page.class.php на $reslist['tech2']

      Это самый быстрый способ реализации, но я бы не советовал так делать)
    • Alright, so this is what I did:

      Database: copied "spy_tech" row, and renamed it "sarturi1_story" changed element ID to 801, kept the class as 100 (should the class be changed also?).

      VarsBuildCache.class.php includes/classes/cache/builder/VarsBuildCache.class.php :

      Added (between tech and fleet lines):


      Source Code

      1. $reslist['stories'] = array();

      Source Code

      1. break;
      2. case 800:
      3. $reslist['stories'][] = $varsRow['elementID'];
      \ includes \ vars \ General.php (I believe this refers to the particular tech?)



      Source Code

      1. $reslist['stories'][3] = array(801);


      Copied ShowResearchPage.class.php > ShowSarturiPage.class.php

      Changed the following:

      Source Code

      1. class ShowSarturiPage extends AbstractGamePage

      Source Code

      1. $Element = HTTP::_GP('stories', 0);


      Source Code

      1. foreach($reslist['stories'] as $ID => $Element)

      Source Code

      1. $this->display('page.sarturi.default.tpl');
      Language/En/Tech.php


      Source Code

      1. //{IDs_0004} General - Name
      2. $LNG['stories'] = array(
      3. 800 => 'Sarturi Research',
      4. 801 => 'Curela',
      5. );


      mods/version 1.0.0/Vars 2Moons V1.3/includes/vars/Resource.php

      Source Code

      1. 801 => "sarturi1_story",
      styles/templates/game/page.sarturi.default.tpl

      Copy and rename page.research.default.tpl > page.sarturi.default.tpl

      Result I get is:

      Source Code

      1. Message: Illegal offset type
      2. File: /includes/pages/game/ShowSarturiPage.class.php
      3. Line: 491
      4. URL: http://www.website.com/game.php?page=sarturi
      5. PHP-Version: 7.2.29
      6. PHP-API: litespeed
      7. 2Moons Version: 1.0.git
      8. Debug Backtrace:
      9. #0 /includes/pages/game/ShowSarturiPage.class.php(491): errorHandler(2, 'Illegal offset ...', 'FILEPATH ...', 491, Array)
      10. #1 /game.php(58): ShowSarturiPage->show()
      11. #2 {main}
      Display All
      Line 491, ShowSarturiPage.class.php:

      Source Code

      1. $techTreeList[$Element] = $requirementsList;
      2. if(isset($queueData['quickinfo'][$Element]))
      3. {
      4. $levelToBuild = $queueData['quickinfo'][$Element];
      5. }
      6. else
      7. {
      8. $levelToBuild = $USER[$resource[$Element]];
      9. }
      10. $costResources = BuildFunctions::getElementPrice($USER, $PLANET, $Element, false, $levelToBuild);
      11. $costOverflow = BuildFunctions::getRestPrice($USER, $PLANET, $Element, $costResources);
      12. $elementTime = BuildFunctions::getBuildingTime($USER, $PLANET, $Element, $costResources);
      13. $buyable = $QueueCount != 0 || BuildFunctions::isElementBuyable($USER, $PLANET, $Element, $costResources);
      Display All

      I think that's everything, unless I've missed something! ?( ^^
    • sixu wrote:

      Alright, so this is what I did:

      Database: copied "spy_tech" row, and renamed it "sarturi1_story" changed element ID to 801, kept the class as 100 (should the class be changed also?).

      VarsBuildCache.class.php includes/classes/cache/builder/VarsBuildCache.class.php :

      Added (between tech and fleet lines):


      Source Code

      1. $reslist['stories'] = array();

      Source Code

      1. break;
      2. case 800:
      3. $reslist['stories'][] = $varsRow['elementID'];
      \ includes \ vars \ General.php (I believe this refers to the particular tech?)



      Source Code

      1. $reslist['stories'][3] = array(801);

      Copied ShowResearchPage.class.php > ShowSarturiPage.class.php

      Changed the following:

      Source Code

      1. class ShowSarturiPage extends AbstractGamePage

      Source Code

      1. $Element = HTTP::_GP('stories', 0);

      Source Code

      1. foreach($reslist['stories'] as $ID => $Element)

      Source Code

      1. $this->display('page.sarturi.default.tpl');
      Language/En/Tech.php


      Source Code

      1. //{IDs_0004} General - Name
      2. $LNG['stories'] = array(
      3. 800 => 'Sarturi Research',
      4. 801 => 'Curela',
      5. );

      mods/version 1.0.0/Vars 2Moons V1.3/includes/vars/Resource.php

      Source Code

      1. 801 => "sarturi1_story",
      styles/templates/game/page.sarturi.default.tpl

      Copy and rename page.research.default.tpl > page.sarturi.default.tpl

      Result I get is:

      Source Code

      1. Message: Illegal offset type
      2. File: /includes/pages/game/ShowSarturiPage.class.php
      3. Line: 491
      4. URL: http://www.website.com/game.php?page=sarturi
      5. PHP-Version: 7.2.29
      6. PHP-API: litespeed
      7. 2Moons Version: 1.0.git
      8. Debug Backtrace:
      9. #0 /includes/pages/game/ShowSarturiPage.class.php(491): errorHandler(2, 'Illegal offset ...', 'FILEPATH ...', 491, Array)
      10. #1 /game.php(58): ShowSarturiPage->show()
      11. #2 {main}
      Display All
      Line 491, ShowSarturiPage.class.php:

      Source Code

      1. $techTreeList[$Element] = $requirementsList;
      2. if(isset($queueData['quickinfo'][$Element]))
      3. {
      4. $levelToBuild = $queueData['quickinfo'][$Element];
      5. }
      6. else
      7. {
      8. $levelToBuild = $USER[$resource[$Element]];
      9. }
      10. $costResources = BuildFunctions::getElementPrice($USER, $PLANET, $Element, false, $levelToBuild);
      11. $costOverflow = BuildFunctions::getRestPrice($USER, $PLANET, $Element, $costResources);
      12. $elementTime = BuildFunctions::getBuildingTime($USER, $PLANET, $Element, $costResources);
      13. $buyable = $QueueCount != 0 || BuildFunctions::isElementBuyable($USER, $PLANET, $Element, $costResources);
      Display All
      I think that's everything, unless I've missed something! ?( ^^
      screenshots para ver lo que isistes
    • 1.
      801-999 ID заняты
      801 - бонусы
      901 - ресурсы

      2. Папка mods ни как не влияет на игру это ДОПОЛНИТЕЛЬНЫЕ МОДЫ.

      3. Дополнить массив $LNG['tech']

      800 => 'Sarturi Research',
      801 => 'Curela',

      4. Если вы создали класс в VarsBuildCache.class.php, то не надо его создавать в General.php

      5. Создайте новый объект в vars.sql

      6. Это не надо менять
      $Element = HTTP::_GP('stories', 0);

      ... Ошибок много.
      Мне кажется вы не знаете основ php. Я могу посоветовать учебные материалы.
      В ближайшее время напишу несколько туториалов для админов.
      К сожалению я один, и не смогу всем помочь. Мне и так одному сложно писать движок.
    • ***New Star V1.0.4 Beta***
      Дизайн:
      ✔ Новый дизайн мода ресурсы (Yaro2709);
      ✔ Новый дизайн навигации ресурсов (Yaro2709);
      ✔ Другие маленькие изменения (Yaro2709);
      Моды:
      ✔ Исправлена ошибка, связанная с удалением сообщений (Yaro2709);
      ✔ Исправлена ошибка со строительством (Yaro2709);
      ✔ Новая ресурсная система (Yaro2709);
      ✔ Другие маленькие изменения (Yaro2709);
      Движок:
      ✔ Добавлен автоматический install (Yaro2709);
      ✔ Переход с jQuery v1.8.3 на jQuery v3.3.1 и обновлены все прилагающие файлы (Yaro2709);
      ✔ Переход с FancyBox v1.3.4 на FancyBox v3.5.7 (Yaro2709);
      ✔ Изменены некоторые файлы для успешного перехода на jQuery v3.3.1 (Yaro2709);
      ✔ Другие маленькие изменения (Yaro2709).

      Завтра New-Star исполняется месяц)
      Images
      • 1.0.4.jpg

        39.09 kB, 900×480, viewed 213 times
    • Todo esta muy lindo, y se agradece el esfuerzo, pero después de la versión 1.8 no hacen un backend de verguenza, ahora sacas tu sitio sin backend, wtf.... tampoco tendrás interés de hacer un backend para la comunidad que no sabe desarrollar
      VERY SAD :/ :/ :/ :/
    • Shell-Script

      1. Message: Undefined index: laboratory_inter
      2. File: /includes/classes/class.BuildFunctions.php
      3. Line: 210
      4. URL: http://new-star-master/game.php?page=resources
      5. PHP-Version: 7.1.33
      6. PHP-API: apache2handler
      7. 2Moons Version: 1.0.git
      8. Debug Backtrace:
      9. #0 /includes/classes/class.BuildFunctions.php(210): errorHandler(8, 'Undefined index...', 'G://OpenServer//O...', 210, Array)
      10. #1 /includes/classes/class.PlanetRessUpdate.php(714): BuildFunctions::getBuildingTime(Array, Array, 108, Array)
      11. #2 /includes/classes/class.PlanetRessUpdate.php(637): ResourceUpdate->SetNextQueueTechOnTop()
      12. #3 /includes/classes/class.PlanetRessUpdate.php(117): ResourceUpdate->ResearchQueue()
      13. #4 /includes/pages/game/AbstractGamePage.class.php(42): ResourceUpdate->CalcResource()
      14. #5 /includes/pages/game/ShowResourcesPage.class.php(24): AbstractGamePage->__construct()
      15. #6 /game.php(43): ShowResourcesPage->__construct()
      16. #7 {main}
      Display All
      Кто к нам с чем зачем, тот от того и того! :D
    • PHP Source Code: General.php

      1. $reslist['lab'] = array(31,916); //единицы, которые объединяются в сеть
    • Что вам важно - голоса - имена:
      1. Новый функционал, моды - 0 -
      2. Учебное пособие по New-Star - 0 -
      3. Упрощение функционала - 1 - Yaro2709.

      Правила: голос у вас 1.
      Прошу всех заинтересованных ответить мне в ЛС.
      Не засоряйте эту тему.
      Мне нужно определить вектор своего движения.
      Все сразу успеть я не смогу.