:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Wed Apr 08, 2020 9:19 am
All times are UTC + 0
 Forum index » Featured Tools » Community Tools
MapTool
Moderators: Community Tools Developpers
Post new topic   Reply to topic Page 2 of 2 [71 Posts] View previous topic :: View next topic
Goto page: Previous 1, 2
Author Message
G-E
General


Joined: 09 Feb 2015

PostPosted: Sat Nov 17, 2018 9:52 am    Post subject: Reply with quote

I'm suggesting if the tile specified in the pack is invalid, that it gets replaced by the Clear of whatever theater it is currently, or whatever theater it's specified to convert into.

This would be specifically for maps that were corrupted, or converted impromperly, or a tileset changed later. It would be a case where the user wouldn't know which tiles are bad or where they are and thus no rules could be made for them, it would have to be auto-corrected.

I'd ask you add that...
_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Sat Nov 17, 2018 10:32 am    Post subject: Reply with quote

The tool doesn't take any terrain INI file like temperat.ini as input to validate whether a tile is missing or a pack has invalid tiles. IsoMapPack5 contains a set of numbers. A profile supplies what number changes to what other number. Any number that is not specified is not touched. Already where there are cases in vanilla theater change like temperate to snow or snow to temperate etc., the provided profiles already gives the closest matching tile if there is no 1 to 1 match or even clear tile on complete mismatch.

Say in case, someone wants to convert a mod map which has more tiles added than the vanilla game but has not changed any vanilla tile indices, users could create a simple one line profile that can give a range higher than the tiles index that vanilla uses and convert all of those to clear tile. But if the mod has changed tile indices then a generic profile would do no good.

If a tileset is changed altering tile indices after creating a map, then all the tile indices that come after that tileset also get affected. A profile could be created to correct such cases. Once you look at the documentation which comes with examples and also at the provided profiles, it is not that difficult to create your own profiles.

Back to top
View user's profile Send private message
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Sun Nov 25, 2018 6:45 am    Post subject: Reply with quote

Updated MapTool in the previous post with few options for the extended logging feature.

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Sun Nov 25, 2018 8:53 pm    Post subject: Reply with quote

I'm testing a simple conversion between a few tiles and I'm already stumped. I get the following error, and I've no idea why.

Code:
Error encountered. Message: The requested operation requires elevation


EDIT: Jesus Christ, it took me 20 minutes to realize it meant elevated user access instead of map/tile elevation. Now I feel dumb Laughing
_________________


Back to top
View user's profile Send private message Visit poster's website
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Sat Dec 07, 2019 1:21 am    Post subject: Reply with quote

Could a system to randomize terrain objects be added?

It could for example work like this to replace any instance of FONA01 with TREE01,TREE02 or TREE03:
Code:
[ObjectRules]
FONA01|TREE01,TREE02,TREE03

_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Sat Dec 07, 2019 11:25 am    Post subject: Reply with quote

Updated MapTool (Source code)

Changes 2019-12-07:
- Object rules can have multiple comma separated replacement values, one of which will be chosen randomly for substitution.

Note: Profiles for building replacement should be careful of the foundation sizes. Replacing with a bigger building could cause problems.

@Bittah Commander: Examples -

Code:
[ObjectRules]
TREE04|TREE04,,TREE16,TREE17   ; Empty entry will get a chance to remove
TREE08   ; Will remove TREE08
NEGLAMP|CABHUT,TSTLAMP,TSTLAMP,,   ; Repeats will have more chance


@Starkku: Glanced at the updates at github repository. Of the significant changes, your out of bound feature seems flawed. When the maps are compressed for IsoMapPack5, height level 0 clear tiles are removed, resulting in the number of tiles being less than the number of cells in the map. For such cases, your feature could remove all objects/overlays from non-present height level 0 tile cells, making it unsafe to use. The repo also doesn't contain my previous changes after 2018-06-24 upto 2018-11-25. Couldn't spare time for correction and merging, so branched from an earlier commit.


MapTool_20191207.7z
 Description:

Download
 Filename:  MapTool_20191207.7z
 Filesize:  107.19 KB
 Downloaded:  8 Time(s)


Back to top
View user's profile Send private message
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Sat Dec 07, 2019 5:24 pm    Post subject: Reply with quote

E1 Elite wrote:

@Starkku: Glanced at the updates at github repository. Of the significant changes, your out of bound feature seems flawed. When the maps are compressed for IsoMapPack5, height level 0 clear tiles are removed, resulting in the number of tiles being less than the number of cells in the map. For such cases, your feature could remove all objects/overlays from non-present height level 0 tile cells, making it unsafe to use.


Yeah this was an oversight in the logic. I went and changed it so that it checks this purely on coordinate-basis and does not care about tiles at all.

E1 Elite wrote:

The repo also doesn't contain my previous changes after 2018-06-24 upto 2018-11-25. Couldn't spare time for correction and merging, so branched from an earlier commit.


This is something I should've addressed a while ago already, but my attention has been elsewhere and it is also why I have not updated the downloads on the first page for a long time.

To be direct, I am not a huge fan of how many of the things mentioned in this post are implemented and I am unlikely to merge them as is. Particularly the UI change looks sloppy and I'd rather look for a solution that looks nice for all DPI settings. The ability to alter overlay frame data is nice, will probably implement that alongside some code refactoring (on a related note, is there any particular reason why ModifyOverlayRules is its own thing rather an extension on OverlayRules?). The profile edits I have not gone through yet in detail but I assume they are fine too. The rest seems like mostly superfluous or even pointless feature creep, the raw data dumping in particular sticks out as something entirely out of the scope of this tool.

Once the codebase and the missing features are sorted out, I would also appreciate if any future contributions from you (or anyone else for that matter) come through GitHub (look up how pull requests work) instead of being posted here. It was barely excusable when version control wasn't involved on your end and understandable in case of C&C Map Renderer where the original author is absent for all intents and purposes, but not here any longer.

Also try to avoid those large, single commits with lots of unrelated changes bunched together. Amongst other things, makes keeping track of the changes and potentially reverting them pain in the ass.
_________________
Project Phantom

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Sun Dec 08, 2019 8:14 am    Post subject: Reply with quote

Raw dump and extended log feature were not requests, I coded those to learn and then shared it so that others could also benefit from it. Raw dump was helpful in analysis for me and Verlusti also found it useful. ModifyOverlayRules came up later to take input and apply it to the map. It has different set of inputs compared to Overlay rules, parsing those from the same section would have lead to complexity. UI was small for 125% DPI that I use, some text were not fully visible, if you do better, will try that.

You are free to merge as you wish at your own pace, I am not insisting, only gave reason why I had to branch out. Its been more than a year since I touched this tool. Did it now because I could finish a request by spending few minutes. It could use further improvements, bug fixes and IsoMapPack5 compression is outdated when compared to Map Renderer, that could be overhauled etc..

You have a DLL, is it open source? I had to make use of what is available in one instance instead of changing it myself.

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Sun Dec 08, 2019 9:24 am    Post subject: Reply with quote

Starkku wrote:
E1 Elite wrote:

@Starkku: Glanced at the updates at github repository. Of the significant changes, your out of bound feature seems flawed. When the maps are compressed for IsoMapPack5, height level 0 clear tiles are removed, resulting in the number of tiles being less than the number of cells in the map. For such cases, your feature could remove all objects/overlays from non-present height level 0 tile cells, making it unsafe to use.


Yeah this was an oversight in the logic. I went and changed it so that it checks this purely on coordinate-basis and does not care about tiles at all.


Wait. I use this compression a lot. Which release is "safe" to use?
_________________


Back to top
View user's profile Send private message Visit poster's website
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Sun Dec 08, 2019 9:27 am    Post subject: Reply with quote

E1Elite wrote:
Raw dump and extended log feature were not requests, I coded those to learn and then shared it so that others could also benefit from it. Raw dump was helpful in analysis for me and Verlusti also found it useful. ModifyOverlayRules came up later to take input and apply it to the map. It has different set of inputs compared to Overlay rules, parsing those from the same section would have lead to complexity. UI was small for 125% DPI that I use, some text were not fully visible, if you do better, will try that.


I don't deny that the extended logging and data dumping can be useful in certain circumstances. A case could be made for some sort of more verbose logging in debug mode, but I don't think the full map data logging / raw data dumping fits in. Purpose of the tool is manipulation of map data, primarily for the objective of map conversion from one game/mod to another and to apply optimizations and fixes etc. SectionRules already kind of skews this a bit since it ventures into generic INI structure manipulation, and I have purposedly kept trigger manipulation out of the scope even though few use cases have since cropped up. I wouldn't mind separate tools based on my code doing other things as long as their release abides by the license.

