Skip to content

Custom status script #1355

@charlie-in-spain

Description

@charlie-in-spain

Hi!

First of all, I've realized that maybe modding issues don't fit here and they should rather go in "Discussions". Please let me know so that I place these topics correctly.

I'm trying a custom status following the wiki: https://github.com/Albeoris/Memoria/wiki/Modding-status-effects
I'm designing a C# script that is very similar to PoisonStatusScript since it also handles the parameters "Target.CurrentHp" and "Target.MaximumHP", but it doesn't seem to work in battle.
Therefore, I've tried to redo "PoisonStatusScript.cs" as a custom script and call it from an external battle script, in order to check if I'm doing it fine. So I've followed these steps:

-I've registered it in CommonScript.cs as:
public const BattleStatusId Test = BattleStatusId.CustomStatus1;

-I've donde a copy of "PoisonStatusScript.cs" as "TestStatusScript.cs", and in its content I changed the attribute and sub-class at the beginning:
[StatusScript(CommonScript.Test)]
public class TestStatusScript : StatusScriptBase, IOprStatusScript
The rest of the content is the same as in "PoisonStatusScript.cs".

-I've added an entry in "StatusData.csv" (editing with Notepad) with a new ID for "Test" status, and the same values as Poison status from the original game. This seems to be recognised because I've tried to add a color for test in "ColorKind" parameter and it is showing in battle.

Then in battle the poison icon appears above character's head when inflicted with "Test" status, but nothing happens: no damage is inflicted nor shown on the character. Maybe there's something else to do in order to make it work as in the original Poison status script?
My idea is that if I manage to make this "copy" work, I should be able to do the same with my custom script.

I'm calling this "Test" status from an external battle script with:
_v.Target.TryAlterSingleStatus(CommonScript.Test, true, _v.Caster);

Regards!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions