Skip to content

Instantly share code, notes, and snippets.

@leper
leper / templates.py
Last active December 10, 2015 22:29
get template data place in binaries/data/mods/public
#!/usr/bin/env python
import xml.etree.ElementTree as ET
import copy
import os
import errno
use_custom_xml_folder = False
template_path = "simulation/templates/"
@leper
leper / commands.txt
Created March 17, 2013 22:25
max+alkazar vs alpha123+leper
start {"settings":{"PlayerData":[{"Name":"Player 1","Civ":"spart","Colour":{"r":46,"g":46,"b":200},"AI":"","AIDiff":1,"Team":0},{"Name":"Player 2","Civ":"rome","Colour":{"r":150,"g":20,"b":20},"AI":"","AIDiff":1,"Team":0},{"Name":"Player 3","Civ":"athen","Colour":{"r":50,"g":165,"b":5},"AI":"","AIDiff":1,"Team":1},{"Name":"Player 4","Civ":"spart","Colour":{"r":230,"g":230,"b":75},"AI":"","AIDiff":1,"Team":1}],"Seed":17167,"Name":"Persian Highlands","Description":"A dry centeral plateau rich in minerals surounded by rocky hills\u000a\u000aThe southern parts of Zagros Mountains where the heart of the Persian empires and population. Although the altitude is high, the southern parts are drier that the northern Zagros, leading to a semi-arid climate. Still there are some sparse oakforests in the higher grounds. The annual precipitation falls mostly in the winter spring. The winters are severe, with low temperatures.","PopulationCap":300,"StartingResources":300,"Size":320,"GameType":"conquest","Script":"persian_hig
@leper
leper / PKGBUILD
Created April 14, 2013 23:40
gloox 1.0 svn pkgbuild
pkgname=gloox
pkgver=1.0
pkgrel=4
pkgdesc="C++ libraries for development of Jabber client/component/server"
arch=('i686' 'x86_64')
url="http://camaya.net/gloox"
options=('!libtool')
license=("GPL")
depends=('libidn' 'gnutls')
source=('gloox::svn+svn://svn.camaya.net/gloox/branches/1.0')
Index: binaries/data/mods/public/gui/session/input.js
===================================================================
--- binaries/data/mods/public/gui/session/input.js (revision 13428)
+++ binaries/data/mods/public/gui/session/input.js (working copy)
@@ -616,7 +616,7 @@
if (hasWallSegment)
{
Engine.PostNetworkCommand(cmd);
- Engine.GuiInterfaceCall("PlaySound", {"name": "order_repair", "entity": selection[0] });
+ Engine.GuiInterfaceCall("PlaySound", {"name": "order_build", "entity": selection[0] });
@leper
leper / gist:6844238
Created October 5, 2013 18:07
files causing libpng warnings
identify: iCCP: known incorrect sRGB profile `./art/textures/skins/structural/stupa_big_gate.png' @ warning/png.c/MagickPNGWarningHandler/1830.
identify: iCCP: known incorrect sRGB profile `./art/textures/skins/structural/spart_siege_ram.png' @ warning/png.c/MagickPNGWarningHandler/1830.
identify: iCCP: known incorrect sRGB profile `./art/textures/skins/structural/stupa_gate_norm.png' @ warning/png.c/MagickPNGWarningHandler/1830.
identify: iCCP: known incorrect sRGB profile `./art/textures/skins/structural/siege_tower.png' @ warning/png.c/MagickPNGWarningHandler/1830.
identify: iCCP: known incorrect sRGB profile `./art/textures/skins/structural/siege_walls_wood.png' @ warning/png.c/MagickPNGWarningHandler/1830.
identify: iCCP: known incorrect sRGB profile `./art/textures/skins/structural/celt_roof_round_norm.png' @ warning/png.c/MagickPNGWarningHandler/1830.
identify: iCCP: known incorrect sRGB profile `./art/textures/skins/structural/sambuca.png' @ warning/png.c/MagickPNGWarningHandler/1830.
identify: iCCP:
# Linked objects and binaries
*.so
*.a
*.so.1
*.so.1.0
binaries/system/ActorEditor
binaries/system/pyrogenesis
binaries/system/test
# Debug binaries
binaries/system/ActorEditor_dbg
@leper
leper / gist:7508698
Created November 17, 2013 03:31
random excerpt
if g['state'] == 'init' or (g['state'] == 'waiting' and self.nicks[str(to)] in g['players-init']):
KeyError: 'josh@lobby.wildfiregames.com/0ad'
ERROR Failed to process changestate data
Traceback (most recent call last):
File "XpartaMuPP.py", line 504, in iqhandler
self.sendGameList()
File "XpartaMuPP.py", line 562, in sendGameList
self.sendGameList(JID)
File "XpartaMuPP.py", line 546, in sendGameList
if g['state'] == 'init' or (g['state'] == 'waiting' and self.nicks[str(to)] in g['players-init']):
@leper
leper / gist:7519731
Created November 17, 2013 23:24
More lobby bot errors
func(*args)
File "XpartaMuPP.py", line 447, in muc_offline
del self.nicks[str(presence['muc']['jid'])]
KeyError: ''
ERROR Error processing event handler: <bound method XpartaMuPP.muc_offline of <__main__.XpartaMuPP object at 0xb5c70410>>
Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/sleekxmpp/xmlstream/xmlstream.py", line 1659, in _event_runner
func(*args)
File "XpartaMuPP.py", line 447, in muc_offline
del self.nicks[str(presence['muc']['jid'])]
WARNING Timed out waiting for IqWait_2cd2f66a-70ba-4c12-a346-80b3cc259477-A5C
ERROR Error processing event handler: <bound method XpartaMuPP.start of <__main__.XpartaMuPP object at 0xb5cb24d0>>
Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/sleekxmpp/xmlstream/xmlstream.py", line 1659, in _event_runner
func(*args)
File "XpartaMuPP.py", line 417, in start
self.get_roster()
File "/usr/lib/python3.3/site-packages/sleekxmpp/clientxmpp.py", line 248, in get_roster
response = iq.send(block, timeout, callback)
File "/usr/lib/python3.3/site-packages/sleekxmpp/stanza/iq.py", line 219, in send
@leper
leper / commands.txt
Created December 9, 2013 14:33
The Persian AI player caused the errors some time after the CC was destroyed, and they stopped when the AI was defeated.
start {"settings":{"PlayerData":[{"Name":"Player 1","AI":"","AIDiff":2,"Civ":"gaul","Team":0},{"Name":"Player 2","AI":"","AIDiff":2,"Civ":"pers","Team":0},{"Name":"Darayavahush II","AI":"aegis","AIDiff":4,"Civ":"pers","Team":1},{"Name":"Ptolemy Philometor","AI":"aegis","AIDiff":4,"Civ":"ptol","Team":1}],"Seed":8949,"CircularMap":false,"Description":"The African savanna is chocked full of animal life for hunting, while the nearby mineral deposits are plentiful. The dry season is approaching and the watering holes are drying up.\u000a\u000aNote: This is a very small \"fast and furious\" map. Iberians do not start with their custom circuit walls.","GameType":"conquest","Keywords":[],"LockTeams":false,"Name":"Watering Holes (4)","Preview":"watering_holes_skirmish.png","RevealMap":false,"Size":128,"PopulationCap":10000,"StartingResources":300,"mapType":"skirmish"},"mapFilter":"Default","map":"maps/skirmishes/Watering Holes (4)","mapType":"skirmish","mapPath":"maps/skirmishes/","matchID":"D506A608D1EDB7CE","gameSpe