Author Topic: Labyrinth of Touhou 19F  (Read 285772 times)

0 Members and 7 Guests are viewing this topic.

Re: Labyrinth of Touhou 19F
« Reply #240 on: August 12, 2021, 12:56:40 PM »
Could you clarify that, if it’s not too much to ask?

As a disclaimer, everything I know about 3peso's programming ability is "second hand", meaning I don't have access to the source code, just to the .exe, and this is from looking at the disassembled code when I need to for the translation effort (e.g. datamining stuff to make it easier to translate).

First, something I should mention that makes me think the game was rewritten, is that the game uses shift-jis for Japanese text, not Unicode. The steam port will include a Chinese translation. You cannot put Chinese text in shift-jis, you need to use another code page... or switch to Unicode. I'm hoping this means they made the switch to Unicode, because it'll make a few things easier to deal with. Also the game predates the switch, so the version of DxLib he's using wouldn't support it. I don't think he ever updated, and I don't know if it'd be difficult to (having never used it myself). But that's another push in the direction of a big rewrite effort.

My biggest complaint with 3peso is that everything is in the .exe. Everything. The only exceptions are the audio and graphics, and the map files. Every line of dialogue is in the .exe. Every monster is defined entirely in the .exe. Every item. All skills. Every map icon. Everything. This is why his patches break so much stuff each time, and why I haven't tried to clean up any of the text placement. Everything would be undone with each new version, because even if he didn't change any monster names, everything got moved around, so I need to run a script to try and get the new addresses.

There's also a lot of redundancy. He did fix this with plus-disk (he had to, for the IC), but in the original version of the game, every monster was declared separately, for each time it could appear. So you had a function in the code that was basically

Code: [Select]
If monster == "small kedama" and level == 2:
hp = 10
atk = 10
def = 5
...
If monster == "small kedama" and level == 3:
hp = 15
atk = 14
def = 7
...

And so on. For every single monster in the game, for all levels. This caused a problem in LoT1 with map icons; when you fight the Hibachi twins on 30F, there's dialog before and after the fight. After beating WINNER, you can re-fight them. These are considered separate encounters, so he basically took the code he was using to display the dialog the first time and pasted it in for the refightable version. This was an issue with my patch because I had to insert a new text line to one of those speech bubbles, and only did it to the refight, since I had no idea they were different.

Pretty much everything is straight text. Y'know the first line of all player spellcards that lists the name, what it targets, element, and accuracy? Those are all text. There's no attempt to get the data from the spellcard itself and format it. Which causes plenty of bugs where the description is different (we had a list of mismatched elements. I think the MP costs always tended to be right. There was at least one row target that was actually all, or vice versa. Oh, and I'm pretty sure one of Orin's spellcards has like +1000 accuracy instead of +10, or something)
« Last Edit: August 24, 2021, 09:48:45 PM by qazmlpok »

deice

  • minus mentality
    • 
Re: Labyrinth of Touhou 19F
« Reply #241 on: August 12, 2021, 03:51:33 PM »
(large post)

ouch. i hadn't realized the situation with the text was that bad (though the text file with the addresses that's bundled with one of the old translations should've tipped me off in hindsight).

while i'm still not sure an encoding change is enough to warrant a full rewrite, ultimately it does depend on how easy it is to port code from the windows dxlib to the switch dxlib, which i don't think most people can attest to as you seemingly need to present a nintendo-issued switch development license to actually obtain the latter.

Re: Labyrinth of Touhou 19F
« Reply #242 on: August 12, 2021, 07:36:18 PM »
Further posts from 3peso on twitter indicate that he's both aware of our English patch existing *and* appreciative of it :)

Re: Labyrinth of Touhou 19F
« Reply #243 on: August 14, 2021, 02:03:31 AM »
Hidden passages are added


AngryEclectus

  • The '24 Hours a Day, 7 Days a Week' Library
  • Taking it easy
  • Gender: Any/All
Re: Labyrinth of Touhou 19F
« Reply #244 on: August 15, 2021, 07:21:18 AM »
So, I finally got LoT2 to work! Happy days~

Can't wait to start playing! Any strats I should know of before I start?
"Rat poison, rat poison..."

(ᗜˬᗜ)

Re: Labyrinth of Touhou 19F
« Reply #245 on: August 24, 2021, 10:08:31 PM »
LoT2 is now out on steam.

Here is the situation on making an English patch for this.

