Open snake-biscuits opened 2 years ago
Generated list of classnames with bsp_tool:
>>> import fnmatch
>>> import functools
>>> import os
>>>
>>> import bsp_tool
>>>
>>> r1md = "E:/Mod/Titanfall/maps"
>>> r1omd = "E:/Mod/TitanfallOnline/maps"
>>> r1m = {m[:-4]: bsp_tool.load_bsp(os.path.join(r1md, m)) for m in fnmatch.filter(os.listdir(r1md), "*.bsp")}
>>> r1om = {m[:-4]: bsp_tool.load_bsp(os.path.join(r1omd, m)) for m in fnmatch.filter(os.listdir(r1omd), "*.bsp")}
>>> # for each entity lump:
>>> r1_script= functools.reduce(lambda a, b: a.union(b), [{(e["classname"], e.get("editorclass", "")) for e in bsp.ENTITIES_script} for bsp in r1m.values()])
>>> r1o_script= functools.reduce(lambda a, b: a.union(b), [{(e["classname"], e.get("editorclass", "")) for e in bsp.ENTITIES_script} for bsp in r1om.values()])
>>> {print(f" - [ ] {cn}", f"(editorclass={ec})" if ec != "" else "") for cn, ec in sorted(r1_script.union(r1o_script))}
>>> # copy & paste results into github issue
We should also add entities which get compiled into the map as special lumps (e.g. cubemaps & static props)
VDC: List of Hammer-only entitities
Quake3's misc_model
is another useful one, used to compile model geometry into triangles embedded in the bsp
Respawn apparently managed to do visibility calculations for static prop occlusion, just look at Apex maps w/o props
NOTE: if you count static props, Titanfall maps can have thousands of entities -- need to do some model lod switching, fade distance emulation or fade to model bounding boxes like Hammer
Helper code for keyvalues:
>>> e_k = functools.reduce(lambda a, b: a.union(b), [set(e.keys()) for bsp in r1m.entities for e in bsp.ENTITIES.search(classname="entity")])
>>> {print(x) for x in sorted(e_k)}
# list of entity keys
# compare base.fgd
# compare VDC
# compare Quake3 .ent
>>> e_k_vs = {e.get("key", "") for bsp in r1m.entities for e in bsp.ENTITIES.search(classname="entity")}
>>> print(sorted(e_k_vs)[-1]) # see what values look like to guess / confirm type
Generated a huge batch of .ent
files over at snake-biscuits/bsp_tool_examples
Installation:
.xml
entity definitions: .xml
extension to .ent
MRVN-radiant/gamepacks/TitanfallOnline.game/TitanfallOnline/
WARNING! Experimental! will replace default entities.ent! (make a backup just in case)
Feel free to try new entities & keys out Please record what happens if you do (record as in take notes, doesn't have to be video) I'll be mixing in the ents by @catornot & some of my manual additions at a later date plus updating the generator (forcing inheritance, more interactive & analysis tools etc.) but rn i gotta sleep
Generated a huge batch of
.ent
files over at snake-biscuits/bsp_tool_examples
This includes .ent
for MRVN-radiant/MRVN-entities#2 & MRVN-radiant/MRVN-entities#3
Build an entity zoo with every entity and figure out what it does Update the
.ent
files where nessecary If an entity / family of entities looks like it'll be a lot of work, break it off into a child issueentities.ent
for entities which appear in thebsp.ENTITIES
lumpenvironment_entities.ent
for entities which appear inmaps/bsp_name_env.ent
effects_entities.ent
for entities which appear inmaps/bsp_name_fx.ent
script_entities.ent
for entities which appear inmaps/bsp_name_script.ent
sound_entities.ent
for entities which appear inmaps/bsp_name_snd.ent
spawn_entities.ent
for entities which appear inmaps/bsp_name_spawn.ent
Titanfall2/entities.ent
)