Opened 2 years ago
Closed 2 years ago
#6376 closed defect (fixed)
templatesanalyzer broken
Reported by: | Langbart | Owned by: | |
---|---|---|---|
Priority: | If Time Permits | Milestone: | Alpha 26 |
Component: | Non-game systems | Keywords: | |
Cc: | Patch: | Phab:D4445 |
Description (last modified by )
The following python script no longer works.
- 0ad/source/tools/templatesanalyzer/unitTables.py
The issue might be related to [25223]
paria@Paria ~/0ad % python3 /Users/paria/0ad/source/tools/templatesanalyzer/unitTables.py Traceback (most recent call last): File "/Users/paria/0ad/source/tools/templatesanalyzer/unitTables.py", line 331, in <module> if hasParentTemplate(template, possParent): File "/Users/paria/0ad/source/tools/templatesanalyzer/unitTables.py", line 78, in hasParentTemplate Template = ET.parse(Name) File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/xml/etree/ElementTree.py", line 1229, in parse tree.parse(source, parser) File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/xml/etree/ElementTree.py", line 569, in parse source = open(source, "rb") FileNotFoundError: [Errno 2] No such file or directory: 'builder|template_unit_support.xml'
Recommendations by elexis
:
- lesson that can be learnt from that, if you want to add a feature, make sure that its tested regularly, either by CI tests or by having the feature so exposed that there are many eyes on it, and maybe adding a reminder to manually test it in the release process document
- if someone actually did make such a feature that shows the same data in the game, then that could supersede the html tool, having the thing inside the GUI would definitely make it become more maintained as more people would run it, notice and report bugs
- or the html tool could receive a CI test
Update: 9/Jan/22
- hyiltiz
- User project: https://hyiltiz.github.io/0ad-unit-analysis
- Related forum thread: Unit efficiency and availability analysis by unit category and civilization (9/Jan/22)
- Github repo: https://github.com/hyiltiz/0ad-unit-analysis
Users who have created similar projects that might be worth collaborating on.
- nwtour
- User project: https://nwtour.github.io/compare-0ad/index.html
- Related forum thread: Techtree visualisation and overview of units' parameters (6/Sep/21)
- s0600204
- User project: http://s06eye.co.uk/0ad/
- 7yl4r
- User project: https://7yl4r.github.io/0ad-unit-net/index.html
- Related forum thread: I made a thing : Unit counter relationship network viz (9/Jan/19)
Change History (5)
comment:1 by , 2 years ago
Component: | UI – In-game → Non-game systems |
---|
comment:2 by , 2 years ago
Description: | modified (diff) |
---|
comment:4 by , 2 years ago
Script results are now available on http://docs.wildfiregames.com/templatesanalyzer/
In r26043 Update unitTables.py for A25 and trunk
Add support for mul_round Correct table BUGFIX: correct roster table via the mixin Civ fix avoid long lines for PEP8 compliance for mod development outside .svn repo, create symlink replace all TAB indents to 4 spaces for PEP8 TAB to 4 spaces to be PEP8 compliant refactor complex inline logic to compute and formatting beautify and avoid long lines to be PEP8 compliant beautify and simplify JS table format code Using more accessible color scheme Better color scheme main analysis file Rename the new version back to keep consistancy dependency JS library Unit analysis result Rewrite specilized table logic to only show changed Prefer numeric flag over string flag to refactor Re-format HTML templates into readable source code Civ specific table now renders non-empty Update computeCivTemplate to parse A25 template dir Cleanup debugging flags Update copyright notice to 2022 Explain how the code works for future development Initial README Refactor: put HTML IO code in a single function Refactor: include JavaScript as verbatim str Refactor: separate computation from IO Refactor: compute templates before HTML IO Refactor: compute CivTemplates before HTML IO Refactor: compute separate from IO code Fixed melee and ranged attack damage parsing Fixed Resistance parsing Implement the undefined function complain Rename Armour -> Resistance Simplify NumericStatProcess logic
Patch by: @hyiltiz
Differential Revision: https://code.wildfiregames.com/D4445
comment:5 by , 2 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Update the description with links to hyiltiz's project.