Closed EvenIllusion closed 8 years ago
Yes the tools surely have there issues, there are sadly not too many testers 😄
First issue: Ye I just tested it, it's a bug. Looks like somewhere inside the SH file are some secret color tables hiding. Will look into it!
Second issue: I looked into FACE.DAT
, it dosn't contain .SH files but .TX2 (just images) files. The problem is that the File Manager doesn't recognise them. It's kinda hard as the files inside .DAT don't contain any names or info about them. I will look into it and hopefully fix it. But right now you can just rename .SH to .TX2 and open them.
Third issue: I am not very sure how to add a completely new character. I will ask Krisan Thyme, maybe he can write a tutorial on his wiki. Currently I am afraid you will need to use a Hex editor to add a new NPC.
I would say the value for monster or humanoid is inside SUBDATA.DAT/START.DAT/CHAR_E.DAT
which you can open with the Data Editor, but I am not sure which entry you need to edit as many of them are still unknown.
I think the weapons are located inside SUBDATA.DAT/START.DAT/ANM00.DAT
but the Sprite Editor can't open the currenty.
Thank you for the insight, and your willingness to look into the issues! Sadly the .TX2s for the generic classes in FACE.DAT have some palettes that I can't figure out, and so my game crashes when using the classic UI if I edit those. Somewhat related is this: extracting the .TX2, converting it to .TGA, editing, converting back to .TX2 and importing it back leaves it with a significantly different size than the rest. Assuming everything else was done right, could the difference in size alone cause the crashes? Also, NEW_FACE.DAT has a portrait without those palettes for each tier so that seems a little easier, but I'm not that interested in those, since I much prefer the classic UI.
I've turned the folders I've used for this venture into complete messes, whew... Still, I'll keep trying to figure out stuff like the thief's better stealing rate, or the ninja's dodge, as well as the monster/humanoid difference. Perhaps Krisan knows about that last one.
Adding new classes is possible, but it's pretty complicated, and a lot of things need to be figured out in advance before you dive into it too deeply. (Like whether it will be a Humanoid or a Monster, for example.)
Anyway here is a quick rundown of the need-to-knows, many of which you likely know already:
ANM00.DAT - This is the first place the game looks for Sprite Sheets, seeks the sheet by Actor ID. FACE.DAT - This is for SD portraits, seeks the portrait by Actor ID and by Index in savefiles. NEW_FACE.DAT - Same as above, but for HD Portraits. Paletted units are hardcoded in this. CHAR.DAT - Database for Actors and their stats, this is the first place Actor ID comes into play. MAGIC.DAT - Database for Skills and their properties, necessary for adding new skills or spells. SCRIPT.DAT - Contains various game scripts, necessary for monsters, actor skills, and recruiting. TALK.DAT - Contains dialogue-based scripts, necessary for most NPC's and custom menus.
Okay, so the long and short of it is this.. You can't add a new unit to the Dark Assembly, at least not as of yet. The Dark Assembly as a whole is hard-coded with how it handles class unlocks.. Even the initial classes you have in the assembly at the start of the game is hard coded in the executable. You could modify this to an extent, but you're looking at doing Assembly hacks in order to achieve this.
So what do you do then? The best course of action would be adding the new unit via a script. My mod currently adds new NPC's with dialogue trees that trigger scripts to add the desired units. I have some plans in the next update to revise this a good bit and make it more interesting, but the idea of it being done with scripts isn't really going to change. You can use my tool here to extract SCRIPT.DAT or edit TALK.DAT: https://drive.google.com/file/d/0B5q4LxwS1je2Um5kdXpqUDhNQlE/view
This tool also kind of parses SCRIPT.DAT scripts, but I wouldn't rely on it too heavily, as it's extremely buggy at the moment. It should help you get the gist on a few things, though. Both TALK and SCRIPT DAT's contain compiled scripts, though my TALK editor removes much of the need of knowing Opcodes for it, SCRIPT is another matter entirely.. there are a LOT of opcodes I still don't know the meaning of, and a lot of research still needs go into that.
For the purposes of helping you get started though, and without me stumbling through a poor explanation of scripting for this game, take a look at 00150903.bin, this is the script that adds Priere to the party. And 00150703.bin is the the script that adds Marjoly to the party. What you could do is copy either of those, modify the actor it adds, and then call that script via a modified TALK script. That would be the simplest way of doing it, at least.
Anyway, it's important to maintain the same Actor ID between ANM00, CHAR, FACE, and NEW_FACE. It's also important to have entries in all of these for the new actor, because otherwise the game can crash at any time on you when it looks for the appropriate data. I modified most of these files by hand (old habits die hard) or with my own poorly coded tools before ProgSys implemented his own tools into this repository for most of them, so you're starting off better than I did when the mod first rolled out, heh.
I'll answer any more specific questions you have as I can, I just figured a basic rundown of this would help you get started. (Or I hope it does, anyway!)
I released a new version (v0.6.5 ), the sprite editor now should display and save all the color tables. Also FACE.DAT
and NEW_FACE.DAT
should now be better supported by the File Manager.
The problem right now is that FACE.DAT
contains TX2 images with multiple color tables and there is currently not tool (besides a hex editor) to property edit them. I plan to make one but it will take some time.
ProgSys, thank you for the update! I haven't gotten around to putting it in game yet, but it seems like the palettes are working just fine, yes. As for the palettes in the FACE.DAT files, I'd love such a tool to edit those, as I'm not sure how to do it with a hex editor. But I will wait however long.
Now, Krisan, thank you for the great reply! I did have an idea of the many assets I'd have to work on to add new characters; animations, portraits, attributes, skills learned and at what levels, but I didn't know the Dark Assembly wasn't easily editable, so thank you for the insight on how to use your tool, and SCRIPT.DAT and TALK.DAT to be able to access the new characters. I'll put all the info to good use and give this a try!
I do have some questions, before I get to it: First, the character I want to add is a Humanoid, so how do I set it to that? My only idea is simply setting their weapon masteries to above 0 in their entry in CHAR.DAT.
Second, I recently noticed that when rearranging by Humanoids 1st, Pleinair is put below some monster classes, which is minor, but kind of inconvenient. Is this due to her Script ID being 3500 as opposed to 6 as it was in earlier versions of the mod?
Third, the scripts for adding Priere and Marjoly to your party are normally called upon clearing their respective maps, right? The scripts don't have any requirements IN them?
Last but not least, since I am only doing this for personal use (for now at least) I'll try and make it so I can add my character by talking to the Dimension Phone from your mod. Is that okay?
Thank you guys for the hard work that makes it easier for people like me to delve into this stuff!
Sure, let's see..
Thanks for the heads up! I think for now, having replaced the Female Martial Artist with the Kunoichi has me content, but as it was my first ambition when discovering the modding scene for the game, I still want to add a character just for educational purposes... Just to see if I can do it. Then I can probably move on to setting up my own NPC or trying to accomodate to updates.
I see the part of the scripts you pointed me to that hold the ID of the actors they add, but little else. I'm wondering if those contain the level of the actor as well?
I also can't figure out how to add a new entry to TALK.DAT. I see some that don't do anything yet and I could edit those, but can a new one be added?
The opcode supports setting a level, though in Priere and Marjoly's case it is set to level 1, because Priere and Marjoly are actually pre-generated in the savefile before you even recruit them, and anything in the save takes priority over what a script sets. (This way NG+ characters retain their experience and equipment.)
As for TALK.DAT, my tool doesn't support adding entries currently. I've added a few manually the hard way, but never got around to writing a means to add them via a tool yet. I mostly made it for myself, and only released it because some people showed interest. (Most of the things I cobble together for myself are quick and dirty.)
I understand, thank you! There should still be enough for me to work with.
Now, I ran into another issue, Sprite Editor crashes when opening Asagi's .SH. I remember having opened it successfully before, when there wasn't an editor built into the Sprite Viewer. I can't recall which version that was but I'll test when I can.
Found the problem Asagi's .SH should now open in the new version (v0.6.6 ).
That did it, thank you! I'm a little curious about the markers as I've found some of them have to do with the sfx that plays when a weapon is used, and perhaps some vfx. But I'm not sure the Sprite Editor displays all of their values yet, and the ones that are displayed are not editable (don't know what T, A, B are). I have an idea of what the more obvious markers do. But I'm assuming you guys already know way more about this than I do. Anyway:
For example in this celebratory animation in 0001_LAHARL.SH, the yellow markers seem to be just a Y offset for the sprite; the first 8 move the sprite up, the last 7 move the sprite down, and without these, the animation will be played in place in game, much like in the Sprite Editor.
Or in this animation in 3610_FILE.SH (Asagi) the marker at frame 8 plays the attack sound, but also seems to apply a filter to the sprite? which stays until the end of the animation, or close to it.
I'm confused because some of them show the same value (T:1) but seem to do different things. Is there anything else you know about the markers?
I released a new version (v0.6.7) where the markes are now editable.
The markers can change the x and y offset of all layers and also mark a event. But what exactly the event does seems to be hardcoded. Like it is expected for attack animations to have a marker to indicate a hit, otherwise the animation will loop infinitely ingame. They can also do other stuff like mark a sound effect, a particle effect, a animation loop and so on. But I am not sure myself what they do as I didn't test it myself.
Yeah, much like ProgSys I haven't tested the markers thoroughly. But it's interesting you mentioned one of them seemed to apply a filter to the sprite, that suggests the filtering "bug" on some characters is due to that specific marker.. I never considered it being a marker before, so that's an interesting find. I wonder what purpose that marker is suppose to actually serve? Seems strange to me..
I was reading through the NCP discussion in the mod index and when I saw that there was a filtering bug this came to mind, yeah. How I discovered this was by trying to update Asagi to her D3 and onwards look. When doing some testing in game, her attack animation when facing away from the camera (the only one I'd modified so far) had white pixels all around her (this doesn't happen when friendly effects are off). Moving that marker to the very end of the animation delayed this accordingly, but obviously also had the undesired effected of the gunshot sound not playing until then. For some reason it is not nearly as obvious with the sprite sheet your mod uses, so if you'd like to take a look at my .SH, let me know. As for the purpose of the marker, I can only guess as well. Rozalin is the only other "monster" character that uses a gun that comes to my mind, so my only idea is to take a look at how NIS handled her and making a comparison between the two?
The new version (v0.6.9) now has a proper TX2 editor, with it you now can edit the color tables.
The new tool works great! And the new ways to add sprites in the Editor are very convenient. Thank you!
When I first saw the modding tools I drooled at the thought of adding classes from later games (without replacing existing ones), but I didn't even know where to start. So my next plan was to replace some classes with the ones I'd like, by changing their sprites or even their attributes. First attempt was replacing the Female Martial Artist with the Kunoichi from later games. I have almost all the battle animations working well, just need to tweak the weapons so they're actually in her hands, mess with descriptions, attributes, etc. I have a few issues and questions I'd like help with so I can make more progress.
First, the issues: One: I can't see the 2nd tier and above of the class I edited. I was expecting to see them with messed up colors as it is a different sprite and I didn't mess with any palettes beyond the 1st tier of the class. I wasn't expecting them to be completely transparent.
This may be related to the sprite editor, as opening a .sh, and exporting it without editing anything produces a similar result:
When opening any of the generic character .SHs (not sure about unique characters) which should have very many palettes, only the first 2 sets seem to be read, with colors 32 and up (they only ever go up to 127) being very blacked out. From what I gather after messing a little with CHAR.DAT, "palette index" 0 corresponds to the colors 0-31, the first 16 for the sprite, the other 16 for the battle cut-in, palette index 1 corresponds to 32-63, and so forth. If this is right then when I have some time I'll try adding each set manually and seeing if I can get them to show up normally in game.
Two: In addition to editing battle sprites, I'd like the portraits (in the menus) to go with them, I'm assuming those are the .SH files in FACE.DAT and NEW_FACE.DAT, but my sprite editor fails to import the .SHs from FACE.DAT and crashes when trying to import the ones in NEW_FACE.DAT. I've read that the sprite editor has had and probably still has issues, which is fine, but I want to make sure it is not on my end; can anyone else open those .SH files successfully?
Now my questions, these are not that important, so feel free to leave them unanswered if they are too complicated to explain, keep in mind I have about zero experience with this:
Is it as hard as I think it is to add new characters without replacing existing ones? Looking a bit at Krysan Thyme's NCP, where there is a playable Baal that seems to be an entirely different class despite its stats being the same, makes me think I could just clone a character and use them as a template.
What determines if a character is a monster or a humanoid? And is it possible to edit that with these tools? I would love to for example make Adell and Rozalin into humanoids, I know they'd probably need some more sprites and animations, too.
Where are the battle sprites for the items located? I've had no luck digging through ANMXX.DATs and their .SHs
That would be it... for now? Thank you so much in advance