View topic - unitDefs to HTML-pages set exporter



All times are UTC + 1 hour


Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: 10 Nov 2012, 01:55 
User avatar

Joined: 03 Jun 2010, 00:28
Hi, Im sure someone did the same before me, but maybe his try is not known enough and maybe it does a bit different thing or work different way (than i needed). So here is the widget

WHAT DOES IT DO?

You launch standard game - from every unit defined in your choosen mod/gamefile widgets gets some choosen values (unit statistics). For each unit, it creates separate html page with all choosen stats + navigation (list of names of all units).

It creates one index.html and one style.css file, too.

Example result you can check: http://nota.machys.net/images/units/index.html

Currently widget creator contains three files:

  • ./LuaUI/Widgets/stat_mod_to_html.lua
  • ./LuaUI/Widgets/html-creator/css.lua
  • ./LuaUI/Widgets/html-creator/head.lua

POSSIBLE SETTINGS (in first file):

  • websiteURL (def: "http://nota.machys.net/" - put here your webpage or let empty -> "")
  • filePath (def: "LuaUI/stats/" - choose different folder in LuaUI - if you dont want create "stats" there - its folder for output data)
  • notaPageGoogleStatistics (def: "true" - for different game then NOTA let false OR edit google analytics in head.lua file and use own one)
  • backgroundColor (def: "fff")
  • backgroundColor2 (def: "ddd")

POSSIBLE ISSUES

I: I have no result.
A: Maybe you forgot to create "stats" folder in your spring ./LuaUI/

I: It says - "./LuaUI/stats/ doesnt exist" in my logfile but I created it
A: Maybe you look in the folder with some browser or file manager (folder testing is done by silly way - it tests renaming)

I: There are some units in result I never met in game
A: Yes, those bastards are hiding all the time.

I: I dont have any images as you on example page
A: Yes, you need to pick all images from you game, convert them to *.jpg and put into same folder as all html files

EXPECTED CRITICS
(I answer in Taunts shortcuts)

C: You code like my granny.
A: (1) (43)

C: There can be added many features, its not finished, there are only few values, its not possible to change the list of values
A: (202)

C: What is that for? It does almost nothing
A: (1), its for fast comparing, arguing about balance in you mod/game, for showing to newbies (if no better tools present around in your game community)

FUTURE:

At the end I want to say, it was done in few hours this afternoon to get the some end-value at the smallest time cost.

Another development depends on interest of you or our NOTA dudes.


Attachments:
File comment: just unpack in your spring folder and it should create the result after init of first game you try to play
mod_stats_exporter.zip [4.23 KiB]
Downloaded 55 times


Last edited by PepeAmpere on 10 Nov 2012, 18:41, edited 1 time in total.
Top
 Offline Profile  
 
PostPosted: 10 Nov 2012, 02:15 
Moderator

Joined: 05 Aug 2009, 19:42
at least sort units in the index by name


Top
 Offline Profile  
 
PostPosted: 10 Nov 2012, 03:09 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: You are going to die anyway, hurry up and do it.
neat, I did one like this years ago and lost the source code. Good stuff. I didn't think of generating an index with all the names, that is a cool idea.


Top
 Offline Profile  
 
PostPosted: 10 Nov 2012, 03:16 
User avatar

Joined: 03 Jun 2010, 00:28
gajop wrote:
at least sort units in the index by name


its sorted by name, unitDef name, not humanName ;)


Top
 Offline Profile  
 
PostPosted: 10 Nov 2012, 10:21 
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
zK has this http://zero-k.info/Static/UnitGuide made with similiar widget.

this was my try at unitguide generator, did not really do much:
http://knorke.darkstars.co.uk/ug/unitguide.html


Attachments:
tp_unitguide.lua [5.09 KiB]
Downloaded 23 times
Top
 Offline Profile  
 
PostPosted: 10 Nov 2012, 12:49 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
Thanks for a job well done.


Top
 Online Profile  
 
PostPosted: 10 Nov 2012, 15:17 
Moderator