As for ModifyOverlays, increased complexity is a fair concern. However I'd rather take slight increase in complexity than a massive increase in redundancy. The rule parsing code is a mess which I aim to address regardless. I don't think adding a coordinate filter, potentially to both tile and overlay rules, that is checked before anything else is out of the question, but I do wonder if it'll lead to feature creep towards stuff that traditionally belongs to the realm of full-fledged map editors.

E1Elite wrote:
You are free to merge as you wish at your own pace, I am not insisting, only gave reason why I had to branch out. Its been more than a year since I touched this tool. Did it now because I could finish a request by spending few minutes. It could use further improvements, bug fixes and IsoMapPack5 compression is outdated when compared to Map Renderer, that could be overhauled etc..


Yeah I understand that, I was just likewise explaining why I have not already merged them in. Also in case it wasn't clear, I wasn't trying to sound ungrateful for the contributions or help. I actually do appreciate the principle of others stepping up and filling in where I could not, it is just a territory that often comes with clashing ideas and standards. And even if I do not directly end up using your implementation, you've at the very least laid the groundwork for these things to me and I am grateful for that.

E1Elite wrote:
You have a DLL, is it open source? I had to make use of what is available in one instance instead of changing it myself.


The utility library DLL is currently not open source. Might change in the future but that'll be left for me to judge. Feel free to point out what part specifically would have necessiated alterations to the library code, though.

Crimsonum wrote:

Wait. I use this compression a lot. Which release is "safe" to use?


No binary distribution available currently even has this problem, much less having a fix for it. It is also only a problem if you would use the 'delete objects outside bounds' option (which was added for and should purely be used to get rid of problems stemming from downsizing a map in FS / FA2 which often does not purge the object/overlay data properly) on maps that have been through the compression (including combining the two in same profile). If you do not, there's nothing to worry about.
_________________
Project Phantom

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Sun Dec 08, 2019 12:03 pm    Post subject: Reply with quote

The raw dump and extended logging were in debug mode only earlier until I decided to share. I don't see how more logging goes against any tool's objective. It doesn't even activate without actually giving it as a parameter to the Exe. If you feel it doesn't meet the objective of the tool, that is fine with me.

For ModifyOverlays, the complexity is not for coding alone but for the user as well. The entries that are different for modify overlay and overlay rules could be interspersed in a profile under the same section. This feature tend towards the category of map editor as it can take input and insert into the map. The rule parsing for this feature was the one instance that I mentioned earlier of not having the DLL open source and had to use what was available.

@Crimsonum: IsoMapPack5 compression effort was done because of the game had an artficial restriction on the decoding size of that section. This hack makes the need of it obsolete unless you are reducing the map size by a few lines. I use the ts-patches version of the hack to compile the exe, will share if you need it.

Back to top
View user's profile Send private message
Holland
Soldier


Joined: 31 May 2017

PostPosted: Tue Dec 31, 2019 3:16 pm    Post subject: Reply with quote

I making profiles for xtx. I have a question about height difference, would it be possible to replace tiles that has a different height properly ?

Cliffs to Xtx low natural cliffs are for me:
60-99|4930-5028

Any ideas or suggestions ?


converting lowcliffs.jpg
 Description:
 Filesize:  87.54 KB
 Viewed:  687 Time(s)

converting lowcliffs.jpg



Back to top
View user's profile Send private message
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Tue Dec 31, 2019 3:51 pm    Post subject: Reply with quote

No, it will screw the map. Old cliff themselves have height of 4 and the new cliffs have height of 2. Whatever the old cliff tops were connected will be at earlier height and all the tiles above those height will also remain as is.

Back to top
View user's profile Send private message
Holland
Soldier


Joined: 31 May 2017

PostPosted: Sun Jan 05, 2020 12:21 am    Post subject: Reply with quote

Is the command line able to make a profile out of two unique temperate.ini files?

Back to top
View user's profile Send private message
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Sun Jan 05, 2020 1:01 am    Post subject: Reply with quote

Holland wrote:
Is the command line able to make a profile out of two unique temperate.ini files?


No. It does not create profiles at all, merely provides info to do it manually. This probably won't change, as the theater configuration INIs alone do not contain enough data to build profiles from accurately.
_________________
Project Phantom

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Sat Mar 28, 2020 12:35 am    Post subject: Reply with quote

MapTool version 1.1.0.0 can now be downloaded from here.

