Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(16 edits)

Sorry then, I've no idea how to help in that regard. I use the Aon mod for inserting skills, so I don't know what you'd need to do to fix it. I can still explain a bit more of what I've learned about making the skills themselves though, so that it's easier for you to start.

The code for individual skills can be found in the SkillList file. When creating a skill, most of the time this is the only place you need to go.

Each skill is broken into three pieces: 
1.) The skill ID, name and description at the top
2.) The flags which will tell the game what kind of skill it is and when to use it.
3.) The actual code which the skill preforms, if any.

Skill flags are pretty intuitive when you study where each one is used, but using the wrong flags when creating a skill will usually leave it non-functional.

To demonstrate, skills generally follow this structure:

SkillList.skills.Add(new Skill( [Skill ID], "The Skill's Name ", "Reference Name", "Description of the skill.", new Skill.Flag[]   
      {

         Skill.Flag.TurnEnd,   (When the skill will activate. If nothing is referenced it will be active all the time.)
         Skill.Flag.Trait,    (What "type" of skill it is, whether that be a buff, trait, modifier, or something else. Multiple can apply.)
         Skill.Flag.Visible        (Determines whether you can see the skill from the character's status or not.)
     }, delegate()
      {

        (Everything the skill actually does goes here.)
         SkillList.current.Pause(false);        (I am uncertain as to exactly what this line does or where it should be used, but
                                                                                      I know that  certain passive skills will cause the character to freeze without it.)

     }));

Here is a relatively simple skill as a real example:

SkillList.skills.Add(new Skill(1001, "Sleeping Beauty", "SleepingBeauty", "Digest period decreases by one additional turn each round while asleep. Uses Hibernate instead of Digest when Overburdened.", new Skill.Flag[]
        {
            Skill.Flag.TurnEnd,
            Skill.Flag.Trait,
            Skill.Flag.Visible
        }, delegate()
        {
            if (SkillList.current.skills.Contains(200) && SkillList.current.containPeriod > 1f)
            {
                SkillList.current.containPeriod -= 1f;
            }
            SkillList.current.Pause(false);
        }));

This is the skill "Sleeping Beauty", which is what Dusk Lamia uses to increase her digestion speed while asleep.
As you can see, the skill ID is 1001; this is how the skill is identified when it is referenced in another part of the code.

The skill uses the flags "TurnEnd", "Trait", and "Visible". TurnEnd means that the code is executed at the end of that characters turn. Trait means that it will be called a trait in the status page. Visible means that you can see it in that character's status

Now, to focus on the active part of the code.


if (SkillList.current.skills.Contains(200) && SkillList.current.containPeriod > 1f)
            {
                SkillList.current.containPeriod -= 1f;
            }
SkillList.current.Pause(false);

"SkillList.current" is how the game referrers to the character a skill belongs to. In this case, that would be Dusk Lamia.

"SkillList.current.skills.Contains(200)" is checking whether Dusk Lamia has the skill with the ID "200". In this case, that would be the "Sleeping" status.

"SkillList.current.containPeriod > 1f" is checking on the amount of time left Dusk Lamia needs to digest her prey. In this case, it is determining whether that period is more that one.

"SkillList.current.containPeriod -= 1f;" is taking that period, and removing one from it. If there were 6 turns until digestion before, it would now be 5.

Altogether, what this does is first check that Dusk Lamia is both Asleep, and has more than just a single turn until digestion. If that is true, it will subtract an extra turn from that amount. This is why she digests things at twice the speed while asleep.

I am not nearly as confident on how attacks work, but the framework isn't too different from skills. There are values which determine the statistics of the attack, flags to identify it, code to be executed, and restrictions as to when and how it can be used. Sorry that I can't give much information, but I'm still learning them myself.  Attacks can be found in the AttackList file.

When developing both skills and attacks, an incredibly helpful thing to do is start by modifying an existing skill which is similar to what you want to make. This way, it becomes much easier to understand how that type of skill works, and how you will need to modify it. 

If any of this turns out to be incorrect in some way, I apologize. All of this information is only what I've managed to piece together, but if there's anything specific about them you need to know I'll try my best to help.

pretty accurate guide for skills as you got everything down that you need to know the basics for; as for what Pause() does, it just tells the game whether or not to pause the queue of what code to run when currently in an event scene (mainly so it doesn't try to run multiple things at once)

do note though that some flags are currently unfinished / non-functional / require extra code to make them work properly, so I'd say stick to what's currently used by other skills when making something of your own

attacks are pretty simple since you mainly just need to worry about setting up a listing for them in AttackList.cs; once an attack is ran, the actual code for the attack is stored in EventScene.cs (match the internal id value of the attack to the case number there), though there are some special cases like digest that don't use the event system since they use a separate system to handle their functionality

attacks use this format at the top of a listing: attack id value (make this unique) > display name > internal name (put whatever here as the player won't see it) > description > power > en cost > stun amount > minimum range > maximum range > accuracy > array size (make this value equal to the amount of flags you put for the attack) > flags (look in Attack.cs to see what you can put in here)

most of the code you see in an attack listing is mainly for controlling values in the ui / controlling the conditions for which an attack can be used, so I'd say just copy an already-existing attack and modify that

i can feel the brain cells leaving my mind

thanks a ton, that clears things up a lot; I'm making much better progress on getting my attacks to work now.