Public override void Init(ConfigFile config) Public override Sprite ArtifactDisabledIcon => MainAssets.LoadAsset("ExampleArtifactDisabledIcon.png") Public override Sprite ArtifactEnabledIcon => MainAssets.LoadAsset("ExampleArtifactEnabledIcon.png") Public override string ArtifactDescription => "When enabled, print a message to the chat at the start of the run." Public override string ArtifactLangTokenName => "ARTIFACT_OF_EXAMPLE" Public override string ArtifactName => "Artifact of Example" Public static ConfigEntry TimesToPrintMessageOnStart Using static YourNameSpaceHere.BaseUnityPluginInheritedClass for this, we will take a look at ItemModCreationBoilerplate's ExampleArtifact ExampleArtifact Once you finish copying and Parting ArtifactBase, all thats left to do is create the class where you will fill in the information and the logic behind your Artifact. Which is the backbone for making your Artifact do stuff.ĬreateLang(): Method that creates the lang tokens of your ArtifactĬreateArtifact(): Method that finishes the creation of your Artifact and Registers it to the game using ArtifactAPI. as such, just copy and paste this code snippet into an empty class file and create your artifact in another class that inherits from ArtifactBase.īellow is a detailed walkthrough on each variable and the methods.ĪrtifactLangTokenName: The lang token of your Artifact.ĪrtifactDescription: The Description of the Artifact when you hover over it.ĪrtifactEnabled: the icon of your Artifact when its enabled.ĪrtifactDisabled: the icon of your Artifact when its disabled.ĪrtifactDef: Your Artifact Def, Basically how the game identifies your Artifact.ĪrtifactEnabled: A bool that can be used to check if the run has your artifact enabled. Since this class is an Abstract class, it only works as a base. LanguageAPI.Add("ARTIFACT_" + ArtifactLangTokenName + "_DESCRIPTION", ArtifactDescription) ĪrtifactDef = ScriptableObject.CreateInstance() ĪrtifactDef.cachedName = "ARTIFACT_" + ArtifactLangTokenName ĪrtifactDef.nameToken = "ARTIFACT_" + ArtifactLangTokenName + "_NAME" ĪscriptionToken = "ARTIFACT_" + ArtifactLangTokenName + "_DESCRIPTION" ĪrtifactDef.smallIconSelectedSprite = ArtifactEnabledIcon ĪrtifactDef.smallIconDeselectedSprite = ArtifactDisabledIcon ĬontentAddition.AddArtifactDef(ArtifactDef) LanguageAPI.Add("ARTIFACT_" + ArtifactLangTokenName + "_NAME", ArtifactName) Public abstract void Init(ConfigFile config) Public bool ArtifactEnabled => (ArtifactDef) Running modded and unmodded game with shortcuts Upgrading your project to use R2API's Split Assemblies Working Shaders outside of an AssetRipper projectĬreating skin for vanilla characters with custom model Welcome to the Risk of Rain 2 Modding Wiki !Īrtifact creation using ItemModCreationBoilerplate
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |