Jump to content

Nescio

Community Members
  • Posts

    2.300
  • Joined

  • Days Won

    23

Posts posted by Nescio

  1. 13 hours ago, mimo said:

    I've no idea what is done in the mod (and don't have time to try to know), but just load a few maps with vanilla game and with your mod and you will see the difference

    To test I generated several random giant random maps with five players each:
    Without 0abc: 25s, 23s, 24s, 18s, 5s
    With 0abc: 115s, 183s, 162s, 138s, 165s
    (of which it takes about 15s to get to 99%)
    So it is indeed significantly slower, although I have no idea why. Does initialization time depend on the number of templates in existence?

    13 hours ago, mimo said:

    No because this new error you get has nothing to do with the previous one.

    Yeah, the new output surprised me as well.

    13 hours ago, mimo said:

    Are you sure you don't have a JS syntax error when adding the warning?

    No, I'm not; I just followed your earlier instructions:

    On 10/09/2017 at 10:51 PM, mimo said:

    Anyway, can you add in line 312 of ai/common-api/entity.js (i.e. just before it crashes in your stack)

    if (!bonusClasses) warn(" Template " + this._templateName + " with Attack " + uneval(this.get("Attack")) + " has no bonus with type " + type + " bonus " + b);

    And copy here what is printed. That should help understand what happen.

    Anyway, I tried the above again, and now the following error messages are immediately and continuously produced when starting a game:

    ERROR: JavaScript error: simulation/ai/common-api/entity.js line 13 TypeError: this._templateName is undefined m.Template<._init@simulation/ai/common-api/entity.js:13:7 m.GameState.prototype.getTemplate@simulation/ai/common-api/gamestate.js:149:9 m.GameState.prototype.findTrainableUnits@simulation/ai/common-api/gamestate.js:710:18 m.HQ.prototype.findBestTrainableUnit@simulation/ai/petra/headquarters.js:526:11 m.HQ.prototype.trainMoreWorkers@simulation/ai/petra/headquarters.js:430:20 m.HQ.prototype.update@simulation/ai/petra/headquarters.js:2234:3 m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:119:3 m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:2
    
    ERROR: JavaScript error: simulation/ai/petra/_petrabot.js line 106 TypeError: this.gameState is undefined m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:106:2 m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:2
    
    ERROR: JavaScript error: simulation/ai/petra/_petrabot.js line 106 TypeError: this.gameState is undefined m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:106:2 m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:2
    
    ERROR: JavaScript error: simulation/ai/petra/_petrabot.js line 106 TypeError: this.gameState is undefined m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:106:2 m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:2

    This happens both with and without my mod (no difference), so I suppose there is some js error now.

    13 hours ago, mimo said:

    Otherwise, I've just tried a game between AIs with your mod and did not reproduce the error.

    Yeah, the earlier error message does not occur in every game in my mod, only in some, and if it does, in the mid to late game.

     

    Actually the fact I don't understand the error is more annoying than the error itself.

  2. 2 hours ago, mimo said:

    I don't think it is the map generation as this is much worse that in vanilla game. It should be something you do during initialization.

    Something I do? I've only changed files in simulation/templates/ and simulation/data/ ; how does this affect random map initialization?

     

    Anyway, any suggestions for that AI error?

     

    7 hours ago, wowgetoffyourcellphone said:

    Also in the top ribbon too?

    Yeah: “everywhere”, “etc”, “consistently” :)

  3. Three other questions:

    31. I'd like to display metal everywhere (costs, loot, market, etc.) consistently before stone; which files do I need to edit?

     

     

    32. Likewise, I'd like to display crush armour and damage everywhere before hack (instead of after pierce).

     

     

    33. Where are the player colours defined? I would prefer them to be brighter in my mod.

  4. 12 hours ago, mimo said:

    I've not been able to run your mod: I first selected a skirmish map, and there were a lot of errors linked to skirmish templates.

    That's probably because I implemented a new template tree; I haven't looked at skirmish maps, (I actually forgot they existed), because I always play random maps, but I'll look at it to see if I can easily solve those issues.

    EDIT: there are indeed many error messages; I'll need to have a more careful look at this; thanks for pointing it out!

    PS How and why are skirmish maps different from random maps?

    12 hours ago, mimo said:

    So i tried a random map, and then the game froze at startup.

    Yeah, somehow generating random maps is quite slow; it usually stays at 99% for up to a few minutes. Loading an existing saved game is much faster though.

    12 hours ago, mimo said:

    Have you tried to run it using the zip file from your git repository?

    No, I fetch the repository directly (git clone, git pull, git push); however, the zip contains exactly the same files, and I don't see why it would make any difference whether it's zipped or not. Anyway, I'll try it out now.

    EDIT: if I place the zipped version in the mods folder, 0AD doesn't recognize it. After I unzipped it, it works exactly the same as the repository fetch with command line git (which was to be expected, because they contain the same files).

     

     

    Have you tried running the mod under the stable a22 (which ought to work), or under the newer svn version (to which this mod is probably not fully compatible)?

     

     

    12 hours ago, mimo said:

    Anyway, can you add in line 312 of ai/common-api/entity.js (i.e. just before it crashes in your stack)

    if (!bonusClasses) warn(" Template " + this._templateName + " with Attack " + uneval(this.get("Attack")) + " has no bonus with type " + type + " bonus " + b);

    And copy here what is printed. That should help understand what happen.

    Thanks! I'll try that and see what happens.

    EDIT: here is the new output:

    Quote

    ERROR: JavaScript error: simulation/ai/common-api/baseAI.js line 41
    TypeError: this.gameState is undefined
    m.BaseAI.prototype.Init@simulation/ai/common-api/baseAI.js:41:2
    m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:61:3

     

  5. 5 minutes ago, stanislas69 said:

    The idea is to get things moving while keeping the trace on what has been done and why it didn't work. If it takes two mods to do that. So be it.

    Why just two? I'm aware of the existence of half a dozen ongoing modifications (in chronological order):

    But there are probably many more :)

     

    Different people have different ideas. The more mods there are available, the better. Having ideas you don't want to see implemented is also useful. Disagreement often can be constructive in discussions.

    • Like 4
  6. Working together? I only posted a few critical remarks because stanislas69 mentioned me earlier in this topic. If Hannibal_Barca decides to do something with any of my suggestions, then that's entirely his decision; it's completely his mod.

    (Personally I think it's better to let it evolve on its own way, without aiming to emulate any of the other existing mods; always be critical of my suggestions and do not hesitate to reject them.)

  7.  

    6 minutes ago, Hannibal_Barca said:

    I don't think why anyone would pay 1k each res +2k food, 3k wood, 500metal stone  for 10+10 pop

    when its so hard to accumulate enough res even for your own units with 100 pop max

    Actually I would (and do), if I can afford it, because 100+10+10=120, which gives you a huge advantage against foes who're limited to just 100. Anyway, if you're not interested, perfectly fine, I don't really care, it's your mod, not mine :)

  8. 1 minute ago, Hannibal_Barca said:

    As it happens, I just deleted the comments :rolleyes:

    As for the trade tech, it seems a nice idea but maybe 15% and current cost would be good enough.. after all players don't directly associate walk speed with huge gain, bet most of them think the profit techs are better (noone is going to get out a calculator ingame or even if bored - unless that's you:P )

    Maybe it's just me, but I don't need a calculator to immediately recognize +25% speed is far more effective than +10% gain :)

     

     

    Anyway, another, unrelated suggestion: replace simulation/data/auras/structures/wonder_pop_2.json with:

    {
      "type": "player",
      "affects": ["Player"],
      "modifications": [
        { "value": "Player/MaxPopulation", "multiply": 1.1 }
      ],
      "auraName": "Glorious Expansion",
      "auraDescription": "Further increase the population limit by +10% per wonder owned (requires \"Glorious Expansion\" tech).",
      "requiredTechnology": "pop_wonder",
      "stackable": true
    }

    Because when playing with smaller population sizes (e.g. default maximum of 100), +40 really unbalances the game, and +10% would be much better (which works out at +10 at 100 and +30 at 300).

  9. So you've changed the distance normalization from 100 m to 70 m? (Don't forget to update the comments between lines 40 and 43).

     

    You also might want to have a critical look at simulation/data/technologies/trade_convoys_speed.json, because at 200 metal this town phase research is both much cheaper and more effective than any of the other market technologies. *1.25 (i.e. +25%) walk speed means 1/1.25=0.8 (i.e. -20%) travel time which means 1/0.8=1.25 (i.e. +25%) trade income. Maybe lower it (to +10%?) and make it more expensive (add a 200 food cost?).

  10. 20 minutes ago, Hannibal_Barca said:

    As traders are easy targets for raid and stuff.. I dont think this will work

    Something around 50-60 for 1 trip was my intention, also to have short distance trade not 4 but maybe 10

    You can easily change the normalization (the “/ 100” part) or add a constant in the “gain.traderGain” line; e.g. if you think gain ought to be twice as high, just put a “ * 2” before the “;” .

  11. 51 minutes ago, Hannibal_Barca said:

    Updated mod

    @Nescio your suggestion for trade didn't seem to work properly

    It changed the trade values but you got something like 27 across a whole normal sized map.

    And? Your intention was to make trade less profitable, right? To me this seems to work properly; besides, with upgrades the income will probably be higher; traders don't have to gain more than they costed in a single trip.

  12. 0abc updated

    • each rank (0 to 12) has a new chevron icon to distinguish them individually
    • corrals, docks, farmsteads, markets, rotary mills, storehouses have to be placed at distances of 20 m from economic buildings, to prevent players from building “storehouse walls”; because distances are calculated from the centre, markets can still be directly adjacent; small buildings leave just enough room for a small unit to walk in between them
    • barracks, blacksmiths, cavalry stables, elephant stables, and embassies have to be placed at distances of 30 m from military buildings; because they're typically large and distance is calculated from the centre, this leaves enough room for units to move in between
    • reduced cavalry speed
    • new team bonuses:
      brit: allied units cost -4% metal
      mace: allied units cost -4% wood
      ptol: allied units cost -4% food
    • several other minor changes
    • Like 1
  13. 28.

    1 hour ago, mimo said:

    Yes, can you give more details: A22 or svn?

    Both.

    1 hour ago, mimo said:

    only when loading your mod or also in vanilla?

    It occures only in mid to late game, and not in every game. It happens in my mod, yes. I don't know if it also happens in vanilla, I never continue vanilla single player games beyond a few minutes.

    1 hour ago, mimo said:

    if only with your mod, have you added some attack Bonuses?

    Yes, I certainly did. I already went through the templates looking for typos (e.g. “Bonus” or “Class” instead of “Bonuses” or “Classes”; missing or wrongly placed </>).

     

     

    30. Found it: /gui/session/selection_details.js Changed it and it seems to work as intended :)

  14. 27. Now I believe I understand how to add, update, and revert diffs on phabricator; to summarize (as a reference for future use for myself):

    Start with:

    svn up

    Optionally, to load an existing diff (e.g. D888), type:

    arc patch D888

    And also optionally, to load a previous version (e.g. diff 3575), type:

    arc patch --diff 3575

    Make some changes. Use “svn add”, “svn rm”, and “svn mv” when adding, deleting, and renaming files. Then:

    svn diff
    arc diff --preview

    Follow the url produced in the terminal, click to add it to a (new or existing) patch, and fill in the required fields (title, summary, test). Finish with:

    svn revert -R ~/0ad/binaries/data/mods/public

    If you're inside the 0ad/ folder, you can also use:

    svn revert -R *

    [EDIT]: if you get a 'svn:eol-style' or 'svn:mime-type' error exception for a certain `file.ext`, run:

    svn propset svn:eol-style native file.ext
    svn propset svn:mime-type text/plain file.ext
    svn propset svn:mime-type image/png file.png
    svn propset svn:mime-type text/xml file.xml

    Let's leave “how to start contributing?” for now and return to “how to start modifying?” :)

     

     

    24. How large are map sizes?

     

     

    28. Any suggestions how to solve the following AI error? (No, I didn't touch any of the AI files. I'm not sure what causes it, but when it starts, this error message continues uninterruptedly, which is quite annoying and also seems to slow down the game.)

    Quote

    ERROR: JavaScript error: simulation/ai/common-api/entity.js line 313 ReferenceError: bonusesClasses is not defined m.Template<.getMultiplierAgainst@simulation/ai/common-api/entity.js:313:1 m.getMaxStrength@simulation/ai/petra/entityExtend.js:28:12 m.HQ.prototype.findBestTrainableUnit/<@simulation/ai/petra/headquarters.js:570:18 m.HQ.prototype.findBestTrainableUnit@simulation/ai/petra/headquarters.js:554:2 m.AttackPlan.prototype.trainMoreUnits@simulation/ai/petra/attackPlan.js:557:19 m.AttackPlan.prototype.updatePreparation@simulation/ai/petra/attackPlan.js:440:4 m.AttackManager.prototype.update@simulation/ai/petra/attackManager.js:140:21 m.HQ.prototype.update@simulation/ai/petra/headquarters.js:2286:3 m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:119:3 m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:2

     

     

    29. Where to post feature requests? Technologies can supersede each other; it would be nice if this would also be possible for auras.

     

     

    30. By default, individual basic, advanced, and elite units are distinguished by the chevrons overlaid on the unit icon (rank1 is one bronze, rank2 two silver, rank3 three gold). Because I've replaced the b/a/e system with ranks 0 to 12, I've also created new chevron icons (attached; located under /art/textures/ui/sessions/icons/ ) to match those. Now, which files do I have to edit to properly display them?rank0.png

    rank1.png rank2.pngrank3.pngrank4.pngrank5.pngrank6.pngrank7.pngrank8.pngrank9.pngrank10.pngrank11.pngrank12.png

    • Like 1
  15. 22 minutes ago, The Undying Nephalim said:

    And here's another question: Is it possible for a tech to affect or improve an Aura in any way? I found techs that improve healer ranges, but can't seem to find anything that effects Aura ranges or activating new auras for units.

    Forgive me for jumping in a completely unrelated thread without reading anything but the last post, however, I believe I can at least partially answer this. /simulation/data/auras/structures/wonder_pop_2.json has a technology requirement:
    "requiredTechnology": "pop_wonder",
    and there is no reason why unit auras would behave differently. As for improving auras, I suppose this is also possible, albeit probably a bit less straightforward.

    EDIT: Technologies can supersede each other; if this is also allowed with auras (I'm not sure), improving auras would be very easy; just create a new file for the improved aura aura_2.json which contains:
    "supersedes": "aura_1",

  16. The last step (following the url produced by “arc diff --preview”) was actually quite easy, although I overlooked it initially. Hopefully I've correctly filled in all required fields. Anyway, a new diff was produced:

    https://code.wildfiregames.com/D887

    Now I suppose I just have to wait to get it reviewed and accepted or rejected.

     

    Meanwhile, is it possible to make another diff proposal, independently of this one? If so, how do I use arc to ignore the changes of D887 and focus on the next changes? Something I'd like to do is to give healers a + shaped selection marker, so I've added a few lines in binaries/data/mods/public/simulation/templates/template_unit_support_healer.xml and created new files in binaries/data/mods/public/art/textures/selection/plus (which arc diff proposes to ignore); now, how to proceed?

  17. Great, many thanks, “sudo yum install php-xml” solved the issue, and “arc diff --preview” seems to work now, finally!

    Quote

     

    Linting...
     LINT OKAY  No lint problems.
    Running unit tests...
    No unit test engine is configured for this project.
     SKIP STAGING  Phabricator does not support staging areas for this repository.
    Created a new Differential diff:
            Diff URI: https://code.wildfiregames.com/differential/diff/3568/

    Included changes:
      M       binaries/data/mods/public/simulation/templates/structures/brit_blacksmith.xml
      M       binaries/data/mods/public/simulation/templates/structures/gaul_blacksmith.xml
      M       binaries/data/mods/public/simulation/templates/units/maur_elephant_archer_b.xml

     

    Now let's see what the next step is and where I encounter the next hurdle :)
     

     

    PS Maybe you could add php-xml in the list of prerequisites under https://trac.wildfiregames.com/wiki/BuildInstructions#Fedora ? That would have saved a lot of time and trouble.

  18. Yes, I'm running from ~/0ad/

    OK, I've run arc install-certificate again, no difference, arc diff --preview still gives the same exception message.

    If I run arc diff --preview --trace instead, I get the longer message:

     ARGV  '/home/b/0ad/arcanist/bin/../scripts/arcanist.php' 'diff' '--preview' '--trace'
     LOAD  Loaded "phutil" from "/home/b/0ad/libphutil/src".
     LOAD  Loaded "arcanist" from "/home/b/0ad/arcanist/src".
    Config: Reading user configuration file "/home/b/.arcrc"...
    Config: Did not find system configuration at "/etc/arcconfig".
    Working Copy: Reading .arcconfig from "/home/b/0ad/.arcconfig".
    Working Copy: Path "/home/b/0ad" is part of `svn` working copy "/home/b/0ad".
    Working Copy: Project root is at "/home/b/0ad".
    Config: Did not find local configuration at "/home/b/0ad/.svn/arc/config".
    >>> [0] <conduit> user.whoami() <bytes = 117>
    >>> [1] <http> https://code.wildfiregames.com/api/user.whoami
    <<< [1] <http> 2,125,115 us
    <<< [0] <conduit> 2,126,337 us
    >>> [2] <exec> $ svn --xml status
    <<< [2] <exec> 199,777 us
    
    [2017-09-07 19:22:04] EXCEPTION: (PhutilMissingSymbolException) Failed to load class or interface 'SimpleXMLElement': the class or interface 'SimpleXMLElement' is not defined in the library map for any loaded phutil library.
    
    If you are not a developer, this almost always means that a library is out of date. For example, you may have upgraded `phabricator` without upgrading `libphutil`, or vice versa. It might also mean that you need to restart Apache or PHP-FPM. Make sure all libraries are up to date and all services have been restarted.
    
    If you are a developer and this symbol was recently added or moved, your library map may need to be rebuilt. You can rebuild the map by running 'arc liberate'. For more information, see:
    
    https://secure.phabricator.com/book/phabcontrib/article/adding_new_classes/ at [<phutil>/src/__phutil_library_init__.php:25]
    arcanist(head=master, ref.master=cbc785ddce71), phutil(head=master, ref.master=0cd92b1ff5c4)
      #0 __phutil_autoload(string)
      #1 spl_autoload_call(string) called at [<arcanist>/src/repository/api/ArcanistSubversionAPI.php:78]
      #2 ArcanistSubversionAPI::getSVNStatus() called at [<arcanist>/src/repository/api/ArcanistSubversionAPI.php:54]
      #3 ArcanistSubversionAPI::buildUncommittedStatus() called at [<arcanist>/src/repository/api/ArcanistRepositoryAPI.php:142]
      #4 ArcanistRepositoryAPI::getUncommittedStatus() called at [<arcanist>/src/repository/api/ArcanistRepositoryAPI.php:211]
      #5 ArcanistRepositoryAPI::getUncommittedPathsWithMask(integer) called at [<arcanist>/src/repository/api/ArcanistRepositoryAPI.php:186]
      #6 ArcanistRepositoryAPI::getIncompleteChanges() called at [<arcanist>/src/workflow/ArcanistWorkflow.php:841]
      #7 ArcanistWorkflow::requireCleanWorkingCopy() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:691]
      #8 ArcanistDiffWorkflow::runDiffSetupBasics() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:467]
      #9 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]

     

  19. Yes, I did successfully run arc install-certificate and arc upgrade a few hours ago. And it seems there are two .arcconfig files, one in ~/0ad/ :

    {
      "phabricator.uri" : "https://code.wildfiregames.com/",
      "repository.callsign" : "P"
    }

    and one in ~/0ad/arcanist/ :

    {
      "phabricator.uri": "https://secure.phabricator.com/",
      "load": [
        "src/"
      ],
      "history.immutable": false
    }

     

    EDIT: the .arcrc file is located in ~/

  20. The path I entered in the .bash_profile file is ~/0ad/arcanist/bin/ because I've located both the arcanist and the libphutil repositories inside ~/0ad/

    If I type arc diff --preview I get the same as with just arc diff:

     Exception 
    Failed to load class or interface 'SimpleXMLElement': the class or interface 'SimpleXMLElement' is not defined in the library map for any loaded phutil library.
    
    If you are not a developer, this almost always means that a library is out of date. For example, you may have upgraded `phabricator` without upgrading `libphutil`, or vice versa. It might also mean that you need to restart Apache or PHP-FPM. Make sure all libraries are up to date and all services have been restarted.
    
    If you are a developer and this symbol was recently added or moved, your library map may need to be rebuilt. You can rebuild the map by running 'arc liberate'. For more information, see:
    
    https://secure.phabricator.com/book/phabcontrib/article/adding_new_classes/
    (Run with `--trace` for a full exception trace.)

    And if I type arc liberate I get:

    Usage Exception: Specified directory contains more than one libphutil library. Use a more specific path.

     

     

    28. Yes, I understand that, however, I haven't touched any of the AI files.

×
×
  • Create New...