The game was indeed rewritten. It is no longer dxlib (to the best of my knowledge). It is also not Unity. I believe it is using an engine CUBETYPE has used in several other games. This is just a guess, as I've never done anything with anything else from CUBETYPE.

The archive format is completely new to me. I do not have any tools for extracting or replacing assets, which will be needed to create a patch. I do have the XOR decryption key used by the archive, which means it's possible to create such a tool, I just haven't done the grunt work yet The archive extractor is done. I haven't written a packer, but I'm still assuming I won't need to. Additionally, there's some support for explicit patch files (system0.dat and system1.dat), so it might be possible for me to distribute that, and not need to modify the big system.dat at all (it's a full gigabyte).

The Chinese translation does indeed use Unicode text. There are now script files within the asset containing the Japanese script, Chinese script, and some control characters. The script files (I believe) use the extension .cnut, which is a compiled Squirrel language file. I found a steam post on modding a different game that also uses squirrel, but I have not done any real investigation on these files (I'll need to extract them all with the archive tool first), but I did demonstrate that if I use a hex editor to modify the system1.dat file and change text, it shows up in-game... for the Chinese text. Changing the Japanese text in these script files does not work, and I have no idea why. My best guess is that the game is using the Japanese text stored in the executable and ignoring the Japanese text in the script files, and I have no idea why. Which is a problem, because...

I am not able to modify the exe. Changing anything causes an error with whatever DRM/validation/whatever Steam is doing. I don't know how to work around that. Hopefully I won't need to ever modify the exe. But you might need to explicitly set the language to Chinese in order to get the English text to show up. I haven't even started to look into a way to modify the exe, as I'm hoping it just won't ever be needed.

Finally, it is possible that 3peso will work to incorporate the English text officially. This would require approval from all of the translators; I am not a copyright lawyer, but my understanding is that even though this is an unauthorized derivative work, the translation still has its own copyright and therefore the authors need to approve any such transfer. Plus it's the proper thing to do. However, this requires getting a hold of Deranged and Kuilfrayt, and... yeah. (I sent Deranged a PM already, just in case that emails him). I have no idea what would be involved in this, or what would be expected of the translators, or what to do if someone is completely unreachable.

I'm hoping that this will happen, because it will mean I don't have to do any of the stuff mentioned here. And I'm all in favor of not doing stuff.

(p.s. no, I don't know who Lolisauce is, but I'm certain they were not involved in the translation in any meaningful way)

EDIT:

Since the extractor is done, here's the character portraits for anyone that wants them in the new size.

https://drive.google.com/file/d/1NDLyn9TNkJDS-m6MaNoZIcVlJw2BZ2lN/view?usp=sharing

There are no longer separate images for large, small, extra small. They're all combined in one image.
« Last Edit: August 25, 2021, 11:59:10 PM by qazmlpok »

Thurler

  • Go slow to go fast
    • Twitch
    • Twitter
    • Github
  • Gender: Male
Re: Labyrinth of Touhou 19F
« Reply #246 on: August 25, 2021, 03:09:18 AM »
Steam version is out and lots of exciting things to reverse engineer so I don't have to play through the whole game again :cirnotan:
I spent the day reversing the save file format, you can see a detailed description here: https://pastebin.com/Mpx7wdSg

The goal is to now write a script to convert the legacy save file format with a billion files to the new .dat format Steam expects. Huge shoutouts to qazmlpok for figuring out the encryption was a simple XOR with key 0x00 through 0xFF. If you want to decrypt any of the .dat files the game has to try your hand at save hacking, this little python script can convert to/from the encrypted format:

Spoiler:
Code: [Select]
data = None
with open("inputfile.dat", 'rb') as f:
  data = f.read()
data = [((i & 0xff) ^ c) for i, c in enumerate(data)]
with open("outputfile.dat", 'wb') as f:
  f.write(bytes(data))
Right, one important limitation for now is that dungeon map progress can't be carried over since the format is completely different. The best a converting script can do is either empty out all the maps or fully unlock all maps. Technically yes, you could convert the format, but that's a huge pita.

Also there are 38 bytes still unmapped in PEX01, I have no idea what they do - nothing seemed to change when I edited them, but I know for a fact they represent something. Maybe one day I'll figure it out, but for now I guess they'll stay zero'd out.

EDIT: Attached are 3 save files ready for use - all of them NG+, with 46, 48, and 56 characters. Hopefully this will help people enjoy the early parts of the game with a new team. :)

EDIT 2 because double posting is bad: I finished a save file converter from DLSite format to Steam format, it carries over everything except for map data, sadly. The readme should explain everything, but feel free to PM me or open an issue on github if you're having trouble. It uses python so there might be some setup necessary, but nothing difficult or bothersome. The link: https://github.com/Thurler/thlaby2-save-convert
« Last Edit: August 25, 2021, 08:10:51 PM by Thurler »

deice

  • minus mentality
    • 
Re: Labyrinth of Touhou 19F
« Reply #247 on: August 26, 2021, 11:49:23 AM »
Also there are 38 bytes still unmapped in PEX01, I have no idea what they do - nothing seemed to change when I edited them, but I know for a fact they represent something. Maybe one day I'll figure it out, but for now I guess they'll stay zero'd out.

i may be completely blind and unable to use ctrl+f, but i don't see the number of kills against ***WINNER*** or the flag for enhanced boss mode anywhere in the pastebin. perhaps that accounts for some of the unknown data?

Validon98

  • Utahime says hello!
Re: Labyrinth of Touhou 19F
« Reply #248 on: August 26, 2021, 02:26:08 PM »
Out of curiosity for myself since at this point I've played this game enough to want to just have maps fully unlocked, I could just take the decryption script in the code block above, copy the full map code from the Github and run it on the decrypted file, then reencrypt it with the same script? So something like the following?

Spoiler:
Code: [Select]
data = None
with open("inputfile.dat", 'rb') as f:
  data = f.read()
data = [((i & 0xff) ^ c) for i, c in enumerate(data)] # Decrypt
data[0x0ce8e:0x2ae8e] = [0x55]*0x1e000 #1F-30F
data[0x33e8e:0x3ee8e] = [0x55]*0xb000 #B1F-B11F
data = [((i & 0xff) ^ c) for i, c in enumerate(data)] # Encrypt
with open("outputfile.dat", 'wb') as f:
  f.write(bytes(data))

I'd have to test it myself but it might be a nice bonus utility if anyone wants it.

EDIT: Yup it works, no issues. Well then there you go I guess. I've saved it as a Python script and attached it (god my python build is old-ish, 3.8.2, but it shouldn't matter). Credit to Thurler for all the actual work of figuring out the save format and how it correlates to the old save format, this is just rearranging it for a very specific function. :V
« Last Edit: August 26, 2021, 04:20:07 PM by Validon98 »

