This is not a request for something within the game but for an external application. Maybe someone can write such a thing in Java or any other programming language of his choice. I am just a beginner in Java and have no clue how to read or write textfiles with it, so that's why I ask someone else to do it.
Now what the program should do, is a process that would take half an eternity if done by hand: It should translate the plain text that you get if you select actors in the editor and copy-paste them into a text editor from UE3-style to UE2-style. It should only be done for brushes, as everything else would require the StaticMeshes of that game. (But on the other hand: why shouldn't it work for lights too?)
So the program should walk through the input txt-file in which the user pasted all the brush data of a map and write them into a new output txt-file.
It then should search for certain keywords that tells it where it's currently in the file and which informations it should write to the output.
Helpful is knowledge about the anatomy of such copy-pasted actors in both engines. This is how it looks:
UE2:
UE3:
As you can see there are many similarities and some differences.
UE3 has a single "Begin Level"-scope and an "Object"-scope in every entry (which defines the Archtype) that need to be removed.
And the only entry that is relevant in UE2 between the "End Brush" and "End Actor" is the Brush=Model'myLevel.Model70' (but this is a myLevel-reference in UE2, dunno if it works right away. Maybe it can be left out).
And in the "Polygon" definition are surface flags, but maybe the stuff that I got here just didn't have any flags. It's taken from ONS-SPAMBOX..
For the sake of compatibility should all texture references here be set to the default texture or another one that is already loaded at editor start, the mapper can choose matching textures by himself then.
So if anyone could do this, then it would be a great facilitation for those who try to make exact remakes of UT3-maps.
Now what the program should do, is a process that would take half an eternity if done by hand: It should translate the plain text that you get if you select actors in the editor and copy-paste them into a text editor from UE3-style to UE2-style. It should only be done for brushes, as everything else would require the StaticMeshes of that game. (But on the other hand: why shouldn't it work for lights too?)
So the program should walk through the input txt-file in which the user pasted all the brush data of a map and write them into a new output txt-file.
It then should search for certain keywords that tells it where it's currently in the file and which informations it should write to the output.
Helpful is knowledge about the anatomy of such copy-pasted actors in both engines. This is how it looks:
UE2:
Code:
Begin Map Begin Actor Class=Brush Name=Brush50 CsgOper=CSG_Subtract MainScale=(SheerAxis=SHEER_ZX) PostScale=(SheerAxis=SHEER_ZX) bLightChanged=True Level=LevelInfo'myLevel.LevelInfo0' Region=(Zone=ZoneInfo'myLevel.ZoneInfo0',iLeaf=36,ZoneNumber=1) Tag="Brush" PhysicsVolume=DefaultPhysicsVolume'myLevel.DefaultPhysicsVolume0' Location=(X=-1408.000000,Y=-1024.000000,Z=8192.000000) Begin Brush Name=Model51 Begin PolyList Begin Polygon Texture=HumanoidArchitecture.Floors.flr03HA Link=0 Origin +00000.000000,+00000.000000,+00000.000000 Normal +00000.000000,+00000.000000,-00001.000000 TextureU -00001.000000,+00000.000000,+00000.000000 TextureV +00000.000000,-00001.000000,+00000.000000 Vertex -00383.999969,-01408.000000,-03712.000000 Vertex -00383.999969,-02048.000000,-03712.000000 Vertex -01024.000000,-02048.000000,-03712.000000 Vertex -01024.000000,-01408.000000,-03712.000000 End Polygon Begin Polygon Texture=Shiptech.Walls.Wal21CS Link=1 Origin +00000.000000,+00000.000000,+00000.000000 Normal +00000.000000,-00001.000000,+00000.000000 TextureU +00001.000000,+00000.000000,+00000.000000 TextureV +00000.000000,+00000.000000,-00001.000000 Vertex -01408.000000,-01024.000000,+08192.000000 Vertex -02048.000000,-01024.000000,+08192.000000 Vertex -02048.000000,-01024.000000,-03200.000000 Vertex -01408.000000,-01024.000000,-02944.000000 End Polygon . . . Brush=Model'myLevel.Model70' PrePivot=(X=-1408.000000,Y=-1024.000000,Z=8192.000000) bSelected=True End Actor . . . Begin Surface End Surface End Map
UE3:
Code:
Begin Map Begin Level Begin Actor Class=Brush Name=Brush_4 Archetype=Brush'Engine.Default__Brush' Begin Object Class=BrushComponent Name=BrushComponent0 ObjName=BrushComponent_5 Archetype=BrushComponent'Engine.Default__Brush:BrushComponent0' Brush=Model'Model_3' LightingChannels=(bInitialized=True,Dynamic=True) Name="BrushComponent_5" ObjectArchetype=BrushComponent'Engine.Default__Brush:BrushComponent0' End Object CsgOper=CSG_Add Begin Brush Name=Model_3 Begin PolyList Begin Polygon Texture=WAR-BeachFront.Material.bigRoughBricksMaterial Flags=3584 Link=0 LightingChannels=2051 Origin +04095.998047,-08447.995117,-00512.000000 Normal +00000.000000,-00001.000000,+00000.000000 TextureU -00000.500000,-00000.000000,+00000.000000 TextureV +00000.000000,+00000.000000,-00000.500000 Vertex +00511.999786,-01023.999634,-00512.000000 Vertex +00511.999786,-01023.999634,+00256.000000 Vertex -01023.999878,-01024.000122,+00256.000000 Vertex -01023.999878,-01024.000122,-00512.000000 End Polygon Begin Polygon Texture=WAR-BeachFront.Material.bigRoughBricksMaterial Flags=3584 Link=1 Origin +04095.998047,-08447.995117,-00512.000000 Normal -00001.000000,-00000.000000,+00000.000000 TextureU +00000.000000,+00000.500000,+00000.000000 TextureV +00000.000000,+00000.000000,-00000.500000 Vertex -01023.999878,-01024.000122,-00512.000000 Vertex -01023.999878,-01024.000122,+00256.000000 Vertex -01024.000122,+01023.999878,+00256.000000 Vertex -01024.000122,+01023.999878,-00512.000000 End Polygon Begin Polygon Texture=WAR-BeachFront.Material.bigRoughBricksMaterial Flags=3584 Link=2 Origin +04095.998047,-08447.995117,-00512.000000 Normal +00000.000000,+00001.000000,+00000.000000 TextureU +00000.500000,+00000.000000,+00000.000000 TextureV +00000.000000,+00000.000000,-00000.500000 Vertex -01024.000122,+01023.999878,-00512.000000 Vertex -01024.000122,+01023.999878,+00256.000000 Vertex +00511.999756,+01023.999329,+00256.000000 Vertex +00511.999756,+01023.999329,-00512.000000 End Polygon Begin Polygon Texture=WAR-BeachFront.Material.bigRoughBricksMaterial Flags=3584 Link=3 Origin +04095.998047,-08447.995117,-00512.000000 Normal +00001.000000,+00000.000000,+00000.000000 TextureU +00000.000000,-00000.500000,+00000.000000 TextureV +00000.000000,+00000.000000,-00000.500000 Vertex +00511.999756,+01023.999329,-00512.000000 Vertex +00511.999756,+01023.999329,+00256.000000 Vertex +00511.999786,-01023.999634,+00256.000000 Vertex +00511.999786,-01023.999634,-00512.000000 End Polygon Begin Polygon Texture=WAR-BeachFront.Material.yeOldeTiles Flags=3584 Link=4 Origin +04095.998047,-08447.995117,-00512.000000 Normal +00000.000000,+00000.000000,+00001.000000 TextureU -00000.250000,-00000.000000,+00000.000000 TextureV +00000.000000,-00000.250000,+00000.000000 Vertex -01023.999878,-01024.000122,+00256.000000 Vertex +00511.999786,-01023.999634,+00256.000000 Vertex +00511.999756,+01023.999329,+00256.000000 Vertex -01024.000122,+01023.999878,+00256.000000 End Polygon Begin Polygon Texture=LT_Buildings2.BSP.Materials.M_LT_Buildings_BSP_Bunkerwall1a Flags=3584 Link=5 Origin +04095.998047,-08447.995117,-00512.000000 Normal +00000.000000,+00000.000000,-00001.000000 TextureU -00000.000000,+00000.500000,+00000.000000 TextureV +00000.500000,+00000.000000,+00000.000000 Vertex +00511.999786,-01023.999634,-00512.000000 Vertex -01023.999878,-01024.000122,-00512.000000 Vertex -01024.000122,+01023.999878,-00512.000000 Vertex +00511.999756,+01023.999329,-00512.000000 End Polygon End PolyList End Brush Brush=Model'Model_3' BrushComponent=BrushComponent'BrushComponent_5' Components(0)=BrushComponent'BrushComponent_5' Tag="Brush" Location=(X=-4095.998047,Y=8447.995117,Z=512.000000) CollisionComponent=BrushComponent'BrushComponent_5' Name="Brush_4" ObjectArchetype=Brush'Engine.Default__Brush' End Actor Begin Actor Class=Brush Name=Brush_5 Archetype=Brush'Engine.Default__Brush' Begin Object Class=BrushComponent Name=BrushComponent0 ObjName=BrushComponent_6 Archetype=BrushComponent'Engine.Default__Brush:BrushComponent0' Brush=Model'Model_4' LightingChannels=(bInitialized=True,Dynamic=True) Name="BrushComponent_6" ObjectArchetype=BrushComponent'Engine.Default__Brush:BrushComponent0' End Object CsgOper=CSG_Subtract Begin Brush Name=Model_4 Begin PolyList Begin Polygon Texture=WAR-BeachFront.Material.darkTile Flags=3584 Link=0 Origin +04287.997070,-08255.995117,-00512.000000 Normal +00000.000000,-00001.000000,+00000.000000 TextureU +00000.500000,+00000.000000,+00000.000000 TextureV +00000.000000,+00000.000000,-00000.500000 Vertex +00671.999878,-00767.999817,-00496.000000 Vertex +00671.999878,-00767.999817,+00128.000000 Vertex -00831.999939,-00767.999878,+00128.000000 Vertex -00831.999939,-00767.999878,-00496.000000 End Polygon Begin Polygon Texture=EngineMaterials.DefaultMaterial Flags=3584 Link=1 Origin +04287.997070,-08255.995117,-00512.000000 Normal -00001.000000,+00000.000000,+00000.000000 TextureU +00000.000000,-00000.500000,+00000.000000 TextureV +00000.000000,+00000.000000,-00000.500000 Vertex -00831.999939,-00767.999878,-00496.000000 Vertex -00831.999939,-00767.999878,+00128.000000 Vertex -00831.999817,+00191.999878,+00128.000000 Vertex -00831.999817,+00191.999878,-00496.000000 End Polygon . . . End Actor . . . End Level Begin Surface End Surface End Map
As you can see there are many similarities and some differences.
UE3 has a single "Begin Level"-scope and an "Object"-scope in every entry (which defines the Archtype) that need to be removed.
And the only entry that is relevant in UE2 between the "End Brush" and "End Actor" is the Brush=Model'myLevel.Model70' (but this is a myLevel-reference in UE2, dunno if it works right away. Maybe it can be left out).
And in the "Polygon" definition are surface flags, but maybe the stuff that I got here just didn't have any flags. It's taken from ONS-SPAMBOX..
For the sake of compatibility should all texture references here be set to the default texture or another one that is already loaded at editor start, the mapper can choose matching textures by himself then.
So if anyone could do this, then it would be a great facilitation for those who try to make exact remakes of UT3-maps.
Comment