Modding Visuals

From Rescue HQ – The Tycoon Wiki
Jump to: navigation, search

To create visual assets, or to replace existing ones, you will need to use the Unity Editor.

Basics[edit | edit source]

To get started, create a folder for your mod inside the Unity project, eg. .../ModToolBuild/Assets/_mods/myawesomemod. The name of your mod should of course match its name inside the base game installation directory. Placing your mod inside the _mods subfolder will make sure that the relevant assets you create are automatically assigned to the correct AssetBundle inside Unity.

You can find a list of all asset types the game uses by right-clicking in the project browser, and going to Create -> RescueHQ

For the game to actually use your assets, you must name them correctly based on certain patterns. These patterns usually include the ID of the thing you are creating an asset for (you can see those IDs in the .fsx files of a mod). Find details below.

The game looks up assets by name, and if there's multiple mods providing an asset with the same name, the one from the mod loaded later wins. This can be used to replace/override existing assets from other mods loaded before.

Asset Types[edit | edit source]

This section will give information about all the asset types, how to name them and how to set them up correctly.

SmartObjects[edit | edit source]

SmartObject[edit | edit source]

Naming: "_<SmartObject ID>". Eg. if your object has the ID "Toilet", your asset must be called "_Toilet"

For a SmartObject asset, you can define a list of primary prefabs (variants). One of those is chosen randomly and displayed for a fully built object.

The secondary prefab is also used for display. Having separate primary and secondary prefabs allows to animate them separately based on the object state. The main game uses this for garages.

The sprite will be shown in the UI, eg. build menu.

Some objects can be in various states. The States list allows to specify animations and sounds for each object state. Each entry in that list must specify the name of the object state.

Vehicle states:

  • WaitingForActors : The player just closed the dispatch window, the vehicle is now waiting for people to enter it.
  • Leaving : Everyone assigned to the vehicle has entered and it is now leaving. Leaving animation goes here.
  • AtEmergency : At an emergency and waiting until the emergency is resolved.
  • WaitingToReturn : At a resolved emergency and waiting a bit until it can return (should be set up like AtEmergency state).
  • ComingBack : Vehicle is now returning to the HQ. Returning animation goes here.
  • ActorsGettingOut : Vehicle has returned to the garage and is waiting until everyone inside it got out.
  • Broken : Vehicle requires repairs.

AutomaticDoor states:

  • Closed
  • Opened

Activity[edit | edit source]

Naming: "_<SmartObject ID>_<Activity ID>". Eg. if your object has the ID "Toilet" and an activity with ID "peeing", your asset must be called "_Toilet_peeing"

This asset allows you to set up the animations and sounds that the object plays during use, as well as the animation that the people using the activity play. You can also specify the animations that people using while walking towards performing this activity.

Under Activity Prefabs, the During Loop field can specify a prefab that is spawned on top of the activity when it is being used. Toilets and Showers of the main mod make use of this feature to add a pixelation effect.

Room[edit | edit source]

Naming: "_<Room ID>", eg. if you have a room with ID "Garage", the asset must be named "_Garage".

Room assets allow to specify a sprite to be shown in the UI, eg. build menu.

Various floor prefabs and wall prefabs can be configured, of which one will be randomly chosen based on the chosen selection method. In addition, a wall corner prefab can be set for each angle.

Actors[edit | edit source]

Profession[edit | edit source]

Naming: "_<Profession ID>", eg. if you have a profession with ID "FireFighter", the asset must be named "_FireFighter".

Profession assets allow you to define the default prefabs for male and female actors of that profession, as well as various idle and walking animation.

You should also specify a profession sprite that will be shown in the UI.

Uniform[edit | edit source]

Naming: "_<Uniform ID>", eg. if you have a uniform with ID "FireFighterUniform2", the asset must be named "_FireFighterUniform2".

Uniforms let you define alternative prefabs to be used for actors of a profession. If a uniform definition has no matching asset, the default uniform for the profession will be used instead.

Item[edit | edit source]

Naming: "_<Item ID>", eg. if you have an item with ID "AssaultGear", the asset must be named "_AssaultGear".

Here you can specify a sprite to be shown in the UI, and a prefab that is shown when people carry the item around or when it's inside a storage object.

Level[edit | edit source]

Naming: "_<Level ID>", eg. when you have a level with ID "Berlin_Original", your asset must be named "_Berlin_Original".

This asset specifies a Unity scene name to be used as background scenery when playing a scenario with the level, as well as a 2D map to be shown during emergency dispatch.

Emergency Wave[edit | edit source]

Naming: "_<wave name>". Emergency waves do not have IDs, they are specified as part of a scenario timeline using a wave name.

Emergency wave assets can set a sprite and color that will be displayed in the timeline.

Icon[edit | edit source]

Naming: "_i_<Icon ID>"

Icon assets just specify a sprite. Icons are used for various things in the game, and don't need any dedicated definitions in script files.

The Modding Gameplay section contains more info about what icons are required when.

Trait Style[edit | edit source]

Naming: "_ts_<style name>". Trait styles do not have IDs, they are specified as part of traits using style names.

This asset defines various colors that are used to display traits in the UI.

QuestGiver[edit | edit source]

Naming: "_<questgiver name>". Questgivers do not have IDs, they are used by a scenario timeline or any other script commands using just a questgiver name.

This asset is used to configure questgivers (eg. the mayor speaking), which consist of a list of phases.

Each phase has a speaker image and a speaker key (a localization key) to show who is speaking in the quest pop-up display. The loca key text is a localization key used for the text to display for the phase, and also for the sound event name for the voice over. If sound id is not empty, that sound id is used instead for the voice over.

Sound Override List[edit | edit source]

Does not have any naming requirements. This type of asset is referenced by a Unity scene, to define a mapping of original and replaced sound ids.

This feature can be used to replace certain sounds based on which background scenery is being used for a level.