Skip to main content

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

Vessel Tactics

A vore eroge merging SRPG gameplay and Gacha simulation! · By Cyrk

How to edit a modded unit?

A topic by +Gaming_Enjoyer420+ created Apr 06, 2024 Views: 2,409 Replies: 40
Viewing posts 1 to 11

I am inspired by cheatu’s carry ability and interested in it.

Thus I decide to develop a vehicle mod,to carry the units without being digest,however when I successfully edit the class,speech files and replace the pictures,I find that annoying I am unable to use Java script or C language or python to change a unit’s ability,mainly because idk how to,since I can’t even open the unit data.

This frustrates me a lot,even ChatGPT refuse to help.


if you are reading this,crimson,consider giving me a lift.

you can use these two programs for basic modding of the game: https://github.com/AssetRipper/AssetRipper/releases https://github.com/dnSpy/dnSpy/releases

you use assetripper to extract the game's code into a readable state, then use dnspy to inject your edited code into the game

do note though that you'll have to learn the game's format for skills / unit setup first, you'll be able to see the format / entries with these files: Class.cs, ClassList.cs, Skill.cs, SkillList.cs

Thanks for replying,

however after i installed the AssetRipper,I do NOT know which data i should open,is it MonoBleedingEdge? Unityplayer.dll?Assembly-CSharp.dll in Vessel Tactic_Data(Managed)?  

,

if its the latest one,I did open it with assetgripper,now i am confused,and do not know what to do next.

you do click on file > open folder > select the game's installation folder > wait for it to extract everything > click export > export all files to dump the game's contents to a folder

By game,s installation folder,do you mean Vessel Tactic(containted everything in it) or Vessel_Tactic-Data?or Vessel Tactic.zip?

the unzipped folder that comes out when you unzip the game's downloaded file, so it would be called "Vessel Tactics"

I did export the unzip folder,however I dont know what is the next step.

I have selected AuxiliaryFiles\GameAssemblies but doesnt see the class.cs as you mentioned.

as the other folder is ExportedProject,it contained many assests in there,which I dont think that is the place i want to find.

you have to select the entire folder via file > select folder or else it won't show up when exporting it

if you did it correctly, you should see it in ExportedProject\Assets\Scripts\Assembly-CSharp

As a person that luckily can read Unity c# language,python,javascript and html language.   I do not understand the meaning in the class.cs or skill.cs.


I see you have public some insteresting categories,and in the later these categories added many different attributes,such as "movement = Movement;",I have no idea why you do this but i know how it works.


also i have no idea what does Rarity do.

as for skill.cs,i can see this is some sort of skill numbers? but i dont understand what they actually do.


So from what I can understand,Do if i want to add another new skill that has new skill effect(such as launch missile which produce shockwave pushing enemies away from the center explosion area),I HAVE to edit both skill.cs and skilllist.cs.

But IF i only added a new character that can transport allies as i mentioned before,the only thing i need to change,is add a new skill in skillist,due to carrier is a skill that already existed, and change stuffs in mods file,Ain,t I right?

now i am confused about how do i insert the new skill in the modded unit?

Deleted 230 days ago

Class.cs is there to define how to handle the values of an entry in ClassList.cs, you don't need to touch anything at all in Class.cs

the attributes such as rarity and movement control the in-game stats of a unit (with rarity controlling how many stars a unit has in the vessel details menu and movement controlling how many tiles a unit can move per turn respectively)

the numbers are there just to be part of a flag system the game implements, you don't need to touch them at all

to make a new skill, you have to edit SkillList.cs by creating a new entry in the code for it; I'd say use chateau's bulwark skill as a base since it contains the Skill.Flag.Carrier flag that the game uses to know if a unit has carrier abilities

to put your custom skill on an actual unit though, you'll have to either edit ClassList.cs to make it be included with a pre-existing unit or ModLibrary.cs to change how it handles creating modded characters (which comes at the cost of it applying to all modded characters though)

