BA modinfo - how to generate?

BA modinfo - how to generate?

Classic game design, maintained to please you...

Moderator: Content Developer

Post Reply
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

BA modinfo - how to generate?

Post by jamerlan »

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
User avatar
qray
Posts: 377
Joined: 02 Feb 2009, 18:49

Re: BA modinfo - how to generate?

Post by qray »

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?!?
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: BA modinfo - how to generate?

Post by jamerlan »

meh.. python :-D
Thanks! I will try to generate that info!
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: BA modinfo - how to generate?

Post by dansan »

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.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: BA modinfo - how to generate?

Post by Silentwings »

includes post defs
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.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: BA modinfo - how to generate?

Post by abma »

"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.
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: BA modinfo - how to generate?

Post by jamerlan »

Not working again *cry*

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
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: BA modinfo - how to generate?

Post by Beherith »

http://imolarpg.dyndns.org/trac/balatest/changeset/3934

Fixed, it crashed on repulsors missing some expected weapon stuff ;D
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: BA modinfo - how to generate?

Post by jamerlan »

thanks a lot!
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: BA modinfo - how to generate?

Post by jamerlan »

Beherith wrote:Fixed, it crashed on repulsors missing some expected weapon stuff ;D
Now I have this error:

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']
probably I am using it incorrectly?
I just copied this script to trunk directory and executed without any arguments
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: BA modinfo - how to generate?

Post by Silentwings »

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.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: BA modinfo - how to generate?

Post by Beherith »

Jamerlan, despite the looks, that should be a graceful failure, and everything should still be generated just fine.
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: BA modinfo - how to generate?

Post by jamerlan »

yes, looks like all files were generated

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
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: BA modinfo - how to generate?

Post by jamerlan »

I will generate/host modinfo for each new BA version here: http://springrts.ru:8080/ba901/index.html
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: BA modinfo - how to generate?

Post by jamerlan »

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
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: BA modinfo - how to generate?

Post by Beherith »

Feel free to commit :D
Post Reply

Return to “Balanced Annihilation”