Talk:Mod Tool/OniTools addon: Difference between revisions

m
fixed links by pointing to archive that now contains them
m (writing down fixes of #2 update of v1, writing down notes about far future v2)
m (fixed links by pointing to archive that now contains them)
 
(30 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Notes on usage==
===master xml file===
How a healthy master file should look like:
<?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>
GUI generated master files come with a "level specific item" ([[XML:IPge#Related_files|LSI]]) attribute in the <Objects> tag.
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.
Note that you can use only one type of LSI per level.
==Dev notes for the remake==
==Dev notes for the remake==
alpha helix
alpha helix
Line 7: Line 42:
But having another program in between ease some shortcomings of MT such as its capability of creating GUIs/controls.
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 #2]]
Currently working on: [[#Detailed_checklist|update #3]]
 


===Update management===
===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 58: Line 91:
* <s>quick test function in xsi produces level archives of name "levelN_Final"</s> Fixed in #2. N is now an actual number.
* <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.


===Detailed checklist===
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'''.
{{divhide|Turrets (TURR) (upcoming) - feature update #2}}
 
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 []
 
 
; 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]
* dae and xml gets extracted from shared vanilla classes [x]
* html page [x]
* html page [x]
Line 73: Line 166:
** fix: close and reopen CONS PPG after editing events [x]
** fix: close and reopen CONS PPG after editing events [x]
** fix: show XSI to trigger OnActivate function for loading a layer [x]
** fix: show XSI to trigger OnActivate function for loading a layer [x]
* embed new files and make package []
** fix: various (basically #1 was unusable for other machines) [x]
* test package update on different machine before uploading it []
* 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|end}}


{{divhide|Consoles (CONS) - feature update #1}}
{{divhide|Consoles (CONS) - feature update #1}}
* dae and xml gets extracted from shared vanilla classes [*]
* dae and xml gets extracted from shared vanilla classes [*]
* [https://dl.dropboxusercontent.com/u/139715/OniGalore/Sledgehammer/consoles_wip.jpg CONS html page] [*]
* CONS html page (<nowiki>https://www.dropbox.com/s/1rur57ea9i34652/consoles_wip.jpg?dl=0</nowiki>, dead link) [*]
* detect xml DnD from html page [*]
* detect xml DnD from html page [*]
* make / switch to CONS layer [*]
* make / switch to CONS layer [*]
Line 97: Line 196:
* embed new files and make package [*]
* embed new files and make package [*]
* test package update on different machine before uploading it [*]
* test package update on different machine before uploading it [*]
Version increment:
sharedVanillaClassesVersionInApp = 2
{{divhide|end}}
{{divhide|end}}


===General checklist of addon and GUI===
===General checklist of addon and GUI===
Line 239: Line 340:
----
----
----
----


===New code snippets===
===New code snippets===
Line 301: 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 321: 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 330: 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 404: 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 414: 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 423: 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 430: 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 453: Line 552:
   logmessage "couldn't find ICETree"
   logmessage "couldn't find ICETree"
  end if
  end if


==Dev notes for remake v2==
==Dev notes for remake v2==
Labor-intense improvements will be probably tackled only after v1 (alpha helix) was completed.
Labor-intense improvements (aka ''skipped cuz of lazyness'') will be probably tackled only after v1 (alpha helix) was completed.


beta helix
beta helix
'''GUI'''
* Add a "current tasks" screen.
* Add a "current tasks" screen.
** use background worker threads
** use background worker threads
** use a progress bar
** 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
* 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 turret screens
Line 470: Line 572:
** v1 uses xsi scripts version in the app's settings (a section provided by Visual Studio)
** 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===
===FILM creation within MT===
[[XML:FILM|FILM]]s could be created with certain approximation.
[[XML:FILM|FILM]]s could be created with certain approximation.
Line 481: Line 584:


Exact values might require information about ONCC and starting TRAM.
Exact values might require information about ONCC and starting TRAM.


===Animated reference===
===Animated reference===
Line 525: 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 542: 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 560: Line 657:


[...]
[...]


===TRBS-fitting TRMA creation===
===TRBS-fitting TRMA creation===
Line 574: 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 704: 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 741: 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 750: 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 838: 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 863: 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 918: 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]]