|
Adding New Artifacts
Page history
last edited
by James Koppel 6 years, 6 months ago
This guide is current as of 6/26/2018. At the moment, all artifacts require custom C++ code. We are discussing ways to add new artifacts via only scripting.
What you need
- Art:
- A 64x64 image, the main artifact image
- A 32x32 "icon" image, used in the hero trading screen
- 2 32x32 adventure map tiles, representing the object and its shadow
- Name, description, and event text
- Ability to add code to implement features
Steps
- Add a new entry to artifacts.xml, similar to the others already there. You'll need to provide its name and description, and the text that appears when a player picks it up on the adventure map. Use the next available ID and remember it.
- Of note is the artifact level: treasure, minor, major, or ultimate. This affects which random events may give this artifact.
- Following the guide in Adding Artwork, add the art:
- The 64x64 image goes in ARTIFACT.icn. This image should receive the index (artifact ID)+1.
- The 32x32 icon goes in ARTFX.icn. This image should receive the index (artifact ID).
- The adventure map tiles go in OBJNARTI.icn. The shadow tile receives the index 2*(artifact ID). The main tile receives the index 2*(artifact ID)+1.
- Implement the code. Currently, artifacts are implemented by scattering a number of hero::HasArtifact checks throughout the codebase. Examples:
- hero::GetSSLevel implements the Spade of Necromancy ability.
- hero::CalcMobility implements the Traveler's Boots of Mobility, the Nomad Boots of Mobility, and the True Compass of Mobility
- combatManager::ModifyDamageForArtifacts implements 8 different artifact abilities
- Add a scripting constant for the new artifact: https://github.com/jkoppel/project-ironfist/blob/master/src/cpp/shared/scripting/consts.cpp
- Add it to the map editor. See Adding Map Overlays.
Adding New Artifacts
|
Tip: To turn text into a link, highlight the text, then click on a page or file from the list above.
|
|
|
Comments (0)
You don't have permission to comment on this page.