Essentials Series/Editing Assets: Difference between revisions

no edit summary
Battlepedia>Igorseabra4
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 3:
 
== Using the Archive Editor ==
The archive editor is the main way to edit HIP/HOP archives in Industrial Park. You can open any amount of Archive Editors you want to, and each can have one HIP and/or HOP file open. Also, opening a third one with the boot.HIP file will allow you to view the objects whose models are contained there (such as spatula, underwear and shiny objects). You also can drag a HIP/HOP file into Industrial Park's window to open it in a new Archive Editor. The Archive Editor has many functions and operations it can perform on a HIP/HOP archive, all of which are listed below:
 
[[File:Industrial Park Screenshot3.png|626px|thumb|center|Archive Editor window]]
Line 15:
Closing the Archive Editor through the X button will not close it, only hide it.
 
HIP archives are composed of multiple layers, and each layer can contain many assets. Assets can be of various types, and each type should be in a layer of appropriate type (for example, texture assets should be in a TEXTURE type layer). They are the main thing that we'll be messing with when modding the game (you could say modding BFBB is basically editing assets). The assets contained in HOPs are usually textures, models, sounds and animations, which are the "resources" used to form levels, while the assets in HIPs are usually the data that composes the actual level. Nothing stops you from putting any kind of asset in either the HIP or the HOP, but I advise you to stick to the division the original game uses (the only thing you really cannot do is have sounds in both the HIP and the HOP, as that will glitch the game). For custom levels you created yourself, you have the option of keeping things simpler and not using a HOP file at all: the game will run happily if there's no HOP and all necessary assets are present in the HIP
 
=== Layers ===
The Layer box allows you to choose a layer from the archive to display assets from. You can also edit the layer type, add or remove layers (removing a layer will delete all assets in it!) and reorder the list of layers by using the arrows.
 
'''Note''': although you can add new layers and use the arrows to order them in any way you want, the game expects them in a specific order and might not be able to find the assets if that's different. Using the Collapse[[#Other Archive Editor Functions|Organize Layers]] function (explained at the bottom of this page) will automatically order the layers.
 