Deleted 229 days ago
(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.

you can already see me in there,AoN mod ddnt really work for me because its assembly C# makes the game stopped.

that,s why i have to and wwant to write my own one.

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

so I seems to find the carrier trait/skill i have been looking for,however i have many more questions emerged from my little head.

1.do i just copy the skill id (28) into the later exist characterlist.cs?

2.God,what are those "current.skills.Remove(122)"? I have been dying to search skill 122,123,124 but nothing was found.


Here is a picture from Classlist.cs,I chose the rather Easy Way  to attach the skill for jeep i was looking for implement it.

however I have no idea what those numbers are except the few,such as  50 is Speed,130 is attacking range???

and i dont know why there are two skill traits like "new int[3] {15,16,17}" and "new int[6] {-99,25,26,27,28,29]" but i can tell them that they are skills.

and i dont know why there is a -99 in there.

here are the questiones in here,

1.What does those selected area means??????

2.if there  is a skill that allow my jeep attack from 2 or 3 blocks away,which number in this classlist.cs should i change?

list.Add(new Class("Humvee", "Vehicle", "c911", "Vroom!Vroom! Open up for your Freedom delivery is here!", "Commander", "Master", 0, 69, new Stat(500f, 600f, Dice(15, 50f)), new Stat(140f, 200f, Dice()), new Stat(100f, 140f, Dice(5, 50f)), new Stat(70f, 100f, Dice(5, 50f)), new Stat(40f, 80f, Dice(3, 30f)), new Stat(45f, 90f, Dice(3, 50f)), new Stat(40f, 80f, Dice(3, 30f)), new Stat(100f, 120f, Dice(3, 30f)), 7, UnitInfo.Move.Ground, 100, 130, 1, 150, 5, 0, 2, (SpecialV s) => 2, 1, 5, 1, 90, 0, new int[3] { 15, 16, 17 }, new int[6] { -99, 25, 26, 27, 28, 29 }));

(i copypasted Cheatu and changed the values that i can understand)

1.do i still have to keep the my jeep mod file in mods after basically adding it in the game?

2.what will happen if values in class.txt(mod file) and the codes did not match?

(+1)

to add a skill to a unit, you just insert the skill's id into the field where skills go in a unit's classlist entry (you'll have to edit ModLibrary.cs if you're going to be using a modded character)

the "current.skills.Remove(122)" parts are there to handle the stat changes a unit has depending on its current stomach capacity (there's no current function to clear it all out at once, so it just does it manually)

the 50 and 130 values are chateau's struggle and stun stat amounts respectively; the public class defined at the bottom of Class.cs tells you what to match the values to

the int you see are the arrays used by the game to tell what attacks / skills a unit may have; the first array is for attacks, the second one is for skills

you don't need to worry about the -99 since it's a separate skill for the stomach sizer system

to edit attack range, you have to edit / create an entry in AttackList.cs to your liking since they're all hard-coded to only work with what's included in an entry (so you can't change range purely from character skills / stats)

you are required to put the character's asset folder into the game's modded character folder if you want to use them, though do note that attempting to put stuff into ClassList.cs to get it to function won't work due to it requiring some extra stuff that's not as easy to modify (unity files) and the game will treat them as separately entire characters (which you don't want to happen)

(1 edit)

After breifly read your reply.

I seems to start understanding why you have slow update progress,coding is soooooooo hard,I thank you for creating this "fun" game.


Anyway,in conclusion,use this code in Classlist.cs for example.

list.Add(new Class("Humvee", "Vehicle", "c911", "Vroom!Vroom! Open up for your Freedom delivery is here!", "Commander", "Master", 0, 69, new Stat(500f, 600f, Dice(15, 50f)), new Stat(140f, 200f, Dice()), new Stat(100f, 140f, Dice(5, 50f)), new Stat(70f, 100f, Dice(5, 50f)), new Stat(40f, 80f, Dice(3, 30f)), new Stat(45f, 90f, Dice(3, 50f)), new Stat(40f, 80f, Dice(3, 30f)), new Stat(100f, 120f, Dice(3, 30f)), 7, UnitInfo.Move.Ground, 30, 200, 1, 150, 5, 0, 2, (SpecialV s) => 2, 1, 5, 1, 90, 0, new int[3] { 15, 16}, new int[6] { -99, 10, 11, 16, 120, 121 }));

1.In order to add a "skill" in the modded character, I simple put new attack id from attacklist.cs in the "new int[3] { 15, 16 }" ,new skill/ability  from skilllist.cs in the "new int[6] { -99, 10, 11, 16, 120, 121 }))"?

2.Does game will treat it like two different character despite one is in mod file and the other one exist in classlist.cs and having the exact same values?

3.Ignore the "urrent.skills.Remove(122)" due to its mainly about digestion prey.

4. ignore -99 in "new int[6] { -99, 25, 26, 27, 28, 29 }" its goofy ahh stomach sizer system which i dont wanna understand due to its complexity

5.I found that skill 28 and 29 basically is the worse verison of skill 120 (, "Transporting", "Transporting", "Carrying allied units without digesting them. If an enemy is eaten, if digestion is commanded, or if afflicted with certain status effects, will digest all units inside her.")

i guess i will replace those with skill 120 and 121,due to you can have snacks in the car,with normal digestion speed and the fact how many you are carried wont really affect the speed of car(if  you didnt put 10 people in the humvee in once ofc).

6.The situation now is that,i already have finished modded unit in the mod files,and it function normally aka can only attack and vore.now i dont know how to apply/insert new attacks and skills on this modded character named "Humvee" after putting a large code(code from above in classlist.cs.Does it counted as finished and it will function normally in theory?

7.Damn,I hope my 'c911' code wont broke the game.

8.Zamn,I dont know what my "0,69" would do in ""Commander", "Master", 0, 69, new Stat I guess its just rarity value.

9.About Making a new Attack called "Launch Missile",In order to achieve it and attach it on the modded unit,I should go to attacklist.cs,make a new attack and let the modded unit conculde the attack id?

(note that I am not part of the dev team, I am just someone who mods the game for fun)

the game reads skills to give a unit from the 2nd array, so throw them into the new int[6] { -99, 10, 11, 16, 120, 121 })); part

yeah, any characters listed in ClassList.cs and characters created by the modded character system will be treated as entirely separate characters code-wise (so they won't inherit anything you create for them in ClassList.cs)

stomach sizer system is mainly for giving out temporary skills related to the unit's current total stomach size; you can think of it as doing "if total stomach size is greater to or equal to x then give y"

you need to have a skill on a unit with the flag Skill.Flag.Carrier or else it won't be considered as having carrier abilities (which is what chateau's bulwark does); don't try to use 120 or 121 as actual skills to put on a unit since they're temporary skills that are used to designate the current state of the unit

to give a modded unit custom skills or abilities, you need to modify ModLibrary.cs (it contains a field you can edit for adding attacks / skills to a unit); it should work as long as the code you created follows the format the game uses and doesn't override anything itself

the first stat after names is the unit's gender (0 is female, 1 is male, 2 is gender-neutral), you don't really need to worry about it since it's used for pronouns (mainly just for modded units); the stat after that is for rarity which only works properly for values 3-6, any more or less than that will cause the game to break due to trying to read invalid values

yeah, that's the process you have to go through to make new attacks and put them onto a unit

I have noticed the so called "field"

there are some questions when i first seeing this.

1.I will remove the code in the Classlist.cs in order to not to have 2 same units in game.

(the code in Classlist.cs)

list.Add(new Class("Humvee", "Vehicle", "c911", "Vroom!Vroom! Open up for your Freedom delivery is here!", "Commander", "Master", 2, 5, new Stat(500f, 600f, Dice(15, 50f)), new Stat(140f, 200f, Dice()), new Stat(100f, 140f, Dice(5, 50f)), new Stat(70f, 100f, Dice(5, 50f)), new Stat(40f, 80f, Dice(3, 30f)), new Stat(45f, 90f, Dice(3, 50f)), new Stat(40f, 80f, Dice(3, 30f)), new Stat(100f, 120f, Dice(3, 30f)), 7, UnitInfo.Move.Ground, 30, 200, 1, 150, 5, 0, 2, (SpecialV s) => 2, 1, 5, 1, 90, 0, new int[2] { 15, 16}, new int[6] { -99, 10, 11, 16, 28, 29 }));


2.Ok if this can only read one unit at the time,How to make 2 modded units? Using two mod files(for example:Mod A and Mod B) and put them in the mod file?

`-`

btw i found this section and modified it a bit.


this is after my modification.


And i guess if there are more than one mod file,the change will be like this.


Now the mod thing is getting clear again,however what is reamin still bothered me.

If I finished this coding thing,what do i do after finished it? i cant open modded vessel tactic ofc.

(1 edit)

Is your system locale set to English ? that can be the issue with games opening and closing, if not you would need to redownload the game and extract it. other times it could be the file pathing. (I hope you find this to be helpful) if not then idk

you can have multiple modded characters loaded in at once since you just need to put their separate asset folders into the "Mods" folder of the game

is there a specific issue you're having when using modded characters? (e.g. you have no units when starting up the game)

(1 edit)

the thing is that idk if this works,thus i need you guys help me confirmed that.

so after i modified these all,and delete the code in classlist.cs.

I dont know what is the next step?

because for now,everything in my folder named "Vessel Tactic 911 test" is only "AuxiliaryFiles" and "ExportedProject"

there isnt any "vessel tactic" for me to click in and play.

you need to use dnspy to inject the code you made into the Assembly-CSharp.dll file found in Vessel Tactics\Vessel Tactics_Data\Managed; after doing that, you need to create a modded character yourself using the examples found in the "Mod Example" folder

(1 edit)

Could you be a little bit more speific?

like

how to i use this dyn?

what do you mean inject codes?

i can NOT open any files.

I'm talking about this program, it's what I mentioned in an earlier post https://github.com/dnSpy/dnSpy/releases

it's a tool used for code injection / extraction, but you're going to mainly be worried about the injection part here since you need to edit the file I mentioned to get the code you made included in it, here's a basic guide on how to use it: 


please Send Help.

My head is ouchie.

Dear Crimson,

I hope this message finds you well. I wanted to take a moment to express my deepest gratitude and respect for you. Whenever I encountered countless programming challenges, you were always there, selflessly offering your help and support. Through this letter, I want to convey my sincere thanks to you and acknowledge the significant impact you've had on me.

First and foremost, I want to thank you for your patience and support during my toughest moments. No matter how daunting the problems were, you always took the time to help me clarify my thoughts and overcome the obstacles. Your expertise and skills have been invaluable in helping me navigate through various challenges and continuously improve.

Furthermore, I want to express my gratitude for the confidence and encouragement you've instilled in me. During times of self-doubt, you always believed in me and encouraged me to persevere. Your support has empowered me to believe in myself and tackle any difficulties that come my way.

cool thanks

And thanks the others for having a kind heart supporting me.

(3 edits)

Too many replies above,decide to open new one.

ok now i have two  different modded unit,but the game failed to function normally,aka not having my modded unit loaded.

here are some screenshots.


and I did think of alter some codes based on my limited knowledge of C#.


I am expecting crimison magically fix this issue.

how is your character's folder asset organized? it could be an issue of it not being organized properly, or there's something in there that it doesn't recognize (which will cause the game to freeze due to trying to read something it can't handle)

so uh,i copy paste c110 folder,and rename it to foxgirl,then replace images with Vstate....etc. and change the name in class.txt.

i guess its because my image is too big.

images shouldn't be an issue since the game will automatically ignore them if they're not formatted properly (i.e. too big / small); it could be an issue of having too many characters loaded at once since the game has a limit of how many can be in the game at once or else it will freeze

but,that is like,only 2 mod units.

is 2 modded unit too much?

currently the game only supports up to 2 characters being loaded at once due to memory constraints, though I'd say test it out with a single character for now to see if there's a specific character you have that's causing the issue

its the 2nd folder which i named "FoxGirl" the problem causer seems to be oversized 4k image.

cause i copy paste c011 from mod example and only edit the image part.