Pack

From WonderWiki
Revision as of 23:37, 27 November 2024 by 188.95.65.97 (talk) (Added Pack file page, description and information on a few components.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This page is still under construction.

Pack files are resource files the game uses to store and organise components for its functionality. Most Pack files are used to define the functionality of actors, meaning all enemies, objects, items, and even the behaviour of the terrain unit system.

Pack files have an internal folder structure, where different component presets are contained that, along with the actor's AI, determine how the actor behaves in the game. From importance is also the Bootup.Nin_NX_NVN.pack.zs file, which is responsible for the game's functionality.

Actor Pack files

The actor pack files are from higher interest as they allow the modification and addition of new actors into the game. Following will be an incomplete list and documentation of known actor components and our currently best understanding of them.

AI

The AI folder contains .ainb files as well as an AIInfo folder, containing an .bgyml file which references the root of the actor's AI system. Information and documentation of .ainb files can be found on https://epd.zeldamods.org/wiki/AINB. An AI component is not necessary for an actor to function, as a lot of MapObj and DV actors don't contain them. AI components are only necessary for more complex behaviour.

Actor

The Actor folder contains at least one .bgyml file which has the name of the actor. It contains references to all components inside the Pack file the actor needs to function properly.

Damage Reaction Table

The DamageReactionTable folder contains information on how the actor reacts to different attack types. Each attack type entry has three different settings listed below.

Attack Types
Attack Type Name Explanation
BlockBody
Body Crushed by moving object?
BodyHuge Crushed by very heavy moving object?
BodyLarge Crushed by heavy moving object?
BodySmall Crushed by light moving object?
Bomb Bomb explosion (like Bob-Omb explosion)
BombMedium Big explosion? Bowser Airship Wonder Attack?
Bubble Bubble Flower attack
CarriedObject Attacked by object hold by player (like Koopa Shells)
Eat Eaten by Yoshi
Fire Fire Flower attack
HipDropDrill Ground Pound with Drill Suit
Invincible Player with invincibility star power
Lava Contact with Lava
NormalHipDrop Small player ground pound
NormalSpinJumpStamp Small player spin jump
NormalStamp Small player jump
Poison Contact with Poison
PressHuge
PressMedium
Reflect
ReflectLarge
ReflectSmall
Rolling Spike Ball?
ShockWaveOnGround
Slam Elephant trunk attack
SlamHorizontal Elephant trunk attack while laying down
SlopeSlide Sliding into actor
StampHuge Elephant jump?
SuperHipDrop Super player ground pound
SuperSpinJumpStamp Super player spin jump
SuperStamp Super player jump
UpwardImpactDrill Attack from below with Drill Suit
UpwardImpactLarge
UpwardImpactMedium
Water Contact with Water

Death Parameter

DeathParam (or more specifically its setting DeathType) determines how the actor react upon being killed. The possible values depend on the actor and its AI, though most enemy type actors have a few in common.

Examples of common Death Types
Death Type Value Explanation
DieFall The actor plays its death effect while falling off-screen.
Bubble The actor get trapped in a bubble (from the Bubble Flower) and shrinks into a coin.
ShotUp,

ShotHorizontal

Elephant attack. The actor flies upwards or sideways off-screen.
Vanish The actor disappears without any effect.
VanishWithSmokeHuge The actor disappears into a puff of smoke.
Swallowed (For Eat damage) The actor gets swallowed by Yoshi.

Reaction Parameter

ReactionParam, or more specifically ReactionType, determines how the actor acts upon being attacked without dying. Here as well, possible value depend on the actor and its AI, but many enemy type actors have a few in common.

Examples of common Reaction Types
Reaction Type Value Explanation
OnlyDamageEffect Hurts the actor and plays a damage animation (if available).
Ignore The actor does not take damage and bullets (like fire balls and bubbles) pass through the actor.
NotDamaged The actor does not take damage but stops bullets.
KnockBackSmall,

KnockBackMedium, KnockBackLarge

The enemy gets knocked back.
HeldInMouth (For Eat damage) Yoshi does not swallow the actor after eating.
ReflectedSimply,

ReflectedSimplySmall, ReflectedSimplyLarge

Stop

Along with the ReactionType, ReactionParam can also take a StateTransitionType which controls what the AI does after the actor was hit. Usual values are None and ToState[n], where [n] is an integer.

Recieve Number to Die

ReceiveNumToDie sets the amount of time an actor has to be attacked with this attack type until it dies.

Information on Component Editing and Component Inheritance

Many component folders contain multiple files. These are usually in a parent-child relationship to each other. Actors usually build upon simpler base actors with base components, and use extra files (often having the name of the actor pack file) to modify or append to these base components. It's important to know when changing values inside these components, is that if multiple actors contain the same files in the same locations, only one will be loaded by the game. This can lead to issues where an edited actor may not change its behaviour, or all actors referring to the same component change their behaviour according to the modification. To circumvent these issues, make sure to edit only the files containing the actor's file name, or add a new file to modify a component as described below.

Adding a modifying file to an actor

In order to avoid situations described above, browse to the files of the component you want to edit. The easiest way of adding a file (assuming you use Switch Toolbox) is to export the existing file you want to modify as raw data, then add that file to the folder by Right Click on Folder → Add File. Rename the imported file to the actor's file name. Now you are free to modify it to your heart's content. Lastly, browse to the Actor folder and inside the ActorParam file change the reference to the edited component to the new file. Save everything and the game should recognise the component as being separate.