Touhou Puppet Play Forums

Touhou Puppet Dance Performance => Touhou Puppet Dance Performance => Topic started by: PhantomPilot on October 16, 2016, 06:54:09 PM

Title: TPDP Randomizer
Post by: PhantomPilot on October 16, 2016, 06:54:09 PM
(https://puu.sh/CU9OJ/56cfd9fe04.png)
a thing has been made, you can download it here:
https://github.com/php42/tpdp-randomizer/releases/latest (https://github.com/php42/tpdp-randomizer/releases/latest)

current version: 1.1.1

both the base game and YnK/SoD are supported
it works more or less the same way as regular pokemon randomizers, except it directly modifies the game files so you'll want to backup your game folder as this is irreversible
i might add a finer degree of control eventually, but for now the randomization aims for a sort of hybrid between "shuffle" and "totally random"
in-depth details for anyone interested:
Spoiler
basically, a "deck" is constructed from all the attributes of existing puppets. then, for each puppet, the deck is shuffled and the puppet is assigned the first N attributes from the top of the deck
typings are totally random (though puppets have a fixed 75% chance to get a second type)
the total number of skills a puppet gets is preserved, as well as the levels at which they learn them (though the number of skill-cards they can learn may change)
similarly, the number and level of trainer puppets will be preserved (unless explicitly changed in the options). all other attributes are totally random (though they will only have skills they can actually learn)
to maintain some semblance of sanity, type-effectiveness is weighted towards neutral, so you don't get puppets that are immune to literally everything
skills are randomized in a similar fashion to puppets

netplay will work with a randomized game, but it takes some setup:
you and your opponent will both need to start with a fresh (or at least unrandomized) install of the game
using the same seed and same settings, randomize both games
if you are using a post-game save from a previous playthrough, you will need to unlearn any now-invalid skills your puppets have (they will be marked with an exclamation point next to the skill name when inspecting the puppet)
i have not tried this with match codes, do so at your own risk

have fun :)

Known issues:

ChangeLog
v1.1.1
  • Fix bug with encounter rate randomization
  • Randomization code is now automatically saved as "randomizer_code.txt" in the game folder

v1.1.0
  • Fix graphical bug with boss puppets
  • Fix bug with type effectiveness randomization
  • Add option to export type chart
  • Add randomization for trainer puppet costume
  • Add randomization for trainer puppet mark
  • Adjustments to type effectiveness randomization
  • Do not generate normal trainer puppets above level 30
  • Fix excessively high chance for skillcards when using "prefer STAB moves" option

v1.1.0 BETA 3
  • Add option to export type chart
  • Adjustments to type effectiveness randomization
  • Attempt to fix bug with type effectiveness randomization

v1.1.0 BETA 2
  • Fix visual bug affecting base TPDP
  • Add randomization for trainer puppet costume
  • Add randomization for trainer puppet mark

v1.1.0 BETA
  • Do not generate normal trainer puppets above level 30
  • Fix excessively high chance for skillcards when using "prefer STAB moves" option
  • Redesigned UI implementation
  • Mass refactoring under the hood, don't be surprised if something broke

v1.0.12
  • Add option to not randomize sign skillcards when using skillcard randomization
  • Encounter rate randomization has been merged into wild puppet randomization (click twice to disable)
  • Wild puppet randomization now has only 2 modes: partial and full. Partial will not randomize encounter rates or number of puppets in an area. Style only randomization has been removed.
  • Levels are now displayed in the output of "export catch locations" option
  • Puppet costs are now displayed in the output of "dump puppet stats" option

v1.0.12 BETA
  • Add encounter rate randomization
  • Add puppet cost randomization (click twice to set all to 120 cost)
  • Merged wild puppet style randomization with wild puppet randomization (click twice to enable style only)
  • Add more detailed statistics to catch location output

v1.0.11
  • Add "Proportional stats" option
  • Add "Strict trainers" option
  • Add option to adjust trainer puppet skillcard chance
  • Add option to adjust trainer puppet held item chance

v1.0.10
  • Revert trainer nerf

v1.0.9
  • Fix trainer puppets allowed multiple sign skills
  • Fix trainer puppets allowed skills for which they do not meet level requirement
  • Attempt to fix evolved puppets generated under level 30

v1.0.8
  • Add "share code" function to allow quick copy/paste of randomization settings and seed
  • More options for starting moves

v1.0.7
  • Fix trainer puppets allowed EVs greater than 64
  • Fix puppet skillset randomization not properly sanitized of duplicates

v1.0.6
  • fix normal puppet levelup skills not being affected by "Prefer same type" option
  • add option to revert back to the old skillset randomization method
  • by default all puppets are now guaranteed a damaging same-type starting move (provided there is one in the pool)

v1.0.5
  • adjustments to stat and skill distribution
  • normal puppets will now generally receive less powerful skills and stats
  • trainer puppets now have a chance to have a random held item
  • all puppets are now guaranteed to be found in the wild
  • add option to dump puppet stats to file
  • add option to prefer same-type skills
  • add option to remove "Frail Health" from the ability pool
  • add option to use completely random stats
  • add option to make skill cards teach random skills

v1.0.4
  • Add option to use a "quota" when randomizing puppet base stats

v1.0.3
  • Add option to export wild puppet locations

v1.0.2
  • Form change abilities (were-hakutaku, mode shift, three bodies) will only be given to the puppets for which they were intended (for technical reasons)

v1.0.1
  • Add wild puppet randomization
  • Evolved (non-normal) puppets will no longer be generated under level 30
  • Level adjustment now affects wild puppets as well as trainer puppets
Title: Re: TPDP Randomizer
Post by: DerxwnaKapsyla on October 18, 2016, 01:03:58 AM
I'm not sure if this'll help, but a breakdown of how the individual map files work (which contain the wild puppets) can be found here
http://thpp.supersanctuary.net/forum/index.php?topic=493.msg3141#msg3141
Title: Re: TPDP Randomizer
Post by: PhantomPilot on October 27, 2016, 03:55:45 AM
I'm not sure if this'll help, but a breakdown of how the individual map files work (which contain the wild puppets) can be found here
http://thpp.supersanctuary.net/forum/index.php?topic=493.msg3141#msg3141

Sorry for the super late reply. That's exactly what i was looking for, thanks.

I've updated the program to include wild puppet randomization
Title: Re: TPDP Randomizer
Post by: jhun on October 27, 2016, 01:04:39 PM
Though whenever there is an original Keine Were-Hakutaku, my Chen Were-Hakutaku becomes an Keine when her life is halfed. But I hope that the issue will be resolved. I'd like the puppets to become not invisible. And also the fact that some puppets possess "Three Bodies" with just Void Types is kinda hilarious. But I appreciate the Randomizer. It makes me manipulate and change the way I play the game. Thanks for it.
Title: Re: TPDP Randomizer
Post by: PhantomPilot on October 28, 2016, 05:21:49 AM
Though whenever there is an original Keine Were-Hakutaku, my Chen Were-Hakutaku becomes an Keine when her life is halfed. But I hope that the issue will be resolved. I'd like the puppets to become not invisible. And also the fact that some puppets possess "Three Bodies" with just Void Types is kinda hilarious. But I appreciate the Randomizer. It makes me manipulate and change the way I play the game. Thanks for it.

this sort of thing is a result of the game's own behavior. the only fix i can make is to hard-code an exception so that e.g. only keine can be given were-hakutaku
I honestly don't know why I didn't just do that in the first place, but I've done it now (for all the form change abilities).
Title: Re: TPDP Randomizer
Post by: KuroShinki on November 08, 2016, 02:02:17 PM
YESSS!!!! Thanks a bunch!

A question tough: since the game doesn't have a Pokèdex for check the locations, does the randomizer create a file with the new listed locations?

Going technical: how does it work? The Pokèmon randomizer create a new ROM, so I was curious.
Title: Re: TPDP Randomizer
Post by: PhantomPilot on November 09, 2016, 09:11:40 AM
YESSS!!!! Thanks a bunch!

A question tough: since the game doesn't have a Pokèdex for check the locations, does the randomizer create a file with the new listed locations?

Going technical: how does it work? The Pokèmon randomizer create a new ROM, so I was curious.

it doesn't list the new locations anywhere, though i suppose i could add that.

it does basically create a new ROM, i just chose to overwrite the original for simplicity.
also that's just the behavior that felt most intuitive to me.

full nerd explanation:
the .arc files in the data folder contain the files which define all the puppets/skills/maps and such
they work sort of similar to regular .zip archives, they contain an entire filesystem with folders and files listed by name all packed in together, optionally using compression (a homebrew sort of run-length encoding)
so the randomizer just searches through the archives for the relevant files, extracts them, modifies them, and packs them back into the archive.
not sure if that's what you meant by technical, but there you go :P

EDIT:
added an option to export the locations of wild puppets
if you run the program with only the "export catch locations" option checked, it'll write the locations where each puppet can be caught to "catch_locations.txt" in the game folder without doing anything else
hope that helps :)
Title: Re: TPDP Randomizer
Post by: Pincher on December 08, 2016, 11:31:52 AM
I have one little suggestion if its not too hard to add...
There should be another check box under the "base stats" check box that sets every puppet's base stats to 500 and randomly allocates those 500 stats.

I think it would make things alot more interesting since everything has the same base with random allocations. And every puppet has multiple versions so one is bound to be good lol.
Title: Re: TPDP Randomizer
Post by: PhantomPilot on December 09, 2016, 04:24:17 AM
I have one little suggestion if its not too hard to add...
There should be another check box under the "base stats" check box that sets every puppet's base stats to 500 and randomly allocates those 500 stats.

I think it would make things alot more interesting since everything has the same base with random allocations. And every puppet has multiple versions so one is bound to be good lol.

that's an interesting idea.
I went ahead and added a "use stat quota" option which allows an adjustable "quota" instead of a fixed 500 stat points.
the total sum of each puppets stats will equal the quota, but the quota is distributed in random quantities for each stat.

