Git Product home page Git Product logo

bsp_tool's People

Contributors

bobthebob9 avatar r-ex avatar snake-biscuits avatar ttury avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bsp_tool's Issues

[Test Maps] `soldier_of_fortune`

Tools

  • Level Editor(s):
    • TODO: find / create
  • Compiler(s):
    • TODO: find / create

Documentation / Guides

TODO: find / make at least one guide

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

TODO

Cannot load entities lump

I made a small script to play around with bsp_tool:

from bsp_tool import load_bsp
from bsp_tool.branches.respawn.apex_legends import LUMP

file = "/home/lee/Code/Mine/Analysis/ApexLegends/Maps/KingsCanyon/mp_rr_canyonlands_staging.bsp"
bsp = load_bsp(file)
bsp.read_lump(LUMP.ENTITIES)

Note I do have the ...0000.bsp_lump.

But I'm unable to retrieve the entities lump:

$ python3 test.py
Loading mp_rr_canyonlands_staging.bsp (rBSP version 49)...
ERROR PARSING TEXDATA:
TEXDATA lump is an unusual size (400 / 36). Wrong engine branch?
Loaded  mp_rr_canyonlands_staging.bsp
Traceback (most recent call last):
  File "/home/lee/Code/Others/bsp_tool/test.py", line 6, in <module>
    bsp.read_lump(LUMP.ENTITIES)
  File "/home/lee/Code/Others/bsp_tool/bsp_tool/respawn.py", line 29, in read_lump
    self.file.seek(self.branch.lump_header_address[LUMP])
ValueError: seek of closed file

After this I'm going to probably export the vertices to see some point clouds (as you've done in lump_analysis.py).

Have you gotten chunks of the level to render with planes? Do you know how LOD is handled?

[Test Maps] `quake3`

Tools

Documentation / Guides

TODO

Maps

  • Basic room with spawnpoint & lighting
    mapsrc/GtKRadiant/Quake 3 Arena/mp_lobby.map -> maps/Quake 3 Arena/mp_lobby.bsp
    • sources.txt crediting mapper / contributor
    • Compiled
    • Tested (Runs In-Engine)
      have to put maps/mp_lobby.bsp in a .pk3 & copy into Quake 3 Arena/baseq3
    • .bsp.info.txt file with vbspinfo output or compile log
      q3map2 -info > mp_lobby.bsp.info.txt (anonymous filepaths)

Active Mods / Modding Community

TODO

[Test Maps] `titanfall2`

Tools

Documentation / Guides

Maps

Maps are fullbright, we're working on it: see this MRVN-Radiant Issue for details
remap.exe -info currently doesn't work for Titanfall Engine maps, so no .bsp.info.txt
mp_crossfire.map uses Valve220 texture mapping, which breaks on compile

  • Basic room with spawnpoint & lighting
    mapsrc/MRVN-Radiant/Titanfall 2/mp_crossfire.map -> maps/Titanfall 2/mp_crossfire.bsp
    • sources.txt crediting mapper(s) / contributor(s)
    • compiled
    • .bsp.info.txt file with vbspinfo output or compile log
    • tested

NOTE: I'm manually copying maps into Northstar for testing rn, the workflow is a mess

Active Mods / Modding Community

[Test Maps] `modern_warfare`

Tools

  • Level Editor(s):
  • Compiler(s):
    • cod3map (internally, IW thought they were working on CoD 3)

Documentation / Guides

Maps

  • Basic room with spawnpoint & lighting
    mapsrc/CoD4Radiant/mp_lobby.map -> maps/Call of Duty 4/mp/mp_lobby.d3dbsp
    • sources.txt entry crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with vbspinfo output or compile log
      cod3map -info > mp_lobby.bsp.info.txt
    • Packed (fastfile etc.)
    • Tested
  • Ships with CoD4 Tools:
    • mapsrc/CoD4Radiant/mp_test.map -> maps/Call of Duty 4/mp/mp_test.d3dbsp
    • mapsrc/CoD4Radiant/test.map -> maps/Call of Duty 4/test.d3dbsp
    • mapsrc/CoD4Radiant/test_traverses.map -> maps/Call of Duty 4/test_traverses.d3dbsp

Active Mods / Modding Community

[Test Maps] `soldier_of_fortune2`

