Skip to content

Commit

Permalink
Merge pull request #33 from tinyhoot/dev
Browse files Browse the repository at this point in the history
Update to v0.8.0
  • Loading branch information
tinyhoot authored Aug 12, 2022
2 parents 8979e9b + faf03f0 commit 17ee395
Show file tree
Hide file tree
Showing 51 changed files with 3,150 additions and 1,984 deletions.
16 changes: 16 additions & 0 deletions DataFiles/alternateStarts.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Biome,Boundaries,,,
BloodKelp,-850/1600/-350/1200,-1050/-480/-910/-600,,
CragField,-100/-1200/500/-1500,,,
CrashZone,250/-650/700/-1100,700/-900/1200/-1300,1100/-650/1400/-1000,1350/550/1550/350
Dunes,-1600/300/-1100/0,-1600/900/-1300/300,-1200/800/-1100/700
FloatingIsland,-712/-1072/-708/-1076
GrandReef,-1400/-1100/-900/-1500,-900/-1300/-300/-1600,,
GrassyPlateaus,-400/600/-300/500,-800/0/-500/200,250/350/350/150,0/-600/100/-700
Kelp,-550/320/-250/280,100/700/400/600,-300/-500/-200/-600,280/-380/320/-420
KooshZone,900/800/1400/600,,,
Mountains,600/1500/1300/1100,,,
MushroomForest,-1000/700/-700/500,600/600/700/300,,
SeaTreaderPath,-1500/-500/-1200/-800,,,
SparseReef,-800/-500/-600/-850,,,
UnderwaterIslands,-250/1150/0/800,,,
None,-1540/-1000/1500/-1040,1580/-580/1620/-620,-1410/1410/-1390/1390,
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 3 additions & 14 deletions DevNotes.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@

Thoughts and notes on features and issues.

- Randomise more things.
- Fish spawn points.
- Fish size and aggression.
- Raw material spawn points.

- Expand on fragments.
- Make it possible to randomise the amount of fragments
needed for each blueprint.
- Is it possible to swap fragments around?
- Change what resources you get upon scanning duplicate fragments
- Maybe you'd get one or two resources needed to build what you scanned?

- Add a casual mode.
- Casual mode would respect vanilla upgrade chains and be more lenient with its
Expand All @@ -21,15 +13,16 @@
- Add a fiendish mode.
- Many more recipes are locked behind databoxes scattered throughout the ocean.
- Databoxes can be many more places, including the cave systems in many biomes.
- Raw materials are no longer found in their original biomes. Look into using
LootDistributionHandler for this?
- Raw materials are no longer found in their original biomes.

- Add support for glitches.
- Several glitches in the game can let you get items or blueprints much earlier.
- It is possible to glitch into the aurora before it even explodes.
- Since this would make the logic run on a timer, better not implement this.
- Large wrecks can be made to despawn with the building tool, skipping the need
for e.g. a laser cutter.
- Table coral can be acquired with a Crashfish, or bumping into it with a vehicle.
No knife required!

- Mod support.
- Even if autodetecting mods and their items seems impossible with how the
Expand Down Expand Up @@ -63,10 +56,6 @@ Thoughts from a playthrough:
- What about land seeds? If those get added, indoor growbeds are a necessity.
- Add Aurora interior to logic. What parts need repair tool, laser cutter, cannon?


Thoughts from users:
- Add console commands to reroll a specific recipe only.

