Skip to content

Commit

Permalink
Update build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebual committed Jul 6, 2021
1 parent 6377d43 commit 97b0924
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 92 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.vmdl text eol=lf
*.vmat text eol=lf
*.cs text eol=lf
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,43 @@
Very early WIP (as is S&box itself).

- Wiring Tool is equivalent to G-Wiremod's non-Adv version, with basic Debugger and Gate spawning functionalities too
- Outputs: Buttons and a Wire Keyboard (effectively a Pod Controller with a builtin vehicle)
- Inputs: Thrusters, Lights
- Gates: the basic arithmetic/logic
- Outputs: Buttons, GPS, Gyroscope, and a Wire Keyboard (effectively a Pod Controller with a builtin vehicle)
- Inputs: Thrusters, Lights, Constraint Controllers, HardLight Bridge
- Gates: the basic arithmetic/logic/constant

Message Nebual on Discord with any questions about contributing! See [todos](https://github.com/wiremod/wirebox/projects/1) for ideas.

## Setup

S&box is currently focused around 'Gamemodes', not modular addons,
however [[A]lex is working on a modular Gamemode framework](https://github.com/Ceveos/minimal-extended) which might work for us.
Unfortunately, the base 'Sandbox' gamemode needs to be modified to be more extendable, so grabbing the latest Github Release with those changes already applied is easiest.
We also use [SandboxPlus](https://github.com/Nebual/sandbox-plus), an extension of FP's Sandbox gamemode, modified to be more extendable.
Thus, grabbing the latest Github Release with that already setup is easiest.

### Using the latest Github Release

1. Download it to `steamapps/common/sbox/addons/`
2. `cd wirebox/addons/code/wirebox && git pull`
1. Download it to `steamapps/common/sbox/workspace/`
2. `cd workspace/modules/wirebox && git pull`
3. `cd workspace/ && .\watcher.ps1 wirebox -build`


### Building from scratch

`wirebox-build-scratch.bat` will `git clone` the [modular Gamemode](https://github.com/Ceveos/minimal-extended), wirebox itself, and [sandbox-plus](https://github.com/Nebual/sandbox-plus), producing a new "gamemode" which should be placed in `steamapps/sbox/addons/`
1. `cd steamapps/common/sbox/`
2. `git clone https://github.com/Ceveos/minimal-extended.git workspace && cd workspace`
3. `.\watcher.ps1 -create`, say yes to prompt to download SandboxPlus
4. `git clone https://github.com/wiremod/wirebox.git modules/wirebox`
5. `.\watcher.ps1 wirebox -build`

The watcher script will combine all modules/* (so you can throw extra mods there), and output a new "gamemode" into `steamapps/sbox/addons/wirebox/`, where S&Box is looking for it.


## Developing

Often the base Sandbox gamemode isn't extendable enough; direct PR's to enhance flexibility to [SandboxPlus](https://github.com/Nebual/sandbox-plus),
which is wire-agnostic, but obviously quite wire-friendly :D

Hotreloading is neat, and generally works well - limitations include:
- Base UI, such as the Spawnmenu's tools/spawnlists, don't reload without a map change
- seems a bit less reliable for non-host players, though often works
- some Model properties don't reload, such as Prop breakability
- You'll need `./asset-watcher.ps1` running for assets/ui

### Assets Watcher
Some files need to be in the "root directory" of the gamemode (eg. `sbox/addons/minimal-extended/models/`).
`./asset-copier.bat` will delete old and copy in new files, or `./asset-watcher.ps1` will actively watch for new changes and copy them in as they occur.
- You'll need `./watcher.ps1 wirebox` running to copy changes from workspace/modules/* to sbox/addons/wirebox (the output gamemode); this lets us keep git repos separate while merging together assets from multiple modules into their respective top-level folders in the resulting gamemde.
6 changes: 0 additions & 6 deletions asset-copier.bat

This file was deleted.

57 changes: 0 additions & 57 deletions asset-watcher.ps1

This file was deleted.

16 changes: 0 additions & 16 deletions wirebox-build-scratch.bat

This file was deleted.

0 comments on commit 97b0924

Please sign in to comment.