=== Assets ===
Line 27:
* '''Type''': this box allows you to see in the list only assets of a specific type, or all of them.
* '''Find''': type an asset ID (preceded by 0x) or name here. If an asset with this ID or name is present, it'll be selected.
* '''Template Focus''': click on this to activate [[../Asset Templates/|template]] placement focus for this Archive Editor.
* '''Import''' (Ctrl + I): displays the [[#Asset Header Editor|Asset Header Editor]], allowing you to create a new asset from an external file.
* '''Duplicate''' (Ctrl + D): duplicates the selected asset(s). The new assets will be a copy with a new name and asset ID.
* '''Copy''' (Ctrl + C): puts the selected assets on clipboard. You can paste them to a text file and save it, or paste in a different Archive Editor, for example.
* '''Paste''' (Ctrl + V): pastes the assets from clipboard. You must have previously copied assets. If the asset already exists, it'll be given a new name and asset ID. If the asset was originally from a different game or platform, Industrial Park will try to convert it to the new format if needed. The '''Replace Assets on Paste''' option, available from the Options tool strip menu in the main form, will cause existing assets to be overwritten on paste instead of given new names.
* '''Remove''' (Delete): deletes the selected assets from the archive.
* '''View''': will move the view to the selected asset's position. For most assets, it will show the asset from a short distance, but for the [[CAM]] asset, it will place the view in the exact position it assumes ingame for that camera.
* '''Export Raw''': allows you to export an asset's raw data to a file. If multiple assets are selected, you'll be able to export all of them to a folder. (this does not convert assets such as sounds, textures and models to formats useable elsewhere)
* '''Edit Header''' (Ctrl + H): displays the [[#Asset Header Editor|Asset Header Editor]], allowing you to edit the selected asset's header.
* '''Edit Data''' (Ctrl + G): displays the [[#Asset Data Editor|Asset Data Editor]], allowing you to edit the selected asset's internal data. This editor is only available for [[Industrial Park (level editor)#Asset Types|somemost of the assets]];interesting forstuff the others, you must exportin the rawselected data and edit it externally in a hex editorasset. Pressing Ctrl + G on the Archive Editor or just G on the main form is a shortcut to this button.
* '''Multi Edit''': allows opening one single Asset Data Editor window with multiple assets in it.
 
Notes:
* Right-click on the asset list box to show the context menu, which has the same functions as the buttons.
* You can click on an asset in the view to select it in the Archive Editor, or Ctrl + click to select multiple.
* The '''Update References on Copy/Paste''' option, available from the Options tool strip menu in the main form, enables references between assets to be automatically updated on Duplicate and Paste. This means that, if you copy assets A and B together and A has a reference such as a [[../Links/|link]] or a field with B's asset ID, the pasted assets C and D will have these references updated to match each other.
* The '''Use Legacy Asset Type Format''' option, available from the Options tool strip menu in the main form, makes IP use 3/4-letter codes for asset types instead of their full names (such as MVPT instead of MovePoint).
 
== Asset Header Editor ==
Line 50 ⟶ 52:
It allows you to edit the information of the asset's [[HIP#AHDR|AHDR]] entry.
 
* '''Asset Type''': the type of the asset. IfYou youcannot change this, beon sureexisting to import new asset dataassets.
* '''Asset ID''': the [[Asset ID]] of the asset. It'll be calculated automatically from the asset name using the BDKR hash algorithm, which is the same one used originally by the developers, but you can edit it afterwards (don't do this for [[RWTX]] assets!)
* '''Flags''': these are dependant on asset type. It's best if you do not change them.
Line 64 ⟶ 66:
[[File:Industrial Park Screenshot7.png|600px|thumb|center|Asset Data Editor for [[TEXT]]s]]
 
This window has different properties for each asset, and sometimes looks completely different as it's adapted for each individual asset types's needs. We will talk about the editor for different types of assets further in the series. Not all of the assets' attributes are known, meaning you'll find a lot of fields labeled as unknown. ThisFor editorsome isof notthe availableless for alldocumented asset types, andthis youwindow canwill finddisplay thea list forof whichthe itasset's doesdata workunlabeled, [[Industrialeither Parkas hex numbers or floats. I only recommend editing assets like this if you're (levelan editor)#Assetexperienced Types|here]]user.
 
The internal editor supports conversion between asset IDs and asset names. This means that, in any place you're supposed to type an asset ID, you can also type the name and the ID will be generated automatically from it; asset IDs will also be automatically replaced by names whenever possible. Type hexadecimal numbers starting with 0x to force use of an asset ID and not a name. There's also support for using the asset ID from a pasted asset; if you have an asset in your clipboard, pasting it in an asset ID field will collect the asset ID from it. This function can be turned off completely in the options: "Use Legacy Asset ID Format" (with this checked, all asset IDs will be displayed and edited as hex numbers only).
Line 71 ⟶ 73:
 
If you check the '''Hide Help in Asset Data Editors''' option, available from the Options tool strip menu, the help box in this window will be hidden. This box usually has comments about specific fields, so if you're unfamiliar with most asset types you should leave the option off.
 
=== Multi Asset Data Editor ===
You can open the Multi Asset Data Editor by selecting more than one asset on the Archive Editor and clicking on Multi Edit.
* This tool is similar to the Asset Data Editor, but with multiple assets open at once.
* Any edited properties will be applied to all assets.
* You can use this tool with assets of different types, but only properties common to all assets will be shown.
* You cannot edit [[../Links/]] with this tool.
* It's only recommended to do this on [[../Links/#Base and Entity Assets|base and entity assets]]; but not others such as sounds, models, textures and animations.
 
== Gizmos ==
Line 109 ⟶ 119:
 
== Templates ==
Now, you know the basics of editing assets. This page might seem like it has a lot of information, but you don't have to remember everything right now, and you can always come back to it to review or find a function you need. Continue to the [[../Asset Templates/]] page for the best way to place new assets.
 
== Other Archive Editor Functions ==
These are available from the '''Edit''' tool strip menu.
* '''Convert Archive''': This allows you to edit the PACK section of the HIP archive, which contains the information for the archive's platform, game and date. This means you can edit an existing archive's game and platform; Industrial Park will also convert the format of all assets to the new game/platform's format. The assets which will be converted are limited to the ones supported by the "Cross-Version Copy" function (which you can check in the table below). For the ones it cannot (such as sounds and MINF), it will ask you to choose a directory to replace the assets from; all HIP/HOPs in this directory and subdirectories will be scanned for the assets. Any assets which were not found will not be converted and the list will be shown at the end. Texture assets are not converted. This function is still experimental.
* '''CollapseOrganize Layers''': This will merge all of the archive's layers in a way that there is only one layer of each type, keeping all assets. Layers will be ordered by type in the same order the game originally does.
* '''Merge Similar Assets''': Checks if the archive has multiple assets of the types [[COLL]], [[JAW]], [[LODT]], [[PIPT]], [[SHDW]] and [[SNDI]], and merges their content into one single asset of each. This is also done upon Import HIP (detailed below).
* '''Apply Scale''': Allows you to apply a X, Y, Z scaling on all assets in the archive. All assets with a X, Y, Z position in the world will have this position multiplied by the factors you specify, and the same for all assets with a X, Y, Z scale. This function will not work well on any of the original game's levels since it does not scale the JSP models.
* '''Verify Archive''': Will create and display a report that searches the archive for any potential errors, such as invalid data, fields left blank and references to non existing assets. It's meant as an aid for custom level development, to find possible errors and help correct them. Note that this function's output is not perfect; not everything in the report is necessarily an error, and not all errors which might be present in the archive will necessarily be reported.
 
* '''Export Assets + INI''': Exports the currently open archive into a folder structure and INI file, the same output perfomed by [[HipHopTool]].
* '''Export Audio''': Exports all SND and SNDS assets in the archive into a folder. The assets will be 'reassembled' with their headers, creating useable audio files. See more information on [[../Sound and Music/]].
* '''Import HIP/HOP Archive''': Choose a HIP, HOP or Settings.ini file (from HipHopTool-style exported archive) to import. All layers and assets from the selected file will be added to the current one. Layers will be ordered by the CollapseOrganize Layers function. If an asset with the same ID is already present, you will be prompted whether to overwrite it or not, except for [[COLL]], [[JAW]], [[LODT]], [[PIPT]], [[SHDW]] and [[SNDI]], all of which will be merged into one single asset. This is useful for [[Asset porting]].
* '''Import Multiple Assets''': Choose any amount of files to use as external data for assets and import them. This is useful mostly for assetssound which are commonly from external editorsfiles, such as textures, models and sounds. Importedimported sounds will automatically be sent to the [[SNDI]], but can also be useful for assets such as models and textures (if they are already in native DFF or TXD format; if not, use Import Models and Import Textures as detailed below).
* '''Import Models''': see [[Custom Models]].
* '''Import TexturesModels''': see [[../Custom Models#Import Textures|Custom Textures/]].
* '''Import ModelsTextures''': see [[../Custom Models/#Import Textures|Custom Textures]].
 
[[Category:Modding]] [[Category:Tutorials]]