Thurler

  • Go slow to go fast
    • Twitch
    • Twitter
    • Github
  • Gender: Male
Re: Labyrinth of Touhou 19F
« Reply #249 on: August 28, 2021, 05:38:18 PM »
i may be completely blind and unable to use ctrl+f, but i don't see the number of kills against ***WINNER*** or the flag for enhanced boss mode anywhere in the pastebin

Those are both stored as event flags, I think. I tried looking through old saves to try and find a pattern, but the only useful info I got out of that is my save past True Dragon God had all 38 bytes with something, and all other saves had them zero'd out (the save that had most progress was right after Winner). Maybe it does have something to do with the Pillar of Light, like keeping track of other records? I'll make sure to test more of it in the future when I actually replay stuff.

Out of curiosity for myself since at this point I've played this game enough to want to just have maps fully unlocked, I could just take the decryption script in the code block above, copy the full map code from the Github and run it on the decrypted file, then reencrypt it with the same script?

You can take out parts of the code to run on any save file too, yea. You can erase all of your achievement progress by not copying over the achievements, for example - this will make it so the Steam achievements actually pop up when you load the save file. I didn't really make a tool for these neat cases since there are many useful combinations and all, maybe when I get around to making a save editor with an actual UI :p

deice

  • minus mentality
    • 
Re: Labyrinth of Touhou 19F
« Reply #250 on: September 16, 2021, 01:54:40 PM »

p-powerful..!!!

the sidebar with the stats/drops seems to be stylized either to match the color of the floor, or to match a color that corresponds to the boss we're figthing.
which also brings into focus the fact that bosses take up a lot more screen real estate now, something that does help make the encounters seem more important, but i fear it will limit the possibility of multiple bosses being on screen at once...

Re: Labyrinth of Touhou 19F
« Reply #251 on: October 13, 2021, 11:22:56 AM »
The official English translation for the steam version is out now.

https://store.steampowered.com/app/1131920/LABYRINTH_OF_TOUHOU__GENSOKYO_AND_THE_HEAVENPIERCING_TREE/

