[Request] Stranded: Alien Dawn

Ask about cheats/tables for single player games here
Chapi
Noobzor
Noobzor
Posts: 14
Joined: Mon Nov 14, 2022 6:07 am
Reputation: 15

Re: [Request] Stranded: Alien Dawn

Post by Chapi »

Violation wrote:
Sun Dec 18, 2022 9:40 am
anyone know what the cheat for god mode or heal all is via the cheat menu? I wasn't watching and almost killed my party on fast speed and didn't notice a bug raid.
In Cheats there is the Option "Toggle Infopanel Cheats" click on it.
Select an Survivor on the Last Panel you have many Options like ToggleInvulnerable.

eltharion
Noobzor
Noobzor
Posts: 8
Joined: Wed Nov 13, 2019 11:19 am
Reputation: 0

Re: [Request] Stranded: Alien Dawn

Post by eltharion »

Omani2999 wrote:
Mon Nov 21, 2022 11:33 am
souldev7 wrote:
Sun Oct 30, 2022 12:16 am
It'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:

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 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/UnitComponents/UnitHealth.lua
  invulnerable = false,
  is_falling = false,
  next_vomit_time = false,
  is_vomiting = false,
  movement_adjust = 2000
Or speed up bandage craft speed:

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)"),
Or let people chill the F out a little:

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 :P ).
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 to read data from a file in Lua ?
Image
I too found myself in the same problem.
I've tried some tools but it seems that none are able to open "lua" files legibly.
Do any of you know how to do it? and with which tool to do it?

Thank you.

Chapi
Noobzor
Noobzor
Posts: 14
Joined: Mon Nov 14, 2022 6:07 am
Reputation: 15

Re: [Request] Stranded: Alien Dawn

Post by Chapi »

eltharion wrote:
Mon Jan 02, 2023 3:27 pm

I too found myself in the same problem.
I've tried some tools but it seems that none are able to open "lua" files legibly.
Do any of you know how to do it? and with which tool to do it?

Thank you.
Try this.

viewtopic.php?p=273513#p273513

sidduu
Cheater
Cheater
Posts: 32
Joined: Wed Sep 19, 2018 11:45 pm
Reputation: 2

Re: [Request] Stranded: Alien Dawn

Post by sidduu »

souldev7 wrote:
Tue Nov 08, 2022 10:39 am
Alright, first up:
Notice: Please don't quote reply me! my posts are too long, you blowin' up the thread (>^.^)>

