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 is currently offline The_Bob

 
Messages:415
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]

Report message to a moderator

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

 
Messages:34
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]

Report message to a moderator

Private 1st Class
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 is currently offline The_Bob

 
Messages:415
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.

Report message to a moderator

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

 
Messages:34
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

Report message to a moderator

Private 1st Class
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 is currently offline The_Bob

 
Messages:415
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.

Report message to a moderator

Master Sergeant
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 is currently offline The_Bob

 
Messages:415
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

Report message to a moderator

Master Sergeant
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 is currently offline The_Bob

 
Messages:415
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.

Report message to a moderator

Master Sergeant
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 is currently offline The_Bob

 
Messages:415
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.

Report message to a moderator

Master Sergeant
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 is currently offline SecretStamos

 
Messages:29
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?

Report message to a moderator

Private 1st Class
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 is currently offline The_Bob

 
Messages:415
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.

Report message to a moderator

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

 
Messages:29
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]

Report message to a moderator

Private 1st Class
Re: ja2MapTool[message #357024 is a reply to message #357016] Fri, 22 March 2019 07:08 Go to previous messageGo to next message
avasthisamar is currently offline avasthisamar
Messages:2
Registered:March 2019
It seems really helpful after reading all the detail concept of this.

[Updated on: Sat, 23 March 2019 05:47]

Report message to a moderator

Civilian
Re: ja2MapTool[message #357029 is a reply to message #357024] Fri, 22 March 2019 17:41 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
I added item id under the picture on the left, also added some item properties to the panel on top of the list.
Here's the new version: https://github.com/starcatter/ja2tools/releases/tag/alpha15

Report message to a moderator

Master Sergeant
Re: ja2MapTool[message #357051 is a reply to message #357029] Mon, 25 March 2019 20:54 Go to previous messageGo to next message
SecretStamos is currently offline SecretStamos

 
Messages:29
Registered:October 2015
This is excellent! I'm very happy to hear that.

Report message to a moderator

Private 1st Class
Re: ja2MapTool[message #357058 is a reply to message #357051] Tue, 26 March 2019 17:35 Go to previous messageGo to next message
LupinoArts is currently offline LupinoArts

 
Messages:5
Registered:March 2015
Somehow i am too stupid, but when i select two Items lists in my vfs setup, and click on "Create Mapping", nothing happens. My Goal is to merge AIM and UC113. This works fine so far, i just need to remap the items so the militia won't throw exploding NADAs on their enemies in the very first sector...

Report message to a moderator

Private
Re: ja2MapTool[message #357066 is a reply to message #357058] Wed, 27 March 2019 13:12 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
Looks like there are some missing images in the latest AIMNAS version, as in, referenced by items but not in the sti files. The map tool couldn't handle that. Thanks for letting me know!

I fixed that the next release:
https://github.com/starcatter/ja2tools/releases/tag/alpha16

I recommend using the .bat files in the 7z releases, that way you get errors and messages saved to log files and can always check them when the map tool is acting strangely. And send them to me so I know what's going on.

Report message to a moderator

Master Sergeant
Re: ja2MapTool[message #357114 is a reply to message #357066] Sat, 30 March 2019 12:14 Go to previous messageGo to next message
LupinoArts is currently offline LupinoArts

 
Messages:5
Registered:March 2015
Thanks for the fix. I did try a little more and noted that other inis worked, it was indeed a problem with the aimnas configs. I think in general it would be nice if the tool could give feedback when it counters problems reading an xml file (e.g. validation errors, missing dependencies as in this case...). Maybe a log of sorts or a simple message box that hints to the problem. Sorry, i didn't read the last sentence in your reply...

I also have another suggestion, but a big one: As the tool already reads the maps and detects what items are used in this maps, it would be nice to have a feature that does a real merge of items in a way that those items hardwired into the maps can be used in the other setup. For instance, i have UC113 -- which comes with its own maps -- and AIM which comes only with new items (i'm not talking about bigmaps here, just the weapons from AIM). So the tool could parse the maps from UC and copies the used items into AIM's item list with the correct ID. Items from AIM, which occupy the needed slot points, are automatically moved to a position that is "free" (e.g. points to the NADA image). The script would be smart enough to automatically update all references to those items in the AIM tabledata xmls. The result is a merged mod folder, which includes all AIM items, and a small subset of the items used in the UC maps. Then the mapping can occur where the user only needs to manually remap the items that are hard-wired in the UC maps. Or she can leave it be and the game should work out of the box by using items from both mods simultaneously. Does that make sense?

[Updated on: Sat, 30 March 2019 12:21]

Report message to a moderator

Private
Re: ja2MapTool[message #357126 is a reply to message #357114] Sun, 31 March 2019 00:24 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
I have that sort of thing planned but there's no ETA right now. Technically most of the low-level pieces required for this are already implemented, it's mostly a matter of putting together some more abstract models of what maps and their contents are, so that it's easier to express this sort of transformations. Until I get that done, I don't expect to post much more than fixes and small features.

Report message to a moderator

Master Sergeant
Re: ja2MapTool[message #357135 is a reply to message #357126] Sun, 31 March 2019 18:07 Go to previous messageGo to next message
LupinoArts is currently offline LupinoArts

 
Messages:5
Registered:March 2015
That is good to hear. I almost was about to write a programme that does that myself. I would have done it in Ruby, thou, since i don't "speak" Java so well (t.b.h, i'm a bit traumatised since i was forced to learn java basics when i studied computer sciences... So much that i quit and switched to linguistics after just one semester). So, i'll be patient and eagerly await your updates happy Keep up the good work.

Report message to a moderator

Private
Re: ja2MapTool[message #358437 is a reply to message #357135] Mon, 04 November 2019 20:04 Go to previous messageGo to next message
Kladdey is currently offline Kladdey

 
Messages:76
Registered:December 2009

When I try to open aimnas ini and wildfire 6.07 it just says loading, but I can't select anything in the next tab.

[Updated on: Mon, 04 November 2019 20:09]

Report message to a moderator

Corporal
Re: ja2MapTool[message #358458 is a reply to message #358437] Thu, 07 November 2019 04:31 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
I guess you found another bug.
Get the .7z release, start the map tool using one of the .bat files, send me the maptool-message.log and maptool-error.log files after you try opening the mods. That should let me know what went wrong.
Thanks!

Report message to a moderator

Master Sergeant
Re: ja2MapTool[message #359335 is a reply to message #358458] Tue, 31 March 2020 20:49 Go to previous message
Parkan is currently offline Parkan

 
Messages:439
Registered:April 2010
Location: Russia,Sevastopol

I am looking for completed item mapping for wildfire and AFS mod.Is anyone have it?I want to convert wildfire 1.13 maps for AFS.The wildfire 6.04 maps working normal with AFS but it lacks a lot of intresting stuff and some changes on maps.Tryed to do a itemmapping for myself but i think i got something wrong and nothing changes on my converted maps.


1.Serve the public trust
2.Protect the innocent
3.Uphold the law(c)Robocop

Report message to a moderator

Master Sergeant
Previous Topic: Using WASD keys for scrolling
Next Topic: Code cleanups, how to contribute
Goto Forum:
  


Current Time: Thu Apr 18 08:43:33 GMT+3 2024

Total time taken to generate the page: 0.01492 seconds