This version has a number of benefits to the standalone dlsite version. Obviously the larger resolution and other steam-only changes, but also to the English translation. The images have been typeset and are all included in the game now. The element icon that shows up during an enemy attack is no longer covered by long spellcard names. There might be other little fixes like that now that the game isn't hacked together, but I haven't noticed them.

I was beta testing this translation and made a number of fixes to the translations. Most of these are very minor (typos, wrong its/it's, tense changes, stuff like that). Two rocks with very confusing messages have been modified, namely the rock where you need Yuyuko and the rock where you need to craft 88 items at Nitori's shop. I'm still going through the game and want to give everything a final pass, but sometime after I do I'll post an updated translation of the standalone dlsite version of LoT2. And this will probably be the last patch for this I release. The steam release should be considered the final product.

If you spot any typos/other issues on your own, feel free to include them here or in a Steam thread Regalstar created: https://steamcommunity.com/app/1131920/discussions/0/3123801577567757503/

Validon98

  • Utahime says hello!
Re: Labyrinth of Touhou 19F
« Reply #252 on: October 13, 2021, 01:12:35 PM »
Thanks for all the hard work over the years, from everyone really. It's amazing seeing this game get a full and proper English release, which really only could have happened because of the effort put into this translation since the start, way back before plus disk even.

I had a run going up to early 30F/29F boss shenanigans that I put on hold for this, but I'll likely start over so I can contribute to RegalStar's thread if need be.

Gesh86

  • Supporter of Hina
    • YouTube
  • Gender: Male
Re: Labyrinth of Touhou 19F
« Reply #253 on: October 13, 2021, 02:26:11 PM »
Thanks for all the hard work over the years, from everyone really. It's amazing seeing this game get a full and proper English release, which really only could have happened because of the effort put into this translation since the start, way back before plus disk even.

Seconding this. It's a really grand development that our humble, MotK-hosted English patch got promoted to the fully official English translation of Labyrinth of Touhou 2. Congratulations to the team and a big, personal thank you from me!

Re: Labyrinth of Touhou 19F
« Reply #254 on: October 14, 2021, 08:36:37 AM »
Yep, spam opening worked! It's annoying, but I can survive! Thanks!

As a reminder, Laby 1 is wonky when selecting fonts, so to make the game readable you may need to pass it thru LocaleEmulator, and since in windows 10 the game only runs about 5% of the time plus locale emulator requiring a right click to be used on whatever exe, I made a bat file to get the good font and only have to click twice, if anyone needs it, copy this and modify it with your correspondant paths.

@echo off
cd "C:\PATH_TO_LEProc.exe_CONTAINING_FOLDER"
LEProc.exe "C:\PATH_TO_GAME\thLabyrinth_ver3.exe"

It should look something like this

@echo off
cd "C:\Users\Reimu\Documents\Utilities\Locale.Emulator.2.4.0.0"
LEProc.exe "C:\Reimu\Documents\Games\TouHou\Fangames\Labyrinth of TouhouthLabyrinth_ver3.exe"

Save as a .bat file, double click it and pray to Minoriko that the game executes.

Also since im that weird guy who gets mad looking at the new ugly portraits from Laby 2, have an already set up Charagraph folder with the old portraits, just extract, drag and drop inside the CharaGraph folder.

https://mega.nz/file/v4gUVZCR#E7yyEDgHlJl446eKEOyCIhjAmQWUSoBn2f-GiwRC9Zw

Re: Labyrinth of Touhou 19F
« Reply #255 on: October 19, 2021, 03:30:56 PM »
Me and my friends are all starting the game on NG+, and there are a few issues I'm hoping I can get some help on.

For starters, I pored over Thurler's save format pastebin, and it was incredibly helpful.  I managed to hex edit away the extra 20,000 money from achievements at the start as well as a few other annoyances.

I'm surprised the Deformed Boss achievement bug is still around.  It was there in the initial version and I was all but certain it would have been fixed by now.  I was using this page:
https://en.touhouwiki.net/wiki/Talk:Labyrinth_of_Touhou_2
to help me navigate the decrypted save files, and it says there are some values you can change from 2 to 1 to make the deformed bosses reappear in NG+, but even when I changed every 2 in the entire EVF01 section to a 1, those achievements still popped.  Is there any way to fix this?

Similarly, is there any way to decouple having all the characters from recruiting all the characters, such that those achievements won't pop either?  This one isn't as big of an issue, but it would be nice.

It's super exciting that the english patch got released and we're all hype to get playing.  Thanks to everyone who helped out on that front!

Re: Labyrinth of Touhou 19F
« Reply #256 on: October 19, 2021, 08:09:42 PM »
I'm surprised the Deformed Boss achievement bug is still around.  It was there in the initial version and I was all but certain it would have been fixed by now.  I was using this page:
https://en.touhouwiki.net/wiki/Talk:Labyrinth_of_Touhou_2
to help me navigate the decrypted save files, and it says there are some values you can change from 2 to 1 to make the deformed bosses reappear in NG+, but even when I changed every 2 in the entire EVF01 section to a 1, those achievements still popped.  Is there any way to fix this?
Setting those values to 1 makes the bosses reappear inside the tree, but it doesn't affect the achievements in any way. EVF01 basically just contains the flags for all events (so changing the values there can make bosses that were already defeated or events that were already triggered reappear, or remove a warp point that you had triggered and so on).

Similarly, is there any way to decouple having all the characters from recruiting all the characters, such that those achievements won't pop either?  This one isn't as big of an issue, but it would be nice.

I don't think so, best you could do is remove the special items you get as rewards from that.

Re: Labyrinth of Touhou 19F
« Reply #257 on: October 25, 2021, 01:53:14 PM »
So, we're now in postgame and I'm trying to get the deformed bosses to spawn again.  Now I can actually see whether or not the bosses appear.  And I've tried everything I can think of and they're still not appearing.  For example, I took a proper NG+ save file at the very start, decrypted it, found every 2, and changed those to 1s in the save file in postgame (which did result in the intro sequence playing again).  I've also tried setting all those values to 0, and still, nothing.

Does anyone know the exact offsets I need for these three bosses in the new save format?  This is driving me nuts.

Thurler

  • Go slow to go fast
    • Twitch
    • Twitter
    • Github
  • Gender: Male
Re: Labyrinth of Touhou 19F
« Reply #258 on: October 27, 2021, 09:46:29 PM »
I took a proper NG+ save file at the very start, decrypted it, found every 2, and changed those to 1s in the save file in postgame (which did result in the intro sequence playing again).  I've also tried setting all those values to 0, and still, nothing.

Does anyone know the exact offsets I need for these three bosses in the new save format?  This is driving me nuts.

The offsets are probably the ones you found: 0x5B10, 0x5B74, 0x5BD9 for the 16/17/18F bosses. I'm not 100% sure how this was handled in the non-Steam versions, but the Steam one is hardcoded to set those 3 events to 0x02 when you load a save that has recruited Renko and Maribel. You can maybe get around it by temporarily disabling their recruitment flags, but I have never tested that to see how the game behaves.

---

After the english release on Steam I went back to review my notes on the speedrun for this game, replaying it and organizing its and bits of the route used. I managed to improve a few fights to make them faster overall, but I still feel like some fights could use more work (particularly 20F mirror and magatama). FabulaFares has helped a lot in the past to come up with new setups for some boss fights, like including Marisa for the Tenshi fights and giving the idea to integrate HVY in some way against Murakumo. Since I can only come up with so much stuff, I started wondering if crowd sourcing ideas wouldn't be more efficient, since many brains are more powerful than 1-3 brains. :p

Attached is a zip file containing 20 saves for the major boss fights in the run, with the current setup used in the speedrun. Linked below is a playlist of recordings from 18 of those fights (I omitted 12F mirror/magatama and Azure Giant since the strat is to just DTH them), to give a general idea of how the fights go down currently. There's obviously a lot of RNG at play, what with the AI being erratic in most fights, but the videos should give an idea of how fights should go, and hopefully make someone think "why not use [some different setup] instead?". This link leads to a complete set of notes I use to guide myself when running the game, and should give more details about any particular setup, or which treasures I pick up in the dungeon, etc. Keep in mind the other pages and some of the boss strategies are still a WIP as I write them.

Youtube playlist with the fights

I was debating whether to open a separate thread for this, since I don't want to flood the thread with a side topic (not like there's much activity right now, but still), so I settled with at least making this post to gauge interest before splitting it into its own thread.

