Skip to content

Commit

Permalink
Merge pull request #7 from etrusci-org/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
etrusci-org authored Nov 14, 2023
2 parents 557a594 + f39b312 commit d9cffd9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ It was created just for fun/learning. Like part 1-3, which I never made public ;

## Dependecies

- [Python](https://www.python.org/downloads/) version `>= 3.9.2`
- [Python](https://www.python.org/) version `>= 3.9.2`
- A terminal to run it. The default on any platform should do the trick - e.g. xterm, terminator, powershell, cmd, etc.

**Note**: DP4 was written and tested on Python `3.9.2`. **Later Python versions could introduce breaking changes**, but usually you're good with installing the latest one. You can have multiple Python versions installed at the same time. If you're not sure which version you have installed, try `python3 --version` in the terminal.
Tested on: Debian 11 + Python 3.9.2, Windows 11 + Python 3.12.0

**Note**: Later Python versions could introduce breaking changes, but usually you're good with installing the latest one. You can have multiple Python versions installed at the same time. If you're not sure which version you have installed, try `python3 --version` in the terminal.

---

## Installation

1. Install [Python](https://www.python.org/downloads/) `>= 3.9.2`.
On *nix: It's most probably already installed. Otherwise install **python3** with your favorite package manager.
On Windows/Other: Download the version for your operating system and install it. Make sure to let the setup program *"add Python to your PATH"*.
On Unix: It's most probably already installed. Otherwise install **python3** with your favorite package manager.
On Windows/Other: Download the version for your operating system and install it. Make sure to let the setup program *"add Python to your PATH"*.
2. [Download](https://github.com/etrusci-org/destinyspath4/releases) the latest DP4 release.
3. Unpack the compressed release file and copy the **destinyspath4-x.x.x** directory to any place on your system.

Expand All @@ -47,7 +49,7 @@ If an update requires a save data reset, the game will do that automatically on

## Quickstart

Open a terminal window and change into the `game/` directory:
Open a terminal window and change into the `destinyspath4/game/` directory:

```bash
cd path/to/destinyspath4/game/
Expand All @@ -56,15 +58,19 @@ cd path/to/destinyspath4/game/
Play the game:

```bash
# on *nix systems
./dp4.py --play # maybe you have to make dp4.py executable first with `chmod +x dp4.py`
# on Unix systems
./dp4.py --play

# maybe you have to make dp4.py executable first with `chmod +x dp4.py`
```

```bash
# on Windows systems:
python3 dp4.py --play

# or if `python3` does not work try...
python3.exe dp4.py --play

# or
C:/path/to/python3/python3.exe dp4.py --play
```
Expand Down Expand Up @@ -96,7 +102,7 @@ Path to the save data directory. Default=`/path/to/destinyspath4/game/save`
Time in seconds on which the progress should automatically be saved to file. Default=`300`

`-f`, `--log-to-file`
Write progress lines to a log file. It will be stored inside the save data directory.
Write progress lines to a log file. It will be stored inside the save data directory. Default=*do not write to log file*

---

Expand Down Expand Up @@ -181,8 +187,8 @@ dp4.py -s -d /path/to/mysavedata
- `income`: Total income from selling items and the amount stolen by hackers.
- `kills`: Total killed foes.
- `deaths`: Total times the player has died and breakdown where it happened.
- `<iNumber>`: Current game loop iteration streak. Resets on each game restart.

- `(i[N])`: Current game loop iteration streak. Resets on each game restart.
- `([N]m)`: Approx. size of the log file in MB. Only visible if `--log-to-file` is used.
---

## Thanks
Expand Down
6 changes: 4 additions & 2 deletions game/lib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ def log(self, msg: str = '', start: str = '', end: str = '\n', sleep: float = 2.


def print_head(self) -> None:
w: int = 60
w: int = 70

self.log(f'---=|| D e s t i n y \'s P a t h 4 ||=---'.ljust(w, '-'), end='\n\n', sleep=0, to_file=False)

Expand Down Expand Up @@ -641,4 +641,6 @@ def print_head(self) -> None:
if self.Save.total_deaths > 0:
self.log(f'{self.Lang.stats_label_total_deaths}: {self.Lang.stats_text_total_deaths.format(total_deaths=self.Save.total_deaths, total_deaths_by_foes=self.Save.total_deaths_by_foes, total_random_deaths=self.Save.total_random_deaths)}', sleep=0, to_file=False)

self.log(f'<i{self.game_loop_iter_count}>---'.ljust(w, '-'), start='\n', end='\n\n', sleep=0, to_file=False)
log_file_size: str = f'({ff(self.Conf.log_file.stat().st_size / 1024 / 1024, prec=1)}m)' if self.cliargs.log_to_file and self.Conf.log_file.is_file() else ''

self.log(f'---(i{self.game_loop_iter_count})---{log_file_size}---'.ljust(w, '-'), start='\n', end='\n\n', sleep=0, to_file=False)
2 changes: 1 addition & 1 deletion game/lib/translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
'sim_transfer_currency_transfering': 'Transfering some {currency_name} to the cold wallet',
'sim_transfer_currency_result': 'Secured {transfer_amount} {currency_name}',

'sim_death': 'Dying because `{cause_of_death}´',
'sim_death': 'Died because `{cause_of_death}´',

'sim_rebirth_waiting': 'Waiting to be reborn',
'sim_rebirth_calibrating': 'Calibrating new reality',
Expand Down
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d9cffd9

Please sign in to comment.