Skip to content

Releases: LostArtefacts/TR-Rando

V1.5.2

04 Dec 19:54
Compare
Choose a tag to compare

New Features

  • Random Game Strings - Huge thanks to Lilly Jericho once again for coordinating this!
  • Random Secret Rewards
  • Random Items and Key Items
  • Random Enemies, including cross-level enemies!
  • Random Textures - including some more fantastic texture sets (E.G. Skyboxes) provided by JimmyBeon!
  • Night Time Mode (Recommend using default gamma).

What's Changed

Full Changelog: V1.5.1...V1.5.2

V1.5.1

10 Nov 19:57
Compare
Choose a tag to compare

What's Changed

#230 Secret/Reward Room Fixes

  • Fixes an issue with the visibility portal on leaving one of the reward rooms in Antarctica.
  • Replaces the reward room entirely in Puna to avoid flip map issues and not being able to reach it after entering the boss room.
  • Moves the City reward rooms so they are not linked to flip map rooms.
  • Fixes the ladder texture for City if the alternate level end approach is used (textures missing from the flipped room).
  • Amends the logic of removing existing secret triggers so that it retains any other action list items other than the secret itself. An example is in room 201 in Antarctica, where we want to retain the savegame crystal trigger action but remove the secret action.
  • Reduced the minimum proximity radius to 5 to allow all 6 secrets to be allocated in Puna when this level has that number.

#231 Alternative City Ending

Because of the issue with the electrified fields and level sequencing, the alternative ending for City (used when it is in Cavern's sequence) is now used whenever the level is out of sequence. Additional crystals are added to the level to help with reaching the end trigger. This also adds an AddEntity function to the environment editor.

#232 South Pacific Spikes

The game initialises spikes in Coastal Village and Madubu to a certain height, but this is dependent on these levels being in their original sequences. If they are off-sequence, the height will be amended accordingly. For other levels that have spikes and end up in these sequences, their heights are unaffected as they don't have triggers like the South Pacific ones (barbed wire in London, Nevada, tooth spikes in India). Each "spike" level has been tested when they are in these sequences.

#234 Lara Locking Issue

If replacing Lara in a level, her animations will be retained as this appears to be causing the locking issue after pressing buttons. So only her meshes and frames will be replaced when replacing her outfit. Each level has been tested with each different outfit (including invisibility) after using a button/lever/switch.

#235 UPV Amendments

  • Amended the angles for UPV locations to ensure Lara doesn't have to mount against a wall, as she was voiding in some locations such as Jungle when using the default angle in Location.
  • Only one vehicle type per level is possible because of LaraVehicleAnimation_H being tied to each vehicle, so for Nevada, if the UPV is placed, we also replace the quad with another UPV otherwise the level can't be ended normally.

#233 Corrected an issue where secret was assigned to a flipmap room and therefore not visible.

V1.5.0

08 Nov 16:08
Compare
Choose a tag to compare

TR3 Randomization is Here!!!

  • Random level order and sequencing. This includes interesting side effects such as varying levels with freeze meter and varying weather.
  • Random unarmed levels.
  • Random ammoless levels.
  • Random secrets. Secrets are now PICKUPS! - there are also secret reward rooms hidden around for finding all secrets in a level!
  • Random Audio - trigger tracks and secret tracks.
  • Random outfits - The classic haircut, invisible lara and persistent outfit.

What's Changed

Full Changelog: V1.4.2...V1.5.0

V1.4.2

09 Oct 19:33
Compare
Choose a tag to compare

It's that time of week again, it's another bloody rando update!

There are two major points to cover in this release.

  1. #215 From @Anopob - Anopob has been kind enough to implement another difficulty adjustment which will be quite challenging. "One Limit" means that pickup items like ammo and guns can only spawn a max of once per level for each unique type.
  2. #218 From @lahm86 - Lahm has introduced a long-request feature of sound effects randomization! Sound effects like weapons, footsteps, enemy grunts etc. are now all randomized! The implementation is also pretty smart by categorizing "types" of sfx. So for example an enemy death noise will always be replaced by an alternate death noise rather than a footstep.

Lahm has also introduced the following improvements:

  1. For unarmed levels, extra ammo will now be added directly to the inventory instead of creating additional entities in the level. This avoids situations where the savegame would have to save all these entities and now only saves a single value.
  2. Purist Mode - Even when environmental randomization was disabled, some were still applied for corrections or backtracking. A purist mode option is now added to ensure levels are in a completely original state (apart from very minor fixes such as those related to pathfinding).

For full details, please see the linked PRs.

Thanks!

What's Changed

  • Add item difficulty option by @Anopob in #215
  • Unarmed Level Ammo, Purist Mode and SFX Randomization by @lahm86 in #218

Full Changelog: V1.4.1...V1.4.2

V1.4.1

02 Oct 13:13
a022450
Compare
Choose a tag to compare

#214 - Thanks to Lahm for the PR. For detailed information, click the link.

  1. Resolves AI Pathfinding problems introduced by Environment Randomization.
  2. Resolves pathfinding issues with invalid overlaps (E.G. Catacombs of the Tailon)
  3. General ammendments to environment randomization (Fix for a potential inaccessible glitched secret, and minor improvements).

V1.4.0

21 Sep 19:00
e3cd5f9
Compare
Choose a tag to compare

Note: There are substantial changes in this version. Although extensive testing has been done, there are likely to be issues. Please report them on the discord or raise an issue here. We will aim to follow up with a 1.4.1 with fixes similar to how 1.3.1 was handled.

#196 - Some initial work on Randomizer difficulty from Anopob!

#200 #205 #206 & #207 - Environmental randomization, variety of languages, texture updates by Lahm, Lilly, Jimmy Beon and all the language contributors (there are so many to list!!!)

#201 - Update of projects to SDK format by chreden.

Please see the merge requests listed above for implementation details (they are worth the read!). A summary can be found as follows:

  • Enemy difficulty can be modified between its normal behaviour and an "unrestricted" mode which removes a few restrictions to bring an even crazier rando experience.
  • Opera House and Barkhang Monastery entity freezing issues have been fixed. This was caused by water enemies essentially not cleaning up due to their lift to the heavens.
  • Improvements to dragon interactions and behaviour.
  • Fix for start positions resulting in inaccessible secrets.
  • Additions of a huge amount of languages ranging from German to Finnish, Russian to Japanese.
  • Huge amount of new textures including secrets and themes.
  • Environment randomization: this includes mirroring of levels, randomization of traps, obstacles, keyholes, doors, water and even completely new geometry and ways to complete and progress through levels!.
  • Ability to choose the level of brightness for night mode.

V1.3.3

01 Aug 10:16
Compare
Choose a tag to compare

#168 - Removed rooms from burner chip pool on Diving Area that can cause softlocks.
#152 - Dagger on Lara's dressing gown can be hidden if she has not completed a level wit ha dragon in it.
#152 - Invisibility cloak option for Lara. She will be completely invisible except for her shadow.
#183 - Cutscenes are now Randomized.

V1.3.2

25 Jul 13:14
Compare
Choose a tag to compare

Many thanks to Anopob, Lahm and Topixtor for this release.

  • #154 - Fix to skidoo limits to avoid game throwing assertion/exit.
  • #157 - Corrected issues with flame randomization.
  • #161 - Correction to Barkhang Freeezing by keeping the original set of Merc1 and MonkWithLongStick entities. Barkhang will no longer include non-killable enemies and docile chickens. This was necessary for now to prevent this freeze bug occurring.
  • #161 - Correction to skybox with TR2Main which was caused by the flat colour palette not matching the randomized texture (thanks to Topixtor).
  • #161 - Winston can now appear in-game. He will appear in at most 2 different levels, and a maximum of twice in those levels. He is treated as a hazard, so won't appear in HSH, at the end of DA or in Barkhang
  • #172 - Various UI improvements implemented by Anopob.
  • #176 - Randomized Outfits - Correct various issues and support for haircuts.
  • #176 - Randomized Inventory - Medikit colours are now randomized for each level. The Floater Spooky theme will still have black medikits. The inventory background, font, UI frame (i.e. the border for the in-game statistics, level list etc) and the passport textures are now randomized. Themes are used to ensure text is legible against the different backgrounds
  • #176 - Randomized Gamestrings - Randomization of game text.
  • #176 - Randomized Offshore Keycards - Keycard textures on rig and DA can now be randomized. This can be disabled by selecting the original key sprites option.
  • #176 - Randomized Secret Sprites - Secrets sprites are now randomized (for all levels) with the option to disabled if required (similar to above, there is an option to use original secret textures).
  • #181 - Night Mode - For a chosen number of levels, the environment (all rooms) will be darkened. NightModeRandomizer includes some logic to remove entities that don't make sense in a dark environment such as venice washing lines or singing birds. Night mode overrides sunset.
  • #181 - FDControl Updates - Improvements to the FDControl library to support greater manipulation of floordata.
  • #181 - Audio Randomization - Randomizes soundtrack triggers as well as secret collection sounds.
  • #181 - Starting Position Randomization - Lara can now start levels in different locations and facing different directions.
  • #181 - Enemies.md has been added to describe rules relating to cross-level enemies.

V1.3.1

06 Jun 14:54
3e6086f
Compare
Choose a tag to compare

Bug Fixes and improvements on V1.3.1:

I would like to thank Lahm86 and Anopob for big contributions to these fixes, and also the entire community for providing us with detailed information and bug reports so we can continue to improve the rando.

  • #130 - TRex Softlock Issue Fixed
  • #131 - Added option to protect monks (they wont drop key items or be necessary to kill for progress)
  • #133 - Ensured hidden gong on catacombs is randomized
  • #110 - Implemented ability to parse, modify and write floordata for modification of triggers
  • Various item location fixes and additional items provided by Anopob
  • #128 - Option added to include glitched secrets or keep them out
  • #136 - Barkhang entity freeze fix
  • #137, #139 - Texture corruption fixes
  • #147 - New randomized sky in DA and Rig
  • #148 - Cross Level enemies now in HSH
  • #145 - Added option to stop key item textures changing
  • #121 - Water draining tempeorarily disabled due to softlock issues
  • Corrected various issues of inaccessible secrets and key items being zoned incorrectly
  • #149 - Fixed issues where savegame buffer would overflow as the entity limit was exceeded
  • #146 - All dragon triggers are now OneShot, which avoid crashes of re-triggering the dragon

V1.3.0

29 May 16:26
Compare
Choose a tag to compare

Main issues covered: #43, #58, #97, #124, #125

The changes are separated into the following sections.

  1. Dependency Changes
  2. TRGE Updates
  3. Cross-level Enemies
  4. Texture Framework
  5. Multiple Unarmed Locations
  6. Item Randomizer
  7. Refactoring
  8. UI Updates
  9. Misc
  10. Key Items

Dependency Changes

TRGE Updates

  • The "Modified by…" string that appears in the title screen/inventory can now be specified in German and French as well as in English. The language is detected in the script file.
  • Fixes a problem where disabling title screen demos was ineffective.
  • Fixes a problem with Floating Islands if the version swapper tool had been used after TRGE had performed a backup of the original files. The swapper tool replaces FLOATING.TR2, but TRGE will always use the file that it originally backed up. Checks will now detect when the swapper has been used, and the backed-up file will be replaced. For the Randomizer, this meant that despite switching to UK Box, it was possible to still see texture corruption in this level.
  • Fixes sprite texture bounds of imported weapons (Floating Islands and Dragon's Lair).
  • Fixes air bubbles showing as blood splats when swimming in HSH.
  • Fixes upside-down paintings in HSH piano room (original bug in the game).

#97 Cross-level Enemies

Excluding a few restrictions, any enemy type can now appear in any level. TRModelTransporter is responsible for exporting enemy definitions (or more loosely, model definitions) to JSON format, and these definitions are made up of animations, animation frames, cinematic frames, colours, sound, meshes, meshtrees, object textures, sprite textures and sprite sequences. Beside each JSON file is a PNG of the textures used by the model. The definition holds a map of how to relate the PNG to the object or sprite textures used by the model.

Some models have several dependencies on others. A good example is MarcoBartoli – this definition holds a reference to the dragon explosion (4 separate models), the dragon itself (another 4 separate models) and the model that defines Lara's animation of inspecting the dagger. The Venice goons and the Tibet mercenaries are others like this, all sharing various behaviour. This complexity is all handled within TRModelImporter, so given an entity to import, it will resolve all dependencies.

The models are exported once and stored in Resources\Models, rather than exporting each time they are needed.

Aliases

Some enemies have aliases, so these are models with the same ID, animations, sounds etc, but different textures. These have been defined as follows to allow specific entity types to be imported (the original levels they appear in are shown in brackets).

  • Barracuda
    • BarracudaIce (CoT, Ice Palace)
    • BarracudaUnwater (40F, Doria, LQ, Deck)
    • BarracudaXian (Xian)
  • StickWieldingGoon1
    • StickWieldingGoon1Bandana (Rig, Diving Area)
    • StickWieldingGoon1BlackJacket (HSH)
    • StickWieldingGoon1BodyWarmer (Venice)
    • StickWieldingGoon1GreenVest (40F, Doria, LQ, Deck)
    • StickWieldingGoon1WhiteVest (Bartoli, Opera)
  • TigerOrSnowLeopard
    • BengalTiger (Great Wall, Xian)
    • SnowLeopard (Tibet, CoT)
    • WhiteTiger (Ice Palace)

Only one entity per family can exist in a level as the model can only point to one set of textures.

Limits

The biggest limit is that only 16 texture tiles are supported per level. When transporting models, the textures of those no longer in use are removed from the tiles, so freeing up some space. Fortunately, Core duplicated a lot of textures in the original levels so there has been room for manipulation here to make even more space available. This was done by going through every texture and comparing it pixel-by-pixel with every other texture. On an exact match, the first texture is removed from the tile, and the texture object updated to point to the second tile location instead. For example, in tile index 3 in Great Wall, the 64x64 square at position [64, 152] is already contained within the 64x80 rectangle at position [72, 0], so the square is deleted and the texture object is repointed to [72, 0] - so gaining 64x64 pixels of space. JSON files are stored in Resources\Textures\Deduplication for each level, and these are used to process the remapping during randomization (this is much more efficient than running pixel-by-pixel checks each time). The mapping files also detail any dependencies, so for example if two enemies share the same texture, the area in the tile will only be removed if both enemies are also being removed.

Another limit is that the game only supports 2048 texture objects (TRLevelReader.Model.TR2Level.NumObjectTextures). When importing enemies, we re-use all of the texture objects of the removed enemies, but in some cases this is still not enough. An example is in Diving Area, which only has 26 free slots, so if the enemies that are being imported are more texture-heavy than the ones removed, we hit a problem. A workaround is described below in the randomization process.

Packing

After the tiles have been stripped of duplicates and the old enemies have been removed, the new enemy textures can be imported into the tiles. RectanglePacker deals with this bin-packing problem – you can see a demo of this in action at https://github.com/lahm86/RectanglePacker/raw/main/Resources/PackingDemo.gif. It would be ideal to start completely afresh and repack every texture, similar to the demo, but this takes between 10-20 seconds per level. For efficiency, we begin with the pre-populated level tiles and start packing on the last occupied tile, then fill them up until we reach the end of tile 16. If there are still more textures to add, we move to the first tile and continue from there. RectanglePacker is only one solution to bin-packing, so there is definitely room for improvement with it.

Randomization Process

Selecting Enemies

EnemyRandomizer has been updated with the option to include cross-level enemies. If this is not used, the standard native enemy randomization will take place. The number of enemy types per level remains the same for the bulk of levels, but for some there will be more and others less. The likes of Great Wall has plenty of tile space and free object textures, so we add an extra 2 enemy types here to make 6. Opera House and Diving Area are tight on space, so we drop 1 each here to 6 and 5.

TR2RandomizerCore.Utilities.EnemyUtilities contains most of the rules that control which enemies can be selected. Other than the special cases below, enemies are simply chosen at random, but we still honour the previous requirements for water and droppable enemies as well as ensuring that the chicken, dragon, and HSH shotgun goon remain at the end of their default levels. A check is also done at the end of Diving Area to ensure that both enemies here can be killed (so we specifically avoid the eels).

HSH

The kill count seems to break in HSH when you change the enemy types – in some cases you can finish the level after one kill, in others, the ShotgunGoon never spawns. So for now, we only randomize StickWieldingGoon1 into a different alias for this level.

Dragon

The dragon can only appear in the following levels outside of Lair.

  • Great Wall
  • Opera House
  • Doria
  • The Deck
  • Tibet
  • CoT

The main reason is that the explosion has a 128x128 texture, so levels tight on space won't support this without performing full texture repacking. In addition, if the dragon spawns in a compact room, it can be impossible to kill. It tends to land in the void when it falls so the dagger can't be reached. Lara can also void during the explosion. So, those levels that can support the textures have rooms defined for supporting the dragon. These are held in Resources\enemy_restrictions.json, which is a map of level name -> entity ID -> room number list.

In addition to room restrictions, the dragon will only appear a maximum of once per level. If multiple dragons spawn close together, the game tends to crash.

MercSnowmobDriver

The file described above also lists room restrictions for MercSnowmobDriver. This is restricted to showing a maximum of twice per level (outside of Tibet). As the black skidoo depends on the red skidoo, this will be added as an entity to a level when MercSnowmobDriver is present. One red skidoo is added to the same spot as the first MercSnowmobDriver. This should ideally be zoned along with the room restrictions for this enemy and the dragon.

Chicken

The chicken is restricted to appear in at most 3 different levels (there are currently no restrictions on location or count within each level). There is also scope in EnemyUtilities to limit other enemies across the game in a similar way if needed.

Performance

Texture packing is quite time consuming – on average it takes around 5 seconds per level. As a result, EnemyRandomizer uses threading to run the model import work in parallel.
...

Read more