[Request] Script for overlaying two maps

4 posts Page 1 of 1
Lostmotel
League Participant
League Participant
Posts: 298
Joined: Sun Nov 18, 2012 1:09 pm


I'd like to request a script which basically allows you to load two different maps into one map on a server. Unlike in thepolm3's script (http://buildandshoot.com/viewtopic.php?f=70&t=5048) both maps would have to retain their respective color and height values.
Here an example with icecraft and a part of another map:
Image
The idea behind this is that once a map is finished with all the objects like trees and houses in it, you could simply export the colormap from it and use it as a layer in gimp/paint.net. this way things like shadows can be added to the old colormap which was initially used to create the map without any objects. Now with a script like this it would be possible to simply overlay the old, unshaded terrain with a new shaded one without destroying any structures.
This is already possible in Qubicle, but unfortunately Qubicle hollows any structure like trees or arches out and it can take hours to refill those objects given the limited speed at which Qubicle handles large files and its proneness to crash.
Dr.Morphman
Scripter
Scripter
Posts: 73
Joined: Sun Feb 24, 2013 9:55 am


Code: Select all
# heavily based on thepolms mapmerger script
def apply_script(protocol,connection,config):

    class Combinerprotocol(protocol):
        prev_map = None

        def on_map_change(self,map):
            print 'wait a sec'
            if self.prev_map != None:
                for x in range(512):
                    for y in range(512):
                        for z in range(63): 
                            if self.prev_map.get_solid(x,y,z):
                                map.set_point(x,y,z, self.prev_map.get_color(x,y,z))
            print 'k done'
            self.prev_map = map.copy()
            return protocol.on_map_change(self,map)

    return Combinerprotocol,connection
there you go
Attachments
mapcombiner.py
(703 Bytes) Downloaded 38 times
Jdrew
Mapper
Mapper
Posts: 4808
Joined: Tue Oct 30, 2012 10:48 pm


You need to make your map with the script in mind in order for best results. GJ morph!

/news
Attachments
snow.vxl
(2.14 MiB) Downloaded 46 times
Lostmotel
League Participant
League Participant
Posts: 298
Joined: Sun Nov 18, 2012 1:09 pm


awesome morph, I just tried baking some shadows on my most recent map using yourself's color gradient tools.
Spoiler:
before:
Image
after:
Image
Image
also, nice map, jdrew. I wasn't even thinking about the possibility to basically replace the whole terrain with new colors.
4 posts Page 1 of 1
Return to “Ideas / Requests”

Who is online

Users browsing this forum: No registered users and 1 guest