Tools

Documentation / Guides

TODO: find at least one guide / tutorial

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

  • TODO

Convert CSS/CSGO map to CSO2

Hello! I didn't find a way to contact you directly so I have to ask it here.
I run a community and EU/RU server of the game called Counter-Strike Online 2 which works on the modified Source engine. It is possible to add different custom content to the game, but not the maps.
I'm looking for someone who is experienced in the .bsp format to create a map converter: CSS -> CSO2 or CSGO -> CSO2. If you like to try it I will drop you few CSO2 maps for investigation.
Error 1) Different BSP version, 100 expected. Can be bypassed by editing .bsp file in hex editor.
Error 2) Funny lump size. Stuck here.
I heard some guys bypassed the funny lump size error by adding zeroes at the end of the lumps, but they gave up at the upcoming errors.

[Test Maps] `call_of_duty2`

Tools

Documentation / Guides:

Once installed, CoD2ModTools will add a Docs/ folder to the CoD2 install
You will need to edit windows registry so the installer can find your CoD installation:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Activision\Call of Duty 2]
"InstallPath"="C:\\Program Files (x86)\\Activision\\Call of Duty 2\\"
"InstallDrive"="C:\\"
"Language"="enu"
"Version"="1.3"
"codkey"="XXXXXXXXXXXXXXXXXXXX"
"EXEString"="C:\\Program Files (x86)\\Activision\\Call of Duty 2\\cod2sp_s.exe"
"MultiEXEString"="C:\\Program Files (x86)\\Activision\\Call of Duty 2\\cod2mp_s.exe"
"QA"="15.3"

NOTE: Wow6432Node\Activision is for 64-bit systems, make a copy in Activision\ for x86

NOTE: I copied my steam install to the pre-steam Program Files (x86)/Activision install dir

Maps

  • Basic room with spawnpoint & lighting
    • sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log
    • Tested

NOTE: CoD2ModTools includes ~38MB of .map files, ~32MB of which are prefabs

Active Mods / Modding Community

Test maps for every branch

Need to identify mapping tools / pipelines and provide test maps for as many games as possible
All without distributing any copyrighted maps

branch_scripts with maps:

[Test Maps] `dark_messiah_sp`

Tools

  • Level Editor(s):
  • Compiler(s):
    • vbsp, vvis, vrad & vbspinfo

SDK is pre-steampipe, so assets will need to be extracted from .vpks

Documentation / Guides

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

[Test Maps] `alien_swarm`

Tools

  • Level Editor(s):
    • Hammer (Alien Swarm SDK on Steam)
    • Hammer (Alien Swarm: Reactive Drop SDK on Steam)
    • Hammer++ (2013 MP) [UNTESTED]
  • Compiler(s):
    • vbsp, vvis, vrad, vbspinfo

Documentation / Guides

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

[Test Maps] `vampire`

Tools

  • Level Editor(s):
    • Hammer (Community Mod)
  • Compiler(s):
    • Community SDK

Documentation / Guides

NOTE: The SDK is Unofficial and based on Half-Life 2 Beta Leaks

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

Refactor BspLump

Editing attrs of an object returned by a BspLump don’t update BspLump.changes, need to do some soft copies probably
Slice overriding & insertion don’t seem to work either.
Both of these need tests and more

>>> BspLump[i].x = new_val
>>> BspLump[i].x
old_val

editing a lump should be as easy as modifying the contents of a list

Access both internal & external lumps

Titanfall 2 .bsps has different formats for internal (.bsp) REAL_TIME_LIGHTS & the external (.bsp_lump) lump
To deal with this all ValveBsp & RespawnBsp will need another member to hold external lumps

Methods for copying between internal & external lumps will also be needed
When saving options will need to be added for folding lumps into the internal .bsp

While RespawnBsp has no headers in .bsp_lump files, ValveBsp includes a header at the start of .lmp files
ValveBsp can also have multiple numbered lump files
Managing mounting these lumps will likely grow to be quite complex

However, keeping headers to exclusively the headers defined in the .bsp will simplify things
(the c++ implementation really shows how simple the process can be)

RespawnBsp .ent headers could also probably get their own member
Especially since they are tied to the ENTITY_PARTITION lump

[Test Maps] `cso2_2018`