Changelog:

• OverlayRules now supports additional parameters for changing overlay frame data.
• Both TileRules and OverlayRules now support tile coordinate filters, allowing rules that only apply to tiles at specific coordinates.
• DeleteObjectsOutsideMapBounds option, deletes objects and overlays outside map's physical bounds that can sometimes be left in the data when resizing maps.
• FixTunnels option, corrects malformed tunnel data generated by map editors.
• TheaterTileOffsets feature, allows defining theater-specific offsets for tile start & end indices that apply to all TileRules.
• IsoMapPack5 sorting, ice growth manipulation and removing level 0 clear tiles are now applied even without TileRules present.
• Updates to Tiberian Sun conversion profiles.
• Better high DPI support.
_________________
Project Phantom

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Fri Apr 03, 2020 12:00 pm    Post subject: Reply with quote

Couldn't the ice growth flag be set on all ice tiles in a map using the tile numbers, instead of the 1x1 building workaround? Unless someone modifies snow.ini, the ice tile numbers are always the same (though preferably the indexes should be customizable for mod support).

As FinalSun fails to set the ice flag on ice tiles, it will not only prevent the ice from regrowing, but it also leaves the water gaps passable (yes, units will be able to walk on the water), hence the flag should always be defined on all ice tiles. Also AFAIK ice can only spread on the special icy water tiles contained in the ice tilesets, not normal water tiles, so I don't see the purpose of not defining it.
_________________


Back to top
View user's profile Send private message Visit poster's website
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Fri Apr 03, 2020 3:44 pm    Post subject: Reply with quote

Ice grows on both the ice tiles and normal water tiles. Developers have programmed it to be selective and the info resides in the map rather than in the ice tiles itself. Ice growth is strategically placed like in the map nod8a for connectivity if the bridge is broken while in nod12a water grows into ice to give connectivity. Making all ice to grow is not the right approach.

I had tested ice growth on normal water in the test map. As I remember, if the ice growth marker was placed on land tiles like paved roads, it would crash the map but wouldn't crash if placed on shore tile edges.

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Sat Apr 04, 2020 11:25 am    Post subject: Reply with quote

Interesting, I thought the ice growth would be limited to the icy water tiles in the ice sets, since maps have clearly marked ice growth areas with them instead of using just regular water. I checked nod8a and nod12a and this is the case in both (though nod8a has already preplaced ice bridges). Another example is Desolation Redux. The fact that ice grows on normal does explain why the flag is coded in IsoMapPack5, but on the other hand it makes the icy water tiles redundant.

Still, I think setting ice growth on all ice and icy water tiles is a preferable option; it's much easier for mappers, and you can still strategically limit ice growth to certain areas (icy water tiles = ice growth allowed, normal water = no ice growth allowed).
_________________


Back to top
View user's profile Send private message Visit poster's website
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Sat Apr 04, 2020 2:12 pm    Post subject: Reply with quote

The IsoMapPack5 rules part doesn't deal with tile ranges (Getting tile numbers from tileset is long route and restrictive).

May be the TileRules could get another override for ice growth like it already has for subtile and height overrides. Profile could look like

200-300|200-300|*|*|1 ; Ice growth could be set to 1 or 0.

It also gives flexibility if the mod changes the ice tile numbers. And it could also become selective for an area if coordinate range is supplied with Starkku's update which supports coordinate inputs.

Back to top
View user's profile Send private message
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Mon Apr 06, 2020 2:55 pm    Post subject: Reply with quote

MapTool version 1.1.1.1 can now be downloaded from here.

Changelog for 1.1.1.0:

• Attempted to fix incorrect calculation of valid tile coordinates (used when removing objects outside map bounds) that also invariably crashed with maps of certain size.
• Valid tile coordinates are now only calculated when they are needed.
• Moved ice growth flag manipulation to TileRules, fifth value now works as override to the flag value. Old keys under IsoMapPack5 are no longer functional.

Changelog for 1.1.1.1:

• Fixed Tiberian Sun ice growth fix profile file.
• Added file extension to license file for easier opening on all operating systems.
_________________
Project Phantom

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
Display posts from previous:   
Post new topic   Reply to topic Page 2 of 2 [71 Posts] Goto page: Previous 1, 2
View previous topic :: View next topic
 Forum index » Featured Tools » Community Tools
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.3508s ][ Queries: 13 (0.0251s) ][ Debug on ]