Game Data (Temp page)

*(Not temporal anymore, probs renaming to "Hacking Guide" n completly overhauling when i understand things better)*

For the record, what you are about the read is about me, Piggie2023, randomly info dumping about specific values of the game by using mainly Cheat Engine and FModel to datamine things. The original goal was to hopefully somehow get cleaner renders in-game for the wiki, and recreations of TNaR in blender eevee 3.0.

*I'll update this page as i find more info*

## Getting started

First off, set **FModel** Archive directory in settings to TNaR's location, or even all of your TNaR games! it seems to detect them all, quick warn tho, it needs to restart itself every time you change something from the settings, fow whatever reason.
From here open the .pak that now shows up and, happy navigation! Maps can be found at TheNights>Content>FirstPersonBP>Maps. If you have a powerful enough pc you can load a somewhat decent 3D free roam of the maps that replicates UE4 viewport, no characters or half of other things like a few lights.

Now, **Cheat Engine** is not as hard to use as i remembered. Simply open the game process with the blue magnifier icon, type in a value, set value type to float, New scan, and values!! it could be any of those!! you mostly need to figure out which one is the one you searchin for, but they usually stick in groups of 3, sometimes depends. And whenever you wanna search a new value, just click New scan, the first scan.
DONT, change all of them at once tho, as **changing smth important will crash your game**

To test any of these out while having not to worry about having **animatronics** in your tail, just go to **Night 6**! It doesn't exist, so the game will enter in a freeze state where nothing but the power will ran out, but you can freeze this with Cheat Engine.
To enter it, simply download **Notepad++**, or any more powerful version of the default one that can read **[NULL] characters** within your game save, wich **arent compatible with the default windows notepad**. Simply change the single number within those nulls near the end of the file and. The game is constantly reading the save file, so if it gets corrupt, the game will drop the frames to 0 until the file is either changed or deleted.

* The **positions and rotation destinations for the cameras** can be found in the Restaurant.json file and are organized in this order: Stage, Dinnig Area, Arcade1, Parts N Services, East Hall, Ray's hut, Arcade2, and likely the bathroom(still confirmin), all under the group "InterpTrackMove\_8".
	+ All of these have 6 same-ish values repeated in a long list, with the first 3 values begin the positions, and the other 3 begin the rotation animations. So like, while the positions are the usually the same irrc, the rotations vary, but iii dont understand them yet, specially for blender porting. (Ex. for the Stage: First rotat is 15, then 15, then suddenly 165, while Blender has 115 to 125)
		- Right now, i figured that some if not all cameras sometimes will have 8 of these, 5 of these actually changing at random close values, then freezing at a certain camera angle, also randomly, need to see why.

* Theres 3 values for the **main power** of the building, 2 of these seemingly meaning nothing and changing to the actual main power indicator. This value is also the easiest to find, as the entire value is literally in the 2nd monitor lOl. THe address always seems to end with 24.

* The game has set **positions, rotations** and even **scales** for each **character positions**, found again in the .json, and you can pretty much play around with these to move the characters around.
	+ Changing the rotations don't do anything even if they do get updated, and from what im noticing, the X location in most cases is somehow locked.
	+ Finding the scales is most of the time near impossible withouth changing too many values, often leading to crashes.

* When The Thing's ai or curtains tick are not coded, if the player presses "space" sometimes one of the curtains will "update", changing its current scale or location. *Still need to find the value for these to deactivate the thing, same for AIs.*

* If the player sends a animatronic model far away from the map, the model will seemingly "delete" itself, with the next time they move the game will summon a new replacement.
	+ This is not the case with Ray, as the game will generate a new one after clicking his camera.

* IIRC, Rachel, Doug, Pete and Bane have confirmed AIs, but it is not clear how they work. It has been confirmed that everyone has a random chance of moving right to your doorway, usually when they can move and you are either looking behind or while begin in the Backroom. It is not clear why this stops Rachel from using this mechanic past night 2.
	+ The AI could work as individual specific timers for a each character and night.
	+ They could somehow work in the way FNaF does, which is bascically a 1 in 20 chance to move every 5 secs roughly.