The prior step leaves the set at two 5G pieces and thirty 1G pieces Of four 5G pieces, two become ten 1G pieces The prior two steps leave the set at four 5G pieces and twenty 1G pieces, but the division repeats since GDC is 2 Of now eight 5G pieces, four become twenty 1G pieces Of one 25G piece, one becomes five 5G pieces, added to the three 5G pieces Moss Knights, which drop 40 Geo in total.Ĥ0 Geo becomes one 25G piece and three 5G pieces So, let's walk through a more interesting example. (Note: While I had a hard time explaining it readably in this format, this is very easy to code in a simple for loop and contained in a function that can be called with only two inherently available integer parameters any time any random enemy drops Geo, which is much more in line with my experience programming than hard-coding to every Enemy's class or struct their exact Geo drop distribution) Of the above examples, Husk Dandies have a GDC of 0, Husk Sentries have a GDC of 1, and Aspid Mothers have a GDC of 2 however, these Enemies drop low quantities of Geo that can easily be explained as being hard-coded. If GDC is 2, Steps 2 and 3 are repeated on the new set, producing a further divided combination of Geo pieces Half the number of 5G pieces, rounded up, (potentially including the 5G pieces produced by dividing the 25G pieces if there were any) are broken into five 1G pieces each if GDC is 1, this is where the process stops Half the number of 25G pieces, rounded up, are broken into five 5G pieces each (For example, 10 Geo becomes two 5G pieces) if GDC is 0, this is where the process stops The minimum number of Geo pieces to produce the TGD is calculated. When an Enemy dies, the Geo dropped is calculated as follows: Each Enemy is assigned an integer value that is their total Geo drop and an integer between 0 and 2 (while there is no reason it cannot be higher, I was unable to find an Enemy that indicated a value above 2) that is their Geo Division Counter. (Note: I refer to Enemies, however I believe that fixed-location, one-time sources of Geo like Bosses, Mini-Bosses, and Chests are hard-coded I can and will defend this assumption as reasonable) So, how is the division of each Enemy's total Geo drop calculated? Is it simply hard-coded to each Enemy? While that is not impossible, my experience in programming would lead me to believe otherwise, especially given that I have found a relatively simple algorithm that I am nearly certain accurately produces every Enemy's Geo drop distribution. Let's review the math, though.Įxample: Aspid Mothers drop ten 1G pieces, which becomes twelve 1G pieces for a total of 12 Geo Husk Sentries drop one 5G piece, which becomes two 5G pieces (1 × 1.2 = 1.2, ceil(1.2) = 2) and five 1G pieces, which become six 1G pieces for a total of 16 Geo.Īnother useful example here is that Husk Dandies drop 9 Geo, but drop it in the form of one 5G piece and four 1G pieces, so with Greed they drop 15 Geo, more than Aspid Mothers with Greed, despite their base drop being lower. This typically means that Enemies dropping smaller numbers of higher-value Geo pieces get a bigger boost to their total Geo drop. For the uninitiated, the Greed Charm increases Enemy Geo drops in a very particular way, that is, it multiplies the number of each type of Geo piece being dropped by 1.2, then rounds up. Why is this important? Because of the way Fragile/Unbreakable Greed works. However, two Enemies with the same total drop value may not drop the same combination of Geo pieces.Įxample: Aspid Mothers and Husk Sentries both drop 10 Geo Aspid Mothers drop ten 1G pieces, while Husk Sentries drop one 5G piece and five 1G pieces. Enemies each have a fixed value of Geo drop that is not necessarily divisible by 5 or 25, so they must usually drop a mix of Geo pieces all lower in value than the total amount they are dropping. Geo drops in items worth 1 Geo, 5 Geo, or 25 Geo. Your first question is probably how this is even a puzzle to solve. I believe I have reverse engineered how Enemy Geo drops are calculated in Hollow Knight, without any knowledge of the game's code itself (though I have a strong, if amateur, programming background). This is a post I've been meaning to make for a while, since I find it fascinating, though if the premise and length disinterest or intimidate you, you're free to leave.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |