Opened 11 years ago

Last modified 8 years ago

#1840 new enhancement

Manual

Reported by: qwertz Owned by:
Priority: Nice to Have Milestone: Backlog
Component: Non-game systems Keywords: Manual
Cc: Patch:

Description

Since I won't have much spare time the next months, I thought it'll be better to post what I have so far.

To reproduce the manual, follow these steps (only tested with Windows 8, 64 bit):

  • Install MiKTeX (2.9)
  • Install TeXnicCenter (2.0 Beta)
  • choose output profile LaTeX --> PDF
  • use the following arguments for the LaTeX-Compiler: -synctex=-1 -interaction=nonstopmode "%wm" --enable-write18 --pool-size=9000000

(* While the python-script should principially work from within LaTeX, it's better to run it via IDLE, as there are no error messages, if it fails within LaTeX. As a result, the .tex-file containing the script is commented out as a standard.)

  • run the python-script. Eventually you have to extract the simulation-folder of the game, so it's no longer a .zip-file and specify the path at the beginning of the script. (This would be a relatively easy to implement improvement, to make the extract process happen automatically). The script will generate a XML-folder and some tex-files-subfolders
  • Compile Manual.tex
  • Don't underestimate the amount of files generated by the script. Currently there are ~10500 files in the XML-folder, so LaTeX will be slow and may, as well as the script, take several minutes. I don't consider this to be a severe issue, as the manual will not change that often. Would be nice if performance could be improved, though.

Further possibilites to improve:

  • Use biblatex instead of bibtex. Currently not needed, as there are no references set. Relatively easy to do, I may be able to do that as I already have it done for my standard-working-template
  • It would be better to reduce the amount of manual work needed, as acutally, if there's e.g. a new unit, you would have to add it by hand to the python-script and include the tex-file later by hand to the corresponding civ's tex-file. One could e.g. only have to include the female citizen to get all buildable units, like it's done with the buildings currently.
  • If there are any copyright-problems with the pictures in the pictures-folder, please remove them
  • the technology-system needs some improvements, currently civ-specific ones are not recognized, e.g. the Colonisation-research doesn't show up on the carthaginian civ centre.
  • I'd suggest a <Description></Description> area in the xml's, analog to the description in the research-jsons. This text could be included directly under the subsubsection-heading and could include a short-ingame-description of the unit
  • Higher res pics at least for the attack-icons as well as for the timer-icon
  • Currently the text at the very beginning of the table ("Basic") is equal for all stuff, this has to be adjusted (currently by hand), it'd be better if for a Structure it'd be "Structure", for a Ship "Ship" ...
  • If there are no more fundamental layout-changes in LaTeX and there won't be much more stuff to add, set Keep_Tex_files to true in the script, as then only the .txts containing the values get updated. This is needed, as there will always have to be some manual adjustment for a final version. If there are many new units after manual adjustment took place, exclude the corresponding tex-files via the script.

If something is unclear/doesn't work, send me an email or a PM in the forum. I'll upload the file (.zip) after lunch.

Attachments (2)

Manual.zip (115.8 KB ) - added by qwertz 11 years ago.
Contains (hopefully all) needed files, the script and the tex-files
manualgenerator.7z (1.2 MB ) - added by Stan 8 years ago.
While I was in England I had a look at the above python script, and I updated it by using functions documenting them, try parsing errors, removing some units from showing up (special units). I removed the hardcoded list, and fixed some of the bonuses, but there is still some work to do on that since you have to parse json files and add the corresponding modifiers. Animals still need to be done, technologies should all be there(76). I need to get the current svn version to avoid hardcoding it and same thing for the paths. Same requirements as above with python 2.7. You might need to pass --pool-size=5000000 else it won't compile.I uploaded the generated pdf on the forums. I keep the files here cause I don't want to lose them a second time.

Download all attachments as: .zip

Change History (4)

by qwertz, 11 years ago

Attachment: Manual.zip added

Contains (hopefully all) needed files, the script and the tex-files

comment:1 by qwertz, 11 years ago

I've excluded the 0ad-logo-picture since it has ~10 MB alone

by Stan, 8 years ago

Attachment: manualgenerator.7z added

While I was in England I had a look at the above python script, and I updated it by using functions documenting them, try parsing errors, removing some units from showing up (special units). I removed the hardcoded list, and fixed some of the bonuses, but there is still some work to do on that since you have to parse json files and add the corresponding modifiers. Animals still need to be done, technologies should all be there(76). I need to get the current svn version to avoid hardcoding it and same thing for the paths. Same requirements as above with python 2.7. You might need to pass --pool-size=5000000 else it won't compile.I uploaded the generated pdf on the forums. I keep the files here cause I don't want to lose them a second time.

Note: See TracTickets for help on using tickets.