Difference between revisions of "Viewing a Texture or Model"
Captain Berf (talk | contribs) (How to view a specific model and / or texture in Oolite) |
Cholmondely (talk | contribs) (Added Svengali's Library Tools) |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== How to view a specific model and / or texture in Oolite. == |
== How to view a specific model and / or texture in Oolite. == |
||
− | If the ship you want to view is your player ship simply launch the ship and press v to cycle through the external views. Otherwise ... |
||
+ | ===Using the in-game external views=== |
||
− | Install Debug.oxp |
||
+ | If the ship you want to view is your player ship simply launch the ship and press v to cycle through the external views. |
||
− | Installing Debug.oxp |
||
+ | Otherwise ... |
||
− | 1. Add Debug.oxp to your Oolite Addons [http://wiki.alioth.net/index.php/Debug_OXP] |
||
+ | ---- |
||
− | 2. Install PyDebugConsole [https://developer.berlios.de/project/showfiles.php?group_id=3577] |
||
+ | ===Install Debug.oxp=== |
||
− | Run Oolite with the DebugConsole |
||
+ | 1. Add Debug.oxp to your Oolite AddOns [[Debug OXP]] |
||
+ | -- Extract the archive. |
||
+ | -- Move the extracted folder Debug.oxp to $PROGDIR/AddOns/ |
||
+ | 2. Install PyDebugConsole [https://developer.berlios.de/project/showfiles.php?group_id=3577] |
||
+ | -- Extract the archive |
||
+ | -- Put the directory OODebugConsole wherever you like |
||
− | + | ===Run Oolite with the DebugConsole=== |
|
− | 2. Start Oolite (holding down the shift key while it boots if an oxp has been changed |
||
− | (holding down shift clears the cache)) |
||
− | 3. Launch into space (moving into a clear area helps). |
||
− | Spawning the ship you want to view |
||
+ | 1. Run the DebugConsole [WhereverIPutIt/OODebugConsole/OODebugConsole.exe] |
||
+ | 2. Start Oolite |
||
+ | (If you have modified an oxp hold down the shift key during during the boot |
||
+ | to clear the cache) |
||
+ | 3. Launch into space [Press 1](moving into a clear area helps). |
||
− | Type in the console |
||
+ | ===Spawning the ship you want to view actively in the game=== |
||
− | :spawn ''role'' |
||
+ | |||
− | where ''role'' is the parameter to be passed to the :spawn macro. |
||
+ | ====Spawning the ship==== |
||
+ | |||
+ | Type in the console |
||
+ | |||
+ | :spawn ''shipUniqueRole'' |
||
+ | |||
+ | where ''shipUniqueRole'' is the parameter to be passed to the :spawn macro. |
||
+ | |||
+ | ====Finding the ''shipUniqueRole''==== |
||
+ | |||
+ | To find the correct argument for ''shipUniqueRole'' refer to [i.e. open in a text editor] |
||
− | To find the correct argument for role refer to [i.e. open in a text editor] |
||
config\shipdata.plist |
config\shipdata.plist |
||
− | + | Find the entry for the ship in question in the shipdata.plist. [we'll call it shipX] |
|
<key>shipX</key> |
<key>shipX</key> |
||
− | Find the defined roles |
||
+ | |||
+ | Find the defined roles |
||
+ | |||
<key>roles</key> |
<key>roles</key> |
||
− | Use one of the defined roles as the argument for :spawn [found between <string></string>] |
||
+ | |||
+ | Use one of the defined roles as the argument for :spawn [found between ''<string></string>''] |
||
+ | |||
<key>shipX</key> |
<key>shipX</key> |
||
− | <dict> |
+ | <dict> |
− | ... |
+ | ... |
− | <key>roles</key> |
+ | <key>roles</key> |
− | <string>shipX-trader shipX-escort shipX-hunter</string> |
+ | <string>shipX-trader shipX-escort shipX-hunter</string> |
− | ... |
+ | ... |
− | </dict> |
+ | </dict> |
− | + | ||
+ | yields |
||
+ | |||
:spawn shipX-trader |
:spawn shipX-trader |
||
− | + | in the console. |
|
+ | |||
+ | ====Modifying the shipdata.plist==== |
||
+ | |||
+ | If all the defined roles are generic* modify the shipdata.plist from: |
||
− | If all the defined roles are generic* modify the shipdata.plist from: |
||
<key>shipX</key> |
<key>shipX</key> |
||
− | <dict> |
+ | <dict> |
− | ... |
+ | ... |
− | <key>roles</key> |
+ | <key>roles</key> |
− | <string>trader escort hunter</string> |
+ | <string>trader escort hunter</string> |
− | ... |
+ | ... |
− | </dict> |
+ | </dict> |
− | + | to |
|
<key>shipX</key> |
<key>shipX</key> |
||
− | <dict> |
+ | <dict> |
− | ... |
+ | ... |
− | <key>roles</key> |
+ | <key>roles</key> |
− | <string>shipX-trader trader escort hunter</string> |
+ | <string>shipX-trader trader escort hunter</string> |
− | ... |
+ | ... |
− | </dict> |
+ | </dict> |
[* If the defined roles are only generic e.g trader|pirate|hunter|etc then a random ship fulfilling the role will be spawned. Not necessarily the one you wanted.] |
[* If the defined roles are only generic e.g trader|pirate|hunter|etc then a random ship fulfilling the role will be spawned. Not necessarily the one you wanted.] |
||
Line 64: | Line 85: | ||
[Make sure to use a text editor suitable for programming. One that doesn't change the encoding or add junk to the file. EOL=LF+CR] |
[Make sure to use a text editor suitable for programming. One that doesn't change the encoding or add junk to the file. EOL=LF+CR] |
||
− | To park the spawned ship |
+ | ====To park the spawned ship==== |
+ | |||
+ | To park the spawned ship target it then enter in the console |
||
+ | |||
player.ship.target.setAI("dumbAI.plist") |
player.ship.target.setAI("dumbAI.plist") |
||
− | To manipulate sub entities (if the ship has any) use the command |
+ | To manipulate sub entities (if the ship has any) use the command: |
+ | |||
player.ship.target.subEntities[0].position = [x, y, z] |
player.ship.target.subEntities[0].position = [x, y, z] |
||
+ | |||
+ | ===View a rotating ship Mission Screen style=== |
||
+ | |||
+ | These commands work when you are docked in the station. |
||
+ | |||
+ | [for version 1.7.3] |
||
+ | |||
+ | Enter in the console |
||
+ | |||
+ | mission.runMissionScreen(null,null,null,'shipUniqueRole') |
||
+ | |||
+ | which, using the ShipX convention yields |
||
+ | |||
+ | mission.runMissionScreen(null,null,null,'ShipX-Trader') |
||
+ | |||
+ | |||
+ | [Coming soon to a stable version near you...] |
||
+ | |||
+ | Enter in the console |
||
+ | |||
+ | mission.runScreen({model:'shipUniqueRole'}) |
||
+ | |||
+ | which, using the ShipX convention yields |
||
+ | |||
+ | mission.runScreen({model:'ShipX-Trader'}) |
||
+ | |||
+ | ---- |
||
+ | == Library == |
||
+ | Svengali wrote a couple of AddOns for [[Library]] which enable this. |
||
+ | |||
+ | There are two tools tucked away in diverse locations: |
||
+ | |||
+ | * [https://app.box.com/s/pwttg9nrqvvpqzya0wcpqpc4ly9bov1r Lib_MatFinder 1.1] (oxz, 39.7 KB) - A developer-tool to work out materials entries. |
||
+ | :See [http://aegidian.org/bb/viewtopic.php?p=265566#p265566 here] for description ''re'' shaders ''etc''. (2 pages, 2018). |
||
+ | |||
+ | ::On your F4 screen (if you have Library running too) under "Developer": |
||
+ | [[File:Lib MatFinder Pos01.png|150px]] |
||
+ | [[File:Lib MatFinder Pos02.png|150px]] |
||
+ | [[File:Lib MatFinder.png|150px]] |
||
+ | |||
+ | |||
+ | |||
+ | * [https://app.box.net/s/h78y01lg9b Library_devtools.oxp] (look in Test OXP's) - Something peculiar |
||
+ | |||
+ | ::On starting a game (if you have Library running too): |
||
+ | [[File:Library_devtools_switches.png|150px]] |
||
+ | [[File:Library_devtools.png|150px]] |
||
+ | [[File:Library_devtools.values.png|150px]] |
||
+ | |||
+ | ::On your F4 screen (if you have Library running too) under "Lib_MatEditor": |
||
+ | [[File:Lib_MatEditor_%281%29.png|150px]] |
||
+ | [[File:Lib_MatEditor_%282%29.png|150px]] |
||
+ | |||
+ | [[Category:Oolite Development]] |
Latest revision as of 11:44, 11 January 2022
Contents
How to view a specific model and / or texture in Oolite.
Using the in-game external views
If the ship you want to view is your player ship simply launch the ship and press v to cycle through the external views.
Otherwise ...
Install Debug.oxp
1. Add Debug.oxp to your Oolite AddOns Debug OXP -- Extract the archive. -- Move the extracted folder Debug.oxp to $PROGDIR/AddOns/ 2. Install PyDebugConsole [1] -- Extract the archive -- Put the directory OODebugConsole wherever you like
Run Oolite with the DebugConsole
1. Run the DebugConsole [WhereverIPutIt/OODebugConsole/OODebugConsole.exe] 2. Start Oolite (If you have modified an oxp hold down the shift key during during the boot to clear the cache) 3. Launch into space [Press 1](moving into a clear area helps).
Spawning the ship you want to view actively in the game
Spawning the ship
Type in the console
:spawn shipUniqueRole
where shipUniqueRole is the parameter to be passed to the :spawn macro.
Finding the shipUniqueRole
To find the correct argument for shipUniqueRole refer to [i.e. open in a text editor]
config\shipdata.plist
Find the entry for the ship in question in the shipdata.plist. [we'll call it shipX]
<key>shipX</key>
Find the defined roles
<key>roles</key>
Use one of the defined roles as the argument for :spawn [found between <string></string>]
<key>shipX</key> <dict> ... <key>roles</key> <string>shipX-trader shipX-escort shipX-hunter</string> ... </dict>
yields
:spawn shipX-trader
in the console.
Modifying the shipdata.plist
If all the defined roles are generic* modify the shipdata.plist from:
<key>shipX</key> <dict> ... <key>roles</key> <string>trader escort hunter</string> ... </dict>
to
<key>shipX</key> <dict> ... <key>roles</key> <string>shipX-trader trader escort hunter</string> ... </dict>
[* If the defined roles are only generic e.g trader|pirate|hunter|etc then a random ship fulfilling the role will be spawned. Not necessarily the one you wanted.]
[Make sure to use a text editor suitable for programming. One that doesn't change the encoding or add junk to the file. EOL=LF+CR]
To park the spawned ship
To park the spawned ship target it then enter in the console
player.ship.target.setAI("dumbAI.plist")
To manipulate sub entities (if the ship has any) use the command:
player.ship.target.subEntities[0].position = [x, y, z]
View a rotating ship Mission Screen style
These commands work when you are docked in the station.
[for version 1.7.3]
Enter in the console
mission.runMissionScreen(null,null,null,'shipUniqueRole')
which, using the ShipX convention yields
mission.runMissionScreen(null,null,null,'ShipX-Trader')
[Coming soon to a stable version near you...]
Enter in the console
mission.runScreen({model:'shipUniqueRole'})
which, using the ShipX convention yields
mission.runScreen({model:'ShipX-Trader'})
Library
Svengali wrote a couple of AddOns for Library which enable this.
There are two tools tucked away in diverse locations:
- Lib_MatFinder 1.1 (oxz, 39.7 KB) - A developer-tool to work out materials entries.
- See here for description re shaders etc. (2 pages, 2018).
- On your F4 screen (if you have Library running too) under "Developer":
- Library_devtools.oxp (look in Test OXP's) - Something peculiar
- On starting a game (if you have Library running too):
- On your F4 screen (if you have Library running too) under "Lib_MatEditor":