Tools

Documentation / Guides

TODO: find at least one guide / tutorial

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

[Test Maps] `nightfire`

Tools

Documentation / Guides

TODO: find at least one guide / tutorial

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

TODO: look around for modding projects / communities

[Test Maps] `hexen2`

Tools

Documentation / Guides

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

TODO

Need helper class for Bitfields in Struct & MappedArray classes

Thanks Fifty.

struct CellAABBNode_t {
    Vector3f  mins;
    uint32_t  num_children: 8;
    uint32_t  first_child: 16;
    uint32_t  child_flags: 8;
    Vector3f  maxs;
    uint32_t  num_obj_refs: 8;
    uint32_t  first_obj_ref: 16;
    uint32_t  obj_ref_flags: 8;
};

Looks like respawn structs use bitfields a lot
This makes sense with the "Extreme SIMD" method of vec4(a.xyz, a.metadata)

valve.source.Leaf also uses a bitfield
at present we just write a getter & setter property for each member

This means CellAABBNode would need 12 property methods
Automating this would minimize errors & reduce bloat

rBSP version is now 49

canyonlands_staging uses rBSP version 49, which is even newer than the 48 noted in the file.

[Test Maps] `dark_messiah_mp`

Tools

  • Level Editor(s):
  • Compiler(s):
    • vbsp, vvis, vrad & vbspinfo

SDK is pre-steampipe, so assets will need to be extracted from .vpks

Documentation / Guides

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

Entity data lost due to duplicate keys not being handled by parser

Duplicate keys in entities are lost just like in QtPyHammer-devs/vmf_tool#13

UPDATE: This isn't actually a bug, turns out I forgot the code handles this case and didn't check before creating the issue :P
Still, an update would be nice

Try handling this like https://github.com/pySourceSDK / ValveVMF
Where instead of a dict a list of [(key, value)] tuples store all keys without duplicates

This will require:

  • New parsing approach
  • Refactor of Entities.search
    • Refactor all bsp methods (in branch scripts, e.g. worldspawn_volume) that touch ENTITIES lumps
      • TODO: list all such methods here so we can track progress
  • Re-compiling test/maps/Team Fortress 2/test2.bsp to match QtPyHammer-devs/vmf_tool's test2.vmf
  • A test that uses this test map to confirm this issue has not reappeared

NOTE: io_import_rbsp will also need updating to support these changes

Extending

This might also be a good opportunity to use ValveVMF's parser on values
And even using ValveFGD & custom classes for entities
However this would likely require some re-engineering (of ValveVMF) to allow feeding the system flat nodes (unnamed curly brace groups)
Not to mention some extra details to the parser, and maybe a deeper look at .fgd generation

NOTE: Many source engine titles have .fgd files available via the VDC: link

Maybe extenstions/fgd.py or bsp_tool_examples would be a place to try this out
It would be preferable for the core lib to continue to function without any external dependencies
ValveVMF parsing can also be quite slow, so deferring it's use until needed would be ideal

Any progress on save_as() function ?

I am working on a program which automatically adds an eventlistener to any given csgo .bsp file. I have already made a progress on adding the entities to the bsp and the only thing left is to save the map to a new bsp file. I just wanted to know if any progress was made in the past 4 months ?

[Test Maps] `call_of_duty1`

Tools

  • Level Editor(s):
  • Compiler(s):
    • q3map (Call of Duty/Tools/bin/q3map.exe)

Documentation / Guides:

NOTE: instscript.vdf in steam install should make a 32-bit registry key, maybe?

Maps

  • Basic room with spawnpoint & lighting
    • sources.txt entry crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log
    • Tested

Active Mods / Modding Community

[Test Maps] `quake`

Tools

Documentation / Guides

Maps

  • Basic room with spawnpoint & lighting
    mapsrc/TrenchBroom/Quake/mp_lobby.map -> maps/Quake/mp_lobby.bsp
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

[Test Maps] `sin`

Tools

  • Level Editor(s):
    • TODO: find / create
  • Compiler(s):
    • q3map2 maybe? (think I saw some references in the public source code)

Documentation / Guides

TODO: find / make at least one guide

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

TODO

[Test Maps] `daikatana`

Tools

Documentation / Guides

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

TODO

