Talk:Mod Tool/OniTools addon: Difference between revisions

m
fixed links by pointing to archive that now contains them
mNo edit summary
m (fixed links by pointing to archive that now contains them)
 
(45 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Dev notes for the remake==
==Notes on usage==
[[Image:Mod_Tool_Oni_level_rebuilder_logo.jpg|200px|right]]
===master xml file===
The original plan was to do all relevant stuff with Mod Tool scripts.
How a healthy master file should look like:


But having another program in between ease some shortcomings of MT such as its capability of creating terrible GUIs/controls.
<?xml version="1.0" encoding="utf-8"?>
<Oni>
  <Level SharedPath="../shared">
    <Environment>
      <Model>
        <Import Path="levelN_Final/alpha_helix_env.dae" />
        <Import Path="levelN_Final/alpha_helix_env_markers.dae" />
      </Model>
      <Rooms>
        <Import Path="levelN_Final/alpha_helix_bnv.dae" />
      </Rooms>
      <Textures Format="BGR" AlphaFormat="RGBA" MaxSize="512"></Textures>
    </Environment>
    <Sky>sunset</Sky>
    <Objects lsi="torch">
      <Import>levelN_Final/BINACJBOCharacter.xml</Import>
      <Import>levelN_Final/BINACJBOPowerup.xml</Import>
      <Import>levelN_Final/BINACJBOTurret.xml</Import>
      <Import>levelN_Final/BINACJBOConsole.xml</Import>
    </Objects>
    <Films></Films>
    <Cameras></Cameras>
  </Level>
</Oni>


Currently working on: loading console classes into XSI
GUI generated master files come with a "level specific item" ([[XML:IPge#Related_files|LSI]]) attribute in the <Objects> tag.


* extract shared vanilla classes [*]
The tag is used by the GUI to copy the correct LSI files into the output folder where OniSplit generates all other level files for the "Final" archive or plugin.
* backup Model.vbs and replace original with modified version to support xml and oni drag and drop
* build CONS html page
* detect xml DnD from html page
* make / switch to CONS layer
* load all dae parts and group them under a root object
* part selection is replace with root selection
* make collision box transparent and unselectable


Note that you can use only one type of LSI per level.


===Update management===
==Dev notes for the remake==
Fast ring: If I can I go to upload every Friday the latest build to my [http://paradox.oni2.net/documentations/Simple_OniSplit_GUI.html webpage.]
alpha helix
 
[[Image:Mod_Tool_Oni_level_rebuilder_logo.jpg|200px|right]]
The original plan was to do all relevant stuff with Mod Tool scripts.


Slow ring: AEI releases are uploaded whenever a bigger chunk was completed.
But having another program in between ease some shortcomings of MT such as its capability of creating GUIs/controls.


Currently working on: [[#Detailed_checklist|update #3]]


===Update management===
====GUI====
====GUI====
Starting with 14.01.2017 the GUI is distributed via AEI.
Starting with 14.01.2017 the GUI is distributed via AEI.
Line 46: Line 68:
C:\Users\UserName\Autodesk\Softimage_Mod_Tool_7.5\Addons
C:\Users\UserName\Autodesk\Softimage_Mod_Tool_7.5\Addons


  Addon name folder
  ''Addon name folder''
   |
   |
   +-- Application
   +-- Application
Line 57: Line 79:


The welcome screen triggers an automatic search. The user either confirms or changes the information.
The welcome screen triggers an automatic search. The user either confirms or changes the information.
===Known issues===
* level projects cannot migrate from original release to update #1
:: Folder naming rule was changed from numbered levels to "levelN_Final".
:: This avoids the need to update all links in master file if the level number changes.
:: You would have to rename your local level and update the master file by hand.
* <s>self-closing PPG leaves a blank page</s> Fixed in #2. ''DeleteObj "..."'' and ''PPG.'''Close''''' need to be embedded within ''oPPGLayout'''.Logic'''''
* GUI pops up when you save the console from XSI. (Cause is unexpected hard to track down.)
* <s>XSI cannot brought to front by GUI when it is minimized.</s> Fixed in #2
* <s>unstable updating of shared classes</s> Fixed in #2 by renaming old folder. That way custom made changes don't get lost however still need to be moved by hand.
* <s>quick test function in xsi produces level archives of name "levelN_Final"</s> Fixed in #2. N is now an actual number.
===Detailed checklist===
{{divhide|env markers - feature update #3 (upcoming)}}
Since this update deals mainly with textures I better shouldn't stop at env markers.
These things deal also more or less with textures: '''pathfinding''' (ghosts), '''furniture''' (collision boxes), handling of '''regular textures''' (adding an easy way to switch textures), '''gunk flagged''' ("special") textures, '''static objects''' (just so that I complete the model section all together), and for sake of completeness '''animated objects''' and '''cameras'''.
Version increment:
sharedVanillaClassesVersionInApp = 4
xsiGeneralScriptsVersion = 3
;env markers
* html page [x]
* detect xml DnD from html page [x]
** create new grid if DnD happened on an empty location [x]
** change material if DnD happened on an object [x]
* make / switch to layer [..]
* auto-create texture clips and materials [x]
* move object if a point was selected [x]
* make PPG (property page) [..]
** button: toggle twosidedness of object's main material [x] (lose of twosidedness also removes transparency)
** button: toggle transparency of object's main material []
** button: toggle twosidedness of selected polygons []
** button: toggle transparency of selected polygons []
** button: invert selected polygons [x]
** button: toggle visibility of polygon normals [x]
** button: toggle visibility of collision boxes [x]
* add layer export [x]
* load complete layer after clicking button in GUI [x]
* enhancements
** add instance checker: AKEV textures []
** don't show tasks PPG on startup if there are no imports [x]
* embed new files and make package []
* test package update on different machine before uploading it []
; powerups
* html page [x]
* detect xml DnD from html page [x]
* make / switch to layer [x]
* move object if a point was selected [x]
* make PPG (property page) [x]
* add layer export [x]
* load complete layer after clicking button in GUI [x]
* get specific (local) LSI files when building a level [x]
* embed new files and make package []
* test package update on different machine before uploading it []




===Combined checklist of addon and GUI===
; furniture
:attached OFGA particle can't be shown within xsi until there I write 3RAP support which won't happen
* html page []
* detect xml DnD from html page []
* make / switch to layer []
* move object if a point was selected []
* make PPG (property page) ? []
* add layer export []
* load complete layer after clicking button in GUI []
* embed new files and make package []
* test package update on different machine before uploading it []
 
{{divhide|end}}
 
{{divhide|Turrets (TURR) - feature update #2}}
* dae and xml gets extracted from shared vanilla classes [x]
* html page [x]
* detect xml DnD from html page [x]
* make / switch to layer [x]
* load all dae parts and group them [x]
* move objects if a point was selected [x]
* make PPG (property page) [x]
* add layer export [x]
* load complete layer after clicking button in GUI [x]
* enhancements
** fix: close and reopen CONS PPG after editing events [x]
** fix: show XSI to trigger OnActivate function for loading a layer [x]
** fix: various (basically #1 was unusable for other machines) [x]
* embed new files and make package [x]
* test package update on different machine before uploading it [x]
 
 
Version increment:
sharedVanillaClassesVersionInApp = 3
xsiGeneralScriptsVersion = 2
{{divhide|end}}
 
{{divhide|Consoles (CONS) - feature update #1}}
* dae and xml gets extracted from shared vanilla classes [*]
* CONS html page (<nowiki>https://www.dropbox.com/s/1rur57ea9i34652/consoles_wip.jpg?dl=0</nowiki>, dead link) [*]
* detect xml DnD from html page [*]
* make / switch to CONS layer [*]
* load all dae parts and group them [*]
* move console if a point was selected [*]
* make collision box semi-transparent [*]
* make PPG (property page) [*]
* get textures of used screens from vanilla CONS collections [] (#?)
* make screen section in CONS html [] (#?)
* detect active project via exchange file [*]
* add CONS layer export [*]
* re-create PPG whenever an CJBO event changes [*]
* add quick level test function [*]
* load complete CONS layer after clicking button in GUI [*]
* bugs fixes [*]
* remove Sledgehammer's old self-updater, other cleanups [*]
* embed new files and make package [*]
* test package update on different machine before uploading it [*]
 
Version increment:
sharedVanillaClassesVersionInApp = 2
{{divhide|end}}
 
===General checklist of addon and GUI===
: estimated time
: estimated time
:: XSI addon features (1y)
:: XSI addon features (1y)
:: small GUI features and editors (1y)
:: small GUI features and editors (1y)
:: BSL and XML editor (1y)
:: BSL and XML editor (1y)
:: fine-tuning, bug-fixes, refactoring (1y)
:: fine-tuning (v2), bug-fixes, refactoring (11mos.)
:: demo-level with prone-mode (1y)
:: demo-level with prone-mode (1mo.)
:: wth ...
:: wth ...


Line 152: Line 294:
'''addon'''
'''addon'''
# read, write, edit CHAR [][][]
# read, write, edit CHAR [][][]
# read, write, edit CONS [][][]
# read, write, edit CONS [x][x][x]
# read, write, edit DOOR [][][]
# read, write, edit DOOR [][][]
# easy option to [http://paradox.oni2.net/tmpWikiPics/create_3d_door_frame.png create door frames] [] (2d walls require a bit more work)
# easy option to [http://paradox.oni2.net/tmpWikiPics/create_3d_door_frame.png create door frames] [] (2d walls require a bit more work)
Line 165: Line 307:
# read, write, edit TRIG [][][]
# read, write, edit TRIG [][][]
# read, write, edit TRGV [][][]
# read, write, edit TRGV [][][]
# read, write, edit TURR [][][]
# read, write, edit TURR [x][x][x]
# read, write, edit WEAP [][][]
# read, write, edit WEAP [][][]
# read, write, edit CONS class [][][] ?
# read, write, edit DOOR class [][][] ?
# read, write, edit decal class [][][] ?
# read, write, edit TURR class [][][] ?
# read, write, edit TRIG class [][][] ?
# read, write, edit WEAP class [][][] ?
# xsi vertex shading editor (with easy controls for light sources) []
# xsi vertex shading editor (with easy controls for light sources) []
# add new corpses []
# add new corpses []
# material-depending polygon deletion []
# material-depending polygon deletion []
# create cameras from dae []
# create cameras from dae []
: count: 49




Line 193: Line 340:
----
----
----
----


===New code snippets===
===New code snippets===
Line 255: Line 401:
| -
| -
| html
| html
| [https://dl.dropboxusercontent.com/u/139715/OniGalore/ModToolScript/LevelBuilder/HelpFunctions.vbs x]
| x <nowiki>https://www.dropbox.com/s/srcvil992v3jkxs/HelpFunctions.vbs?dl=0</nowiki> (dead link)
| [https://dl.dropboxusercontent.com/u/139715/OniGalore/ModToolScript/LevelBuilder/HelpFunctions.vbs x]
| x <nowiki>https://www.dropbox.com/s/srcvil992v3jkxs/HelpFunctions.vbs?dl=0</nowiki> (dead link)
| html
| html
<!--
<!--
Line 275: Line 421:
|-
|-
| preview imgs
| preview imgs
| [https://dl.dropboxusercontent.com/u/139715/OniGalore/ModToolScript/LevelBuilder/characters.zip x]
| x <nowiki>https://dl.dropboxusercontent.com/u/139715/OniGalore/ModToolScript/LevelBuilder/characters.zip</nowiki> (dead link)
|
|
|
|
Line 284: Line 430:
|
|
<!-- | -->
<!-- | -->
| [https://dl.dropboxusercontent.com/u/139715/OniGalore/VanillaTURRs.jpg x]
| x <nowiki>https://dl.dropboxusercontent.com/u/139715/OniGalore/VanillaTURRs.jpg</nowiki> (dead link)
| x
| x
|-
|-
Line 358: Line 504:
Patrol paths are the trickiest. There's no easy way to show the connection from flag to another. It might be possible with multiple chains used for rigging but that's not very comfortable to deal with.
Patrol paths are the trickiest. There's no easy way to show the connection from flag to another. It might be possible with multiple chains used for rigging but that's not very comfortable to deal with.


Idea: add ID property to each used flag. When a flag is clicked, a PPG opens with a button to show flag connections (one lose chain with many bones, old one is deleted). MT also opens/updates an application (have to look into [https://bytes.com/topic/visual-basic-net/answers/630751-how-do-i-pass-command-line-another-instance-my-application-already-running writing command line apps] first). I guess that's necessary to preview (and edit) the complete xml code as this would be to awkward to code directly in MT. The xml file is saved on change events. MT reads that xml when a patrol path flag is selected.
Idea: add ID property to each used flag. When a flag is clicked, a PPG opens with a button to show flag connections (one lose chain with many bones, old one is deleted). MT also opens/updates an application (have to look into [http://web.archive.org/web/20150926205808/http://bytes.com/topic/visual-basic-net/answers/630751-how-do-i-pass-command-line-another-instance-my-application-already-running writing command line apps] first). I guess that's necessary to preview (and edit) the complete xml code as this would be to awkward to code directly in MT. The xml file is saved on change events. MT reads that xml when a patrol path flag is selected.
 
21.06.2016 Yay. Ugly PATR xml editor underway. "[https://1drv.ms/u/s!AjLkf0bK7POzgpI-McvVNAPeU5Cz2w Full manual edits]" tab ''already'' ready... took long enough. Figured out command line part. Next stop MT interaction.
 


21.06.2016 Yay. Ugly PATR xml editor underway. "Full manual edits (<nowiki>https://1drv.ms/u/s!AjLkf0bK7POzgpI-McvVNAPeU5Cz2w</nowiki>, dead link)" tab ''already'' ready... took long enough. Figured out command line part. Next stop MT interaction.


===Editing simultaneously multiple ghost quads heights===
===Editing simultaneously multiple ghost quads heights===
Line 368: Line 512:


===Display keywords===
===Display keywords===
[[Image:XSI_ModTool_display_keywords.png|thumb|200px|right]]
  SetUserKeyword selection(0), "type=akev, id=1"  
  SetUserKeyword selection(0), "type=akev, id=1"  
   
   
Line 377: Line 523:
  SetValue "Camera.camvis.attrseluserkeywords", True
  SetValue "Camera.camvis.attrseluserkeywords", True


https://dl.dropboxusercontent.com/u/139715/OniGalore/xsi_char_save_settings.png




Line 384: Line 529:
Using a "Simulate Rigid Bodies" ICETree node for this is ''overkill''. But it works and I fail to come up with alternatives, so...
Using a "Simulate Rigid Bodies" ICETree node for this is ''overkill''. But it works and I fail to come up with alternatives, so...


https://dl.dropboxusercontent.com/u/139715/OniGalore/abusing_ICE_for_displaying_a_flag.png
<nowiki>https://dl.dropboxusercontent.com/u/139715/OniGalore/abusing_ICE_for_displaying_a_flag.png</nowiki> (dead link)
  '### setup flag display by abusing ICE
  '### setup flag display by abusing ICE
  CreatePrim "Cube", "MeshSurface"
  CreatePrim "Cube", "MeshSurface"
Line 408: Line 553:
  end if
  end if


==Dev notes for remake v2==
Labor-intense improvements (aka ''skipped cuz of lazyness'') will be probably tackled only after v1 (alpha helix) was completed.
beta helix
'''GUI'''
* Add a "current tasks" screen.
** use background worker threads
** use a progress bar
* Use separated form for txmp creation (avoid impression that GUI is only for that one file type)
* Explore and fix issue that causes GUI to remain in front when called via command-line in XSI
* Add html section for turret screens
* Add html section for door decals
* Migrate custom classes to new "shared" folder after an update
* Unify use of internal update variables
** v1 uses shared classes version right inside the source code
** v1 uses xsi scripts version in the app's settings (a section provided by Visual Studio)
'''XSI'''
* remove the deprecated exchange file tag <activeLevelNumber>


==More wild ideas==
==More wild ideas==
===FILM creation within MT===
[[XML:FILM|FILM]]s could be created with certain approximation.
Maybe we can use curves and add null objects to specific point that hold FILM properties like key presses.
Cameras would indicate the current perspective.


Exact values might require information about ONCC and starting TRAM.


===Animated reference===
===Animated reference===
Line 454: Line 627:


===New camera animations===
===New camera animations===
{| border=0 cellpadding=0 style="float: right;"
| last frame of OBANOutroCam02<br>[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/Mod_Tool/camera_OBAN_examination_zpsaf16d39e.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/Mod_Tool/camera_OBAN_examination_tn_zpsc8295474.png]
|}
There's already an excel macro available but now I want to build cam anims without excel.
There's already an excel macro available but now I want to build cam anims without excel.


Line 471: Line 640:


Positions and rotations keyframes can be applied to the camera root object.
Positions and rotations keyframes can be applied to the camera root object.


===Adding multiple textures to level geometry [out-dated]===
===Adding multiple textures to level geometry [out-dated]===
Line 489: Line 657:


[...]
[...]


===TRBS-fitting TRMA creation===
===TRBS-fitting TRMA creation===
Line 503: Line 670:


Current status:
Current status:
* http://youtu.be/RqSsXTzHTA8
* drag and drop [http://mods.oni2.net/system/files/Oni_Character_Helper_with_onisplit_dnd_updater_wip.zip add-on file] into Mod Tool to install it
* drag and drop [http://mods.oni2.net/system/files/Oni_Character_Helper_with_onisplit_dnd_updater_wip.zip add-on file] into Mod Tool to install it
* no LOD, no envmap support
* no LOD, no envmap support
|style="float:right"|
hexhound hierarchy
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/hexhound_hierarchy_zpsf32e971c.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/hexhound_hierarchy_tn_zpsd82230ce.png]
|}
|}


Line 633: Line 794:
  ' INFO  : counted body parts: 19
  ' INFO  : counted body parts: 19
{{divhide|end}}
{{divhide|end}}


==Old dev notes==
==Old dev notes==
===New door animations===
===New door animations===
Final door animation depends on:
Final door animation depends on:
Line 670: Line 829:


There could be a loop scanning all objects for those numbers.
There could be a loop scanning all objects for those numbers.


===Hierarchy builder for characters===
===Hierarchy builder for characters===
Based on old knowledge. See [[Mod_Tool#exchange_of_meshes_in_hierarchies|HERE]] for an easy manual way to change the meshes in hierarchies.
Based on old knowledge. See [[Mod_Tool#Exchange_meshes_in_hierarchies|HERE]] for an easy manual way to change the meshes in hierarchies.




Line 679: Line 837:
'''(old notes in the following)'''
'''(old notes in the following)'''


{| border=0 cellpadding=0 style="float: right;"
(Automatic rigging.) Maybe null objects could stand for the centers of body parts. Then one click and the real centers gets positioned. The rotations are known and the names would lead to the correct hierarchy.
| hierarchy breaker beta<br>[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/hierarchy_breaker_beta.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/hierarchy_breaker_beta_tn.png]
|}
 
(Automatic rigging.) Maybe null objects could stand for the centers of body parts. Then one click and the real centers gets positioned. The [[User:Paradox-01/for_WIP_pages#Mod_Tool:_putting_a_character_together_while_preserving_body_part_positions|rotations are known]] and the names would lead to the correct hierarchy.


In order to make edits there is also a need of destroying the hierarchy again while preserving the rotation and position of the meshes.
In order to make edits there is also a need of destroying the hierarchy again while preserving the rotation and position of the meshes.




code pieces
'''[http://mods.oni2.net/node/383 code pieces]'''
 
 
hierarchy breaker
* [https://dl.dropbox.com/u/139715/OniGalore/ModToolScript/hierarchy_breaker_beta.txt hierarchy_breaker_beta.txt] (works only with strict correct names)


* hierarchy_breaker_beta.txt
: works only with strict correct names


hierarchy builder
* hierarchy builder
* [https://dl.dropbox.com/u/139715/OniGalore/ModToolScript/delete_keyframes.txt delete_keyframes.txt] (deletes keys, saves and reloads character)
** delete_keyframes.txt
* [...]
:: deletes keys, saves and reloads character
** [...]




Line 767: Line 920:
'''Data table'''
'''Data table'''


[[Mod_Tool/Scripting#as_binary|Reading the AKEV's name table]] was more or less easy. This time we need to look up the data table.
[[Mod_Tool/Scripting#Read_binary_file|Reading the AKEV's name table]] was more or less easy. This time we need to look up the data table.


Three things to take care about: '''reading hex numbers backwards''' (as usual in Oni), '''adding relative offsets''' to data table's offset (took a pretty while to find that one out*), '''subtracting 8 bytes''' for no other reason to get the correct offset.
Three things to take care about: '''reading hex numbers backwards''' (as usual in Oni), '''adding relative offsets''' to data table's offset (took a pretty while to find that one out*), '''subtracting 8 bytes''' for no other reason to get the correct offset.
Line 792: Line 945:
'''AGQG reader'''
'''AGQG reader'''


https://dl.dropboxusercontent.com/u/139715/OniGalore/temp/AKEV_AGQG_reader.txt
see [[Mod_Tool/Scripting#AKEV_AGQG]]


output sample:
output sample:
Line 847: Line 1,000:


AKEV data and extracted console mesh have different polygon IDs and point IDs. Identifying each point by position (taking tolerances into account) and then identifing the quads and triangles would take too long. So, it's still possible but at the moment it's a black hole consuming too much dev time... Darn.
AKEV data and extracted console mesh have different polygon IDs and point IDs. Identifying each point by position (taking tolerances into account) and then identifing the quads and triangles would take too long. So, it's still possible but at the moment it's a black hole consuming too much dev time... Darn.
== Improving deletion algorithm ==
'''[Expand [http://konoko.oni2.net/%5bOni%20Developing%5d/%5bProgramming%5d/SRC%20texts.7Z this archive] to see the files being referenced. -Iritscen]''' I've tested an improved version ("kill_NONEs_improved.TXT") of this section ("kill_NONEs_orig.TXT"). My improvements are very simple:
# Deleting cluster itself after polygon deletion
# Freezing object and modelling
That improvements are really useful for me... Maybe, it could be useful for you (or for others)... You can test it...
<br>
--[[User:Mai X|Mai X]] ([[User talk:Mai X|talk]]) 00:17, 10 April 2023 (CEST)
[[Category:Completed modding tools]][[Category:Windows-only modding tools]]