it might be worth noting that the average sum of stats is 332 in base TPDP, and 454 in YnK/SoD, for reference.
Title: Re: TPDP Randomizer
Post by: Pincher on December 09, 2016, 09:09:53 AM
Haha wasn't expecting an update that fast!
I'll add a few more suggestions then if you don't mind the feedback. :)

1. An xp rate modifier. from 1% xp required (instant levels basically) to like 400 or 500% increased xp required. Reason this would be helpful is when you give all trainers 6 puppets, you kinda level too quickly for the game and end up just beating everything up. (an XP share rate modifier would  kinda work too if that's easier)

2. Another check box to remove the "Frail Health" ability from the randomizer. It's no fun to come across good ol' wonder guard on a type combination that has 2 or less weaknesses haha.

3. Yet another check box to make it more likely for puppets of the same type learn moves of that type. For example, a fire type puppet would have a 75% chance to learn a fire tm and a 30% to learn tms of other typing. same goes for level up moves, Something like 60% of level up moves are one of the puppet's main types.

4. Make sure each puppet is even catch-able in the wild after you check off the wild puppets box. I did a few random seeds to test a few things and 2/3 of the times i did it Meiling wasn't in any grass to be caught. (at least according to the catch location thing it spits out.)

5. Heres a fun one... check box for tms being completely random moves.

6. Oh also, An option for it to spit out the base stats and move pools of the puppets. A file like the catch location one it produces.   

Just a few things i thought of to makes things more enjoyable for certain randomizer playthroughs. Hope this gave you some good ideas too; I have quite a bit of fun with randomizers and would love to see some if not all of these added if its not to annoying to add any of them.

it might be worth noting that the average sum of stats is 332 in base TPDP, and 454 in YnK/SoD, for reference.

That also includes that stat totals of the Normal versions of the puppets too. So the average is very skewed being that low overall.
Title: Re: TPDP Randomizer
Post by: PhantomPilot on December 15, 2016, 05:04:47 AM
1. An xp rate modifier. from 1% xp required (instant levels basically) to like 400 or 500% increased xp required. Reason this would be helpful is when you give all trainers 6 puppets, you kinda level too quickly for the game and end up just beating everything up. (an XP share rate modifier would  kinda work too if that's easier)
unfortunately this one is impossible
the exp formulas (exp curve, exp yield for defeating enemies, exp share) are all hard-coded into the game itself (as far as i know). you can change a puppets cost but that amounts to at most a 60% difference in total exp (30% in YnK).
this is why i added the option to adjust enemy levels. doesn't stop you hitting level cap, but at least your opponents can be level capped as well.

I've added the rest of them though.
I've also overhauled the randomization mechanics in a way that i hope will provide a better experience
stat and skill distribution in particular should be much better
in general, most of the "blind" randomization has been removed and weighted toward something more sensible

That also includes that stat totals of the Normal versions of the puppets too. So the average is very skewed being that low overall.
true, i think i also just goofed my math. the perils of sleep deprivation :P
Title: Re: TPDP Randomizer
Post by: ZSeraph on December 21, 2016, 01:49:38 AM
Sorry if this is an inconvenience, but I have two questions/requests for the randomizer.
First off, I've been playing it and I really love it so far, I'm having a lot of fun with it. Thank you for making it, it adds a lot of replay value to the game for me.

1) Is it possible to randomize the starter as well? I don't know much about programming, but I don't know if they programmed it in such a way that you can't randomize it since there's a whole sequence involving it rather than in Pokemon where you pick it and go on your way.

and 2) Is it possible to also randomize the starting moves (Yin/Yang Energy, for example)?. I do realize with that it runs the risk that a puppet wont have any attacking moves. A Pokemon randomizer I played had every Pokemon start with 4 random moves to increase the chance of an offensive move (though I have gotten 4 status moves before, haha)

Both of these things aren't anything that have bothered me nor have they taken anything away from the game. Just somethings I've been curious about.
Thanks again!
Title: Re: TPDP Randomizer
Post by: Pincher on December 21, 2016, 10:33:16 AM
1) Is it possible to randomize the starter as well? I don't know much about programming, but I don't know if they programmed it in such a way that you can't randomize it since there's a whole sequence involving it rather than in Pokemon where you pick it and go on your way
You get an random puppet when you talk to Zun and hit "b". He then proceeds to say, "oh, you don't have a favorite... but "random character" sure is cute right?"
done, there's your random starter.

2) Is it possible to also randomize the starting moves (Yin/Yang Energy, for example)?. I do realize with that it runs the risk that a puppet wont have any attacking moves. A Pokemon randomizer I played had every Pokemon start with 4 random moves to increase the chance of an offensive move (though I have gotten 4 status moves before, haha)
In an older version of his randomizer it worked that way. I think its better that you just start with yin/yang energy so it makes the beginning less of a struggle battle to catch something that does have an attacking move. Unless its easy to guarantee a damaging move of the same typing as the puppet.... that would be a very positive change.

