BA modinfo - how to generate?
Moderator: Content Developer
BA modinfo - how to generate?
Is it possible to generate modinfo for latest BA? How to do that?
I am talking about this: http://imolarpg.dyndns.org/modinfo/ba783/index.html
I am talking about this: http://imolarpg.dyndns.org/modinfo/ba783/index.html
Re: BA modinfo - how to generate?
Here you find the a post of Beherith with a link to the script:
viewtopic.php?f=44&t=30945&p=547937&hil ... fo#p548207
If I remember right, I had change a small thing to work with latest BA (and some images for new units like the 3rd level hovers are missing). But I don't remember right now what it was...
Quite some time ago I started to look into an update that includes post defs, but never got very far (mostly due to time).
I the meantime I noticed this:
http://springfiles.com/spring/lua-scrip ... exporter-1
Maybe that would be a good starting point, too?!?
viewtopic.php?f=44&t=30945&p=547937&hil ... fo#p548207
If I remember right, I had change a small thing to work with latest BA (and some images for new units like the 3rd level hovers are missing). But I don't remember right now what it was...

Quite some time ago I started to look into an update that includes post defs, but never got very far (mostly due to time).
I the meantime I noticed this:
http://springfiles.com/spring/lua-scrip ... exporter-1
Maybe that would be a good starting point, too?!?
Re: BA modinfo - how to generate?
meh.. python :-D
Thanks! I will try to generate that info!
Thanks! I will try to generate that info!
Re: BA modinfo - how to generate?
Hmm.. I liked the BA modinfo page more. It is great to be able to browse from the builders to their products and back etc.
It would be great if a modinfo paser could create an intermediate format that could be used by multiple renderers (like docbook maybe?). Then a web page could show the info as well as in ingame tech tree browser.
It would be great if a modinfo paser could create an intermediate format that could be used by multiple renderers (like docbook maybe?). Then a web page could show the info as well as in ingame tech tree browser.
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: BA modinfo - how to generate?
No need to worry about this (after the next release), I wrote a tool for baking untidefs post straight into the unitdefs. The bigger issue is that it misses all the gadgets.includes post defs
Re: BA modinfo - how to generate?
"fixed" without post unitdefs:
http://imolarpg.dyndns.org/trac/balatest/changeset/3682
i guess to include post unitdefs, the nota tool (some lua widget) should be used as it runs ingame and can get all info.
http://imolarpg.dyndns.org/trac/balatest/changeset/3682
i guess to include post unitdefs, the nota tool (some lua widget) should be used as it runs ingame and can get all info.
Re: BA modinfo - how to generate?
Not working again *cry*
Can someone fix it? Please! Abma, you fixed previous issues, maybe you can help again?
Can someone fix it? Please! Abma, you fixed previous issues, maybe you can help again?
Code: Select all
➜ ba_svn ./mod2html.py
Traceback (most recent call last):
File "./mod2html.py", line 375, in <module>
unitpage(u)
File "./mod2html.py", line 352, in unitpage
writeweapon(outf,k,v)
File "./mod2html.py", line 277, in writeweapon
td(outf,v3)
File "./mod2html.py", line 70, in td
file.write('<td '+params+'>'+entry+'</td>')
TypeError: cannot concatenate 'str' and 'dict' objects
Re: BA modinfo - how to generate?
http://imolarpg.dyndns.org/trac/balatest/changeset/3934
Fixed, it crashed on repulsors missing some expected weapon stuff ;D
Fixed, it crashed on repulsors missing some expected weapon stuff ;D
Re: BA modinfo - how to generate?
thanks a lot!
Re: BA modinfo - how to generate?
Now I have this error:Beherith wrote:Fixed, it crashed on repulsors missing some expected weapon stuff ;D
Code: Select all
➜ ba_svn ./mod2html.py
Failed to find explodeas weapon for meteor in the table: ['mine_nuke', 'bantha_nuke', 'fmine_heavy', 'decoy_commander_blast', 'medium_building', 'spybombx', 'big_unit', 'estor_buildingex', 'small_building', 'ptl_collision', 'armestor_buildingex', 'nanoboom2', 'big_unitex', 'tiny_buildingex', 'small_unit', 'mine_light', 'ca_ex', 'medium_buildingex', 'noweapon', 'armestor_building', 'mech_blastsml', 'flea_ex', 'rlrpc_death', 'shocker', 'mine_heavy', 'atomic_blast', 'small_unitex', 'cormine6', 'mech_blast', 'tidal_deathex', 'big_unit_air', 'crawl_blast', 'emp_medium', 'nuclear_missile', 'gunshipex', 'small_buildingex', 'estor_building', 'small_unit_air', 'corpyro_blast', 'twilight', 'wind_ex', 'big_buildingex', 'large_building', 'mine_medium', 'bantha_death', 'crawl_blastsml', 'atomic_blastsml', 'crblmssl', 'commander_blast', 'large_buildingex']
Failed to find selfdestructas weapon for meteor in the table: ['mine_nuke', 'bantha_nuke', 'fmine_heavy', 'decoy_commander_blast', 'medium_building', 'spybombx', 'big_unit', 'estor_buildingex', 'small_building', 'ptl_collision', 'armestor_buildingex', 'nanoboom2', 'big_unitex', 'tiny_buildingex', 'small_unit', 'mine_light', 'ca_ex', 'medium_buildingex', 'noweapon', 'armestor_building', 'mech_blastsml', 'flea_ex', 'rlrpc_death', 'shocker', 'mine_heavy', 'atomic_blast', 'small_unitex', 'cormine6', 'mech_blast', 'tidal_deathex', 'big_unit_air', 'crawl_blast', 'emp_medium', 'nuclear_missile', 'gunshipex', 'small_buildingex', 'estor_building', 'small_unit_air', 'corpyro_blast', 'twilight', 'wind_ex', 'big_buildingex', 'large_building', 'mine_medium', 'bantha_death', 'crawl_blastsml', 'atomic_blastsml', 'crblmssl', 'commander_blast', 'large_buildingex']
I just copied this script to trunk directory and executed without any arguments
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: BA modinfo - how to generate?
What's happened there is that a side effect of baking unit/weapondefs_post into the unitdefs results in units that don't have death/selfd explosions getting the corresponding unitdef tags set to the empty string (previously the tags would not have been present at all) - and the python script isn't prepared for this. Probably only the meteor was affected by this.
Re: BA modinfo - how to generate?
Jamerlan, despite the looks, that should be a graceful failure, and everything should still be generated just fine.
Re: BA modinfo - how to generate?
yes, looks like all files were generated
Is it possible to set destination folder for that script?
would be nice to have smth like:
Is it possible to set destination folder for that script?
would be nice to have smth like:
Code: Select all
./mod2html.py -src ~/projects/ba/trunk -dest ~/projects/ba/modinfo
Re: BA modinfo - how to generate?
I will generate/host modinfo for each new BA version here: http://springrts.ru:8080/ba901/index.html
Re: BA modinfo - how to generate?
I updated the script. Added ability to:
1) search (filter)
2) sort columns
https://www.dropbox.com/s/5c38kl35xu9gu ... ml.py?dl=0
example how it looks like: http://springrts.ru:8080/ba901/index.html
original was look like: http://imolarpg.dyndns.org/modinfo/ba783/index.html
I am bad at python. Should I commit these changes to BA repo or not?
downside: zebra style is broken
1) search (filter)
2) sort columns
https://www.dropbox.com/s/5c38kl35xu9gu ... ml.py?dl=0
example how it looks like: http://springrts.ru:8080/ba901/index.html
original was look like: http://imolarpg.dyndns.org/modinfo/ba783/index.html
I am bad at python. Should I commit these changes to BA repo or not?
downside: zebra style is broken
Re: BA modinfo - how to generate?
Feel free to commit :D