Modify

Ticket #196 (closed task: fixed)

Opened 10 years ago

Last modified 10 years ago

Map editor fill layer script

Reported by: barra_parpg Owned by: parpg
Priority: major Milestone: Techdemo 1
Component: scripts Version: trunk
Keywords: map, fill, script Cc:
Blocked By: Blocking:
Department:

Description

For our first techdemo we want to create an outdoor map that is about 250*250m (= 250*250 ground tiles) in size. That means we'll have to actually place 62500 ground tiles.

Manually doing so will take hours and will be very frustrating so we should try to automatize the task. A standalone Python script should be totally sufficent for the task.

Input:

  • Name of the object that it should be used for filling the layer (e.g. snow02)
  • xmin, xmax, ymin, ymax; in this case 0 >> 250 for x and for y

Expected output:

<i o="_object_" r="0" x="_xmin_" y="_ymin_" z="0.0" />
<i o="_object_" r="0" x="_xmin_+1" y="_ymin_" z="0.0" />
<i o="_object_" r="0" x="_xmin_+2" y="_ymin_" z="0.0" />
...
<i o="_object_" r="0" x="_xmin_" y="_ymin_+1" z="0.0" />
etc.

Output into a seperate text file is sufficent. The developer who created the map can copy and paste the content of the text file into his map stub via a text editor, save it, open the map in the map editor and resave again. This way indentation will get fixed as well.

Attachments

PARPG_Map_Creator.py (1.5 KB) - added by beliar 10 years ago.
First, quick, version.

Change History

comment:1 Changed 10 years ago by beliar

  • Owner changed from parpg to beliar
  • Status changed from new to assigned

comment:2 Changed 10 years ago by beliar

Added a first, quick made, version. There is surely much room for improvement but i don't have more time right now. Everyone who wants can take over.

comment:3 Changed 10 years ago by beliar

I forgot: This version will create or overwrite a file, with a name the program asks, in the directory the script is started from. It will not ask before overwriting.

Changed 10 years ago by beliar

First, quick, version.

comment:4 Changed 10 years ago by beliar

  • Owner changed from beliar to parpg
  • Status changed from assigned to new

comment:5 Changed 10 years ago by barra_parpg

  • Status changed from new to closed
  • Resolution set to fixed

(In [391]) Patch by beliar & mvbarracuda:

  • Layer fill utility by beliar to easily fill a larger section of the map with one specific instance
  • Map camera name changes for consistency (mapname_camera)
  • New ground level map for the techdemo featuring 250*250 = 62500 tiles; caution: performance is _very_ sluggish in the editor, we might need to downscale the map size or investigate how we can optimize the FIFE code to cope with such large maps
  • closes #196
View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.