This patch allows you to create a map without using text editors. In your manual for the creation of maps, monsters, and adds a group of monsters in your hand, after the patch, it can be done in the editor Tiled, which for many will be easier. try, then it will be possible to arrange the editor monsters or NPC, or event, or teleport, and then do export and play.
P.S. Apologies for machine translation, I do not understand English.
small path for tiled-qt-0.8.1/src/plugins/flare/flareplugin.cpp
change from:
if (ObjectGroup *group = layer->asObjectGroup()) { foreach (const MapObject *o, group->objects()) { if (o->type().isEmpty()) { out << "[" << group->name() << "]\n";
// display object name as comment if (o->name().isEmpty()) { out << "# " << o->name() << "\n"; }
out << "type=" << o->type() << "\n"; out << "location=" << o->x() << "," << o->y(); out << "," << o->width() << "," << o->height() << "\n";
// write all properties for this object Properties::const_iterator it = o->properties().constBegin(); Properties::const_iterator it_end = o->properties().constEnd(); for (; it != it_end; ++it) { out << it.key() << "=" << it.value() << "\n"; } out << "\n"; } }
to:
if (ObjectGroup *group = layer->asObjectGroup()) { foreach (const MapObject *o, group->objects()) { if (!o->type().isEmpty()) { // ! out << "[" << group->name() << "]\n";
// display object name as comment if (!o->name().isEmpty()) { out << "# " << o->name() << "\n"; }
out << "type=" << o->type() << "\n"; out << "location=" << o->x() << "," << o->y();
if(group->name()=="enemy"){ out << "\n"; } else { out << "," << o->width() << "," << o->height() << "\n"; }
// write all properties for this object Properties::const_iterator it = o->properties().constBegin(); Properties::const_iterator it_end = o->properties().constEnd(); for (; it != it_end; ++it) { out << it.key() << "=" << it.value() << "\n"; } out << "\n"; } } }
This patch allows you to create a map without using text editors.
In your manual for the creation of maps, monsters, and adds a group of monsters in your hand, after the patch, it can be done in the editor Tiled, which for many will be easier. try, then it will be possible to arrange the editor monsters or NPC, or event, or teleport, and then do export and play.
P.S. Apologies for machine translation, I do not understand English.
С Уважением Ковальчук Роман.
small path for tiled-qt-0.8.1/src/plugins/flare/flareplugin.cpp
change from:
if (ObjectGroup *group = layer->asObjectGroup()) {
foreach (const MapObject *o, group->objects()) {
if (o->type().isEmpty()) {
out << "[" << group->name() << "]\n";
// display object name as comment
if (o->name().isEmpty()) {
out << "# " << o->name() << "\n";
}
out << "type=" << o->type() << "\n";
out << "location=" << o->x() << "," << o->y();
out << "," << o->width() << "," << o->height() << "\n";
// write all properties for this object
Properties::const_iterator it = o->properties().constBegin();
Properties::const_iterator it_end = o->properties().constEnd();
for (; it != it_end; ++it) {
out << it.key() << "=" << it.value() << "\n";
}
out << "\n";
}
}
to:
if (ObjectGroup *group = layer->asObjectGroup()) {
foreach (const MapObject *o, group->objects()) {
if (!o->type().isEmpty()) { // !
out << "[" << group->name() << "]\n";
// display object name as comment
if (!o->name().isEmpty()) {
out << "# " << o->name() << "\n";
}
out << "type=" << o->type() << "\n";
out << "location=" << o->x() << "," << o->y();
if(group->name()=="enemy"){
out << "\n";
} else {
out << "," << o->width() << "," << o->height() << "\n";
}
// write all properties for this object
Properties::const_iterator it = o->properties().constBegin();
Properties::const_iterator it_end = o->properties().constEnd();
for (; it != it_end; ++it) {
out << it.key() << "=" << it.value() << "\n";
}
out << "\n";
}
}
}
sample map: http://www.ex.ua/view_storage/759173035633
С Уважением Ковальчук Роман.