<commit_before># oatot
OpenArena tote

## Idea

Make betting (with both virtual currency or [BTC][BTC-link]) possible in [OA][OA-link].

## Motivation

Just for fun and to keep the game I love alive.

## Architecture of the project

```
OaMod <-----------> gRPC client (Go) <-------------> Backend (Go)
           Cgo                             gRPC
                                  (documented in api.proto)
```

## How to build and run OA mod

You will need a C-compiler (better gcc or clang), GNU make, Go, grpc-go.

```
cd /path/to/oa_mod/linux_scripts/
./build_oa_server [ path/to/dir/for/downloading/pk3s - optional ]
./run_oa_server <port> server.cfg
```
Make sure that `server.cfg` is in `~/.openarena/baseoa` folder
and you have `BINNAME` set to your openarena server binary.

## How to build and run backend

You will need: Go, grpc-go.

```
cd /path/to/backend/otservice/
go build
./otservice -database '/path/to/storage_file' -start-money 0
```

## OpenArena mod

Modified OAX.

*New console commands*:

Basic stuff you can call by typing `/<command>` in OA game console.

```
 - bet              <horse>[red,blue] <amount> <currency>[BTC,OAC]
 - unbet            <bet_ID>
 - pastBets
 - pastBets         elder
 - betsSummary
 - ready
 - help
 - shareBalance
 - shareBalance     <currency>[BTC,OAC]
```

*Update note:*<br>
`/bet` and `/unbet` commands are outdated, there is super cool UI menu for this purpose instead.<commit_msg>New note in README<commit_after># oatot
OpenArena tote

## Idea

Make betting (with both virtual currency or [BTC][BTC-link]) possible in [OA][OA-link].

## Motivation

Just for fun and to keep the game I love alive.

## Architecture of the project

```
OaMod <-----------> gRPC client (Go) <-------------> Backend (Go)
           Cgo                             gRPC
                                  (documented in api.proto)
```

## How to build and run OA mod

You will need a C-compiler (better gcc or clang), GNU make, Go, grpc-go.

```
cd /path/to/oa_mod/linux_scripts/
./build_oa_server [ path/to/dir/for/downloading/pk3s - optional ]
./run_oa_server <port> server.cfg
```
Make sure that `server.cfg` is in `~/.openarena/baseoa` folder
and you have `BINNAME` set to your openarena server binary.

## How to build and run backend

You will need: Go, grpc-go.

```
cd /path/to/backend/otservice/
go build
./otservice -database '/path/to/storage_file' -start-money 0
```

## OpenArena mod

Modified OAX. The mod is currently **only CTF-oriented** (both betting structure and user interface).

*New console commands*:

Basic stuff you can call by typing `/<command>` in OA game console.

```
 - bet              <horse>[red,blue] <amount> <currency>[BTC,OAC]
 - unbet            <bet_ID>
 - pastBets
 - pastBets         elder
 - betsSummary
 - ready
 - help
 - shareBalance
 - shareBalance     <currency>[BTC,OAC]
```

*Update note:*<br>
`/bet` and `/unbet` commands are outdated, there is super cool UI menu for this purpose instead.
{'fraction_non_alphanumeric': 0.13610459269192088, 'fraction_numerical': 0.0013409319477036541, 'mean_word_length': 2.5865384615384617, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4564278', 'n_tokens_mistral': 1009, 'n_tokens_neox': 960, 'n_words': 336}