Home » MODDING HQ 1.13 » v1.13 General Development Talk » ja2MapTool (Initial release)
Re: ja2MapTool[message #354039 is a reply to message #354037] Sun, 15 July 2018 14:33 Go to previous messageGo to next message
The_Bob

 
Messages:407
Registered:May 2009
Location: Behind you.
It should just work when you do
mvn clean install
on the top level project. Unless I broke it somehow of course.

I started coding it in Netbeans, which was fine I guess, and later switched to IntelliJ Idea, which I can recommend for more serious Java work. Both have excellent support for Maven projects.

Edit: also, here's the method that does the remapping, you can start looking for issues around that point. I think the problem is that the code doesn't do enough when removing items, it sets item stacks as nonexistent but leaves all of the content data intact, which may save more data than necessary, resulting in a corrupt file. Have a look at the asset loader code for how items are loaded, properly removing world items probably requires rebuilding that structure, or at least adding some checks to the method that later saves the data.

[Updated on: Sun, 15 July 2018 14:51]


Re: ja2MapTool[message #354040 is a reply to message #354039] Sun, 15 July 2018 16:47 Go to previous messageGo to next message
Neitronus

 
Messages:30
Registered:October 2014
Well still didn't work for me with that clean install thing... Same error about missing plugin for xml handling.

About that bug: Seems like some of Wildfire maps do have more item IDs on a map than xml config of 1.13 has and due to that issue it just stps remapping. Also thing is that this issue seems to be located within NPCs so i figured why just not to leave this intact since the very same IDs work for Wildfire without remapping. I just wanted to implement a simple plug with null check in remapping function. Like if we get null here:
int itemId = stack.getStack().getObject().usItem.get();

Then just ignore this iteration of cycle and do no remaping. If that would work for me, i'd look into NPC data on the maps themselves with itemset full of placeholders with IDs to see which IDs are missing and so on.

[Updated on: Sun, 15 July 2018 16:49]

Re: ja2MapTool[message #354041 is a reply to message #354040] Sun, 15 July 2018 16:54 Go to previous messageGo to next message
The_Bob

 
Messages:407
Registered:May 2009
Location: Behind you.
Didn't see your edit before posting the last thing, try building with JDK8, IIRC I got similar errors while checking if it would build with JDK10.

Re: ja2MapTool[message #354042 is a reply to message #354041] Sun, 15 July 2018 17:20 Go to previous messageGo to next message
Neitronus

 
Messages:30
Registered:October 2014
So i tried to do this with JDK 1.8 and progress moved, now i'm getting this:
https://i.imgur.com/jAVR5uc.png
Re: ja2MapTool[message #354043 is a reply to message #354042] Sun, 15 July 2018 17:28 Go to previous messageGo to next message
The_Bob

 
Messages:407
Registered:May 2009
Location: Behind you.
Looks like new version of mvvmfx came out, I'll have a look and update the dependencies. I'm in discord now, log in there I'll try to get you up and running.

Re: ja2MapTool[message #354044 is a reply to message #354043] Sun, 15 July 2018 20:58 Go to previous messageGo to next message
The_Bob

 
Messages:407
Registered:May 2009
Location: Behind you.
Here's the current version with a few extra fixed: https://www.dropbox.com/s/ip2cvvl3gpyvbw0/ja2MapTool-alpha11c.7z?dl=1

correct8.png  ja2MapTool Alpha12[message #354114 is a reply to message #354044] Sun, 22 July 2018 05:23 Go to previous messageGo to next message
The_Bob

 
Messages:407
Registered:May 2009
Location: Behind you.
Here's version 12: https://www.dropbox.com/s/yugg1b1j6cukit0/ja2MapTool-alpha12.7z?dl=1

It features a bunch of bug fixes, new features are:
  • Remapping items on NPCs present on maps
  • Remapping items not present in source VFS config via hand crafted itemmap files
  • Batch operation with command line arguments. The package contains an example batch file.

The command line parameters are:
Source vfs config file
Target vfs config file
Tile mapping file ("none" to skip)
Item mapping file ("none" to skip)
Map file name, or comma separated list of map names, without spaces between maps, names should include the .dat extension if present


All file paths can be given as full paths or relative to current, should use parenthesis if the path contains spaces, forward/back slashes are equally supported

The output maps and log files will be placed below the working dir in the "out" directory. It is recommended to either run the batch file in a console window or add the pause command at the end to inspect the program output.

exclamation8.png  ja2MapTool Alpha13[message #354171 is a reply to message #354114] Fri, 27 July 2018 22:37 Go to previous message
The_Bob

 
Messages:407
Registered:May 2009
Location: Behind you.
Here's an important update: https://www.dropbox.com/s/mb395299szhxa0d/ja2MapTool-alpha13.7z?dl=1

Version 13 fixes an issue with NPC schedule corruption. This could lead to crashes, general weirdness or otherwise undesirable results.

If you converted city maps or other maps containing NPCs /w schedules on them, chances are they're busted. Sorry about that. If anyone lost any important work due to this, let me know and I'll put together a tool for excising data corrupted by this issue, which should make the files salvageable.

Previous Topic: .mp3 support
Next Topic: Custom Laptop Background Compilations
Goto Forum:
  


Current Time: Sun Dec 16 12:41:03 EET 2018

Total time taken to generate the page: 0.01094 seconds