Customizing item mapping

Problem


I have many items, and I will potentially have even more in the future.
How am I suppose to manage it?!

Do I have to rename and re-pack them everytime I want to use it? (waste of time)
Do I keep a dozen files for every set of items I want? (waste of space)
What happens if I want the same item to appear in multiple sets? Isn't that a little redundant to keep a 1 MB file in 42 pp files? (redundancy is bad)

Solution

Take advantage of digital yuusha's item map. In mo_00_00_37.pp, there's a "digi_item.lst" file that tells the game the locations of the item files that it needs to load. I call this the "item definition list"

If you open it up in notepad, you will see exactly that

0 mo_00_00_00.pp item_00_00.xx 0 0
1 mo_00_00_00.pp item_00_01.xx 0 0
2 mo_00_00_00.pp item_00_02.xx 0 0
3 mo_00_00_00.pp item_00_03.xx 0 0
4 mo_00_00_00.pp item_00_04.xx 0 0
5 mo_00_00_00.pp item_00_05.xx 0 0
6 mo_00_00_00.pp item_00_06.xx 0 0
7 mo_00_00_00.pp item_00_07.xx 0 0
8 mo_00_00_00.pp item_00_08.xx 0 0
9 mo_00_00_00.pp item_00_09.xx item_00_09.xa item_00_09.ptcl
10 mo_00_00_00.pp item_00_10.xx item_00_10.xa item_00_10.ptcl
11 mo_00_00_00.pp item_00_11.xx 0 0
12 mo_00_00_00.pp item_00_12.xx 0 0
13 mo_00_00_00.pp item_00_13.xx 0 0
14 mo_00_00_00.pp item_00_14.xx 0 0
15 mo_00_00_37.pp item_00_15.xx 0 0
16 mo_00_00_37.pp item_00_16.xx 0 0
17 mo_00_00_37.pp item_00_17.xx 0 0
18 mo_00_00_37.pp item_00_18.xx 0 0
19 mo_00_00_37.pp item_00_19.xx 0 0

You can think of this as saying "item 16 is located in mo_00_00_37.pp in file item_00_16.xx, with no other file to be loaded".

So what does this mean? The xx file is just a name for its contents. You don't need to call it item_00_16.xx. In fact, that is undescriptive and fairly meaningless (well so are 1, 2, 3, ... but those are hardcoded indices so you can't do much about it).

But you CAN change what you call the xx file right? Of course.
So all you have to do is name your xx file something informative like "sword.xx", toss it in your folder, and then pack it. And then save it in MIK trial format.

You can extend this to an arbitrary number of files, and changing what item you want to use is a matter of changing the item definition list to point to another item.

Problem

But doesn't that mean I have to maintain my list then? I still have to go through the hassle of unpacking my file, changing the list, repacking it, RE-SAVING IT, and then finally get on with my project?

No

If you look at the second column, it says to look at a particular pp file. In this case, the game looks at 00 and 37 for the corresponding items. But what if I don't want to look there? What if I want to look elsewhere?

Suppose I build a new pp file and called it mo_00_00_38.pp
Let's say I took all of the items from 37 and put it in 38, so that the only file in 37 is the item definition list.

Now let's say I updated the definition list to point to 38 instead of 37. All of the item names are the same; only the file has changed.

And for sure, this works. Now I have a 37 file with only one file and a 38 file with all the items. [b]I have effectively separated the definitions from the data[/b].

So you have many lists of items? That's no problem. You can just toss them into their own individual pp's and whenever you need to switch item sets, you just swap the 37.pp files.

Now you can keep a master list of items in a single file and change item sets quickly without having to do any mundane renaming. Or you can logically group the items into separate files, but that makes no real difference since all you have to keep track of is which file it belongs.

And you can probably make wizard ready files to update that definition list...

Currently I keep my items in the following structure:

mo_00_00_37.pp - definition list
mo_00_00_38.pp - default items
mo_00_00_39.pp - custom items

That way I can quickly swap definition lists without having to do any re-packing.



Troubleshooting

Client keeps crashing? Then do things one at a time. Here, I want to let 37 be only the definition list, and 38 will be where the graphics are.

1. start with your original files (def list, and items) all in mo_00_00_37.pp, and verify that your poser works.
2. unpack 37, and copy all of the files except for the def list from 37 into a new folder (call it "mo_00_00_38"). Pack it, open with SB3U, and convert from retail to trial
3. Open digi_item.lst in 37. Replace all instances of "mo_00_00_37.pp" with "mo_00_00_38.pp")
4. Pack it, and convert to trial.
5. Place both files back to the data folder and start client. Verify that everything works.
6. Unpack 37 again, this time deleting everything except for the def list. Do the re-packing process and then verify that it still works.
7. At this point, you've successfully separated your def list from the item files, so it should be enough to convince you that you have it working.

Making it wizard ready

So you want to be even more lazy?
Then all you have to do is set up the directory structure, toss in the specific digi_item.lst for that pack, and then 7zip it.
Do this for every item set you have, and when you actually want to change sets, just go to the list of mods available and force mod.

Now having a hundred different item sets seems pretty manageable from any point of view!
In fact, if you're going to use wizard, you can just put everything in 37 and let the wizard update the def list; the separation above would not be necessary, as it was meant for swapping pp files.

A note on wizard: it appears that it packs it as SM retail and it works fine. However I'm not sure what it converts from...

Standards

Like everything else, if anyone is interested in creating and sharing their items, then standards would allow the automation process to go smoother.

For instance, we can say that 37 will be the default items, and 38 will be the custom items. Any item mods will go into 38, and the def list will be updated. To avoid conflict, naming schemes would be devised to minimize duplicate names, etc.

Potential issues

There could be problems with the main game, as I'm not too sure how dependent the specific files are, but it shouldn't be too big a problem if you're only using digital yuusha.
Aside from technical issues that I have no understanding of, there is the issue of whether the item you have is compatible with yuusha or not.

I call an item "yuusha ready" if you can use it in yuusha. Items that are not yuusha ready are basically any items that you try to just toss into your file and ask the poser to load. It will crash miserably and you will feel horrible.

Basically the only thing to look out for here is that the items must be compatible with yuusha. If an item is not working, chances are, it's not compatible yet.

Things to think about

1. If items are mapped this way...perhaps stages are also mapped the same way?
2. Maybe clothes are also done the same way? Lol then changing outfits would be even faster.
3. Since people have already modded the UI, perhaps there's a way to make a UI that populates the menu with the actual item name? Or even add more menu items?

No comments:

Post a Comment