Re: [Request] Stranded: Alien Dawn
Posted: Fri Oct 28, 2022 8:44 pm
thx, but no real need for that, the game has built in option to have all your survivors have lvl 10 skills
Community Cheat Tables of Cheat Engine
https://fearlessrevolution.com/
Code: Select all
Platform.cheats = true
return {
Hey, I've been following this thread for a while, new here, but have been using cheat engine for a while, this game is doing my head in.jst_dust wrote: ↑Fri Oct 28, 2022 10:35 pm@Ashar true i just stubled upon it trying to find a way to enable the build in cheat menu
Just found a hacky way to do it.
Before starting the game goto:
%APPDATA%\Stranded - Alien Dawn\LocalStorage.lua
before `return {` add Platform.cheats = true
so:and Ctrl+c toggles the ingame menus'Code: Select all
Platform.cheats = true return {
I also realized that I need to change the LocalStorage.lua file to read-only. If not the game rewrites it as soon as it starts, "reminded me of the xcom2 file edit".schoolofmonkey wrote: ↑Sat Oct 29, 2022 3:41 amHey, I've been following this thread for a while, new here, but have been using cheat engine for a while, this game is doing my head in.jst_dust wrote: ↑Fri Oct 28, 2022 10:35 pm@Ashar true i just stubled upon it trying to find a way to enable the build in cheat menu
Just found a hacky way to do it.
Before starting the game goto:
%APPDATA%\Stranded - Alien Dawn\LocalStorage.lua
before `return {` add Platform.cheats = true
so:and Ctrl+c toggles the ingame menus'Code: Select all
Platform.cheats = true return {
I have tried your suggestion of editing the LocalStorage.lua file, didn't do anything for me.
Edit: Worked it out, it was the ` key for me.
Code: Select all
-- ./Lua/Lua/__const.lua
DefineConst({
group = "Gameplay",
id = "MaxSurvivorsCount",
value = 6
})
-- ./Lua/Lua/PreGameSetup.lua
function GetMaxSurvivorsCount(scenario_id)
local scenario_def = scenario_id and ScenarioDefs[scenario_id]
return const.Gameplay.MaxSurvivorsCount
end
Code: Select all
-- ./Lua/Lua/UnitComponents/UnitHealth.lua
invulnerable = false,
is_falling = false,
next_vomit_time = false,
is_vomiting = false,
movement_adjust = 2000
Code: Select all
-- ./Data/Recipe.lua
Activity = "Crafting",
ActivityDuration = 10000,
ActivityXPGrade = "Crafting_Low",
BuildCategory = "CraftResources",
Description = T(746560224749, "Make bandages from cloth pieces."),
DisplayName = T(751595636010, "Bandages (scrap cloth)"),
Code: Select all
-- ./Lua/Lua/UnitComponents/UnitRelaxation.lua
category = "Relaxation",
id = "RelaxationLossPerDay",
name = T(241929465459, "Daily relaxation loss"),
editor = "number",
modifiable = true,
scale = 1000,
default = 30000
Code: Select all
hpk create --cripple-lua-files --dont-compress-files Lua Lua.hpk
Thanks, this was a doubt I was having, I even thought about it but my lua.hpk file after packing it again got a size of 13.2 MB, and when the game loads the screen goes black after a while and so don't go forward. Will it be a corrupted file? I also heard a guy talking on the forum [Link] that Stranded: Alien Dawn are zipped with Zstdsouldev7 wrote: ↑Sun Oct 30, 2022 12:16 amIt's the same as [Surviving Mars] by same company, except would appear mods are disabled.
The loader apparatus is there, and it uses same bootstrap. But obviously not shown in the UI, nor does it appear to load metadata files.
So instead, best way to tweak the insanity of this game to some degree, is to unpack the HPK, decompile the LUA, modify it, and pack it back up.
This 100% worked for me, was easy enough to do with GREP scans to find what I wanted.
For instance, you can increase max # of survivors when starting a game:Or double the speed of movement of your survivors (1000 = 1, so 2000 = 2; same applies for all integers in the game, if you search for "movement_adjust" you'll see it's a multiplier reduced by 1k affecting a 100% scaled integer.. so it's like: 0.25 * 1 = 25% where .25 is dynamic based on condition of the unit):Code: Select all
-- ./Lua/Lua/__const.lua DefineConst({ group = "Gameplay", id = "MaxSurvivorsCount", value = 6 }) -- ./Lua/Lua/PreGameSetup.lua function GetMaxSurvivorsCount(scenario_id) local scenario_def = scenario_id and ScenarioDefs[scenario_id] return const.Gameplay.MaxSurvivorsCount end
Or speed up bandage craft speed:Code: Select all
-- ./Lua/Lua/UnitComponents/UnitHealth.lua invulnerable = false, is_falling = false, next_vomit_time = false, is_vomiting = false, movement_adjust = 2000
Or let people chill the F out a little:Code: Select all
-- ./Data/Recipe.lua Activity = "Crafting", ActivityDuration = 10000, ActivityXPGrade = "Crafting_Low", BuildCategory = "CraftResources", Description = T(746560224749, "Make bandages from cloth pieces."), DisplayName = T(751595636010, "Bandages (scrap cloth)"),
---------------------Code: Select all
-- ./Lua/Lua/UnitComponents/UnitRelaxation.lua category = "Relaxation", id = "RelaxationLossPerDay", name = T(241929465459, "Daily relaxation loss"), editor = "number", modifiable = true, scale = 1000, default = 30000
So in order to do that, you need the HPK extractor.. [Link]
Then you need a decompiler. I used the Mod package here: https://www.fearlessrevolution.com/surv ... ?tab=files
(which is just a powershell script to extract everything)
Combined with unluac: [Link]
I found that the Victor Vran bytecode header situation applies here. Given that they switched to lua 5.3.
Powershell script handles that for you when executing hpk.exe.
However when repackaging I found that you HAVE to disable compression or the game just crashes, or fails to load the main menu runtime (step 4 below).
That could just be a switch for lz4 algorithm that needs tweaked a bit. Not sure, but uncompressed works just fine for me.
So the process is like so:
1. Follow the guide for the NexusMod powershell script (you need java, unluac, and hpk.exe sitting in the root folder of the game. set exec policy, and run it)
2. Now you have extracted everything (__Unpacked folder). __Unpacked/Packs/Lua and ./Data are of interest.
3. Modify whatever you want.
4. Pack it up using the command: (specify the folder to repackage, ex. "Lua", or "Data")Code: Select all
hpk create --cripple-lua-files --dont-compress-files Lua Lua.hpk
and copy that to C:\Program Files (x86)\Steam\SteamApps\common\Stranded Alien Dawn\Packs (and overwrite, after you backup original obviously).
Test that game boots and no corrupt decompilation/repackaging, & off you go.
I still haven't been able to find certain things, like % chance of Expedition resulting in a new recruit (I'm on year 8 and still 5 people; rough as hell with 100+ unit enemy spawns. I like it tough, just not without hope for the future ).
I'm also very curious about fixing the pathing (character runs back and forth across a field to gather, when it could rather target the closest pickup), and spotted several files in there relating to it. So far looks like potentially a simple array sort will resolve.
Anyway - good luck to he who reads, and he who doesn't too.
How does one make this have 8 survivors only ?Akira wrote: ↑Thu Oct 13, 2022 10:57 pmYou can also scan for this AoB F2 0F ? ? 0F B6 ? ? 88 42 ? E9 ? ? ? ? 8B F7 and find out what the address accesses to get the value, saves you the time of scanning.WarStalkeR wrote: ↑Thu Oct 13, 2022 9:39 amActually, I've managed to change amount of survivors you can start game with. Search one byte for amount of selected survivors. Freeze it at 1, add 20+ survivors, unfreeze, game will ask if you want to start only with 1 survivor, click OK/continue. And viola, you start with whole colony of survivors.
The address handles a few more values which i couldn't separate so far which is why I haven't made a script.
Edit:
Here ya go, activate it, add a survivor, disable script and remove a survivor and you can add as many as you want.Code: Select all
[ENABLE] aobscanmodule(SurvivorMaxCountAndWhoKnowsWhatElse,StrandedSteam.exe,F2 0F ? ? 4C 8B ? ? ? ? ? 4C 8B ? ? ? ? ? 4C 8B ? ? ? ? ? F2 41 ? ? ? ? 0F B6 ? ? 41 88 ? ? ? E9 ? ? ? ? 4D 8B) alloc(newmem,$1000,SurvivorMaxCountAndWhoKnowsWhatElse) label(code) label(return) newmem: cmp byte ptr [rax],04 jne code mov byte ptr [rax],FF //;MaxSurvivorSelectCount code: movsd xmm0,[rax] mov r8,[rbp+000001F8] jmp return SurvivorMaxCountAndWhoKnowsWhatElse: jmp newmem nop 6 return: registersymbol(SurvivorMaxCountAndWhoKnowsWhatElse) [DISABLE] SurvivorMaxCountAndWhoKnowsWhatElse: db F2 0F 10 00 4C 8B 85 F8 01 00 00 unregistersymbol(SurvivorMaxCountAndWhoKnowsWhatElse) dealloc(newmem)
First, big thanks for your post! It really helped me get the game to where it's actually enjoyable.souldev7 wrote: ↑Sun Oct 30, 2022 12:16 am
For instance, you can increase max # of survivors when starting a game:Code: Select all
-- ./Lua/Lua/__const.lua DefineConst({ group = "Gameplay", id = "MaxSurvivorsCount", value = 6 }) -- ./Lua/Lua/PreGameSetup.lua function GetMaxSurvivorsCount(scenario_id) local scenario_def = scenario_id and ScenarioDefs[scenario_id] return const.Gameplay.MaxSurvivorsCount end
does not seem to be command to spawn another survivor as that is all i would use it forjst_dust wrote: ↑Fri Oct 28, 2022 10:35 pm@Ashar true i just stubled upon it trying to find a way to enable the build in cheat menu
Just found a hacky way to do it.
Before starting the game goto:
%APPDATA%\Stranded - Alien Dawn\LocalStorage.lua
before `return {` add Platform.cheats = true
so:and Ctrl+c toggles the ingame menus'Code: Select all
Platform.cheats = true return {
If you press ' on the keyboard and search for place (survivor's name) it can bring up anyone I think. example: Place Annette G_SpawnCharacterPhantom Flan Flinger wrote: ↑Sun Oct 30, 2022 6:57 pmdoes not seem to be command to spawn another survivor as that is all i would use it forjst_dust wrote: ↑Fri Oct 28, 2022 10:35 pm@Ashar true i just stubled upon it trying to find a way to enable the build in cheat menu
Just found a hacky way to do it.
Before starting the game goto:
%APPDATA%\Stranded - Alien Dawn\LocalStorage.lua
before `return {` add Platform.cheats = true
so:and Ctrl+c toggles the ingame menus'Code: Select all
Platform.cheats = true return {
Thanks will give that a goIf you press ' on the keyboard and search for place (survivor's name) it can bring up anyone I think. example: Place Annette G_SpawnCharacter
Certainly! I almost feel like this stuff is better suited in a different thread since it's more Modding than anything else.pandalorian wrote: ↑Sun Oct 30, 2022 3:51 pm
First, big thanks for your post! It really helped me get the game to where it's actually enjoyable.
Regarding the survivor count, do you modify the existing GetMaxSurvivorsCount() in PreGameSetup.lua, or does preceeding it with the keyword "function" make enough of a difference (tbh, I'm more familiar with java than lua).
Definitely thinking it's corruption.
Code: Select all
...itAnimalCompositeDef/Scissorhands_Hatchling_Starving.lua:1: syntax error near '<\144>'
...UnitAnimalCompositeDef/Skarabei_Manhunting_Explosive.lua:1: syntax error near '<\172>'