zhulikkulik Posted May 18, 2024 Share Posted May 18, 2024 (edited) Now, I absolutely understand that the game is huge, there are many stages to main story quests and even more side quests and their stages, NPCs, all the voiced lines, etc. And I understand that this idea iteself is kind of ridiculous. But still... From what I understand, in original two games ( Fallout and Fallout 2 ) quests were little more than a bunch of global integers. Plus some text files with descriptions for maps, encounters and cities, text files with dialogue and description lines and so on. Some stuff was hardcoded, like you can't make more or less than 49 towns or you can't have more than xxxx scripts and yyyy maps, but as long as your first map was called "artemple.map" and you set certain globals/play certain videos and don't rename certain files and certain things inside files and stick to numeric limits - you could pretty much rewrite everything else entirely. Worldmap, its dimensions, townmaps, npcs, dialogues - whatever you want. That's basically how Sonora and Nevada work. They aren't just expansions to main game, but a complete rewrite, using the same globals through "#define GVAR_MyName (GVAR_OriginalName)" and using same names for some files to override them. So the question is - would it be at least theoretically possible to edit every single quest, scene and npc in the base game and remake the entire map without breaking the game? Or is there simply too much hardcoded/behind-the-scenes stuff going on? ( Also is it possible to change in-game date and time with something like F4SE? ) Edited May 18, 2024 by zhulikkulik Link to comment Share on other sites More sharing options...
LarannKiar Posted May 18, 2024 Share Posted May 18, 2024 Theoretically, it's possible to write a whole new story for the game and skip all the vanilla quests. It'd take years to make a detailed game map as large as the Commonwealth and many hardcoded features would become unavailable. One would need to use a very complex .dll to communicate with certain game assets too, depending on how much they'd like their overhaul to differ from the vanilla design (e.g. menus due to names of many DisplayObject, AS3 variables and functions are hardcoded, or marker nif EditorIDs). If you open the Creation Kit without any master or plugin file, the forms you see are all hardcoded in some way if I'm not mistaken. As for changing game date and time, is F4SE needed for that? I'm not sure right now but I think you can change them with the global variables GameYear, GameHour, etc. Link to comment Share on other sites More sharing options...
zhulikkulik Posted May 20, 2024 Author Share Posted May 20, 2024 On 5/19/2024 at 12:28 AM, LarannKiar said: Theoretically, it's possible to write a whole new story for the game and skip all the vanilla quests. It'd take years to make a detailed game map as large as the Commonwealth and many hardcoded features would become unavailable. One would need to use a very complex .dll to communicate with certain game assets too, depending on how much they'd like their overhaul to differ from the vanilla design (e.g. menus due to names of many DisplayObject, AS3 variables and functions are hardcoded, or marker nif EditorIDs). If you open the Creation Kit without any master or plugin file, the forms you see are all hardcoded in some way if I'm not mistaken. As for changing game date and time, is F4SE needed for that? I'm not sure right now but I think you can change them with the global variables GameYear, GameHour, etc. Idk, there's a lot of hacks related to time at least in mq101 and hc_manager. Says something about the game changing day time in the beginning and throwing timers out of sync. Not sure about date, but I saw that somewhere. Also mq101 isn't "run on start" so something must trigger it from code. Well, I completely forgot about all that flash crap. Not sure if they're hardcoded or if there's some file with strings. Buttons seem to be hardcoded. I've remapped keys but some menu prompts still tell me to use E when my interaction key is F. Like crafting table. Yet in VATS E works fine. Also, I've tried to find variables responsible for "hardcore" tweaks using cheat engine but no luck so far. They're always in different offsets. Found something that changes 0->1 upon switching hc on and off but it doesn't feel right since mod that disables hc tweaks for survival writes 0x9090 into some location to disable ammo weight, but this one offset I've found just flips 0/1 like a bool. Could it somehow be bHardcoreEnabled from hc_manager quest script? So now I wonder if 9090 is just two no-op codes and I'm looking in the wrong place. Cuz that old source code did have an array called "nops" with 0x90s in it for enabling autosave, manual save, etc. Link to comment Share on other sites More sharing options...
LarannKiar Posted May 20, 2024 Share Posted May 20, 2024 I remember there's an INI setting for the "chargen quest" or "starting quest" (Starfield has something similar but that uses a Default Object, I think..). Survival difficulty has hardcoded elements too. There's an F4SE plugin that enables the Console in Survival difficulty if I'm remembering right.. if it's open source you can take a look at that. As for the gameplay changes themselves, I don't know but likely the code just performs a difficulty check like ( if Difficulty == 4, then ApplyAmmoWeight() ) and doesn't rely on other global variables or settings. You can try locating the variables in the memory but then you'd probably need to find several of those as the functions are at different addresses. Link to comment Share on other sites More sharing options...
zhulikkulik Posted May 21, 2024 Author Share Posted May 21, 2024 (edited) So, I found some things. But either something changed in the game or I'm doing something wrong. I was referencing Unlimited Survival Mode, perhaps this is the mod you mentioned. Found seemingly correct bits in the exe and new offsets of instructions to overwrite and I thought I understand the logic correctly(check if difficulty is 6 and jump/don't jump), but it doesn't work. Doesn't crash either, which isn't bad, i guess. I saw in that mod's changelog something mentioning that simply «changing binary codes at runtime» didn't work anymore. Wonder if it simply means moving their code to F4SEPlugin_PreLoad or using something like BranchTrampoline or something completely different. Also seems like he/she rewrote the thing after NG update. Unfortunately no newer source code is available which means there's more of me banging my head against the keyboard coming this week. Whatever. I probably didn't compile properly. It works! Stimpaks and ammo have weight on normal difficulty! Edited May 21, 2024 by zhulikkulik -a small correction- a big correction Link to comment Share on other sites More sharing options...
zhulikkulik Posted May 22, 2024 Author Share Posted May 22, 2024 On 5/20/2024 at 9:26 PM, LarannKiar said: I remember there's an INI setting for the "chargen quest" or "starting quest" (Starfield has something similar but that uses a Default Object, I think..). Found a complete dump of all INI settings here on nexus, that's one of those, takes form ID (can be found in collapsed column next to Editor ID). Thank you!!! Link to comment Share on other sites More sharing options...
Recommended Posts