Re: Labyrinth of Touhou 19F
« Reply #259 on: October 28, 2021, 06:44:24 PM »
Sounds interesting, I'll probably take a look at them this weekend. Though I think you should also add some DLsite version saves, for those who don't have the Steam version yet (gameplay-wise they're the same anyway).

EDIT: Ok, some notes I did after checking some of the fights.

-Hina
Been trying out offensive Komachi here, it's a bit more rng, but she can deal a prety decent amount of damage with Scythe that Chooses the Dead and Wrath of Edokko God of Death.
Good thing is that as long as Parsee and Wriggle are alive you can just switch back to PSN stalling if Komachi dies or smt.


-Iku
I don't think Parsee is necessary here, since she doesn't support the team that much. Tried a different setup with Sanae/Wriggle/Aya/Nitori, Sanae loses 2 levels in Miracle Fruit but
maxes Youkai Buster, Aya loses HP/ATK boost but gets Tengu's Wind level 1 and Ability to Manipulate Wind to level 2, Nitori loses Kappa's Ecology Observation but gets Overheating. Satori
is also incorporated into the team for her weakness bonus.

Start the fight by playing defensively, with Wriggle landing the PSN and then being swapped out by Reimu, Sanae focuses on buffing Nitori and healing if necessary,
Reimu focuses on buffing/healing, Nitori just spams her Normal Attack to stack Overheating (Attack deals a surprisingly good amount of damage here). By the time Overheating is at level 5,
Iku should already be close to her Thundercloud Stickleback threshold, at which point Satori is switched-in, both Sanae and Satori buff Nitori with Miracle Fruit and then Nitori attacks twice
with Extending Arm (with Aya giving her an extra turn), this should be enough to two-shot her. With Reimu and Ability to Manipulate Wind at level 2, Nitori is overall a bit safer.


-9F Tenshi
Nitori has a Glaive of Pain in her first slot, which can probably be replaced by something that gives SPI affinity or DEF instead. She also has the Washing Machine, which could just be replaced
by a Purple Metallic Armor, then the Washing Machine can be given to Iku instead. Iku also has some leftover SKP that can be used for MAG boost.

Reisen doesn't need Intense Vertigo since Tenshi has 0 res to both MND debuffs and SIL, could put those 10 SKP in MP/SPD boost, or in Lunatic Red Eyes for higher SIL chance.


-Magatama & Mirror
Aya doesn't need Silent Melody, I also believe she may not need Gensokyo's Fastest Lessons for the bosses.
That's about 20 SKP that can be used with MP boost and SPD boost to make locking down the bosses easier.

Sanae should be a Strategist instead of an Enchanter, Enhanced buffing basically just turns Miracle Fruit from 42% to 48%, which isnt a huge increase. Strategist meanwhile gives 10% extra damage
and reduces buff decay, which allows Aya/Nitori to sustain their buffs better (can remove most of Sanae's skills for those since Last Wish/Youkai Buster doesn't do anything here).

Rin could afford to only get Recharging at level 1 (since it only reduces the delay), and get Extra Attack, for the chance of bonus Magic Transfer/Concentrate.

For Magatama, Iku is uninvested, main problem is that Elekiter Dragon Palace is only 50% debuff at level 1, which due to random variance may not max out the DEF debuff. So getting at least
level 2 is better. Leftover points can also be used to speed up Iku with Lightning Fish.

« Last Edit: November 07, 2021, 09:31:27 PM by FabulaFares »

Thurler

  • Go slow to go fast
    • Twitch
    • Twitter
    • Github
  • Gender: Male
Re: Labyrinth of Touhou 19F
« Reply #260 on: November 11, 2021, 03:21:29 AM »
I've been meaning to convert the saves back to the DLSite format but I keep running into little bugs and having no time to revise the code to squash them. I'll hopefully get some time to finish that by the weekend and then edit the post with the legacy save format.

I actually had no idea debuffs had random variance as well, wut.

Regarding the suggestions, first thanks for taking your time to try these out! Seems a lot of small things I dismissed based on "this will take too much menuing time to be worth it", turned out to be part of a more optimal strategy. Starting with the fights with bigger improvements:

-Iku
Parsee's biggest role there is to just sponge damage and swap people around, what with how annoying PAR is. Having Sanae and Reimu in slots 1/2 puts me at a big risk of losing heals/buffs to PAR, but I guess there's always Aya DGA if I desperately need a turn with a PAR'd unit. I really like the idea of bringing in Satori + Overheating and changing Ecology Observation for Youkai Buster, more so if it makes Nitori 2shot Iku from around 55% HP. I'll try to incorporate it to see how big the menu is comparatively, and how (in)consistent Sanae on slot 1 is.

-Magatama and Mirror
Taking Gensokyo's Lessons out means resetting her after the fight so 20F depths is nice and safe, but a more consistent diva lock on mirror seems too good to pass on. I guess I reset her anyway for Murakumo, might as well just do that after the Mirror. Similar thing with Sanae, and everything else should also help with minimal or no time difference, too.

-9F Tenshi
Was the damage difference with Iku's attack that significant? Because swapping that many equips and skills around will definitely be a bit time consuming, gotta time it out to know if it's worth it for the faster fight. Or if it's more consistent that could work too, though I imagine it'd be just as consistent unless Nitori is taking way less damage thanks to extra SPI affinity. :thinkingemoji:

-Hina
Interesting, I never would have thought of making Komachi the support damage for PSN. I do wonder if it's worth routing in an extra Tomes of Reincarnation to pump her ATK to further speed this fight up. I'll definitely play around with this to see how much faster it is.

All I need now is time to sit down and play the game, thanks again for all your suggestions!

Re: Labyrinth of Touhou 19F
« Reply #261 on: December 27, 2021, 10:48:04 PM »
Hello, completely new user here

So, i played LoT2 a while ago (like half a year maybe) and wanted to try my hand at editing some of the characters stats to suit my playstyle better (and so i can use my favorite characters more instead of better ones...).

Can someone give me a hand at where to start, especially how i can find whatever i'm looking for in the hex and make the changes stay, because when i tried that myself, i could edit say keines fire affinity for example, but the value got overwritten immediately again.

deice

  • minus mentality
    • 
Re: Labyrinth of Touhou 19F
« Reply #262 on: December 28, 2021, 04:56:04 PM »
Can someone give me a hand at where to start, especially how i can find whatever i'm looking for in the hex and make the changes stay, because when i tried that myself, i could edit say keines fire affinity for example, but the value got overwritten immediately again.

the file structure for the different save files can be found here, with noted differences between the dlsite and steam versions: https://pastebin.com/Mpx7wdSg (this was posted earlier in the thread)

however do keep in mind that the game does perform certain checks to prevent cheating (for example, you cannot have more than 200 copies of some items at one time), so it might not be possible to go over values that the game has set as obtainable on a legit run.

Re: Labyrinth of Touhou 19F
« Reply #263 on: December 28, 2021, 05:40:41 PM »
Thanks for the help, but unfortunately that list isn't quite what i am looking for.

What i want to do is edit a characters base stats and skills, say for example raise marisas hp growth value from base 9 to base 10 or lower master sparks damage by 10% mag, basically "balancing" the game to suit whatever i deem appropriate. In the link you posted i cannot find where these values are stored.

deice

  • minus mentality
    • 
Re: Labyrinth of Touhou 19F
« Reply #264 on: December 28, 2021, 05:46:39 PM »
What i want to do is edit a characters base stats and skills, say for example raise marisas hp growth value from base 9 to base 10 or lower master sparks damage by 10% mag, basically "balancing" the game to suit whatever i deem appropriate. In the link you posted i cannot find where these values are stored.

to the best of my knowledge, these things are hardcoded into the exe file (though people who've done more datamining than me might be able to correct me there), which would make them extraordinarily difficult to pinpoint.

Re: Labyrinth of Touhou 19F
« Reply #265 on: December 30, 2021, 02:18:59 PM »
That information is indeed all in the exe. Most of the stuff isn't too difficult to change, but it will be hard to work with without some knowledge of programming (especially x86 assembly), and the right tools. I used OllyDbg, but it's old and there might be newer tools by now. Ghidra seems like it may be a good choice.

Just changing numbers around is fairly easy, but some specific things might be difficult. e.g. it's easy to change the MP cost of almost every spell except master spark, which is specially programmed to use all MP. Doing fancy stuff like adding in brand new spell cards or skills is going to be practically impossible. Giving characters new (existing) skills is possible, but there's a hard limit of 10 skills per character. Just keep in mind that some things you might want to do might not work out well.

Thurler

  • Go slow to go fast
    • Twitch
    • Twitter
    • Github
  • Gender: Male
Re: Labyrinth of Touhou 19F
« Reply #266 on: February 08, 2022, 01:19:40 AM »
Wow, haven't posted here since last year... Is it still funny to make this joke when it's February already?

Anyway, I posted about this on the Discord server the other day and finally managed to get some time to post about it here: I dug around the exe and found the "encounter tables" for each floor, along with information regarding how many enemies show up on each floor. A link to the pastebin with all the dumped data: https://pastebin.com/1Y9HdugB

The way the system works is that each floor assigns weights to each enemy that can spawn there, and when a battle spawns, enemies are randomly picked based on their weights. The higher the weight, the higher the odds of it getting picked. The game also defines specific regions in the map where specific enemies are given bonus weights, making it a spot where those rare enemies become more common - some can only be found inside those regions, like Alluvial Kedama in 10F.

Since reading the raw X and Y coordinates doesn't really help without Cheat Engine, the pastebin also provides a link to a zip file that contains maps that highlight each special region defined in the code (I did skip the obvious ones, like 20F west/east/depths sections). It's kinda funny how there's a lot of effort put into balancing each enemy's placing in specific regions of each floor up until 6F, and then from 7F onwards it's pretty much all global spawns with the occasional rare encounter.

Hopefully this helps someone that's having trouble finding specific rare enemies to fill in their bestiary, since there are only a few enemies that have no good spawn spots, off the top of my head I can only remember the Golden One enemy in B10F. This can also help with grinding, since rare enemies often yield much more EXP and Money than usual. I know I'll implement some of this knowledge in the speedrun, at least :p

Lastly, I also found the code that drops Byakuren's Scroll #4. It's a flat 3% drop rate per battle (as opposed to per enemy) whenever you're in 14F and don't already have a Scroll #4 in your inventory. So any rumor about Nazrin needing extra BP or her being in the party making it more likely to drop all stem from coincidences! Incidentally, the code checks if your current floor is 14, which means that this can drop in Infinity Corridor's 14F as well, though this is only possible in a NG+ save. It actually did happen with someone when playing, which is pretty crazy to think about considering how fast IC goes by.

Re: Labyrinth of Touhou 19F
« Reply #267 on: February 12, 2022, 11:06:10 AM »
Hi. Thank you very much, everyone involved, for the english patch. I saw at least qazmlpok is. Thank you very much.

Oh and thanks for the interesting work on rare encounters, Thurler. I might have a lot more fun with those when I play the game, thanks to you. I downloaded your picture archive.

I've still never played this game, but I still hope to eventually. I've never managed to get the text to stop cutting off, as far as I know, whether I've used meiryo, or two other fonts, I think. Changing the locale to Japanese seems to reduce the problem, but not solve it. I use wine so far, maybe I'll manage to install windows one day, but winetricks installing Japanese fonts should make this a snap right? Come to think of it, I guess this problem is the ancient reason I still haven't played this game.

I'm a big fan of Labyrinth of Touhou 1, so if all else fails, I'll just replay that. I might even use stock character art and force everyone to know that I enjoyed it.
It even got some cool mods:
http://www.shrinemaiden.org/forum/index.php/topic,17317.0.html Labyrinth of Touhou - Rebirth
https://www.shrinemaiden.org/forum/index.php?topic=21102.0 Labyrinth of Touhou: SPECIAL DELUXE
As a big Sanae fan though, I'm very disappointed that the first person removed her, but I respect their decision because I would remove characters I didn't like if I made a mod.
**Someone really needs to reupload the Labyrinth of Touhou Toolkit from the first one.**

Is there a more complete list of LoT1 and 2 mods anywhere?

I was bothered to read that (based on a poor machine translation that may be wrong) you can now in 1.107 read the elemental matchup of your attack with each opponent, I worry that would dumb the game down more, I would just check the bestiary when something stops me enough though, I guess it doesn't matter.
It looks like they changed the event icon too, but I'm not sure what that did or didn't do.
Release notes: https://n-e-studio.com/THL2P/download.html
Translator I used: https://www.deepl.com/translator
« Last Edit: February 12, 2022, 11:13:59 AM by Tori »

Re: Labyrinth of Touhou 19F
« Reply #268 on: February 12, 2022, 01:42:01 PM »
The Steam version of Labyrinth of Touhou 2 works wonders with Wine/Proton, so if you don't want text overflowing, you may play that, since they implemented the English fan translation as an official one :)

Re: Labyrinth of Touhou 19F
« Reply #269 on: February 13, 2022, 10:11:21 AM »
The Steam version of Labyrinth of Touhou 2 works wonders with Wine/Proton, so if you don't want text overflowing, you may play that, since they implemented the English fan translation as an official one :)
Wow, I tried it and it works. It's an almost dream-like solution I never expected, I didn't have to do anything except run Labyrinth of Touhou 2's steam version... I don't like steam versions of games... I would have never even thought this would solve my problem.

Thank you very much!
« Last Edit: February 21, 2022, 11:47:56 PM by Tori »