diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-11-02 22:48:23 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-11-02 22:48:23 -0300 |
commit | 7c5e51f21c1cddcb6c8709d275b64f20a98776af (patch) | |
tree | 5e0366ef8a5bcf6e8cf66afb2426136c2ad98e23 | |
parent | 2fd4281a9cc0b5ee0e812d8eea31358d3e1273d8 (diff) | |
download | tools-7c5e51f21c1cddcb6c8709d275b64f20a98776af.tar.gz tools-7c5e51f21c1cddcb6c8709d275b64f20a98776af.tar.bz2 tools-7c5e51f21c1cddcb6c8709d275b64f20a98776af.tar.xz tools-7c5e51f21c1cddcb6c8709d275b64f20a98776af.zip |
Updates by Andrei Karas
+ Some stuff by Jesusalva which got in because -a flag
-rw-r--r-- | hercules/code/clienttoserver/maps.py | 23 | ||||
-rwxr-xr-x | hercules/tmx_converter.py | 3 | ||||
-rwxr-xr-x | localserver/updatedb.sh | 11 | ||||
-rwxr-xr-x | testxml/testxml.py | 18 | ||||
-rw-r--r-- | update/commit.txt | 2 | ||||
-rw-r--r-- | update/commit_old.txt | 2 | ||||
-rw-r--r-- | update/files/resources.xml | 1 | ||||
-rw-r--r-- | update/files/resources2.txt | 1 | ||||
-rw-r--r-- | update/files/xml_header.txt | 1 | ||||
-rw-r--r-- | update/news.txt | 22 | ||||
-rw-r--r-- | web/nf_main.xml | 67 |
11 files changed, 71 insertions, 80 deletions
diff --git a/hercules/code/clienttoserver/maps.py b/hercules/code/clienttoserver/maps.py index 06b7eb5..0f8e773 100644 --- a/hercules/code/clienttoserver/maps.py +++ b/hercules/code/clienttoserver/maps.py @@ -52,10 +52,13 @@ def findFirstGid(tilesets, tile): # 4 - sit, walkable ground # 5 - none # 6 - monster walk not allowed -def convertTileType(tile): +def convertTileType(tile, idx, width, height): if tile == 5: tile = 0; - if tile > 128 or tile < 0: + if tile > 6 or tile < 0: + y = int(idx / width) + x = idx - y * width + print "Error: wrong tile: ({0}, {1}) = {2}".format(x, y, tile) tile = 1 return tile @@ -74,6 +77,7 @@ def recreateMap(names): tmxName = names[0] mCaheName = destDir + names[1][:-3] + "mcache" with open(mCaheName, "wb") as w: + print tmxName dom = minidom.parse(tmxName) root = dom.documentElement tilesets = [] @@ -106,17 +110,20 @@ def recreateMap(names): layerData = dc.decompress(binData) arr = array.array("I") arr.fromstring(layerData) + idx = 0 for tile in arr: if tile == 0: tileType = 0 else: firstgid = findFirstGid(tilesets, tile) - tileType = convertTileType(tile - firstgid); + tileType = convertTileType(tile - firstgid, idx, width, height); tiles.append(tileType) + idx = idx + 1 elif encoding == "csv": binData = data.childNodes[0].data.strip() f = StringIO.StringIO(binData) arr = list(csv.reader(f, delimiter=',', quotechar='|')) + idx = 0 for row in arr: for item in row: if item != "": @@ -125,7 +132,7 @@ def recreateMap(names): tileType = 0 else: firstgid = findFirstGid(tilesets, tile) - tileType = convertTileType(tile - firstgid); + tileType = convertTileType(tile - firstgid, idx, width, height); # tmx collision format # 0 - walkable ground # 1 - non walkable wall @@ -146,6 +153,7 @@ def recreateMap(names): if tileType > 128 or tileType < 0: tileType = 1 tiles.append(tileType) + idx = idx + 1 f.close() else: print "map format not supported: " + tmxName @@ -165,7 +173,12 @@ def recreateMap(names): break if found == False: print "Error: missing collision layer in file: {0}".format(tmxName) - + return + return + with open(mCaheName + ".debug", "wb") as w: + writeInt16(w, width) + writeInt16(w, height) + writeData(w, struct.pack(str(len(tiles))+"B", *tiles)) def recreateMapCache(): diff --git a/hercules/tmx_converter.py b/hercules/tmx_converter.py index 3b56a7b..f2b40c0 100755 --- a/hercules/tmx_converter.py +++ b/hercules/tmx_converter.py @@ -333,10 +333,9 @@ class ContentHandler(xml.sax.ContentHandler): elif isinstance(obj, Warp): if (obj.npc_id == u'WARP'): obj_name = "#%s_%s_%s" % (self.base, obj.x, obj.y) - y_offset = int(self.heightmap[((obj.y * self.width) + obj.x)])/2 self.warps.write( SEPARATOR.join([ - '%s,%d,%d,0\t' % (self.base, obj.x, (obj.y + y_offset)), + '%s,%d,%d,0\t' % (self.base, obj.x, obj.y), 'warp\t', '%s\t%s,%s,%s,%d,%d\n' % (obj_name, obj.w, obj.h, obj.dest_map, obj.dest_x, obj.dest_y), ]) diff --git a/localserver/updatedb.sh b/localserver/updatedb.sh index b3524f0..d77e2ba 100755 --- a/localserver/updatedb.sh +++ b/localserver/updatedb.sh @@ -76,6 +76,13 @@ if [ "${VER}" -lt "15" ]; then run "2018-08-03--11-37.sql" fi -if [ "${VER}" -lt "15" ]; then - echo "15" >versions/sqlver +if [ "${VER}" -lt "16" ]; then + run "2018-06-03--00-10.sql" + run "2018-06-03--17-16.sql" + run "2018-09-01--05-22.sql" +fi + +if [ "${VER}" -lt "16" ]; then + echo "16" >versions/sqlver fi + diff --git a/testxml/testxml.py b/testxml/testxml.py index 66d08df..aff8b1a 100755 --- a/testxml/testxml.py +++ b/testxml/testxml.py @@ -43,7 +43,7 @@ errors = 0 warnings = 0 errDict = set() safeDye = False -borderSize = 20 +borderSize = 18 # Original 14 colorsList = set() showAll = False silent = False @@ -1616,7 +1616,7 @@ def testMap(mapName, file, path): showMsgFile(file, "missing fringe layer", True) if collision == None: showMsgFile(file, "missing collision layer", True) - else: + elif mapName != "test.tmx" and mapName != "testbg.tmx": ids = testCollisionLayer(file, collision, tilesMap) if ids[0] != None and len(ids[0]) > 0: if silent == False or file.find("maps/test") != 0: @@ -1814,8 +1814,8 @@ def testCollisionLayer(file, layer, tiles): arr = layer.arr x1 = borderSize y1 = borderSize - x2 = layer.width - 20 - y2 = layer.width - 20 + x2 = layer.width - borderSize + y2 = layer.height - borderSize if x2 < 0: x2 = 0 if y2 < 0: @@ -1825,18 +1825,18 @@ def testCollisionLayer(file, layer, tiles): return (set(), set()) for x in range(0, layer.width): - if haveTiles == True: - break for y in range(0, layer.height): idx = ((y * layer.width) + x) * 4 val = getLDV(arr, idx) if val != 0: haveTiles = True - tile, _ = findTileByGid(tiles, val) + tile, tilesetName = findTileByGid(tiles, val) if tile is not None: idx = val - tile.firstGid - if idx > 1: + if idx > 6: # 6 - max collision type badtiles.add(((x, y), idx)) + else: + badtiles.add(((x, y), "+{0}".format(val))) if val == 0 and (x < x1 or x > x2 or y < y1 or y > y2): tileset.add((x, y)) @@ -1887,7 +1887,7 @@ def getLDV2(arr, x, y, width, height, tilesMap): for x2 in range(x0, x + 1): ptr = ((y2 * width) + x2) * 4 val = getLDV(arr, ptr) - tile = findTileByGid(tilesMap, val) + tile, _ = findTileByGid(tilesMap, val) if tile is not None: if (tile.tileHeight > 32 or y2 == y) and (tile.tileWidth > 32 or x2 == x): hg = tile.tileHeight / 32 diff --git a/update/commit.txt b/update/commit.txt index e58aa50..8837d1e 100644 --- a/update/commit.txt +++ b/update/commit.txt @@ -1 +1 @@ -e09c7dc8ee385997fe034fe0363789ca6e185c27 +1b8c54833cef233e59c741745b34771c01ed72a3 diff --git a/update/commit_old.txt b/update/commit_old.txt index a8532d6..e58aa50 100644 --- a/update/commit_old.txt +++ b/update/commit_old.txt @@ -1 +1 @@ -45a72d0e82c28c201731d1fd264ac7513a0b9b39 +e09c7dc8ee385997fe034fe0363789ca6e185c27 diff --git a/update/files/resources.xml b/update/files/resources.xml index b916bbf..4ce6310 100644 --- a/update/files/resources.xml +++ b/update/files/resources.xml @@ -5,4 +5,5 @@ <update type="data" file="TMW2-3af0874..4d623de.zip" hash="bff899af" /> <update type="data" file="TMW2-4d623de..45a72d0.zip" hash="fda4dcb4" /> <update type="data" file="TMW2-45a72d0..e09c7dc.zip" hash="fda0685f" /> + <update type="data" file="TMW2-e09c7dc..1b8c548.zip" hash="df6b1ae9" /> </updates> diff --git a/update/files/resources2.txt b/update/files/resources2.txt index bc7d64c..7c8d56a 100644 --- a/update/files/resources2.txt +++ b/update/files/resources2.txt @@ -2,3 +2,4 @@ TMW2.zip 545f77a1 TMW2-3af0874..4d623de.zip bff899af TMW2-4d623de..45a72d0.zip fda4dcb4 TMW2-45a72d0..e09c7dc.zip fda0685f +TMW2-e09c7dc..1b8c548.zip df6b1ae9 diff --git a/update/files/xml_header.txt b/update/files/xml_header.txt index 397c89c..cae1ff9 100644 --- a/update/files/xml_header.txt +++ b/update/files/xml_header.txt @@ -5,3 +5,4 @@ <update type="data" file="TMW2-3af0874..4d623de.zip" hash="bff899af" /> <update type="data" file="TMW2-4d623de..45a72d0.zip" hash="fda4dcb4" /> <update type="data" file="TMW2-45a72d0..e09c7dc.zip" hash="fda0685f" /> + <update type="data" file="TMW2-e09c7dc..1b8c548.zip" hash="df6b1ae9" /> diff --git a/update/news.txt b/update/news.txt index e210196..9468309 100644 --- a/update/news.txt +++ b/update/news.txt @@ -1,4 +1,4 @@ -##0 Actual Release: ##1 7.0 - Polished Emerald +##0 Actual Release: ##1 7.2 - Frozen Jesusalva ##0 Welcome to ##BTMW-2: Moubootaur Legends##b! ##0 By playing you agree and abide to the ##1##BTerms of Service##b##0, available at: ##1 [@@https://tmw2.org/legal|https://tmw2.org/legal@@] @@ -9,22 +9,10 @@ ##2 If you ever run in trouble, try contacting a GM with ##B@request Help me!##b ##2 Please enjoy our server, and have fun! -##7 Latest release: ##B2018-09-14##b +##7 Latest release: ##B2018-11-02##b ##7 Never miss a release! Follow our [@@https://discord.gg/BQNTe68|Discord Channel@@]! -##0 The snowstorm at Nivalis has ceased, but the ##BMonster King##b led a massively huge -##0 army to siege Nivalis. He even mirrored himself to kill players at random. -##0 But worry not, ##BLand Of Fire##b refiners are working better, and wooden sword -##0 craft price has been lowered. By the way, there's a missing map on the path to -##0 Nivalis. Let's just say it was SO EMPTY that you literally didn't noticed you -##0 went straight past it. - -##0 Jesusalva just wanted so much people to see the new quest, which is part of LoF, -##0 that he decided to don't make too difficult to get there. - -##0 Some of spotlights includes bugfixes, Autumn stuff, ##BThief/Merchant Guilds##b, -##0 which includes a new ##Bminigame##b for your fun, pets, and let me not spoil -##0 too much. Sufficient to say, beware the Terranite. You get the message, right? +##1 Nivalis Liberation Day Event: Nov 3rd ~ Nov 9th (16:30 UTC) ##0 By the way, [@@https://transifex.com/akaras/saulc-tmw-fork|Translators@@] welcome. @@ -35,12 +23,12 @@ ##7 We want to express our gratitude here to Saulc and GonzoDark, for sponsoring this server. ##7 And by last, our gratitude to every developer and contributor who made this -##7 possible! Jesusalva, Saulc, mishana, Aisen, demure, et al. +##7 possible! Jesusalva, demure, et al. ##0 Enjoy gaming, and leave feedback! ##9 -- Your TMW2 Team -##9 September 2018 +##9 November 2018 ##0 You can check out this page for older entries: ##9 [@@https://tmw2.org/news|https://tmw2.org/news@@] diff --git a/web/nf_main.xml b/web/nf_main.xml index e41f3dd..c952876 100644 --- a/web/nf_main.xml +++ b/web/nf_main.xml @@ -1,5 +1,5 @@ <entry> - <title> 7.0 - Polished Emerald</title> + <title> 7.1 - Broken Emerald</title> <link href="https://tmw2.org/news#2018-10-06"/> <updated>2018-10-06T20:30:20.663750</updated> <id>tag:tmw2.org,2018-10-06</id> @@ -23,69 +23,50 @@ </p> <p> </p> -<p> Latest release: <b>2018-09-14</b> +<p> Latest release: <b>2018-10-06</b> </p> <p> Never miss a release! Follow our <a href="https://discord.gg/BQNTe68">Discord Channel</a>! </p> +<p/> +<p/> +<p/> <p> -</p> -<p> The snowstorm at Nivalis has ceased, but the <b>Monster King</b> led a massively huge -</p> -<p> army to siege Nivalis. He even mirrored himself to kill players at random. -</p> -<p> But worry not, <b>Land Of Fire</b> refiners are working better, and wooden sword -</p> -<p> craft price has been lowered. By the way, there's a missing map on the path to -</p> -<p> Nivalis. Let's just say it was SO EMPTY that you literally didn't noticed you -</p> -<p> went straight past it. +<b>.:: URGENT TO ALL ADVENTURERS ::.</b> </p> <p> -</p> -<p> Jesusalva just wanted so much people to see the new quest, which is part of LoF, -</p> -<p> that he decided to don't make too difficult to get there. +The Monster King left Nivalis Town, although the city is now partly destroyed. </p> <p> -</p> -<p> Some of spotlights includes bugfixes, Autumn stuff, <b>Thief/Merchant Guilds</b>, -</p> -<p> which includes a new <b>minigame</b> for your fun, pets, and let me not spoil -</p> -<p> too much. Sufficient to say, beware the Terranite. You get the message, right? +The Monster King still haven't left the ice lands. An alliance outpost is being set, </p> <p> -</p> -<p> By the way, <a href="https://transifex.com/akaras/saulc-tmw-fork">Translators</a> welcome. +because the Monster King must be stopped at all costs. From NOVEMBER 2ND, all ship </p> <p> -</p> -<p> Please bear the development stages with us. There are balance problems, and -</p> -<p> various items are NPC-Only, and many bugs are lurking here and there and here - -</p> -<p> give us feedback at #world channel and, who knows, you may be rewarded if you -</p> -<p> find a bug! +travels to Nivalis will be sponsored by the Alliance and therefore, free. </p> <p> +Join us in this effort to save our world from this ever present threat. </p> -<p> We want to express our gratitude here to Saulc and GonzoDark, for sponsoring this server. -</p> -<p> And by last, our gratitude to every developer and contributor who made this -</p> -<p> possible! Jesusalva, Saulc, mishana, Aisen, demure, et al. +<p> +-- The Alliance High Council </p> +<p/> +<p/> +<p/> <p> +<b>.:: What's New? ::.</b> </p> -<p> Enjoy gaming, and leave feedback! +<p> This is a partial update. In other words: Buggy. It change item and monster </p> -<p> +<p> databases, breaks travel price, fix teleporter, implements (I hope) the refer </p> -<p> -- Your TMW2 Team +<p> system for Saulc, Tortuga Mount got in on merits of item db update, Update Lua, </p> -<p> September 2018 +<p> Fix Ched, fix Quest Log. This is not the entirety of r7.1, be warned. +</p> +<p/> +<p> Oct. 2018 </p> <p> </p> |