9/3/2023 0 Comments Talos principle c5 star 2And I don't even mean us, the writers, although we worked our asses off too, but the programming, the art, all of that, oh God. If people understood how much work goes into this, it's so frightening, it's so insane how much work goes into this. It's very challenging in other ways, but the technical aspect of it, of course, when you don't have thousands of enemies running around all the time and have to deal with guns and god knows what, it's all a bit easier," he said. However, when the multiplier is 0 mod 8, it is set to 1, which differentiates sets 0 and 4 and gives us our 5 sets.He also said the studio is looking forward to The Talos Principle 2, "because it's a lot easier to do than Sam." The modulo 8 creates 8 total spawn sets, and the modulo 4 means that sets 0/4, 1/5, 2/6, 3/7 are the same. This code just checks a couple of edge cases and only displays paint if needed. Wait(CustomEvent("PlayerMessageUnlocked")) wait for message unlocking event until paint bucket is shown events and check if paint item should be shown again since paint item was shown, there is no need to handle message unlocking show paint bucket if necessary at start nothing to do if there are no paint items in the world wait for all other scripts/items to boot Regardless, this is not an even distribution of values 0-7, and it is this behavior that causes uneven spawns. The exception is if 8 | n and the multiplier is set to 1, in which case it will be 7 mod 8. For example, if we're on A3, then we calculate n + (n%8)*3, which will be 0 or 4 mod 8. However, if there are 4 paint spawns ( #worldGlobals.paintItems), then problems will arise because 4 and 8 are not coprime. Then, we convert the random number to a paint spawn. Local randomPaintItemIndex = 1 + randomIndex % #worldGlobals.paintItems This means that the spawn set on A6 differs from A7, but not from B6. Now, the random integer from 0 to 8909478 is increased by the world name string times the multiplier. Local randomIndex = randomSeed + RandomFomStringChars(worldName, multiplier) Note that a multiplier of 1 will occur with probability 1/4. This generates a random integer from 0 to 8909478, then from it creates a multiplier from 1-7. Local worldName = string.match(worldGlobals.worldInfo:GetWorldFileName(), "(+)%.wld$") TalosProgress:SetCode("PaintItemSeed", randomSeed) RandomSeed = mthRoundF(mthRndF()*8909478) Local randomSeed = talosProgress:GetCodeValue("PaintItemSeed") Local talosProgress = nexGetTalosProgress(worldGlobals.worldInfo) If talGetUnlockedPlayerMessagesCount(worldGlobals.worldInfo) < 5 thenĮxit function if player doesn't have paint unlocked. paint buckets can onlys be unlocked if enough messages are unlocked Local function ShowPaintBucketIfNecessary() However, this calls sum = not sum = sum +, and so it in fact only uses the last character in the world name, in this case the world number. This function creates an add-in seed which is supposed to be based on the world name. Local function RandomFomStringChars(str, multiplier) If not talPlayerMessagesAvailableForCurrentWorld(worldGlobals.worldInfo) thenĮxit program if player is done with the current world. nothing to do if messages are not available for current world Here's the Lua code that determines paint spawns: The reason this works is because of how Paint RNG is seeded in Talos. Note that these sets only apply to maps with 4 potential spawn points, not to all maps!Īs a general rule, to completely identify which spawn set you have, you will need to visit one even and one odd numbered map (Star worlds are numbered 8). Here are the 5 sets of spawns that can appear. Credit to sjcTheos for his research (code finding, spreadsheet work, image to game index matching) and for discovering this trick.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |