This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
Create point and click adventures without coding. The free version covers up to 25 scenes per project. For more scenes or to earn money with your game, you need a license.
See the Indie Bundle Try it for freePersonally I'm not a big fan of text being displayed above / near characters unless it's done in a more tasteful way, such as: in a speech bubble or text block of some kind.
# -*- coding: utf-8 -*-
from xml.dom import minidom
from commands import getstatusoutput
import codecs
vedname_in = 'mygame.ved' # your game file
vedname_out = 'mygame_out.ved' # result file
print 'Read %s...' % vedname_in
xmldoc = minidom.parse(vedname_in)
# update sprite positions
for setup in ['SpriteSprite', 'InterfaceSprite', 'SceneSprite', 'sprite']:
objects = xmldoc.getElementsByTagName(setup)
print 'CHECK %ss (%d)...' % (setup, len(objects))
for sid in objects:
picpath = sid.attributes['path'].value
if not '#' in picpath: continue # skip all not #-marked files
posfeld = sid.getElementsByTagName('position')
ox = int(posfeld[0].attributes['x'].value)
oy = int(posfeld[0].attributes['y'].value)
status, output = getstatusoutput('convert %s -format "%%X %%Y" info:' % (picpath))
px, py = map(int, output.split())
if ox != px or oy != py:
posfeld[0].attributes['x'].value = str(px)
posfeld[0].attributes['y'].value = str(py)
print '** --> image %s moved to (%d, %d)' % (picpath, px, py)
print 'Save %s...' % vedname_out
file_handle = codecs.open(vedname_out, 'w', 'utf-8')
xmldoc.writexml(file_handle, encoding='UTF-8')
file_handle.close()