Author Topic: TPDP Randomizer  (Read 1948 times)

Offline PhantomPilot

  • A Member group
  • Posts: 32
    • View Profile
TPDP Randomizer
« on: October 16, 2016, 06:54:09 PM »

a thing has been made, you can download it here:
https://github.com/php42/tpdp-randomizer/releases/latest

current version: 1.0.10

both the base game and YnK/SoD are supported
it works pretty much the same way as regular pokemon randomizers, which means you'll want to backup your game folder since it will modify the game files
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:
  • Adding puppets to certain trainer battles will cause the added puppets to be invisible (so far i've only noticed this with the marisa fight in the prologue of base TPDP)

Changelog
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
« Last Edit: May 27, 2017, 05:03:52 AM by PhantomPilot »

Offline DerxwnaKapsyla

  • Administrator
  • A Member group
  • *****
  • Posts: 157
  • What is development and how do I game
    • View Profile
Re: TPDP Randomizer
« Reply #1 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
I do the 2humons in RMXP

Offline PhantomPilot

  • A Member group
  • Posts: 32
    • View Profile
Re: TPDP Randomizer
« Reply #2 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

Offline jhun

  • A Member group
  • Posts: 8
    • View Profile
Re: TPDP Randomizer
« Reply #3 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.

Offline PhantomPilot

  • A Member group
  • Posts: 32
    • View Profile
Re: TPDP Randomizer
« Reply #4 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).

Offline KuroShinki

  • A Member group
  • Posts: 69
  • Shinki wants to pat your head :3
    • View Profile
Re: TPDP Randomizer
« Reply #5 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.

My favorite videogame is Final Fantasy X (not the remastered garbage).
My favourite anime/manga is Gintama.
My favourite band is Foreground Eclipse
Skype: cloudstrife.91
Youtube: https://www.youtube.com/channel/UCLMpzqHXnvwXvVDUBB7EPyQ
Overwatch (PC): KuroShinki

Offline PhantomPilot

  • A Member group
  • Posts: 32
    • View Profile
Re: TPDP Randomizer
« Reply #6 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 :)
« Last Edit: November 19, 2016, 03:17:56 AM by PhantomPilot »

Offline Pincher

  • A Member group
  • Posts: 12
    • View Profile
Re: TPDP Randomizer
« Reply #7 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.
(╯°□°)╯︵ ┻━┻

Offline PhantomPilot

  • A Member group
  • Posts: 32
    • View Profile
Re: TPDP Randomizer
« Reply #8 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.

Offline Pincher

  • A Member group
  • Posts: 12
    • View Profile
Re: TPDP Randomizer
« Reply #9 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.
« Last Edit: December 09, 2016, 12:15:18 PM by Pincher »
(╯°□°)╯︵ ┻━┻

Offline PhantomPilot

  • A Member group
  • Posts: 32
    • View Profile
Re: TPDP Randomizer
« Reply #10 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

Offline ZSeraph

  • A Member group
  • Posts: 4
  • Seiga? More like SEGA, amirite?
    • View Profile
Re: TPDP Randomizer
« Reply #11 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!
If I'm not playing Touhou, I'm playing Final Fantasy 14. If I'm not playing either, I'm dead inside.
DeviantArt: http://gamefreakgal55.deviantart.com/

Offline Pincher

  • A Member group
  • Posts: 12
    • View Profile
Re: TPDP Randomizer
« Reply #12 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.


(╯°□°)╯︵ ┻━┻

Offline PhantomPilot

  • A Member group
  • Posts: 32
    • View Profile
Re: TPDP Randomizer
« Reply #13 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

Offline PhantomPilot

  • A Member group
  • Posts: 32
    • View Profile
Re: TPDP Randomizer
« Reply #14 on: May 13, 2017, 02:58:09 AM »
small update

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

just more stuff that should have been in earlier versions

cheers