That aside, Thanks for implementing my suggestions. Not being able to change xp gain kinda sucks but that's not a huge issue.


Title: Re: TPDP Randomizer
Post by: PhantomPilot on December 23, 2016, 09:04:15 AM
Pincher summed it up nicely.
i changed it to randomize only within the same "move pools" to preserve some sense of progression and reduce the struggle of catching your first few puppets.
you're guaranteed to get at least one random damaging move from the pool of starting moves. incidentally only yin/yang energy meet this criterion.
that said, it's pretty trivial to guarantee a same-type move if you expand the starting moves to include the rest of the normal puppet move pool (provided a damaging move with such typing exists in the pool)
that does make the early game more interesting so i went ahead and did it.

I've also fixed an oversight which caused normal puppets to be partially unaffected by the "prefer same-type skills" option and added an option to revert back to the old skillset randomization method
Title: Re: TPDP Randomizer
Post by: PhantomPilot on May 13, 2017, 02:58:09 AM
small update


just more stuff that should have been in earlier versions

cheers
Title: Re: TPDP Randomizer
Post by: Spar on May 20, 2017, 05:30:55 AM
So I've been playing around with this and I've noticed something that initially didn't bother me, but started to get tiresome by the time I got past the SDM: Trainer puppets and Sign skills. Specifically most trainer puppets have at least two Sign skills, some have three or even a full load of four Sign skills. I don't mind getting caught off guard by an unexpected skill only available via skill cards, but when a trainer puppet can have multiple Sign skills, while we are limited to one per puppet it rubs me the wrong way. For example I don't expect to be fighting level 29 Power Rumia (what's with the level 29 Style Change too?) with the skill list: Water Sign, Illusion Sign, Wind Sign and Tumble Plant. Is there a way to take the Sign skills out of rotation for random trainer puppets?
Title: Re: TPDP Randomizer
Post by: PhantomPilot on May 22, 2017, 05:40:02 AM
fixed.

trainer puppets can now have only one sign skill
i've also drastically reduced the chance of getting skill card moves in general (15% chance)
most puppets have more skill cards they can learn than level up moves, but they were all tossed into the same pool for randomization purposes so the chance of getting skill card moves was insanely high
this didn't really bother me but i can see why it would bother sane people

i'm not really sure where to strike the balance there, but at least 15% should prevent them from being loaded up with skill cards all the time

i've also enforced level requirements on levelup moves so trainer puppets should no longer get moves they are too low level for

level 29 style change shouldn't be a thing? at least not for trainer puppets
the randomizer explicitly sets trainer puppets to normal if they're under level 30, so i have no idea what could cause that
only thing i can think of is that there's some extra exp calculation nonsense with trainer puppets i'm not aware of, wouldn't put it past this game
if anyone has any insight, let me know

i've increased the minimum level for style change to 32 so hopefully that won't happen anymore

appreciate the feedback though, i've become desensitized to the madness after all the testing early on :P
Title: Re: TPDP Randomizer
Post by: Spar on May 24, 2017, 04:08:16 AM
I don't mind most skill card moves, as most of the moves are linked to their types, it's really just the Signs, since every puppet can learn them, thus cover some of their weaknesses.

