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 messageGo to next 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.

Re: ja2MapTool Alpha13[message #356967 is a reply to message #354171] Fri, 15 March 2019 13:08 Go to previous messageGo to next message
SecretStamos

 
Messages:26
Registered:October 2015
Hello!

I saw your post in the AIMNAS thread. This tool is fantastic, and should make what I'm doing a lot easier.

One request, could you display the item index on the Item mapping screen? Currently we have the name and coolness displayed. This would make things a lot easier since I would be able to compare the indexes.

One question.. once I map an item to be replaced on the item mapping screen, how do I unmap it? Let's say I mapped Stone > Stone by accident, and didn't want to replace the Stone item at all. Is there any way I can delete this mapping?
Re: ja2MapTool[message #356985 is a reply to message #350420] Sun, 17 March 2019 05:14 Go to previous messageGo to next message
The_Bob

 
Messages:407
Registered:May 2009
Location: Behind you.
Looks like there was no way of deleting item mappings in the GUI (had to manually edit mapping files), that was a silly oversight on my part. Here's a new version that can do this:
https://github.com/starcatter/ja2tools/releases/tag/alpha14

To delete item mappings, select them in the list on the right and press the [delete] key.


Re: ja2MapTool[message #357016 is a reply to message #356985] Tue, 19 March 2019 13:23 Go to previous messageGo to next message
SecretStamos

 
Messages:26
Registered:October 2015
That's fantastic! Any chance of the item UI indexes being displayed in the item mapper?

I'm dealing with a lot of placeholder objects, so it's difficult to tell which ones I've already mapped or not since they're all visually identical in the item mapper.
To put it more clearly:

Placeholder -> Baseball
Placeholder -> First Aid Kit

would be a lot easier to look at if it was:

Placeholder (57) -> Baseball (41)
Placeholder (58) -> First Aid Kit (81)

[Updated on: Tue, 19 March 2019 13:28]

Re: ja2MapTool[message #357024 is a reply to message #357016] Fri, 22 March 2019 07:08 Go to previous message
avasthisamar
Messages:2
Registered:March 2019
It seems really helpful after reading all the detail concept of this.
Previous Topic: Any way to remove tanks entirely?
Next Topic: Quick Guide for Compiling and Debugging Source Code in Visual Studio
Goto Forum:
  


Current Time: Fri Mar 22 12:29:47 EET 2019

Total time taken to generate the page: 0.02007 seconds