Joined: 12 Oct 2007, 08:24
I like the widget method because it will read values after unitdefs_posts has messed with them.

The reported LOS and speed values are very strange. Also only one weapon is reported and it has a strange damage value.


Top
 Offline Profile  
 
PostPosted: 10 Nov 2012, 18:34 
User avatar

Joined: 03 Jun 2010, 00:28
Google_Frog wrote:
The reported LOS and speed values are very strange.


  • Yes, it looks some values are edited in postdef or by engine way. But still, i can cut the string to make it shorter.

Google_Frog wrote:
Also only one weapon is reported and it has a strange damage value.


  • Yes, in new version i will write all weapons.
  • Strange DMG value is because some NOTA weapons have set some "strange" number as default and some normal for all armor classes (default is first in list, i write only dmg from first position) = so that "strange" number is never used, because every armor class have some own number. ---> i can list all damages for given weapon.


Top
 Offline Profile  
 
PostPosted: 22 Jan 2013, 00:59 
User avatar

Joined: 03 Jun 2010, 00:28
Hi, here is much more advanced version of previous widget.

Image

CHANGELOG 0.1 -> 0.7

  • 0.7 - new icons (ONLY FOR NOTA), rebalancing size of tables, fix of weapons names
  • 0.6 - basic icons (part of this .zip)
  • 0.5 - new Layout, all weapons, new stats of unit and weapons...
  • 0.2 - options - use different CSS, noNavigation

WHAT DOES IT DO NOW?

Gets some values and do nice tables with stats of unit. Now equiped with nice icons, nice size, more options, full weapons damages list, etc...

Page with links on example result you can check: http://nota.machys.net/nota-units

Contain three main files:

  • ./LuaUI/Widgets/stat_mod_to_html.lua
  • ./LuaUI/Widgets/html-creator/css.lua
  • ./LuaUI/Widgets/html-creator/head.lua

... and folder with 29 original Pepe's icons made in 30 minutes in old Windows Paintbrush :regret: NEW

  • ./LuaUI/stats/icons/

You are free to use them of course or make own ones and rewrite those in icons folder.

POSSIBLE SETTINGS (in stat_mod_to_html.lua file):

  • title (def: false - if you want full alone standing page as in version 0.1, let this TRUE) NEW
  • navigation (def: false - list of links on other units, in version 0.1 it was hardcoded TRUE) NEW
  • footer (def: false - additional foot info with link on main page, , in version 0.1 it was hardcoded TRUE) NEW
  • websiteURL (def: "http://nota.machys.net/" - put here your webpage or let empty -> "")
  • filePath (def: "LuaUI/stats/" - choose different folder in LuaUI - if you dont want create "stats" there - its folder for output data)
  • notaPageGoogleStatistics (def: false - for different game then NOTA let false OR edit google analytics in head.lua file and use own one)
  • backgroundColor (def: "fff")
  • backgroundColor2 (def: "ddd")
  • ownCSS - (def: false - do you want use own CSS or external - for example the one on NOTA page) NEW
  • cssFile - (def: nota page CCS file URL - if you want to use your web CSS, add here its URL) NEW

SOME MARKS


Thx to danil_kalina for new icons set and to Godde for consulting the stats representation and layout.

Enjoy! :mrgreen:


Attachments:
File comment: version 0.7 of widget
mod_stats_exporter_v0_7.zip [14.3 KiB]
Downloaded 22 times
File comment: example of place iframe with seadragon on nota page
sea_drag_example.jpg [68.48 KiB]
Not downloaded yet
Top
 Offline Profile  
 
PostPosted: 18 Feb 2013, 03:51 
User avatar

Joined: 03 Jun 2010, 00:28
CHANGELOG 0.7 -> 0.7.1

  • support for burst/salvo multiplier - if it is not 1, the info about number of projectiles is added into weapon name cell


Attachments:
File comment: version 0.7.1 pf the widget
mod_stats_exporter_v0_7_1.zip [14.37 KiB]
Downloaded 14 times
Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.