Other:
- Sea treaders are a potential anti softlock mechanism. You could change their
poop and shale into something useful on the fly, or make shale always contain
Expand Down
43 changes: 25 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
# Subnautica Randomiser
A Subnautica Mod that randomises recipes for replayability, originally based on [the work of stephenengland](https://github.com/stephenengland/SubnauticaRandomizer).

This can make the game considerably more difficult, and the varying availability of ingredients may also make it harder to collect enough of what you need. Since ingredients can vary so wildly, use of a blueprint tracker mod like [this one on nexus](https://www.nexusmods.com/subnautica/mods/22) is recommended.
![GitHub release (latest by date)](https://img.shields.io/github/v/release/tinyhoot/SubnauticaRandomiser)
![GitHub](https://img.shields.io/github/license/tinyhoot/SubnauticaRandomiser)
[![CodeFactor](https://www.codefactor.io/repository/github/tinyhoot/subnauticarandomiser/badge/dev)](https://www.codefactor.io/repository/github/tinyhoot/subnauticarandomiser/overview/master)
[![wakatime](https://wakatime.com/badge/user/d7c60741-27ca-486e-a1d0-e23b93d91114/project/acdd8cb2-0e10-422a-990f-d717dc24ae45.svg)](https://wakatime.com/badge/user/d7c60741-27ca-486e-a1d0-e23b93d91114/project/acdd8cb2-0e10-422a-990f-d717dc24ae45)

The randomisation persists between play sessions and save games. If you decide to stop playing for the day, everything will remain randomised as it was. In case you need it, there is a mod menu option for randomising everything from scratch again.
A Subnautica Mod that randomises many aspects of the game for replayability, originally based on [the first Subnautica randomizer](https://github.com/stephenengland/SubnauticaRandomizer).

This mod can make the game considerably more difficult, and the varying availability of fragments and ingredients may also make it harder to collect enough of what you need. Since ingredients can vary so wildly, use of a blueprint tracker mod like [this one on nexus](https://www.nexusmods.com/subnautica/mods/22) is recommended.

The randomisation persists between play sessions and save games. If you decide to stop playing for the day, everything will remain randomised as it was.

On first startup, the mod will randomise using recommended settings. You can either start playing immediately, or customise your experience in the mod options menu. Note that, should you choose to re-randomise from the mod options menu, you must **restart your game** for all changes to properly take effect.

#### This mod randomises:
* All recipes for basic and advanced materials
* All recipes for tools, equipment, vehicles and upgrades
* Most ingredients required for base building
* Decorative pieces like chairs or beds are unaffected
* The blueprints found in databoxes
* Recipes for most craftable things in the game, excluding decorative base pieces.
* Blueprints found in databoxes
* Fragment spawn rates and locations
* Lifepod spawn location

## Features
- ✔️ Randomise most items in the game
- ✔️ Include fish, eggs and seeds in recipes (customisable in in-game menu)
- ✔️ Randomise blueprints from databoxes
- ✔️ Randomise fragments
- ✔️ No softlocks
- ✔️ Upgrades can be made independent from their basic variants, so you might acquire e.g. a Seamoth Depth Module 3 long before you ever manage to get Module 1 or 2
- ✔️ Most things you can make may also show up as an ingredient in other recipes. Do you really need that laser cutter, or do you craft it into Polyaniline?
- ✔️ No softlocks
- ✔️ Detailed mod options menu
- ✔️ (Probably) Don't spawn in the void
- ✔️ Randomise rewards from scanning a fragment you already know
- ✔️ Include fish, eggs and seeds in recipes
- ✔️ Out-of-order upgrades, so you might acquire e.g. a Seamoth Depth Module 3 long before you ever manage to get Module 1 or 2
- ✔️ Long recipe chains. Do you really need that laser cutter, or do you craft it into Polyaniline for a Rebreather?
- ✔️ Items are balanced on an underlying value logic
- If you prefer pure chaos, simply turn on Chaotic mode!
- ✔️ Easily share your seed with friends
- ✔️ Share your seed with friends

## How to Use
1. Install [QModManager](https://www.nexusmods.com/subnautica/mods/201)
Expand All @@ -36,9 +42,10 @@ The randomisation persists between play sessions and save games. If you decide t
4. Enjoy!

## How to Build
* Install QModManager and SMLHelper
* git clone
* Add a SUBNAUTICA_DIR variable to your PATH pointing to your install directory of Subnautica
* Install QModManager and SMLHelper
* In Visual Studio, update the project's assembly references to point to the correct locations on your computer.
* For more information, see [QMod Wiki](https://github.com/SubnauticaModding/QModManager/wiki/Libraries)
* In addition, you'll likely need a publicised version of Subnautica's `Assembly-CSharp.dll`. I used [the BepinEx plugin](https://github.com/MrPurple6411/Bepinex-Tools/releases/tag/1.0.1-Publicizer) for that.
* In addition, you'll need a publicised version of Subnautica's `Assembly-CSharp.dll`. Start the game once using [the BepinEx plugin](https://github.com/MrPurple6411/Bepinex-Tools/releases/) for this.
* Building in the Release configuration should leave you with a `SubnauticaRandomiser.dll` in `SubnauticaRandomiser/bin/Release/`
72 changes: 60 additions & 12 deletions ReadMe-Documentation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ is the recommended way to play the randomiser. Should you wish for a completely
off-the-rails experience, Chaotic has you covered. Chaotic will not softlock
you, but it provides very little protection from the ups and downs of random chance.

| Spawnpoint | Vanilla / Random / <Biome> / Void |
--Default: Vanilla
Change where the lifepod spawns. Random simply chooses one among all available options.
You can constrain the general area of where the lifepod will end up by choosing one
of the given surface biomes. It is also possible to spawn in the little lake of the
floating island by choosing Floating Island.

| Use fish in logic | Yes / No |
--Default: Yes
Enabling this setting will include all fish you can grab in the wild in the logic,
Expand All @@ -82,6 +89,23 @@ not add any recipes to the boxes that are not already contained in them in vanil
and the boxes themselves will still be found in the same locations. However, the
blueprints you get from them will no longer be in the same boxes as they used to be.

| Randomise fragment locations | Yes / No |
--Default: Yes
When enabled, all fragments will be distributed throughout the game. Logic is in place
to prevent any softlocks from not being able to access a specific fragment. However,
note that this will not (yet) put fragments into biomes where the vanilla game didn't
spawn any.

| Randomise number of fragments needed | Yes / No |
--Default: Yes
When enabled, all fragments will require a random number of scans to unlock. Ties into
the setting "Max number of fragments needed" below.

| Randomise duplicate scan rewards | Yes / No |
--Default: Yes
Scanning a fragment you've already unlocked will yield a random raw material instead
of the normal two titanium.

| Respect vanilla upgrade chains | Yes / No |
--Default: No
By default, the randomiser breaks the sequential upgrade chains present in the vanilla
Expand Down Expand Up @@ -118,16 +142,23 @@ the same recipe. Thus, setting this to 5 will never allow e.g. a knife to be mad
from 6 titanium and 3 copper. The titanium would be capped at 5, and other ingredients
would be used in the 6th piece's stead.
Reducing this number leads to "flatter" recipes which require more diverse ingredients,
but only a few of them each. This setting is very strongly tied with the one below.
but only a few of them each. This setting is very strongly tied to the one below.

| Max ingredients per recipe | 1 - 10 |
This number determines how many different ingredient types a recipe can hold. Assuming
This number determines how many different ingredient types a recipe can hold. Assume
you set this setting to 3, and you're trying to craft a knife. The recipe you get is
2 copper, 4 gold and 1 stalker tooth. The setting then prevents the randomiser from
adding e.g. 2 titanium to the list of necessary materials, which would bring the
total of diverse types up to 4. However, it does NOT influence how many of each
of these ingredients can be required at once.
This setting is very strongly tied with the one above.
This setting is very strongly tied to the one above.

| Max biomes to spawn each fragment in | 3 - 10 |
This number regulates within how many biomes any given fragment can show up in. Note
that these biomes do NOT refer to biomes in player terms, but rather in game terms,
which treats e.g. walls, ceilings, caves, wreckages, rooms behind locked doors inside
wreckages, etc. each as a different biome. Setting this too low will make it difficult
to find enough fragments.

| Randomise with new seed |
| Randomise with same seed |
Expand Down Expand Up @@ -155,18 +186,17 @@ the randomiser will stop at a depth where you can remain for this many seconds
before having to return for air without dying. This number is capped at 45 seconds
since that is your maximum at the beginning of the game, without any tanks.

| iMaxAmountPerIngredient | 1 - 20 |
--Default: 5
Most ingredients in a recipe may show up as multiples. For example, a Seamoth might
require you to collect four Titanium, five Gold and three Holefish. This setting
controls the maximum amount any single ingredient of a recipe can require.

| iMaxBasicOutpostSize | 4 - 48 |
--Default: 24
The absolute essentials to establish a small scanning outpost all taken together
will not require ingredients which exceed this much space in your inventory. This
affects I-corridors, hatches, scanner rooms, windows, solar panels, and beacons.

| iMaxDuplicateScanYield | 1 - 10 |
--Default: 2
The maximum number of items you will be given upon scanning a fragment that is
already known. Setting this number too high will quickly clutter your inventory.

| iMaxEggsAsSingleIngredient | 1 - 10 |
--Default: 1
This setting does the same as the one above, but specialised for eggs. Because
Expand All @@ -187,7 +217,7 @@ it at your own risk.

| dFuzziness | 0.0 - 1.0 |
--Default: 0.2
Every item in the game is assigned a value before randomising. This setting controls
Every recipe in the game is assigned a value before randomising. This setting controls
how closely the randomiser tries to stick to that value before it declares a
recipe done.
The setting represents a percentage. Assume that Titanium Ingots had a value of 100.
Expand All @@ -206,10 +236,22 @@ With the default value, this means that the randomiser will first try to find an
ingredient with 35%-55% of the total value before moving on to entirely random ones.
Set to 0.0 to disable this behaviour.

| fFragmentSpawnChanceMin | 0.01f - 10.0f |
--Default: 0.3f
This setting, tethered with the one below, provides a global modifier for the
randomiser to decide how likely a fragment spawn should be within a biome. The value
it ultimately decides on is multiplied with the vanilla average fragment spawn rate
within that biome. Small adjustments can have large effects, particularly if combined
with the maximum number of fragments allowed to spawn in a single biome.

| fFragmentSpawnChanceMax | 0.01f - 10.0f |
--Default: 0.6f
See above.

| sBase64Seed |
This extremely long string represents your savegame. All recipes, databoxes,
everything that this mod changes is saved here. You should never change this
manually, unless you're using it share seeds with someone else. In that case,
manually, unless you're using it to share seeds with someone else. In that case,
copying someone else's base seed to your own file allows you to skip synchronising
your settings with them and pressing the randomise button. The game will simply
load their game state next time you boot it up.
Expand Down Expand Up @@ -337,6 +379,12 @@ of information. These are the categories the randomiser will accept:
- Note that fish bred from eggs are also listed in this category.
- Additionally, this category requires an alien containment and a multipurpose
room to be unlocked in logic.
- Fragments
- Provides a base TechType for the randomiser to latch on to while looking through
prefabs in the spawn registry.
- Removing an entry here will cause it to no longer be randomised in a new location.
- Adding an entry will likely do nothing, as the randomiser will probably fail to
find any associated custom prefabs.


[3.3] Depth
Expand Down Expand Up @@ -401,4 +449,4 @@ In addition, this column gives the randomiser a rough idea of how deep you need
to go to be able to grab fragments or databoxes of something. Any item which
included fragments or databoxes in the previous column should provide an unlock
depth here. The randomiser will leave this item alone until its unlock depth is
considered reachable.
considered reachable.
7 changes: 4 additions & 3 deletions SubnauticaRandomiser.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{14E05614-1903-437D-AD80-25E6EE173917}"
ProjectSection(SolutionItems) = preProject
mod.json = mod.json
recipeInformation.csv = recipeInformation.csv
DevNotes.txt = DevNotes.txt
wreckInformation.csv = wreckInformation.csv
ReadMe-Documentation.txt = ReadMe-Documentation.txt
biomeSlots.csv = biomeSlots.csv
DataFiles\biomeSlots.csv = DataFiles\biomeSlots.csv
DataFiles\alternateStarts.csv = DataFiles\alternateStarts.csv
DataFiles\recipeInformation.csv = DataFiles\recipeInformation.csv
DataFiles\wreckInformation.csv = DataFiles\wreckInformation.csv
EndProjectSection
EndProject
Global
Expand Down
Loading

0 comments on commit 17ee395

Please sign in to comment.