Download

Writing a level porting plugin?

I’m currently trying to port levels from a game to use for VR. In the game’s files, each level has several text files that contain information about the objects placed in the world. For example, the static object information is written as follows:



Model File:<File Id="0" Path="static_objects/station/tunnel/tau_tunnel_crewroom.dae" />

World Object Info: <StaticObject ID="268435458" Name="marc/tau_tunnels_tau_tunnel_3way_1" CreStamp="1404230571" ModStamp="1417631797" WorldPos="10.28 0 0" Rotation="0 0 0" Scale="1 1 1" FileIndex="2" Collides="true" CastShadows="true" IsOccluder="true" ColorMul="1 1 1 1" CulledByDistance="true" CulledByFog="true" IllumColor="1 1 1 1" IllumBrightness="1" UID="16 15 268435458" />

I’m wondering if it would be possible to create a script that would parse the necessary information from this file (like the model location, position, and scale) and place everything in the editor accordingly, essentially building the level automatically? I’m fairly new to scripting editor plugins so I’m not sure if this is possible, I’m simply looking for a way to automate this workflow as much as possible. Are there any resources that would be helpful for scripting such a plugin?