Related intel i've discovered:
Spoiler
- Game runs LUA 5.4, not 5.3 (which is why luadec doesn't work; size_t header mismatch).
- LUA 5.4 apparently deeply changed how constant pointers are managed. couldn't fix luadec myself.
- Researched sources and found in Mod.lua that mod loading can be forced using:

Code: Select all

AccountStorage.LoadAllMods || config.LoadAllMods
Since config requires manipulating HPK's, the better strategy is to use AccountStorage.
- One could place the following into LocalStorage.lua to enable all mods:
Spoiler

Code: Select all

-- C:\Users\<you>\AppData\Roaming\Stranded - Alien Dawn\LocalStorage.lua

local ranOnce=false
local function temp()
	if (ranOnce) then
		return 
	end
	ranOnce = true
	AccountStorage.LoadAllMods = true
	SaveAccountStorage(1000)
end
OnMsg.AccountStorageChanged = temp

return { 
...
Then boot the game once. Then mods are forcefully enabled. Warning: ALL mods in the mod folder will be loaded, even if they are broken.
Since LocalStorage is overwritten (object dump with "return" prefix) each game exit, the above will simply disappear.
However, mods can't manipulate the pre-game-setup. Mods are heavily restricted by ENV, and only truly execute with a useful scope once the game runs (playing)
But now your AccountStorage.lua object specifies to load all mods in the default mods folder: C:\Users\<you>\AppData\Roaming\Stranded - Alien Dawn\Mods\
(which follows same methodology as Surviving Mars, to which there are plenty of online guides).
- Some notes about AccountStorage:
Spoiler
- AccountStorage is a memory object exported to a file: AccountStorage.lua
- AccountStorage.lua is encrypted using AES with SHA256 key
- The key is comprised of:

Code: Select all

GetAppId() .. (config.ProjectKey or "1ac7d4eb8be00f1bf6ae7af04142b8fc")
- Thus: "Stranded - Alien Dawn1ac7d4eb8be00f1bf6ae7af04142b8fc"
- They append an "HMAC" (sha256 of above key) onto the end of it in a strange obfuscation/verification attempt I suppose.
- That file is then HPK packed into something called Account.dat, stored in the SaveGames folder.

Which is the whole reason above that I used LocalStorage.lua to hook the AccountStorageChanged event, so as to manipulate it without having to manually reengineer their encryption algo to tweak the file..
Notably: I found that Mods don't have the proper ENV to manipulate pre-game-setup.
So stumbled across DLC.lua, which provisions _G env scope.

Thus: "SADEnabler DLC" has been born.
Zip file Attached (password per forum regulations: F34RL3SS)
With this, Mods can be enabled.
Read the README please.

[Link][Link][Link][Link][Link]

-----------

SADEnabler_tool_src.zip

I do not intend to provide support, nor updates.
All source code included, so it's all yours. :)

--------------

Additional Notes:
Spoiler
This greatly simplifies things, as no longer have to repackage and overwrite the HPK bundles.
You can if you want -- but if you've been following along -- that is unstable.
However it's still useful to unpack(hpk) and decompile(unluac) for [Link] research/hook purposes.

Also in the attachment is my custom tool, which basically is a rewrite of the Powershell Script into C#.
This should help those of you having powershell problems.
It runs on .net core 6, which comes to you via Windows Update (should just work oob).
Use: Tool-Menu.bat, then look at the sources folder after Initializing.

If any of this doesn't make sense I can't help you. Sorry! Reread above perhaps.
I cannot say it any more simply than I have, and googling of how Surviving Mars works should tell you everything you need.
Did my best to make this as simple as possible.
RecipeTweaks mod won't show up in in-game mod options, HumanTweaks works fine.

compmomnc
Noobzor
Noobzor
Posts: 5
Joined: Mon Mar 18, 2019 9:07 pm
Reputation: 0

Re: [Request] Stranded: Alien Dawn

Post by compmomnc »

A couple of weeks ago the dev made some changes and now we can't get to the "cheatmenu". I was hoping one of the talented people who make these tables and trainers could take a deep dive back into this animal of a game? Please validate if there might be a hidden work around the dev possible left in game. Many thanks.

nathanredd
What is cheating?
What is cheating?
Posts: 1
Joined: Fri Oct 27, 2017 2:49 am
Reputation: 0

Re: [Request] Stranded: Alien Dawn

Post by nathanredd »

Just a fair warning to those like me who "go big or go home". Going big in this game with your modified inventory will bring you some very large infestation attacks. I started my game with 600k scrap, wood & etc... my first insect attack started with 600+ bugs LOL

ChristheW
What is cheating?
What is cheating?
Posts: 3
Joined: Fri Mar 17, 2023 2:24 pm
Reputation: 0

Re: [Request] Stranded: Alien Dawn

Post by ChristheW »

Hey guys
So, since today it looks like, nothing is working anymore...

If you search for the survivors at the beginning (for a start with 5+), you need to check for 4byte unknown values and in-/decreasing.
I got mostly (not always) 3 values back, one is 1+number of survivors, one is like in binary (65k) and the last one is kinda 3+2*survivor.
HOWEVER, when you lock thos three values, the game freezes within 30-60sec. When you are fast enough, you can start.

Next: The Storage method doesn't work (With the stockpile earlier in this post).
You can still find the 3 values for your stockpile, however, the global values is somehow fading away (at first it looks like its fine but when you got back to game by ALT+TAB it changes.

The skills you can still calculate for some. (lvl1,0exp=1000, lvl2,0exp=2400, lvl3,0exp=4400, ---- as basic and just add the exp of the skilllevel)
However, intelligence and some other seem to work with a different calkulation (maybe its not that clear stepped as physiology [maybe float?])

Someboday has a workaround to get something or hooking up on this game for table dev as it is released now?
The cheat-SW developer still doesn't support the game. At least, there is nothing on the sites.

Cheers
Chris

LuckVsLogic
Noobzor
Noobzor
Posts: 6
Joined: Wed Nov 29, 2017 11:13 am
Reputation: 2

Re: [Request] Stranded: Alien Dawn

Post by LuckVsLogic »

For skills scan with 2 bytes with total exp (for example total exp level 3 = 4400 + current exp display in bar)
for easy scan i usualy scan while observe task so the exp keep increase
when you get value intelligence skill, the rest is simple
press add address manualy, then copy past intelligence skill address + 16
thats the exp value of the other skill (don't forget chang from 4 bytes to 2 bytes)
keep adding +16 on the original address (for example = 1CBE177F008+16+16+16)
if you not found all 8 skills value, change +16 to -16 (for example = 1CBE177F008-16)
the rest is just earn exp manualy, and your level up according your total exp

For make it easy here list of total exp each level
level 0 = 0
Level 1 = 1000
Level 2 = 2400
Level 3 = 4400
Level 4 = 7200
Level 5 = 11200
Level 6 = 16800
Level 7 = 24800
Level 8 = 34800
Level 9 = 50800
Level 10 = 70800

sorry if it sound wierd, english not my natif language

1kuto
What is cheating?
What is cheating?
Posts: 2
Joined: Sun Apr 24, 2022 5:16 am
Reputation: 0

Re: [Request] Stranded: Alien Dawn

Post by 1kuto »

ChristheW wrote:
Sun Apr 30, 2023 10:07 pm
Hey guys
So, since today it looks like, nothing is working anymore...

If you search for the survivors at the beginning (for a start with 5+), you need to check for 4byte unknown values and in-/decreasing.
I got mostly (not always) 3 values back, one is 1+number of survivors, one is like in binary (65k) and the last one is kinda 3+2*survivor.
HOWEVER, when you lock thos three values, the game freezes within 30-60sec. When you are fast enough, you can start.

Next: The Storage method doesn't work (With the stockpile earlier in this post).
You can still find the 3 values for your stockpile, however, the global values is somehow fading away (at first it looks like its fine but when you got back to game by ALT+TAB it changes.

The skills you can still calculate for some. (lvl1,0exp=1000, lvl2,0exp=2400, lvl3,0exp=4400, ---- as basic and just add the exp of the skilllevel)
However, intelligence and some other seem to work with a different calkulation (maybe its not that clear stepped as physiology [maybe float?])

Someboday has a workaround to get something or hooking up on this game for table dev as it is released now?
The cheat-SW developer still doesn't support the game. At least, there is nothing on the sites.

Cheers
Chris
number colony still work.. I just try right now.. it's easy make sure
1. select all colony 3/3 then search "3" on CE using byte
2. remove 1 colony 2/3 then search next "2"
3. remove 1 colony again 1/3 then search next "1"
4. add 2 colony 3/3 then search next "3" again
5. with this you get your current colony number.. freeze it and change value to 1
6. go add as many colony as you can.. it will show 1/3 but number of colony can more than that

cant figure out storage think.. I got 3 value of item on ground.. its change as I want but they dont want to pick it up.. I also found global value 2byte change as number stock on ground (its all I have) still they ignore and cant build anything

Relentless1
Cheater
Cheater
Posts: 39
Joined: Sun Jul 28, 2019 9:09 am
Reputation: 0

Re: [Request] Stranded: Alien Dawn

Post by Relentless1 »

Other than increasing the number of survivors, is there anything else that can be done here? I wonder why the game is so locked. Surprised to see this in a single player game.

ChristheW
What is cheating?
What is cheating?
Posts: 3
Joined: Fri Mar 17, 2023 2:24 pm
Reputation: 0

Re: [Request] Stranded: Alien Dawn

Post by ChristheW »

Like the post one before, you can increase the skil level of the survivors.
Beside that, nothing so far...

Zanzer
RCE Fanatics
RCE Fanatics
Posts: 1088
Joined: Fri Mar 03, 2017 10:48 pm
Reputation: 3490

Re: [Request] Stranded: Alien Dawn

Post by Zanzer »

Open the Mod Manager from the main menu and leave it open in the background.
You can then load up your normal game and still use the Cheats menu from the manager.

By the way, when you're scanning for values, turn off the Fast Scan option.
Addresses aren't always going to be byte-aligned (0, 4, 8, C).

Post Reply

Who is online

Users browsing this forum: AhrefsBot, Google [Bot], Jullusch, Shonek67, Sword X, YandexBot