Skip to content
Blanc Faye edited this page Oct 21, 2020 · 26 revisions

Mod API

This wiki will contain useful API if ever a mod creator also wants their custom entities to be supported with the Options/Multiples. If you have questions, contact Chen. Contact can be found in the README.

Chen.GradiusMod.GradiusOption.FireForAllOptions(entityState, needTarget, actionToRun)

Loops through all the Options of the minion.

Name Description
entityState EntityStates.BaseState
The state of the of which the attack was made.
needTarget System.Boolean
True will query the target to the input in actionToRun. False will not query and assign null on target for the input.
actionToRun System.Action{UnityEngine.GameObject,Chen.GradiusMod.OptionBehavior,UnityEngine.GameObject}
An action to execute for each Option. The inputs are as follows: GameObject option, OptionBehavior behavior, GameObject target.

Chen.GradiusMod.GradiusOption.LoopAllMinions(ownerMaster, actionToRun)

Loops through the all the minions of the owner.

Name Description
ownerMaster RoR2.CharacterMaster
The owner of the minions.
actionToRun System.Action{UnityEngine.GameObject}
An action to execute for each minion. The minion's CharacterBody GameObject is given as the input.

Chen.GradiusMod.GradiusOption.OptionSync(entityState, actionToRun, queryTracker)

Syncs the Option from the server to clients. Sync logic should be provided in actionToRun.

Name Description
entityState EntityStates.BaseState
The state of which the attack was made.
actionToRun System.Action{UnityEngine.Networking.NetworkIdentity,Chen.GradiusMod.OptionTracker}
The sync action to perform. Inputs are as follows: NetworkIdentity optionIdentity, OptionTracker tracker.
queryTracker System.Boolean
If true, the Option tracker is automatically queried. If false, the Option tracker will not be queried.

Chen.GradiusMod.GradiusOption.SetRotateOptionMultiplier(masterName, newValue)

Sets the rotation multiplier for a minion type. This multiplier affects the distance and speed of rotation.

Name Description
masterName System.String
The CharacterMaster name of the minion.
newValue System.Single
The multiplier value.

Returns

True if the values are set. False if not.

Chen.GradiusMod.GradiusOption.SetRotateOptionOffset(masterName, newValue)

Sets the offset center position for a minion type. Options will rotate around the offset.

Name Description
masterName System.String
The CharacterMaster name of the minion.
newValue UnityEngine.Vector3
The offset value.

Returns

True if the values are set. False if not.

Chen.GradiusMod.GradiusOption.SetToRegularOptions(masterName)

Lets the minion use Regular Options.

Name Description
masterName System.String
The CharacterMaster name of the minion.

Returns

True if the minion is successfully set to use Regular Options. False if it is already using Regular Options.

Chen.GradiusMod.GradiusOption.SetToRotateOptions(masterName)

Lets the minion use Rotate Options.

Name Description
masterName System.String
The CharacterMaster name of the minion.

Returns

True if the minion is successfully set to use Rotate Options. False if it is already using Rotate Options.

Chen.GradiusMod.GradiusOption.SupportMinionType(masterName)

Adds a support for a minion for them to gain Options.

Name Description
masterName System.String
The CharacterMaster name of the minion.

Returns

True if the minion is supported. False if it is already supported.

Clone this wiki locally