Interrupt / Interrupt/systemshock
Take initial game state from archive.dat
- Dominant language
- C
- Stars
- 900
- Forks
- 77
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 1
Description
Hello there!
When a new game is started, the inital state of the game and hacker is hardcoded. Most notably, various game variables, as well as the initial email, are set. See `player.c`, `init_player()` for details.
This also limits where and how fan-missions can start, as even the starting location is hardcoded.
With this this feature request I'd like to bring this port here to feature parity with the source port, which has extra behaviour. tl;dr below.
**Background:**
When Nightdive was working on the source port, I got in a chat with Axemeleon about the initial game state. I convinced them to implement a way that the engine would consider what is stored in `archive.dat` for the `Player` struct:
The behaviour that is in `objsim.c`, `obj_create_player()` was (probably) expanded to `init_player()`: When the first member of `Player.edms_state` is not zero, then (most) values from `archive.dat` are taken over.
(I guess this needed also some resurrection from commented code in `gamewrap.c`, `create_initial_game_func()`.
During all of this, Axemeleon sent me an overview of what they implemented. As this was during the storm of "we're releasing soon, still working on details, ..." I wasn't sure whether this was implemented and implemented to spec.
Long story short, I finally (many moons past) came round to verify and publicly document it, and now I am in the process of implementing this in [HackEd](https://github.com/inkyblackness/hacked).
**tl;dr**
The details which fields and variables are set to which value by the source port is now [documented in ss-specs](https://github.com/inkyblackness/ss-specs/blob/master/archives/gameState.md#initial-game-state).
If you need test archives, it'll take a little longer, as HackEd is not yet ready for this.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.