As for the level 29 style changes, I'm not really sure either. I've only encountered a couple. Almost all of the level 29 puppets have been Normal, but I've encountered a Wakasagihime, a Rumia, and a Kyouko that are all style changed level 29s... Maybe it has to do with exp adjustments for puppets of lower cost? I don't know how the game calculates that stuff, though. Either that or the imported save file (I played normal until I beat Marisa, then randomized, because I don't like fighting a full party before I can catch a puppet.) screwed something up.
Title: Re: TPDP Randomizer
Post by: PhantomPilot on May 27, 2017, 05:00:24 AM
yeah i over corrected a bit
my concern was for early game where you don't have access to decent skills of your own and trainers are just hitting you with 100 power skill cards which can make early game a struggle when all you have is yin/yang energy vs full trainer parties.
but that doesn't last very long and trying to make it conform 100% to the normal rules doesn't seem to work too well, so i'm just going to revert everything except the sign skill restriction

i was unable to reproduce the level 29 bug and the level calculations seem to be spot on, so it's probably some kind of weird edge case
i've set the style change level back to 30, a couple stray style changed level 29s isn't game breaking or anything
Title: Re: TPDP Randomizer
Post by: Spar on May 28, 2017, 04:20:10 AM
Like I said I've only gotten a couple level 29s (after playing through 10 or so times) and I didn't really care either way about them, I was just curious if you knew what was up with me coming upon them. I don't know, and you don't know, so I'll shrug and keep playing, for all I know it's something on my end. I'll track my settings and if I find another I'll let you know.

Early game's not that bad even with high power moves being thrown around, because it's high power moves from extremely low power puppets, so the additional damage isn't too noticeable. It's not until style changes show up that lots of high power moves become problematic and I haven't done anything past 256% level increase to see what early game is like with style change puppets everywhere... Though I'm now tempted to try a 777% run.
Title: Re: TPDP Randomizer
Post by: lastingman on July 07, 2017, 04:12:52 PM
Haven't gotten far into the game yet, but I noticed the trainer puppets that are invisible (when I add puppets to the trainers) are mainly from the scripted boss trainer battles. It also seems that the only ones not invisible are the same amount of puppets they were normally supposed to have (Ex: Marisa is supposed to only have one puppet, so the rest are either invisible or takes a different sprite image. Same with the PLF group in the village who are only supposed to use 2 puppets except the boss). Will go along further in game to confirm.

BTW, I'm using the translated game, just in case that is the cause of the error. The first one, not YnK.


Update 1: Already delivered the package. It seems that the invisible puppets are 75% likely to happen to scripted boss battles. Battled regular trainers and the regular Touhou character trainers not part of the story. All had full teams that are not invisible. Will go to SDM to confirm if it's true.
Title: Re: TPDP Randomizer
Post by: PhantomPilot on July 12, 2017, 01:42:13 AM
yeah this is a known problem with the base game. i should probably update the OP.
it doesn't happen in YnK, so i'm pretty confident it's not a bug on my end.
i suspect that boss battles are hard-coded to expect a certain number of puppets, and only load sprites for that many puppets (this could explain incorrect sprites as well as it may be reusing pointers/ids/etc from previous battles).
the puppets for bosses are loaded from the same files as the puppets for rando trainers, which work fine.
YnK uses the same file format and it's fine, so why it fails in the way it does is a mystery to me.
if it was scripted to only use 2 puppets, why does it load all 6? if it knows there are 6 puppets in the party, why does it load only 2 sprites?
who knows.
Title: Re: TPDP Randomizer
Post by: lastingman on July 14, 2017, 05:40:57 AM
Yeah, it's a mystery to me as well. I noticed in the first post that you only tried it until prologue, so I thought it was just a tutorial glitch. The actual characters themselves that are normal trainers have full parties with all their puppets properly sprited, only the boss battles so far have that glitch. But all-in-all, not that game breaking. The glitched puppets still behave normally (ie. Strengths and Weaknesses are the same, attacks are plausible [unless using the attack/SC randomizer]), so no biggie.

BTW, a suggestion. Maybe add an option to the randomized stats that actually gives out a proper distribution to the stats based on their original stats or maybe increase the stats off all puppets by percentage. In one of my randomized games (backed up original game), almost all of the Focus Attack puppets have a higher Spread attack that their Focus attack stat and vice-versa. And some of the puppets are "LITERAL" glass cannons, especially the farther you go (a LV 50 puppet has around 20-30-ish defense whether Focus or Spread). I even got a Sukuna with an abnormally high Focus Attack and Defense when I style changed her. Add her signature skill to that and I just broke the game. In another, almost all puppets I caught were slower than a turtle.

If that's impossible, then it's fine. Once I'm done with the base game, I'll try Ynk next (though I can't read Japanese).

Took a long time since I'm grinding and school.
Title: Re: TPDP Randomizer
Post by: PhantomPilot on September 02, 2017, 04:43:36 AM
super late, but:
BTW, a suggestion. Maybe add an option to the randomized stats that actually gives out a proper distribution to the stats based on their original stats or maybe increase the stats off all puppets by percentage.

i've added an adjustable "proportional stats" option which allows stats to be randomized to within +/- the specified percentage of the original stat. that should allow puppets to retain some semblance of their original stat distribution.

also, more stuff that should have been implemented ages ago:
Title: Re: TPDP Randomizer
Post by: Spar on September 08, 2017, 04:52:24 AM
Out of curiosity is it possible to give wild puppets held items?
Title: Re: TPDP Randomizer
Post by: lastingman on September 08, 2017, 05:32:54 AM
super late, but:
BTW, a suggestion. Maybe add an option to the randomized stats that actually gives out a proper distribution to the stats based on their original stats or maybe increase the stats off all puppets by percentage.

i've added an adjustable "proportional stats" option which allows stats to be randomized to within +/- the specified percentage of the original stat. that should allow puppets to retain some semblance of their original stat distribution.

also, more stuff that should have been implemented ages ago:
  • option to make trainer puppets conform to skill level requirements (does not affect skillcard moves)
  • option to adjust chance for trainer puppets to have skillcard moves (per move slot; leave blank for shuffle)
  • option to adjust chance for trainer puppets to have a held item


Thanks man for the update. At least I can randomize properly now. At this point, I just need to wait for the story translation (if it will actually continue) of YnK to continue so I can play smoothly for that one. Now the problem is that another 2hu game came out with new characters, so I don't know how the original creators will implement that. :wub:
Title: Re: TPDP Randomizer
Post by: PhantomPilot on September 11, 2017, 01:46:56 AM
Out of curiosity is it possible to give wild puppets held items?

nope. the actual generation of wild puppets is done according to some hard-coded logic. all that is accessible through data files is the type and average level of puppets in an area.

Now the problem is that another 2hu game came out with new characters, so I don't know how the original creators will implement that. :wub:

somehow i doubt they'll patch in new characters. lolk characters didn't get added to the base game, though that may have just been because they were planning the expansion. maybe they'll patch cirno's alt-color costume to tan cirno :P
Title: Re: TPDP Randomizer
Post by: Spar on September 13, 2017, 02:59:57 PM
Hmm... Is it possible to "unrandomize"? Like specifying which puppets appear on Route 1 or in the Human Village?
Title: Re: TPDP Randomizer
Post by: PhantomPilot on September 17, 2017, 05:36:11 AM
sure, you can assign arbitrary values to anything that the randomizer has access to.
but that's moving into the realm of rom hacking/modding. if that's what you're hinting at, then yes it's possible.
if you actually mean 'unrandomizing' as in reversing the randomization, you still need a copy of the original or at least a record of the changes. that's why it's easier to just keep a backup.
Title: Re: TPDP Randomizer
Post by: Spar on September 19, 2017, 02:04:44 AM
I meant more like having the first two areas have specific puppets, while the rest of the areas are still random.

Also, since changing stats is available, is it possible to have it change puppet cost, so that all puppets level up more or less equally? The 80 and 90 cost puppets level up too fast for having similar stats to 120 cost puppets after stat changes.
Title: Re: TPDP Randomizer
Post by: PhantomPilot on September 24, 2017, 05:31:57 PM
equalizing all the puppet costs is trivial enough, but picking puppets for specific areas basically would require a full-fledged editor.
that's what i meant by "moving into the realm of rom hacking". cramming something like that into a randomizer seems weird.
you could make a fixed on/off switch that would leave the first couple areas unrandomized (or populate them with predefined puppets), but that still seems awkward to me. i dunno.
Title: Re: TPDP Randomizer
Post by: Spar on September 28, 2017, 08:22:27 AM
Ah, I understand what you meant now. Would it be possible to randomize the appearance rates for puppets? Or the number of different species in each area? Like having one area with 10 types of puppets with roughly 10% chance for any of them, but the next area only has 3 and two of them are 5% chance to appear, while the third has a 90% chance. Or is that stuff all hard coded?
Title: Re: TPDP Randomizer
Post by: lastingman on September 29, 2017, 04:28:54 PM
Oh and another thing I wanted to mention. Is it possible to edit the max PP a puppet can use to increase stats?
Title: Re: TPDP Randomizer
Post by: PhantomPilot on October 10, 2017, 05:45:42 AM
sorry for the slow replies, just been occupied with other stuff lately.
Oh and another thing I wanted to mention. Is it possible to edit the max PP a puppet can use to increase stats?

this requires editing the save file. there is a hard-coded check to prevent you from increasing EVs above 64 each or 130 total via the in-game UI, but you can edit your save to increase EVs up to +255 each. this can also be done to trainer puppets (infact older versions of the randomizer did it by accident).
i'm not sure if there are any other hard-coded checks that prevent EV editing from actually being effectual in-game though, particularly for EVs over 64 (iirc it does check that sort of thing for netplay).
you can use dabomstews save editor (http://tpdp.dabomstew.com/saveeditor) if you just want to edit your own puppets EVs. the randomizer could be made to allow higher EVs for trainer puppets, but it can't raise the cap on player puppets.

Would it be possible to randomize the appearance rates for puppets? Or the number of different species in each area? Like having one area with 10 types of puppets with roughly 10% chance for any of them, but the next area only has 3 and two of them are 5% chance to appear, while the third has a 90% chance. Or is that stuff all hard coded?

all of that is possible, but i've not tested it much. as far as i can tell each puppet has a "weight" which determines its encounter rate relative to the other puppets. i would expect the percentage to be the weight divided by the sum of weights, and while that mostly seems to be the case so far, i can't guarantee there isn't any other weirdness.
i've made a beta build that adds randomization for both encounter rate (separate option) and number of puppets in an area (applied to the normal wild puppet randomization) and an option to either randomize puppet cost or set them all to 120 cost (in the form of a 3-state checkbox, click twice to set the latter option).
the wild puppet checkbox has also been turned into a 3-state, with the 3rd state being style only. additionally, the "catch locations" file will now display expected encounter rates.
the OP will not link to this since it's largely untested. you can get it here (https://github.com/php42/tpdp-randomizer/releases/tag/v1.0.12-beta) if you'd like to try it out.

note that a number of areas have multiple sub-areas that share the same name (e.g. youkai mountain). these are now numbered in brackets "Youkai Mountain [2]" to avoid confusion.
Title: Re: TPDP Randomizer
Post by: Spar on October 10, 2017, 12:53:53 PM
Awesome, I'll check it out when I have a day off to play around (no idea when that's going to be since 6 people quit in the last 3 days at work and the schedule now resembles a football playbook covered in X's and arrows).
Title: Re: TPDP Randomizer
Post by: lastingman on November 29, 2017, 05:23:20 PM
A little late, but thanks for the heads up. Probably will try that then. Saw that you have a beta, will try it out later.



Edit: There's something I noticed while playing the game. I used the randomized skill cards in the randomizer and played the game. Managed to get all skill cards and then the problem hit in. I believe the Sign skills are also randomized as well, but the only one sign skill restriction is still there, even if the skill is randomized. Just a guess but for some reason, when I taught a puppet a skill from the skill cards, some of the other skill cards disappeared from the selection, even if they were there before I taught them that skill. Once I overwrited that learned skill, they all came back at the selection, then disappeared again when I picked a skill from the previously deleted ones.
Title: Re: TPDP Randomizer
Post by: PhantomPilot on December 18, 2017, 07:48:12 AM
There's something I noticed while playing the game. I used the randomized skill cards in the randomizer and played the game. Managed to get all skill cards and then the problem hit in. I believe the Sign skills are also randomized as well, but the only one sign skill restriction is still there, even if the skill is randomized. Just a guess but for some reason, when I taught a puppet a skill from the skill cards, some of the other skill cards disappeared from the selection, even if they were there before I taught them that skill. Once I overwrited that learned skill, they all came back at the selection, then disappeared again when I picked a skill from the previously deleted ones.

sign skills are hard-coded by item ID in the game code, there's no way around that besides just not randomizing the sign skill cards.
skill cards are considered items by the game, they have a field which determines what skill it teaches.
since sign skills are determined by the item that teaches it, when you change the skill a sign skill card teaches, that skill becomes a sign skill.
the internals of this game are really wonky.

i'll add that to the known issues list in the OP for now, next version will probably just leave sign skills unrandomized
Title: Re: TPDP Randomizer
Post by: lastingman on December 21, 2017, 01:10:54 PM
There's something I noticed while playing the game. I used the randomized skill cards in the randomizer and played the game. Managed to get all skill cards and then the problem hit in. I believe the Sign skills are also randomized as well, but the only one sign skill restriction is still there, even if the skill is randomized. Just a guess but for some reason, when I taught a puppet a skill from the skill cards, some of the other skill cards disappeared from the selection, even if they were there before I taught them that skill. Once I overwrited that learned skill, they all came back at the selection, then disappeared again when I picked a skill from the previously deleted ones.

sign skills are hard-coded by item ID in the game code, there's no way around that besides just not randomizing the sign skill cards.
skill cards are considered items by the game, they have a field which determines what skill it teaches.
since sign skills are determined by the item that teaches it, when you change the skill a sign skill card teaches, that skill becomes a sign skill.
the internals of this game are really wonky.

i'll add that to the known issues list in the OP for now, next version will probably just leave sign skills unrandomized



It's not that big of a deal, it just means that I still have to be picky about what to teach them. It basically becomes a luck thing as well, since those sign skill may have the good moves in one randomized gameplay, then they end up being bad skills in the next, nothing really game breaking though. Just wanted to point out some things I found while doing this. And maybe add an option to leave the sign skills untouched rather than adding it directly. There may be some people who like to have this luck thing going on.
Title: Re: TPDP Randomizer
Post by: Spar on December 21, 2017, 03:25:35 PM
To be honest I sort of like the sign skill cards getting locked out after using one and wish there were some way to similarly limit the remaining skill cards, like only being allowed to use one skill card from an assortment of 15 or so cards. But I somehow doubt that causing skill cards to randomly lock out other skill cards is an easily managed feat.
Title: Re: TPDP Randomizer
Post by: lastingman on December 23, 2017, 10:23:26 AM
To be honest I sort of like the sign skill cards getting locked out after using one and wish there were some way to similarly limit the remaining skill cards, like only being allowed to use one skill card from an assortment of 15 or so cards. But I somehow doubt that causing skill cards to randomly lock out other skill cards is an easily managed feat.


It does add to that challenge factor in the game, like forcing you to choose what skill to teach that puppet carefully, but like I said before, there are some people that don't like that challenge at all. So it's probably better to make it a toggleable option rather than an outright change to the randomizer. It could also be a luck thing as well. Just pray that the sign skills have bad skills and you're good.
Title: Re: TPDP Randomizer
Post by: Spar on December 23, 2017, 01:00:16 PM
I feel that if someone doesn't like a challenge than messing around with a randomizer is probably not a very good way to kill time. After all the primary purpose of a randomizer is to extend the replayability of a game with finite length by adding more challenges.
Title: Re: TPDP Randomizer
Post by: PhantomPilot on January 05, 2018, 04:27:11 AM
late as always, but 1.0.12 proper is here.

there are now only 2 options for randomizing wild puppets:
full: everything is randomized, including number of puppets and encounter rates.
partial: only existing puppets are randomized, encounter rates are not affected.
this is to simplify the randomization logic, the spaghetti was getting out of hand and most other option combinations didn't make much sense anyway.

And maybe add an option to leave the sign skills untouched rather than adding it directly. There may be some people who like to have this luck thing going on.
Done.
Clicking the skillcard option twice will disable randomization of sign skills. note that this will not fix a game that has already been randomized.

To be honest I sort of like the sign skill cards getting locked out after using one and wish there were some way to similarly limit the remaining skill cards, like only being allowed to use one skill card from an assortment of 15 or so cards. But I somehow doubt that causing skill cards to randomly lock out other skill cards is an easily managed feat.
Unfortunately the sign skill behavior seems to be hard-coded. as far as i know there isn't even a way to identify sign skills from the game data alone. the randomizer uses a pre-built table to look them up.
however, it may be possible to just delete some skill cards from the game (i.e. so that there are only sign skill cards left, they can be randomized to whatever and will lock eachother out).
but i have no idea what unintended side-effects that could have, so i haven't tried it :P
Title: Re: TPDP Randomizer
Post by: captiankatsura on January 08, 2019, 03:07:34 PM
I wanna start by saying I appreciate all the work you've put into this. One of my biggest problems with the base game is how there are Puppets not available until literally the end, so the Randomizer is great. But I've noticed some issues when randomizing type effectiveness. In my current seed, Electric resists Electric, Poison resists Electric, Poison/Water is weak to Electric, Electric/Water is weak to Electric, and Electric is neutral against Water. The Puppets in question don't have any abilities that would mess with their effectiveness. And I've noticed inconsistencies like this on other seeds as well.
I'd also like to request a function to print out the changed type effectiveness so I don't have to spend hours experimenting to fill out the type chart.
Title: Re: TPDP Randomizer
Post by: PhantomPilot on January 11, 2019, 09:24:01 AM
In my current seed, Electric resists Electric, Poison resists Electric, Poison/Water is weak to Electric, Electric/Water is weak to Electric, and Electric is neutral against Water. The Puppets in question don't have any abilities that would mess with their effectiveness. And I've noticed inconsistencies like this on other seeds as well.
I may not be able to fix that. I can't actually control the effectiveness against type combos, the game figures that out on its own based on the constituent elements.
I've taken a shot in the dark at fixing it though. There's an additional "NULL" element that presumably does nothing but the randomizer was randomizing it anyway. Hopefully removing that behavior solves the problem.
In any case, i can't seem to reproduce this on the current build of the randomizer. You can get it here: https://github.com/php42/tpdp-randomizer/releases/tag/v1.1.0-beta3
I haven't tested exhaustively, but the seeds i tried seem to work as expected.

If you happen to have the "share code" ("randomization code" if you're using the beta) for a seed that has this problem, that would be helpful (I'll also need to know the game version and randomizer version)

I'd also like to request a function to print out the changed type effectiveness so I don't have to spend hours experimenting to fill out the type chart.
Done. See the link above.
Title: Re: TPDP Randomizer
Post by: captiankatsura on January 11, 2019, 05:02:07 PM
I did not generate a share code at the time of randomization, but this is the code I got from recreating the settings I was using: G0C:cO0ot:7BX8D:1a:7q:0:5:P
The specific puppets I found the inconsistencies with were: I was using an Iku (found on Route 3), and I tested effectiveness against Chiyuri (Human Village), Eirin (Route 3), Iku (Route 3), and Cirno (Myouren Temple). I was running Randomizer version 1.0.12, and I was playing Shard of Dreams version 1.103 with the completed English Patch.
I don't have any other specific seeds on hand where I've encountered the issues with type effectiveness, but I definitely remember seeing some inconsistencies the last time I randomized it. I'm pretty sure it was the same randomizer version, but I think it was on the base game.
Thanks for looking into it, and for adding in the option to export the type chart! I will try out this new version over the weekend and let you know if I encounter any problems again.
Title: Re: TPDP Randomizer
Post by: PhantomPilot on January 12, 2019, 04:16:36 AM
So after some more testing i'm pretty certain that randomizing the "NULL" element was the problem.
Seems like puppets with no second type actually have null as a second type. Normally null is completely neutral but it can be randomized just like the other elements.
So in your original example, most likely electric was resisted by null, neutral to electric and poison, and strong against water.

Anyway, to the point: 1.1.0 beta 3 should work correctly since it doesn't touch the null element, though it won't fix a game that's already been randomized.
If nothing else is broken, I'll probably just repackage beta 3 as 1.1.0 proper soon™.
Title: Re: TPDP Randomizer
Post by: captiankatsura on January 13, 2019, 01:08:46 AM
So after some more testing i'm pretty certain that randomizing the "NULL" element was the problem.
Seems like puppets with no second type actually have null as a second type. Normally null is completely neutral but it can be randomized just like the other elements.
So in your original example, most likely electric was resisted by null, neutral to electric and poison, and strong against water.

Anyway, to the point: 1.1.0 beta 3 should work correctly since it doesn't touch the null element, though it won't fix a game that's already been randomized.
If nothing else is broken, I'll probably just repackage beta 3 as 1.1.0 proper soon™.

That makes sense. I haven't encountered any problems in the newest beta version, so that must have been it.