Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

qqqqqqqqqqqqx12

11
Posts
6
Following
A member registered Sep 21, 2020

Recent community posts

kinda creepy. I like it

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

(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.

(2 edits)

if you only need to make a character with existing skills/ attacks, the Aon character mod comes with a framework and guide for adding them into the game. https://itch.io/t/3527783/blured-modded-characters. It also works for custom skills, so it’s still incredibly helpful even if you create new ones. A character with the Carrier skill would be very easy.

It will take more effort to create new skills/attacks, but it’s still very feasible; I had absolutely zero C# knowledge before starting this, and I’ve still managed to create a few unique skills and attacks I’m proud of.

Im bad at giving instructions, but all I do is use a free program called “dnSpy” to view and edit the “Assembly-CSharp.dll” file in the game data. 

You can find Assembly-CSharp at: Vessel Tactics_Data/Managed/Assembly-CSharp.dll

This is dnSpy: https://github.com/dnSpy/dnSpy, I think the most recent release will work fine. 

DnSpy is a decompiler, so editing the code can be a bit finicky. I am not currently able to check how dnSpy works to describe how to use it, but I will be in a few hours. It isn’t super hard, and there are many helpful tutorials online.

Creating new skills can be easy or hard, depending on how complex it is, but just by studying the existing skills it’s pretty simple to get started. The Aon mod also includes custom skills in its Assembly-CSharp file, so if you download it they can serve as a good example.

 Im again not able to describe the process at the moment, but I will later. A simple piece of advice would be that the “SkillList” and “AttackList” files are most important. It took some trial and error for me to figure it out on my own, but that’s probably because I know nothing about C#

I am not very knowledgeable about the technical details of these things, so I might not be able to help much if something goes wrong. I’ll be back in a few hours to describe things better.

Somehow, making the dialogue feels so much more daunting then making the actual character  <_<

Thanks, that makes sense. It's been fun working out how the code works.

I've made good progress on a simple modded unit, and am currently trying to make sure it's balanced. How did you go about balancing Aon?

thanks, good to know. Everything else is already incredibly useful, and it's made making a modded character feel much more feasible.

(2 edits)

I've continued messing with it, and I still can't get it to work. Using the Aon file as a base, I changed the "DigestSpeed" value from 1 to 2, and nothing else; in-game, there was no difference in how long it took her to digest units. Her displayed Digest Speed value  in the barracks did update though.

Thanks!

(1 edit)

I've been fiddling with "DigestSpeed" but I can't tell what it changes. Is it fully implemented yet?