[Test Maps] `titanfall`

NOTE: Requires Titanfall Online Revival access to run a server to test maps

Tools

Documentation / Guides

NOTE: Need to match .vmt shaders (VertexLitGeneric etc.) to vertex types

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

  • Harmony (Discord)
  • Titanfall: Online - Revive (Closed Alpha Mod)

[Test Maps] `apex_legends`

NOTE: Need R5Reloaded client to test maps

Tools

Documentation / Guides

TODO: find / make at least one guide

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

  • R5-Reloaded (Discord)

[Test Maps] `fakk2`

Tools

  • Level Editor(s):
  • Compiler(s):
    • q3map

Documentation / Guides

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

Create bsp class from bytes / stream

All functions / classes that return a base.Bsp subclass should accept either an open binary file or bytestring in the place of a filename, this would allow for loading .bsps from within archives without unpacking

And other sources I'm sure

as part of such a system a path handler for indexing files inside archives would be needed

game/archive.ext/maps/target.bsp->
archive = game/archive.ext
bsp = bsp_tool.load_bsp(archive.read(“maps/target.bsp”))

Changes would also have to be made to how bsps record and relate to their “folder” & “filename”

Opening an archive only once and scanning it for .bsp files would also be useful for tests

Good luck writing back to the archive, unless you want to add a Read-Only mode...

Refactor to allow reloading lumps

When mapping out methods / lump formats it would be quite handy to use importlib to reload branch scripts and reload a single lump

>>> import bsp_tool
>>> import my_branch_script
>>> bsp = bsp_tool.load_bsp("maps/subject.bsp", branch=my_branch_script)
ERROR LOADING LUMP_XX:
	...
# edit my_branch_script.py
>>> import importlib
>>> importlib.reload(my_branch_script)
>>> bsp.set_branch(my_branch_script)
>>> bsp.reload("LUMP_XX")

or even writing a test lump class live in editor

>>> import bsp_tool
>>> import enum
>>> class BranchScript:
...    class LUMP(enum.Enum):
...        LUMP_XX = 42
...    lump_header_address = {LUMP.LUMP_XX: (16 + 42 * 16)}
...    LUMP_CLASSES = dict()
...    SPECIAL_LUMP_CLASSES = dict()
...    methods = []
>>> branch_script = BranchScript()
>>> class Xx(bsp_tool.branches.base.MappedArray):
...     _format = "3f"
...     _mapping = [*"xyz"]
>>> branch_script.LUMP_CLASSES["LUMP_XX"] = Xx
>>> bsp = bsp_tool.load_bsp("maps/subject.bsp", branch=branch_script)
ERROR LOADING LUMP_XX
	...
>>> class NewXx(bsp_tool.branches.base.MappedArray):
...     _format = "4f"
...     _mapping = [*"xyzw"]
>>> bsp.branch.LUMP_CLASSES["LUMP_XX"] = NewXx
>>> bsp.reload("LUMP_XX")

Though even this theorised process could be simplified a little, but loading new lump classes faster would be a very helpful tool

[Test Maps] `goldsrc`

Tools

Documentation / Guides

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

Still developing?

Nice tool you've built here! I'm a researcher, interested in building virtual environments for people to explore, such that I can scan their brains while they navigate through the maps. The goal is to learn something about how the brain encodes navigation. This tool could put a lot more maps at my disposal for my experiments (doing bsp export / conversion manually through e.g. nem's tools is tedious and doesn't work well on linux / mac, which are my primary computers). So - out of curiosity - are you still developing this? There are a few small bugs in the code that I've caught (could submit a PR for those if you're interested), and there are some other things that I haven't had time to dig into (some geometry errors for some maps, no material exporter implemented yet). But before I get too deep here, I wanted to know if this is an ongoing project that you plan to improve, or just a quickie side project.

Cheers,
Mark

[Test Maps] `cso2`

Tools

Documentation / Guides

TODO: find at least one guide / tutorial

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

[Test Maps] `vindictus`

Tools

  • Level Editor(s):
  • Compiler(s):
    • vbsp, vvis, vrad, vbspinfo
  • Post-Compiler(s):
    • TODO: find / create

Documentation / Guides

TODO: find / make at least one guide

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

[Test Maps] `blue_shift`

Tools

