8,995
edits
Paradox-01 (talk | contribs) mNo edit summary |
Paradox-01 (talk | contribs) m (live-testing later Tool 08030 LevelImporter) |
||
| Line 347: | Line 347: | ||
game data -> converter -> level recycler -> Blender / Blender addon -> converter -> updated game data | game data -> converter -> level recycler -> Blender / Blender addon -> converter -> updated game data | ||
==Tool 08030 | ==Tool 08030 LevelImporter== | ||
The "Level Importer" is essentially a combination of Onisplit, build.cmd, and cleanup/unzip logic, designed to provide an easily extendable modding structure. | |||
<!-- | |||
As there will be no full-fledged level recycler tool in foreseeable near future, I going to update lab demo level instead. The build.cmd was never fully working because of missing marker textures not getting copying. While fixing also an issue of an animated texture, I'm additionally adding a tool to clean up artifacts from the furniture.xml because the produced warnings in the console are annoying if not misleading for novice modders. These OFGAs never shipped with the final version of the game. | As there will be no full-fledged level recycler tool in foreseeable near future, I going to update lab demo level instead. The build.cmd was never fully working because of missing marker textures not getting copying. While fixing also an issue of an animated texture, I'm additionally adding a tool to clean up artifacts from the furniture.xml because the produced warnings in the console are annoying if not misleading for novice modders. These OFGAs never shipped with the final version of the game. | ||
To make the entry into level modding even easier, the demo level should be part of a tool package. So it can be instantly be edited. Also, this would avoid a scenario of where a new modder unpacks the zip the wrong way. Sometimes the zip filename is taken as most top created folder.--> | |||
'''Online zip''' | '''Online zip''' | ||
| Line 354: | Line 358: | ||
mods.oni2.net | mods.oni2.net | ||
| | | | ||
+-- | +-- 08030LevelImport.zip | ||
| | | | ||
+-- | +-- 08030LevelImporter_Win | ||
| | | | ||
+-- Mod_Info.cfg | +-- Mod_Info.cfg | ||
| Line 365: | Line 369: | ||
+--Tools | +--Tools | ||
| | | | ||
+-- | +-- LevelImporter | ||
| | | | ||
+-- icon.png (32 x 32 px) | +-- icon.png (32 x 32 px) | ||
+-- | +-- LevelImporter.exe | ||
+-- lab_demo_project.zip | |||
</pre> | </pre> | ||
| Line 374: | Line 379: | ||
<pre> | <pre> | ||
AEInstallVersion -> 2.0 | AEInstallVersion -> 2.0 | ||
NameOfMod -> Level | NameOfMod -> Level Importer | ||
Creator -> | Creator -> Neo, Paradox-01 | ||
ModVersion -> | ModVersion -> 1 | ||
Readme -> | Readme -> Neo (initial release), Paradox-01 (additional fixes and logic) | ||
ExeName -> Tools/ | ExeName -> Tools/LevelImporter/LevelImporter.exe | ||
WorkingDir -> Exe | WorkingDir -> Exe | ||
IconName -> Tools/ | IconName -> Tools/LevelImporter/icon.png | ||
</pre> | </pre> | ||
Nasty road blocker: [https://learn.microsoft.com/en-us/windows/win32/seccrypto/cryptography-tools Smart App Control]. | |||
Options: | |||
* Deactivate | |||
* Use code signing | |||
* Use Framework 4.7.2 as it is less often triggered than 4.8 | |||
Behavior: | |||
* Lab demo gets automatically unpacked during first run. | |||
There is a cleanup arg to avoid the creation of two executables. Therefore the build.cmd needed another update compared to the initial idea. | |||
<pre> | |||
@echo off | |||
pushd "%~dp0" | |||
set "LEVEL_IMPORTER=..\..\Tools\LevelImporter\LevelImporter.exe" | |||
set "LEVEL_IMPORTER_ARGS=-cleanup" | |||
if exist "%LEVEL_IMPORTER%" ( | |||
"%LEVEL_IMPORTER%" %LEVEL_IMPORTER_ARGS% "." | |||
) else ( | |||
echo Skipping cleanup: "%LEVEL_IMPORTER%" was not found. | |||
echo The tool can be installed via AEInstaller. | |||
) | |||
"..\..\..\AE\Tools\OniSplit.exe" -create:level out lab.xml | |||
"..\..\..\AE\Tools\OniSplit.exe" -create:txmp out env\markers\*.tga | |||
REM use quote signs for folder names that contain spaces | |||
"..\..\..\AE\Tools\OniSplit.exe" -create post-create-patches post-create-patches\*.xml | |||
if exist post-create-patches\*.oni copy /Y post-create-patches\*.oni out | |||
"..\..\..\AE\Tools\OniSplit.exe" -import:pc out ..\level3_Final.dat | |||
REM read notifications, warnings and error messages, continue with any key press | |||
pause | |||
pushd "..\..\..\AE" | |||
Oni.exe -noswitch | |||
popd | |||
popd | |||
</pre> | |||
Expected bat readings. ("..." normalized.) | |||
<pre> | <pre> | ||
Removed OFGA code blocks: | |||
57x furniture/pp_pipe_collar_grey.oni | |||
36x furniture/pp_pipe_L_ylwgrey.oni | |||
14x furniture/pp_pipe_med_ylw.oni | |||
8x furniture/pp_pipe_T_grey.oni | |||
5x furniture/pp_pipe_L_redgrey.oni | |||
3x furniture/pp_pipe_med_red.oni | |||
2x furniture/pp_pipe_X_grey.oni | |||
1x furniture/pp_pipe_long_red.oni | |||
Finished. Removed 126 Furniture block(s). | |||
Saved cleaned XML to: ...\Oni\AE\GameDataFolder\lab\Furniture.xml | |||
Reading environment... | |||
Reading rooms... | |||
Reading objects... | |||
Using DOOR object class 'TCdouble' from '...\Oni\AE\GameDataFolder\shared\doors\TCdouble.oni' | |||
Using DOOR object class 'sbdoor01' from '...\Oni\AE\GameDataFolder\shared\doors\sbdoor01.oni' | |||
Using DOOR object class 'CM_1' from '...\Oni\AE\GameDataFolder\shared\doors\CM_1.oni' | |||
Using DOOR object class 'no_2' from '...\Oni\AE\GameDataFolder\shared\doors\no_2.oni' | |||
Using DOOR object class 'PWmed' from '...\Oni\AE\GameDataFolder\shared\doors\PWmed.oni' | |||
Using DOOR object class 'HA_doorsmall_2' from '...\Oni\AE\GameDataFolder\shared\doors\HA_doorsmall_2.oni' | |||
Using DOOR object class 'AIRfront01' from '...\Oni\AE\GameDataFolder\shared\doors\AIRfront01.oni' | |||
Using DOOR object class 'RL_doorbig_1' from '...\Oni\AE\GameDataFolder\shared\doors\RL_doorbig_1.oni' | |||
Using DOOR object class 'RL_glassup' from '...\Oni\AE\GameDataFolder\shared\doors\RL_glassup.oni' | |||
Using CONS object class 'console_data' from '...\Oni\AE\GameDataFolder\shared\consoles\console_data.oni' | |||
Using CONS object class 'console0' from '...\Oni\AE\GameDataFolder\shared\consoles\console0.oni' | |||
Using OFGA object class 'V_tctf_bigvan' from '...\Oni\AE\GameDataFolder\shared\furniture\V_tctf_bigvan.oni' | |||
Using OFGA object class 'U_security_upright2' from '...\Oni\AE\GameDataFolder\shared\furniture\U_security_upright2.oni' | |||
Using OFGA object class 'pp_pipe_dbl_grey' from '...\Oni\AE\GameDataFolder\shared\furniture\pp_pipe_dbl_grey.oni' | |||
Using OFGA object class 'RF_vent2' from '...\Oni\AE\GameDataFolder\shared\furniture\RF_vent2.oni' | |||
Using OFGA object class 'U_security_tvdesk_hang' from '...\Oni\AE\GameDataFolder\shared\furniture\U_security_tvdesk_hang.oni' | |||
Using OFGA object class 'V_tctf_armorcar' from '...\Oni\AE\GameDataFolder\shared\furniture\V_tctf_armorcar.oni' | |||
Using OFGA object class 'V_tctf_cruiser' from '...\Oni\AE\GameDataFolder\shared\furniture\V_tctf_cruiser.oni' | |||
Using OFGA object class 'RF_HVACmach3' from '...\Oni\AE\GameDataFolder\shared\furniture\RF_HVACmach3.oni' | |||
Using OFGA object class 'U_security_tv_wall' from '...\Oni\AE\GameDataFolder\shared\furniture\U_security_tv_wall.oni' | |||
Using OFGA object class 'U_office_desk_L2' from '...\Oni\AE\GameDataFolder\shared\furniture\U_office_desk_L2.oni' | |||
Using OFGA object class 'U_drum_ylw' from '...\Oni\AE\GameDataFolder\shared\furniture\U_drum_ylw.oni' | |||
Using OFGA object class 'U_office_desk_L3' from '...\Oni\AE\GameDataFolder\shared\furniture\U_office_desk_L3.oni' | |||
Using OFGA object class 'U_office_data_short' from '...\Oni\AE\GameDataFolder\shared\furniture\U_office_data_short.oni' | |||
Using OFGA object class 'PP_junctionbox_A' from '...\Oni\AE\GameDataFolder\shared\furniture\PP_junctionbox_A.oni' | |||
Using OFGA object class 'DOORLIGHT' from '...\Oni\AE\GameDataFolder\shared\furniture\DOORLIGHT.oni' | |||
Using OFGA object class 'U_office_desk_L1' from '...\Oni\AE\GameDataFolder\shared\furniture\U_office_desk_L1.oni' | |||
Using OFGA object class 'U_office_desk_seg1' from '...\Oni\AE\GameDataFolder\shared\furniture\U_office_desk_seg1.oni' | |||
Using OFGA object class 'U_office_desk_seg3' from '...\Oni\AE\GameDataFolder\shared\furniture\U_office_desk_seg3.oni' | |||
Using OFGA object class 'U_office_data2_long' from '...\Oni\AE\GameDataFolder\shared\furniture\U_office_data2_long.oni' | |||
Using OFGA object class 'U_office_data2_short' from '...\Oni\AE\GameDataFolder\shared\furniture\U_office_data2_short.oni' | |||
Using OFGA object class 'doorlight2' from '...\Oni\AE\GameDataFolder\shared\furniture\doorlight2.oni' | |||
Using OFGA object class 'RF_antenna1' from '...\Oni\AE\GameDataFolder\shared\furniture\RF_antenna1.oni' | |||
Using OFGA object class 'RL_bench' from '...\Oni\AE\GameDataFolder\shared\furniture\RL_bench.oni' | |||
Using OFGA object class 'RL_tanningbed' from '...\Oni\AE\GameDataFolder\shared\furniture\RL_tanningbed.oni' | |||
Using OFGA object class 'PP_comp_upright_dbl_B' from '...\Oni\AE\GameDataFolder\shared\furniture\PP_comp_upright_dbl_B.oni' | |||
Using OFGA object class 'TC_topflr_comp_2' from '...\Oni\AE\GameDataFolder\shared\furniture\TC_topflr_comp_2.oni' | |||
Using OFGA object class 'RL_brainflea' from '...\Oni\AE\GameDataFolder\shared\furniture\RL_brainflea.oni' | |||
Using OFGA object class 'PP_comp_upright_B' from '...\Oni\AE\GameDataFolder\shared\furniture\PP_comp_upright_B.oni' | |||
Using OFGA object class 'RL_MRI' from '...\Oni\AE\GameDataFolder\shared\furniture\RL_MRI.oni' | |||
Using OFGA object class 'PP_comp_upright_C' from '...\Oni\AE\GameDataFolder\shared\furniture\PP_comp_upright_C.oni' | |||
Using OFGA object class 'RF_antenna5' from '...\Oni\AE\GameDataFolder\shared\furniture\RF_antenna5.oni' | |||
Using OFGA object class 'RF_antenna4' from '...\Oni\AE\GameDataFolder\shared\furniture\RF_antenna4.oni' | |||
Using OFGA object class 'RF_antenna2' from '...\Oni\AE\GameDataFolder\shared\furniture\RF_antenna2.oni' | |||
Using OFGA object class 'RF_solar_placeout' from '...\Oni\AE\GameDataFolder\shared\furniture\RF_solar_placeout.oni' | |||
Using OFGA object class 'pp_pipe_dbl_ylw' from '...\Oni\AE\GameDataFolder\shared\furniture\pp_pipe_dbl_ylw.oni' | |||
Using OFGA object class 'U_office_desk_dmg2' from '...\Oni\AE\GameDataFolder\shared\furniture\U_office_desk_dmg2.oni' | |||
Importing objects... | |||
Importing textures... | |||
Imported 172 textures, copied 0 textures | |||
Generating grids... | |||
BNV Builder: Ghost 'ghost_22' has no adjacencies at {1310 -25 -492,5} and {1308 -25 -492,5}, ignoring | |||
Read 288 rooms | |||
Writing environment... | |||
Environment bounding box is {{-1724,422 -97 -2201,62} {2757,46 452,9844 2261,838}} | |||
BNV Builder: Ghost 'ghost_22' has no adjacencies at {1310 -25 -492,5} and {1308 -25 -492,5}, ignoring | |||
Building bsp tree for 558 transparent polygons... | |||
Building octtree for 31562 polygons... | |||
Octtree: 2617 interior nodes, 18320 leafs | |||
Writing 1164 objects... | |||
Importing ...\Oni\AE\GameDataFolder\lab\env\markers\_marker_barrier.tga | |||
Importing ...\Oni\AE\GameDataFolder\lab\env\markers\_marker_blackness.tga | |||
Importing ...\Oni\AE\GameDataFolder\lab\env\markers\_marker_door.tga | |||
Importing ...\Oni\AE\GameDataFolder\lab\env\markers\_marker_ghost.tga | |||
Importing ...\Oni\AE\GameDataFolder\lab\env\markers\_marker_impassable.tga | |||
Importing ...\Oni\AE\GameDataFolder\lab\env\markers\_marker_stairs.tga | |||
Importing ...\Oni\AE\GameDataFolder\lab\post-create-patches\TXMPGOO.xml | |||
post-create-patches\TXMPGOO.oni | |||
1 Datei(en) kopiert. | |||
Reading files from ...\Oni\AE\GameDataFolder\lab\out | |||
Removing duplicates | |||
Writing ...\Oni\AE\GameDataFolder\level3_Final.dat | |||
Writing ...\Oni\AE\GameDataFolder\level3_Final.raw | |||
</pre> | </pre> | ||
Right now the LevelImporter.exe runs without triggering the Smart App Control. So, I will release it to do further live-testing. | |||
On "final" release, the [http://mods.oni2.net/node/299 original lab] page should be edited to direct users to the new tool page. | |||
edits