Documentation / Guides

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

  • The Whole Half-Life (Forums, Wiki & Discord)
  • Valve Modding Community (Discord)
  • Valve Developer Community (Wiki)

Inverted "normals" in rBSP (mp_rr_aquaduct at least)

When you load an mp_rr_aquaduct and enable backface culling - all of the normals or order of verticies are inverted rendering the result mesh unusable (as-is) in most real-world case scenarios like importing the FBX in Hammer 2

Pic:

image

[Test Maps] `titanfall_x360`

TODO: Extract a complete .bsp from .bpk files

Tools

  • Level Editor(s):
  • Compiler(s):
    • remap
  • Post-Compiler(s):
    • PC -> Xbox360 converter

Documentation / Guides

TODO: find / make at least one guide

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

  • Harmony (Discord)

[Test Maps] `quake2`

Tools

Documentation / Guides

Maps

  • Basic room with spawnpoint & lighting
    mapsrc/TrenchBroom/Quake 2/mp_lobby.map -> maps/Quake 2/mp_lobby.bsp
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

[Test Maps] `infra`

Tools

  • Level Editor(s):
    • Hammer (ships with Infra)
  • Compiler(s):
    • vbsp, vvis, vrad, vbspinfo

Documentation / Guides

Maps

  • Basic room with spawnpoint & lighting
    • Entry in sources.txt crediting mapper / contributor
    • Compiled
    • .bsp.info.txt file with compile log / bspinfo
    • Can be launched in-game (no crash, fully lit & textured etc.)

Active Mods / Modding Community

  • Valve Developer Community (Wiki)

save_as() method for every BspClass

Any changes made to a .bsp should be saved back to that .bsp by bsp_tool
The user shouldn't have to worry about specifics like lump containing offsets
However confirming the saved map is valid will not be a feature at this time
(could use an optional branch script method as a fuzzy validator for engine limit checks etc.)

NOTE: this means Quake / GoldSrc lumps like MIP_TEXTURES need to be handled with SpecialLumpClasses
or maybe even a new class in the lumps module

TRACKER: base.Bsp subclasses with a functional & tested .save_as() method

  • IdTechBsp
    • Genesis3DBsp
    • InfinityWardBsp
      • D3DBsp
    • RavenBsp
    • RitualBsp
  • QuakeBsp
    • GoldSrcBsp
    • ReMakeQuakeBsp
      • Quake64Bsp
  • ValveBsp
    • RespawnBsp

Further TODOS

  • #109
  • tests/test_save.py needs to be content aware, otherwise saves must be byte-for-byte

load_bsp branch detection can't tell some formats apart

Need to bring more automation to auto-detect
Adding a new game should be as simple as writing a new branch script
Setting defaults for each (FILE_MAGIC, BSP_VERSION) may remain automated for a while though

Could default to mainline IdTech / Source Titles?

The way bsp headers are handled also needs to be refactored
VBSP v20 Vindictus, DarkMessiah headers & Ubertools .bsps don't play nice with the current system
Bsp base classes also don't do enough work, a lot of copy-pasted code needs to be eliminated

TRACKER: auto-detect added:

  • ace_team
    • Zeno Clash
  • arkane.dark_messiah_mp
    • Dark Messiah of Might & Magic Multiplayer
  • gearbox.blue_shift
    • Half-Life: Blue Shift
  • nexon.cso2_2018
    • Counter-Strike: Online 2
  • nexon.vindictus
    • Vindictus
  • nexon.vindictus69
    • Vindictus v1.69 EU
  • outerlight.outerlight
    • Bloody Good Time
    • The Ship
  • raven.hexen2
    • Hexen II
  • raven.soldier_of_fortune2
    • Soldier of Fortune 2
    • Star Wars Jedi Knight II: Jedi Outcast
  • raven.soldier_of_fortune
    • Soldier of Fortune
  • ritual.sin
    • SiN
    • SiN: Gold
  • utoplanet.merubasu
    • Fairy Tale Busters
  • valve.alien_swarm
    • Alien Swarm
    • Alien Swarm: Reactive Drop
  • valve.left4dead2
    • Left 4 Dead 2
  • valve.left4dead
    • Left 4 Dead
  • valve.source_filmmaker
    • Source Filmmaker

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.