#archived-modding-development

1 messages · Page 489 of 1

fair rampart
#

Log the components?

#

Also how do you use reflection?

jolly jungle
#

Can someone answer my question please, or at least direct me to a place/person that can answer

knotty monolith
#

Try it n find out

jolly jungle
#

Ah fair enough

#

Thanks

dark wigeon
#

also loading something like jpgs is kinda a bad idea

jolly jungle
#

Ah, great! Thanks

#

also loading something like jpgs is kinda a bad idea
My point was to keep WIPs as jpgs

#

And the game won't recognise them

fair rampart
#

For reflection, do you use ReflectionHelper?

copper nacelle
#

you can

#

for the purpose of just debug logging shit you'd just want to iterate over the fieldinfos on the types

fair rampart
#

my sans knight skin is complete

shadow dagger
#

it looks really neat and clean, gotta try it out now

quiet crest
#

is there a good way to compile everyones custom skins?

#

like the mod installer but just for skins

young walrus
#

yeah, they're on the google drives

tawny onyx
jolly jungle
#

If I have a file name not in the original skin's folder, the game won't recognise it, right?

#

(CustomKnight)

jolly jungle
#

Well, seems like the answer is no, it won't

#

Although, truth be told, wouldn't matter if it did

wintry rune
#

do we have much resources on how to create mods?

young walrus
#

plus example mods

#

plus existing mods code

wintry rune
#

thanks

minor sierra
#

yo

fair rampart
#

how exactly was the badly translated mod created

#

did they use some sort of script for it to auto translate stuff

vocal spire
#

Idk

#

I know they programmed it tho

young walrus
#

all of the lines were sent through google translate like 8 times

final cloak
#

pls add a better guide for new players

copper nacelle
#

what

vocal spire
#

what

open hemlock
#

what

tawny onyx
#

what

shadow dagger
#

what

tawny onyx
vocal spire
#

@tawny onyx No I can’t, sorry

shadow dagger
#

this is peak comedy right here

copper nacelle
#

@tawny onyx if you dm me your email I can just add you to the drive

tawny onyx
#

thanks, i have sent it

plain spear
#

Hey guys, Kinda new here but I wanted to install the mods on the macOS is that even possible?

knotty monolith
vocal spire
#

(Haven’t checked) are there any on hooks for entering a state and leaving it?

#

Gonna go check for myself then

#

Update: Pc is dead

vocal spire
#

Update: just realized I forgot to say fsm state. Not editing the message because sending this is more amusing to me

jolly oriole
#

Why would you need a hook for it?

vocal spire
#

Idk

#

Just thought it would be interesting and a funny way to fill up the modlog

#

Also thought it might help with adding enemy sync to multiplayer since a state name could be sent and on entering a state would send that and on exiting a state it would go to the synced one instead I’m not making any sense but you probably get the point

jolly oriole
#

oh, but a workaround would be to just add a custom action to every state, which does the sync

vocal spire
#

Was just thinking about that lol

#

I think I’ll do that instead

jolly jungle
#

Alright so

#

If I want my customknight to include a reskin of something other than the knight

#

is it possible, or will I need to use/make a different mod?

#

@ me when you answer

vocal spire
#

Make a new mod

jolly jungle
#

Ah ok thanks

#

So the CustomKnight covers only the images found in the Default folder?

vocal spire
#

Yes

#

Look at how other mods replace textures

#

I’m currently dealing with someone on my server who is reporting a bug with my attempt at adding enemy sync to multiplayer where the mod fails to load, but they have 2 of each multiplayer mod in the mods folder.

fair rampart
#

can someone sent the hollow_point(2) thing plz

vocal spire
#

@fair rampart what

fair rampart
#

im trying to get the ak-47 mod

vocal spire
#

Y did you say it like that

fair rampart
#

because thats what its calles

#

called

vocal spire
#

Where

fair rampart
#

in a video i watched

vocal spire
#

It’s just hollow point

fair rampart
#

i have the modinstaller but theres somthing else

vocal spire
#

?

#

It’s on mod installer

#

Have you tried scrolling

fair rampart
#

yeah

vocal spire
#

So?

#

It’s on there

fair rampart
#

yes i see the hollow point mod but how do i get it in the game

vocal spire
#

Did you try clicking install

shadow dagger
#

you also have to enable it

vocal spire
#

It’s enabled by default after installing

fair rampart
#

it says disable,unistall,and readme

#

ok

vocal spire
#

Ok

fair rampart
#

so if i load in the game will i have it?

vocal spire
#

What happens when you open hk

#

Yes

fair rampart
#

ok

vocal spire
#

Unless you got it on windows store or game pass

fair rampart
#

i got it on steam

vocal spire
#

Good

#

Unplug your controller if you have one

fair rampart
#

ok

vocal spire
#

Open hk

#

At the main menu you can plug a controller in if you want

fair rampart
#

ok

vocal spire
#

Now

#

Look in the top left

#

If it says modding api, modcommon, hollow point, and other mods you installed(if you did) then you’re good

#

To switch to the gun, tap focus

#

To use spells, use quick cast instead

#

Attack to use the gun

fair rampart
#

its working thank you

tawny onyx
#

(Haven’t checked) are there any on hooks for entering a state and leaving it?
@vocal spire of course you can use On.PlayerMaker to hook fsmstate methods

vocal spire
#

K think we figured it out

tawny onyx
#

for my opinion,you can remove all clients ' ememies fsm transition, and just set state base with server's activestate

vocal spire
#

Yeah

#

But

#

Not the server’s state, the client who entered the room first’s state

tiny cove
#

which one of these is the AK-47 mod

#

I need gun

shadow dagger
tiny cove
#

Yeah, the only information that I know of that tells me how to get the AK-47 mod is just that its pinned in this area but im blind af and cant find it

unborn swallow
#

h

tiny cove
#

Thanks, I think that actually helped

#

just found it

tawny onyx
#

Is there any way to get TextMesh Pro for unity 2017? can't find it in Asset Storefeelsgrubman

jolly oriole
#

just do it in code

tawny onyx
#

don't know how to package TMP_SpriteAsset or TMP_FontAsset in code

jolly oriole
#

i mean, you could just instantiate an already existing tmpro object

tawny onyx
#

elderC but i want to add custom tmpro asset

#

actually add some sprite to dialogue box

jolly oriole
#

oh, then good luck

#

try searching the internet for tmpro

tawny onyx
#

lmao

jolly jungle
#

What knowledge prerequisites are there for using the HK Modding API?

jolly oriole
#

c#

tawny onyx
#

also unity

jolly jungle
#

I mean, how much though

#

Cuz I've dabbled in c#, but I do know other languages, and syntax can just be looked up

floral furnace
#

monobehaviour shit

#

and probably learning how to use coroutines too

jolly oriole
#

but both can be borrowed from other mods

copper nacelle
#

I think angle had tmp, I can check if I have it

torpid epoch
#

how can I get access to the knight's fsm?

dark wigeon
torpid epoch
jolly oriole
#

the knight's fsms are in the data/knight_pickup [4] scene

torpid epoch
#

I'll try that

dark wigeon
#

They're in both but I couldn't remember which was the right one

sage holly
#

nes I have a question about sseadv

dark wigeon
#

Actually both seem to the same, at least the file sizes are

jolly oriole
#

@young walrus

var audio = null;
using (Stream s = _asm.GetManifestResourceStream("ModName.Resources.AssetBundleName"))
{
    if (s != null)
    {
        AssetBundle ab = AssetBundle.LoadFromStream(s);
        audio = ab.LoadAsset<AudioClip>("AudioNameHowItsDisplayedInUnity");
        UnityEngine.Object.DontDestroyOnLoad(audio);
    }
}
#

if you need more help, my DMs are open

#

and if you don't mind quality, in unity you can also select Vorbis compression with a quality of 1 and get from 8.1 MB to 125.5 KB in size

torpid epoch
#

I'm trying to modify the fsm "Knight-Nail Arts"

#

I attempt to do it via fsm = HeroController.instance.gameObject.LocateMyFSM("Knight-Nail Arts") and fsm.InsertAction("Has G Slash?", new myFsmStateAction(), 2)

#

it throw a error of "System.NullReferenceException: Object reference not set to an instance of an object"

copper nacelle
#

it's just Nail Arts

#

Knight is just the object the fsm is on

torpid epoch
#

so how can I change the nail arts?

vocal spire
#

@torpid epoch 56 is saying remove Knight-

#

Past the - is the name of the fsm

#

Knight is added to tell you it’s a fsm on the knight, - is added to separate knight and nail arts

torpid epoch
#

understood, thanks

vocal spire
#

Np

vocal spire
#

Is playerdata.hasUpwardSlash the great slash? There is cyclone and dash slashes but no great slash

#

There is also hasNailArt which I just saw which is probably it

floral furnace
#

weirdly enough, the english text stuff lists Upper as dash slash and Dash as the great slash, but thats probably it

vocal spire
#

huh

floral furnace
vocal spire
#

Tc I question you a lot

floral furnace
#

this is from the Language.json SFG gave me, best case scenario the inventory part is just an oversight and hasUpwardSlash should be great slash

vocal spire
#

K

vocal spire
#

Can I get this on the installer?

vocal spire
vocal spire
#

k it's past midnight now and i'm gonna finally do my homework

vocal spire
#

Did my homework shroompog

knotty monolith
#

I hope you didn't have to stay up all night...

vocal spire
#

Nah stayed up til 6 hours ago

#

Then slept

#

I’m not going to feel good today am I

#

At least it’s a cool charm

open hemlock
#

this is very cool, big mcthankies

elder jolt
#

I want to start modding this game, but I don't know where to start. How do I begin modding?

jolly oriole
vocal spire
#

awww

#

almost pasted

shadow dagger
#

hey guys dumb question but how would I look at the source code of the game/pre-existing mods? do I need a decompiler to see whats in the dll;s?

floral furnace
#

most of the mods are open source

#

for the game, youll need a decompiler like ILSpy then decompile the Assembly-CSharp in the game folder

shadow dagger
#

yeah I was just looking at the mods I already had installed through the mod window

#

I figured as much, installed a decompiler and Im gonna look through everything now lol

#

thank you

vocal spire
#

sure this is for modding development?

high tinsel
#

uuuhh, well i guess not, it was a mod i was working on so

floral furnace
small heart
#

Thanks

small heart
#

How to summon Grim Spikes or Radiances balls?

copper nacelle
#

preload them

fair rampart
#

Im trying to modify the values of the Hollow Point mod,
is there a way to do that without going to the source code?

jolly oriole
#

no

floral furnace
#

if you have balance issues or something i can modify it depending if its not too much effort

#

why do i have a feeling this is related to the Carbine modification

jolly oriole
#

i mean, you could also change the mod so that the desired values can be changed from the globalsettings ttacco

floral furnace
#

good point

small heart
#

I wanna see if i have more than 100 geo and if i do i wanna do something. Here is my current code: if (HeroController.instance.geoCounter > 100)
{
PlayerData.instance.geo -= 100;
...
}

vocal spire
#

Try HeroController.instance.RemoveGeo(100)

#

Or RemoveGeo might be on Playerdata

#

Try HeroController first

small heart
#

Let me try

small heart
#

Thanks!

small heart
#

How to call a function when you do desolate dive because as far as I'm aware there is no hook

#

And in the Hero controller there also nothin

#

Current code: On.HeroController.

jolly oriole
#

you could also look at how hollow point does the special things with the spells

small heart
#

Do i have to use FSM??

jolly oriole
#

if you want to change desolate dive / descending dark, yes

small heart
#

I dont wanna change it i wanna spawn Grim spikes when you do it like the light child mod

jolly oriole
#

in that case you also need to change the FSM to include whatever you need to spawn the spikes

small heart
#

Ok

copper nacelle
#

modcommon has a hook i added if you don't want to bother

small heart
#

I'll see

#

Whats the name of the hook

copper nacelle
#

ModCommon.OnSpellHook

#

takes an enum describing spell type

#

if you return false it won't cast the original spell, if you return true it will

small heart
#

Its saying there is no ModCommon.OnSpellHook

copper nacelle
#

do ModCommon.ModCommon.OnSpellHook

small heart
#

ok

#

how to replace a spell eg. Shade Soul -> Grim Balls

copper nacelle
#

return false

#

spawn what you want instead with the behaviour you want

small heart
#

how can i spawn things

#

there nothing in the docs

copper nacelle
#

Object.Instantiate

small heart
#

Object.Instantiate<T>(new FireGrimmBall<T>()); Error: Cant resolve symbol 'T'

floral furnace
#

T is the type, in this case it should be a GameObject

tawny onyx
shadow dagger
#

how do you open the game files straight in unity? I understand how to decompile the code, but for example is it possible to see a specific room in unity?

tawny onyx
#

of course

copper nacelle
#

there's a world editor thing

tawny onyx
#

but also have tons of problem

copper nacelle
#

i should get that at some point

#

so much effort

tawny onyx
#

i just use it for search some object's path for preload

copper nacelle
#

i usually use the dumps

#

but it seems really nice to have tbh

shadow dagger
#

how would I get around to using the world editor you mentioned? is it described in the API docs

tawny onyx
#

maybe you can check github readme

copper nacelle
shadow dagger
#

yeah HK is the first game Im modding so Im new to everything, thanks so much for the help :))

jolly oriole
#

same

small heart
#

Object.Instantiate<GameObject>(new FireGrimmBall<GameObject>()); I get an error idk why

jolly oriole
#

try

GameObject.Instantiate(new FireGrimmBall());
small heart
#

Nope

shadow dagger
#

Maybe "Object.Instantiate<GameObject>(new GameObject FireGrimmBall());"??

#

or maybe just "(FireGrimmBall())" in the argument idk

vocal spire
#

Why can’t you do
New FireGrimmBall()?
Also won’t that not return a GameObject, so it won’t work?

tawny onyx
#

Im trying to modify the values of the Hollow Point mod,
is there a way to do that without going to the source code?
@fair rampart you can use detour to hook any method includes other mods

chrome abyss
#

So I was looking through the code for Randomizer, and I saw that it caches prefabs for geo like so:
_mediumGeo = Object.Instantiate(ReflectionHelper.GetAttr<HealthManager, GameObject>(health, "mediumGeoPrefab"));
I was wondering if there was something similar you could do for the soul particles that a soul totem releases when hit (I have no idea where to find what these would be called).

vocal spire
#

@chrome abyss those might be stored in a fsm Idk, you gotta put in the effort to find them

#

You can start by getting the scene dump in the pins and using control + f to find totem or something

#

Then seeing if it has a specific soul totem component or fsm

chrome abyss
#

Huh, I searched the scene dump files for "mediumGeoPrefab", and didn't find anything there that matched. Would looking through the FSMs with the pinned FSMViewer help? And if so, is there a good way to get that to work on Ubuntu?

vocal spire
#

Wait what are you trying to find?

#

I think I misunderstood you

chrome abyss
#

I'm trying to figure out how to spawn the soul particles that appear when you hit a soul totem, and was looking at the code in Randomizer that spawns geo to try to figure this out

vocal spire
#

Well

#

I don’t think that searching for geo is gonna get you the soul totem particles...

#

I meant searching “totem” or “soul”

chrome abyss
#

Yeah, but I was trying to see if I could do something similar for soul totem particles. Basically trying to do by example

vocal spire
#

?

#

How is searching for geo when you want soul totem similar

chrome abyss
#

Like I see in the scene dump that there's a "Soul Totem 5\Soul Particles" object that is probably what I want?

vocal spire
#

Yes

chrome abyss
#

But I don't know how to use this information to actually spawn them

vocal spire
#

So preload that

#

Then instantiate it

chrome abyss
#

Okay, I think I figured it out, but I'm still curious where the "mediumGeoPrefab" is being loaded from.

vocal spire
#

It’s just the reference to the object

#

It’s a private variable on health manager

#

You are using a different object completely

#

I probably messed up my explanation somewhere but you get the point

chrome abyss
#

Is there a place I can see the details of HealthManager?

vocal spire
#

Dnspy or ilspy?

#

You won’t find soul particles most likely

chrome abyss
#

ty!

small heart
#

Object.Instantiate<GameObject>(new FireGrimmBall<GameObject>()); I get an error idk why

#

can someone help

vocal spire
#

@small heart I’m here

small heart
#

YAY

#

Ive been waiting for hours

vocal spire
#

Is the error in the ide or in game?

small heart
#

new error actually

#

what does this error mean : Module 'PlayMaker, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null' should be referenced

vocal spire
#

Add playmaker to the reference list

small heart
#

what am i supposed to add a reference to : Module 'PlayMaker, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null' should be referenced

#

dlll pls

vocal spire
#

It’s in the same folder as assemblyCsharp

small heart
#

PlayMaker.dll

vocal spire
#

Yep

small heart
#

I cant refer to ridgidbodies or coliders but i have imported unity?

vocal spire
#

Unity physics 2d or whatever the dll is called

small heart
#

ok

#

thanks

vocal spire
#

Can I not contain a list of other structs inside a struct in globalsettings?

small heart
#

ive never worked with structs only classes and interfaces

vocal spire
#

Ok

jolly oriole
#

newest api version should allow you to do that

vocal spire
#

I tried with both classes and structs

#

Well

#

I guess i have an outdated api

small heart
#

lol

vocal spire
#

I can’t English or Spanish now :(

small heart
#

Even mor Lol

#

lol

#

is this correct?: preloadedObjects["GG_Grimm"]["Boss Control/Nightmare King Grimm"]

vocal spire
#

Seems correct

#

Mod installer did not seem to want to install the update....

small heart
#

why

vocal spire
#

idk

#

still isn't working

small heart
#

reinstall it

vocal spire
#

I manually installed the update

small heart
#

??

vocal spire
#

still isn't working
meant globalsettings with lists of structs are still not working

small heart
#

oh

vocal spire
#

I know how to install modinstaller

small heart
#

ok

#

google it

vocal spire
#

bruh

small heart
#

or go on stack overflow

#

how to preload Grim spikes i dont know the names of the strings

vocal spire
#

are they in grimm's fsm?

small heart
#

i think yes

vocal spire
#

then get them from there

small heart
#

whats the name

vocal spire
#

wdym

small heart
#

ill open in fsm viewer

#

thanks got it

jolly oriole
vocal spire
#

no

#

I want to have a list of structs inside a list of structs inside a struct

jolly oriole
#

and this doesn't work?

public class GlobalSettings : ModSettings
{
    public List<Test1> items = new List<Test1>();
}
[Serializable]
public class Test1
{
    public List<Test2> items = new List<Test2>();
}
[Serializable]
public class Test2
{
}
vocal spire
#

no

#

hold on

#

getting my code and globalsettings

#

how do you do that thing in discord with the code again?

#

lol

jolly oriole
#

```csharp
code here
```

vocal spire
#

k

#
public class GlobalSettings : ModSettings
    {
        public void Reset()
        {
            this.BoolValues.Clear();
            this.StringValues.Clear();
            this.IntValues.Clear();
            this.FloatValues.Clear();
            SpriteData = new TextureData();
        }
        public TextureData SpriteData = new TextureData();
    }
    [Serializable]
    public struct SpriteDefinition
    {
        public string SpriteName;
        public Rect Position;
    }
    [Serializable]
    public struct FrameData
    {
        public int Id;
        public bool HasEvent;
        public string EventInfo;
        public int EventInt;
        public float EventFloat;
    }
    [Serializable]
    public struct ClipData
    {
        public string clipname;
        public float fps;
        public List<FrameData> frames;
    }
    [Serializable]
    public struct TextureData
    {
        public tk2dBaseSprite.Anchor Anchor;
        public Vector2 HeroSize;
        public Vector2 offset;
        public List<SpriteDefinition> Definitions;
        public List<ClipData> Clips;
    }

gives me
{
"SpriteData": {
"Anchor": 4,
"HeroSize": {},
"offset": {},
"Definitions": [],
"Clips": []
},
"BoolValues": {},
"FloatValues": {},
"IntValues": {},
"StringValues": {}
}

jolly oriole
#

what happens if you add default values for the definitions and clips? (just to test)

vocal spire
#

I did that in classes and it didn't work

#

oh

jolly oriole
#

as it appears that they're saved without any content

vocal spire
#

GlobalSettings.SpriteData.Clips = clips;
GlobalSettings.SpriteData.Definitions = definitions;
GlobalSettings.SpriteData.HeroSize = new Vector2(0.5f, 1.3f);
GlobalSettings.SpriteData.offset = new Vector2(0f, -0.8f);
GlobalSettings.SpriteData.Anchor = tk2dBaseSprite.Anchor.MiddleCenter;
base.SaveGlobalSettings();
I have made sure to set every value

#

even the ones inside the clips

#

and definitions

#

and frames

#

hold on got a really good idea for a new mod that uses my current code but in a different way but without structs

#

I did get a little farther using arrays

#

but everything in the array would be null

jolly oriole
#

just a question, what usings do you have for the serializable? want to test it myself

vocal spire
#

?

#

using System;
using System.Collections.Generic;
using Modding;
using UnityEngine;

jolly oriole
#

system, thanks

vocal spire
#

k

small heart
#

I've found the attack i wanna do ("GG_Grimm_Nightmare", "Boss Control/Spike Control") but know how do i use it

vocal spire
#

idk

#

there's probably a fsm on spike control

#

instantiate spike control and set the fsm whenever you want to use it

#

ok there is not a fsm

#

actually there is a fsm with the name of spike control

small heart
#

("GG_Grimm_Nightmare","Boss Control/Spike Control/Far L/Grimm Spikes") maybe this will work?

vocal spire
#

maybe

#

maybe these?

small heart
#

im building and having a look

vocal spire
#

looks like nightmarespikes are what you want

small heart
#

yup

vocal spire
#

k

small heart
#

i think its Grimm_Nightmare Spike

vocal spire
#

I meant the ones I showed in fsm viewer

#

the fsms they have are the perfect description of the grimm spikes

small heart
#

ill see

jolly oriole
#

i converted your structs to classes and assigned default values (for testing), output:

{
  "SpriteData": {
    "Anchor": 4,
    "HeroSize": {},
    "offset": {},
    "Definitions": [
      {
        "SpriteName": "Test",
        "Position": {}
      }
    ],
    "Clips": [
      {
        "clipname": "9",
        "fps": 10.3,
        "frames": [
          {
            "Id": 5,
            "HasEvent": false,
            "EventInfo": "6",
            "EventInt": 7,
            "EventFloat": 8.1
          }
        ]
      }
    ]
  },
  "BoolValues": {},
  "FloatValues": {},
  "IntValues": {},
  "StringValues": {}
}
vocal spire
#

what

#
[Serializable]
    public class SpriteDefinition
    {
        public string SpriteName = "Unnamed/Null Sprite";
        public Rect Position = new Rect(0, 0, 1, 1);
    }
    [Serializable]
    public class FrameData
    {
        public int Id = 0;
        public bool HasEvent = false;
        public string EventInfo = "";
        public int EventInt = 0;
        public float EventFloat = 0f;
    }
    [Serializable]
    public class ClipData
    {
        public string clipname = "Unnamed/Null Clip";
        public float fps = 1;
        public List<FrameData> frames = new List<FrameData> { new FrameData() { } };
    }
    [Serializable]
    public class TextureData
    {
        public tk2dBaseSprite.Anchor Anchor = tk2dBaseSprite.Anchor.MiddleCenter;
        public Vector2 HeroSize = new Vector2(0.5f, 1.3f);
        public Vector2 offset = new Vector2(0f, -0.8f);
        public List<SpriteDefinition> Definitions = new List<SpriteDefinition> { new SpriteDefinition { } };
        public List<ClipData> Clips = new List<ClipData> { new ClipData { } };
    }
#

tried this but it didn't work

#

I still can't find that mark for c# on my keyboard....

small heart
#

this one `

vocal spire
#

`

#

found it

small heart
#

under esc

vocal spire
#

ik

#

I just tried it again and it still gives me the same thing

small heart
#

OOO JACKPOT

vocal spire
#

worked?

small heart
#

yup

vocal spire
#

cool

small heart
#

my mod is almost done

vocal spire
#

@jolly oriole what have I done differently in my code than what you did?

small heart
#

show me your code

vocal spire
#

look a bit up

small heart
#
public class GlobalSettings : ModSettings
    {
        public void Reset()
        {
            this.BoolValues.Clear();
            this.StringValues.Clear();
            this.IntValues.Clear();
            this.FloatValues.Clear();
            SpriteData = new TextureData();
        }
        public TextureData SpriteData = new TextureData();
    }
    [Serializable]
    public struct SpriteDefinition
    {
        public string SpriteName;
        public Rect Position;
    }
    [Serializable]
    public struct FrameData
    {
        public int Id;
        public bool HasEvent;
        public string EventInfo;
        public int EventInt;
        public float EventFloat;
    }
    [Serializable]
    public struct ClipData
    {
        public string clipname;
        public float fps;
        public List<FrameData> frames;
    }
    [Serializable]
    public struct TextureData
    {
        public tk2dBaseSprite.Anchor Anchor;
        public Vector2 HeroSize;
        public Vector2 offset;
        public List<SpriteDefinition> Definitions;
        public List<ClipData> Clips;
    }

gives me
{
"SpriteData": {
"Anchor": 4,
"HeroSize": {},
"offset": {},
"Definitions": [],
"Clips": []
},
"BoolValues": {},
"FloatValues": {},
"IntValues": {},
"StringValues": {}
}
@vocal spire what are u trying to do with this code

vocal spire
#

no

#

not that far

small heart
#

maybe i can find a second solution

vocal spire
#

but my code still gives me the same thing

small heart
#

so structs arent the problem

#

try to make a new project and copy the code over

vocal spire
#

I guess

small heart
#

maybe u need to update visual studio / rider

vocal spire
#

I don't think so

small heart
#

maybe it hasent seen your updated api

vocal spire
#

but that shouldn't mean anything because I don't reference anything from any updated parts of the api

small heart
#

oh

#

and why are you doing this in Mod settings

vocal spire
#

public TextureData SpriteData = new TextureData();

#

thats all

small heart
#

okie dokie

vocal spire
#

I'm gonna stop now and go work on a smaller mod that uses the same code I have but no globalsettings and it is much more simple

#

I think I'm gonna call it rando knight

small heart
#

cool

#

my Mod will be called Child of Nightmares

vocal spire
#

y is my pc lagging

#

cool

small heart
#

depends on specs

vocal spire
#

nah just now started lagging after closing vs

small heart
#

ok

#

i use rider

#

it more light weight

vocal spire
#

fan is also working really hard so idk

small heart
#

??

#

And Btw when youre mod is done where would you upload it

vocal spire
#

github and here

small heart
#

i need to push to git hub

jolly oriole
#

@vocal spire helping parents in garden rn, can dm you my code later

vocal spire
#

ok

#

have fun!

#

or is it not fun

#

idk what you think about it

vocal spire
#

it is beautiful

small heart
#

ill see

#

after dinner

vocal spire
#

i just had breakfast

small heart
#

i live in asia

vocal spire
#

k

small heart
#

What does it do?

vocal spire
#

you just gotta see it to see what it does

small heart
#

sure

#

new save?

vocal spire
#

anywhere

#

doesn't mess with save data

small heart
#

ok

#

i ma just do it innew save doe

#

oh

vocal spire
#

:)

small heart
#

it does everything

vocal spire
#

yes it does

small heart
#

i have a suggestion make it so it actualy does the thing instead of just playin the animation

vocal spire
#

nah

#

too hard

small heart
#

lol

vocal spire
#

randomizes every frame of every clip/animation's sprite

small heart
#

how to get this ("GG_Radiance","Boss Control/Spike Control/Far L/Radiant Spike")
to work with nkg
My solution doesnt work '''("GG_Grimm_Nightmare","Nightmare Spike/Far L/Grimm_Nightmare Spike")'''

vocal spire
#

did you try the spikes I suggested?

#

also rediance clearly workes differently than nkg

#

are you actually looking at the nkg hiearchy?

small heart
#

i ve made thess functions via the help of child of light ``` private void SpawnSpike(int n = 10, float spacing = 0.8f)
{
AddSpikeToPool(n, spacing);
foreach (var s in _spikes)
{
s.LocateMyFSM("Control").SendEvent("HEROSPIKEUP");
}
}
private bool AddSpikeToPool(int n = 10, float spacing = 0.8f)
{
/foreach (var s in _spikes)
UnityEngine.Object.Destroy(s);
/
_spikes.Clear();

        float x = -1 * ((n * spacing) / 2);
        for (int i = 0; i < n; i++)
        {
            GameObject s = UnityEngine.Object.Instantiate(SpikePre);
            s.transform.SetParent(SpikeCenter.transform);
            s.transform.localPosition = new Vector3(x, -0.4f, 0);
            x += spacing;
            _spikes.Add(s);
            s.SetActive(true);
        }
        return true;
    }```
#

Yes

vocal spire
#

ok

small heart
#

i just dont know what to put as input

vocal spire
#

if you were actually looking at the scene hiearchy, you would know there is no Far L child of Nightmare Spike

small heart
#

i know

vocal spire
#

then why are you preloading something you know doesn't exist?

small heart
#

i just dont know what to enter so i took it from radience

vocal spire
#

k

#

just use Nightmare Spike and see where that takes you

#

you might also have to set the fsm correctly when you set it to active

#

Grimm Spike Holder\Nightmare Spike

small heart
#

which one

vocal spire
#

Grimm Spike Holder\Nightmare Spike

small heart
#

any?

vocal spire
#

any

#

I would just go with that one

small heart
#

("GG_Grimm_Nightmare","Grimm Spike Holder")

vocal spire
#

no

#

Grimm Spike Holder/Nightmare Spike

small heart
#

("GG_Grimm_Nightmare","Grimm Spike Holder/Nightmare Spike")

vocal spire
#

yes

small heart
#

Loading...

vocal spire
#

wait

small heart
#

Just a bunch o mod logs errors

vocal spire
#

change the fsm stuff

#

lol

small heart
#

??

vocal spire
#

s.LocateMyFSM("Control").SendEvent("HEROSPIKEUP"); change this to
s.LocateMyFSM("Control").SendEvent("SPIKES READY");

#

and you need some more fsm edits

#

Specifically to the GG Y Shift state

small heart
#
        {
            AddSpikeToPool(n, spacing);
            foreach (var s in _spikes)
            {
                s.LocateMyFSM("Control").SendEvent("SPIKES READY");
            }
        } ```
vocal spire
#

yes

small heart
#

Lets see

vocal spire
#

I think you might just be able to skip that state

#

or do s.LocateMyFSM("Control").SetState("Ready") instead of send event to basically do the same thing but skip the Y shift

small heart
#

The error is saying [ERROR]:[API] - Error: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. [ERROR]:[API] - at System.Collections.Generic.Dictionary`2[System.String,UnityEngine.GameObject].get_Item (System.String key) [0x00000] in <filename unknown>:0 [ERROR]:[API] - at ChildOfNightmares.ChildOfNightmares.Initialize (System.Collections.Generic.Dictionary`2 preloadedObjects) [0x00000] in <filename unknown>:0 [ERROR]:[API] - at Modding.ModLoader.LoadMod (IMod mod, Boolean updateModText, Boolean changeSettings, System.Collections.Generic.Dictionary`2 preloadedObjects) [0x00000] in <filename unknown>:0 [ERROR]:[API] - at Modding.ModLoader+<LoadMods>d__9.MoveNext () [0x00000] in <filename unknown>:0

vocal spire
#

oh

#

then show me your initialize code

#

you are probably referencing something you didn't preload

small heart
#

whats my initialize code

#

ohh

vocal spire
#

I think the initialize code is in the Method called Initialize. Might be wrong but I think that's what we call it

small heart
#
        {
            #region GetPrefab
            
            var nkg = preloadedObjects["GG_Grimm_Nightmare"]["Boss Control/Nightmare King Grimm"];
            var fsm = nkg.LocateMyFSM("Attack Commands");
            var spawnAction = fsm.GetAction<SpawnObjectFromGlobalPool>("Spawn Fireball", 1);
            orbPre = UnityEngine.Object.Instantiate(spawnAction.gameObject.Value, null);
            UnityEngine.Object.DontDestroyOnLoad(orbPre);
            orbPre.SetActive(false);
            ShotCharge = nkg.transform.Find("Shot Charge").gameObject;
            ShotCharge2 = nkg.transform.Find("Shot Charge 2").gameObject;
            var finalcontrol = orbPre.LocateMyFSM("Final Control");
            UnityEngine.Object.DestroyImmediate(finalcontrol);
            var herohurter = orbPre.transform.Find("Hero Hurter").GetComponent<DamageHero>();
            UnityEngine.Object.DestroyImmediate(herohurter);
            BeamSweeper = preloadedObjects["GG_Grimm_Nightmare"]["Boss Control/Beam Sweeper"];
            BeamSweeper.transform.SetParent(null);

            HKBlast = preloadedObjects["GG_Hollow_Knight"]["Battle Scene/Focus Blasts/HK Prime Blast"];

            SpikePre = preloadedObjects["GG_Grimm_Nightmare"]["Boss Control/Spike Control/Far L/Radiant Spike"];
            
            #endregion

            #region Setup
            GameManager.instance.StartCoroutine(WaitHero(() => {
                SetupOrb();
                SetupBeam();
                SetupBlast();
                SetupSpike();
            }));
            #endregion

            #region Hooks
            ModHooks.Instance.AfterSavegameLoadHook += ApplyTrigger;
            GameManager.instance.StartCoroutine(WaitSetup(()=> ModHooks.Instance.CharmUpdateHook += Instance_CharmUpdateHook));
            #endregion

 
        }```
vocal spire
#

ok

small heart
#

i g=et it

vocal spire
#
  1. you are loading nkg
small heart
#

i use rasidece

vocal spire
#
  1. you are treating nkg as rad
small heart
#

yup

#

exactly

vocal spire
#

show me your preload code

small heart
#

also using nkg as rad

#

thats why

vocal spire
#

no

#

no it's not

small heart
#

look

vocal spire
#

that is not the error you got in modlog tho

small heart
#

found the error

vocal spire
#

show me your preloading code

small heart
#

SpikePre = preloadedObjects["GG_Grimm_Nightmare"]["Boss Control/Spike Control/Far L/Radiant Spike"];

#

im using nkg as rad

vocal spire
#

var nkg = preloadedObjects["GG_Grimm_Nightmare"]["Boss Control/Nightmare King Grimm"];

#

here is your first line of code

#

var fsm = nkg.LocateMyFSM("Attack Commands"); this will fail

#

but it did not fail in modlog

#

so you are trying to access grimm when you didn't preload them

small heart
#

???

#

im new to this

vocal spire
#

show me your preloading code

small heart
#

all i know ist that fsm sucks

vocal spire
#

show me it and I will guide you to victory

small heart
#

var nkg = preloadedObjects["GG_Grimm_Nightmare"]["Boss Control/Nightmare King Grimm"];

vocal spire
#

wait..... did you not have a GetPreloadNames?

#

that's a big problem you got there

small heart
#
        {
            return new List<(string, string)>
            {
                ("GG_Grimm_Nightmare","Grimm Control"),
                ("GG_Radiance","Boss Control/Beam Sweeper"),
                ("GG_Grimm_Nightmare","Grimm Spike Holder/Nightmare Spike"),
                ("GG_Hollow_Knight","Battle Scene/Focus Blasts/HK Prime Blast"),
            };
        }```
vocal spire
#

oh good

#

you just showed me that I am right

small heart
#

so??

vocal spire
#

none of the get preload names contain the preload referenced in var nkg = preloadedObjects["GG_Grimm_Nightmare"]["Boss Control/Nightmare King Grimm"];

small heart
#

beacuse that not a thing

#

just used rad

vocal spire
#

so remove all code referencing that and your good

small heart
#

i think im done

#

building

vocal spire
#

ok

small heart
#

lets see

vocal spire
#

it is beautiful

small heart
#

i know

#

and nope

#

look at the mod log

#
[ERROR]:[API] -   at System.Collections.Generic.Dictionary`2[System.String,UnityEngine.GameObject].get_Item (System.String key) [0x00000] in <filename unknown>:0 
[ERROR]:[API] -   at ChildOfNightmares.ChildOfNightmares.Initialize (System.Collections.Generic.Dictionary`2 preloadedObjects) [0x00000] in <filename unknown>:0 
[ERROR]:[API] -   at Modding.ModLoader.LoadMod (IMod mod, Boolean updateModText, Boolean changeSettings, System.Collections.Generic.Dictionary`2 preloadedObjects) [0x00000] in <filename unknown>:0 
[ERROR]:[API] -   at Modding.ModLoader+<LoadMods>d__9.MoveNext () [0x00000] in <filename unknown>:0 ```
vocal spire
#

bruh

#

are you still doing var nkg = preloadedObjects["GG_Grimm_Nightmare"]["Boss Control/Nightmare King Grimm"];

small heart
#

yup

vocal spire
#

b r u h

small heart
#

lol

vocal spire
#

after I told you that's what's causing it

#

you don't listen

small heart
#

i sleepy

#

its night for me

vocal spire
#

let me explain it

#

you are trying to access something you haven't told it you want to access

small heart
#

im heading to fsm

vocal spire
#

?

small heart
#

"Boss Control/Nightmare King Grimm" isnt a thing

vocal spire
#

add this to GetPreloadNames and you are good
("GG_Grimm_Nightmare","Boss Control/Nightmare King Grimm"),

#

ok

#

then why are you referencing it

small heart
#

ok done

#

i added it but still get same error ERROR]:[API] - Error: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. [ERROR]:[API] - at System.Collections.Generic.Dictionary`2[System.String,UnityEngine.GameObject].get_Item (System.String key) [0x00000] in <filename unknown>:0 [ERROR]:[API] - at ChildOfNightmares.ChildOfNightmares.Initialize (System.Collections.Generic.Dictionary`2 preloadedObjects) [0x00000] in <filename unknown>:0 [ERROR]:[API] - at Modding.ModLoader.LoadMod (IMod mod, Boolean updateModText, Boolean changeSettings, System.Collections.Generic.Dictionary`2 preloadedObjects) [0x00000] in <filename unknown>:0 [ERROR]:[API] - at Modding.ModLoader+<LoadMods>d__9.MoveNext () [0x00000] in <filename unknown>:0

#
        {
            return new List<(string, string)>
            {
                ("GG_Grimm_Nightmare","Boss Control/Nightmare King Grimm"),
                ("GG_Radiance","Boss Control/Beam Sweeper"),
                ("GG_Grimm_Nightmare","Grimm Spike Holder/Nightmare Spike"),
                ("GG_Hollow_Knight","Battle Scene/Focus Blasts/HK Prime Blast"),
            };
        }```
vocal spire
#

show me your initialize code again

#

bruh

#

did you not add it?

#

you just said you did

small heart
#
        {
            #region GetPrefab
            
            var nkg = preloadedObjects["GG_Grimm_Nightmare"]["Boss Control/Nightmare King Grimm"];
            var fsm = nkg.LocateMyFSM("Attack Commands");
            var spawnAction = fsm.GetAction<SpawnObjectFromGlobalPool>("Spawn Fireball", 1);
            orbPre = UnityEngine.Object.Instantiate(spawnAction.gameObject.Value, null);
            UnityEngine.Object.DontDestroyOnLoad(orbPre);
            orbPre.SetActive(false);
            ShotCharge = nkg.transform.Find("Shot Charge").gameObject;
            ShotCharge2 = nkg.transform.Find("Shot Charge 2").gameObject;
            var finalcontrol = orbPre.LocateMyFSM("Final Control");
            UnityEngine.Object.DestroyImmediate(finalcontrol);
            var herohurter = orbPre.transform.Find("Hero Hurter").GetComponent<DamageHero>();
            UnityEngine.Object.DestroyImmediate(herohurter);
            BeamSweeper = preloadedObjects["GG_Grimm_Nightmare"]["Boss Control/Beam Sweeper"];
            BeamSweeper.transform.SetParent(null);

            HKBlast = preloadedObjects["GG_Hollow_Knight"]["Battle Scene/Focus Blasts/HK Prime Blast"];

            SpikePre = preloadedObjects["GG_Grimm_Nightmare"]["Grimm Spike Holder/Nightmare Spike"];
            
            #endregion

            #region Setup
            GameManager.instance.StartCoroutine(WaitHero(() => {
                SetupOrb();
                SetupBeam();
                SetupBlast();
                SetupSpike();
            }));
            #endregion

            #region Hooks
            ModHooks.Instance.AfterSavegameLoadHook += ApplyTrigger;
            GameManager.instance.StartCoroutine(WaitSetup(()=> ModHooks.Instance.CharmUpdateHook += Instance_CharmUpdateHook));
            #endregion

 
        }```
vocal spire
#

ok

#

so

#

I'm gonna repeat what I have said a bunch of times already

#
  1. you are referencing grimm, who you haven't told the game to preload. I gave you code for this, you said you put it in, but you clearly didn't.
  2. you are still treating nkg as radiance
#
  1. why do you need to preload the hollow knight? aren't these grimm attacks?
small heart
#

nop

#

many enmy attacks

#

ill addlater

vocal spire
#

ok

small heart
#

im just trying to get grim workin rn

vocal spire
#

ok

#

delete all of this
var fsm = nkg.LocateMyFSM("Attack Commands");
var spawnAction = fsm.GetAction<SpawnObjectFromGlobalPool>("Spawn Fireball", 1);
orbPre = UnityEngine.Object.Instantiate(spawnAction.gameObject.Value, null);
UnityEngine.Object.DontDestroyOnLoad(orbPre);
orbPre.SetActive(false);
ShotCharge = nkg.transform.Find("Shot Charge").gameObject;
ShotCharge2 = nkg.transform.Find("Shot Charge 2").gameObject;
var finalcontrol = orbPre.LocateMyFSM("Final Control");
UnityEngine.Object.DestroyImmediate(finalcontrol);
var herohurter = orbPre.transform.Find("Hero Hurter").GetComponent<DamageHero>();
UnityEngine.Object.DestroyImmediate(herohurter);
BeamSweeper = preloadedObjects["GG_Grimm_Nightmare"]["Boss Control/Beam Sweeper"];
BeamSweeper.transform.SetParent(null);

small heart
#

next

small heart
#

Its already there

#

look

#
        {
            return new List<(string, string)>
            {
                ("GG_Grimm_Nightmare","Boss Control/Nightmare King Grimm"),
                ("GG_Radiance","Boss Control/Beam Sweeper"),
                ("GG_Grimm_Nightmare","Grimm Spike Holder/Nightmare Spike"),
                ("GG_Hollow_Knight","Battle Scene/Focus Blasts/HK Prime Blast"),
            };
        }```
vocal spire
#

oh I see now

small heart
#

("GG_Grimm_Nightmare","Boss Control/Nightmare King Grimm"),

vocal spire
#

ok

small heart
#

next

vocal spire
#

try running it now

small heart
#
[ERROR]:[API] -   at System.Collections.Generic.Dictionary`2[System.String,UnityEngine.GameObject].get_Item (System.String key) [0x00000] in <filename unknown>:0 
[ERROR]:[API] -   at ChildOfNightmares.ChildOfNightmares.Initialize (System.Collections.Generic.Dictionary`2 preloadedObjects) [0x00000] in <filename unknown>:0 
[ERROR]:[API] -   at Modding.ModLoader.LoadMod (IMod mod, Boolean updateModText, Boolean changeSettings, System.Collections.Generic.Dictionary`2 preloadedObjects) [0x00000] in <filename unknown>:0 
[ERROR]:[API] -   at Modding.ModLoader+<LoadMods>d__9.MoveNext () [0x00000] in <filename unknown>:0 ```
vocal spire
#

ok

#

show me initialize again

small heart
#
        {
            #region GetPrefab
            
            var nkg = preloadedObjects["GG_Grimm_Nightmare"]["Boss Control/Nightmare King Grimm"];
           

            HKBlast = preloadedObjects["GG_Hollow_Knight"]["Battle Scene/Focus Blasts/HK Prime Blast"];

            SpikePre = preloadedObjects["GG_Grimm_Nightmare"]["Grimm Spike Holder/Nightmare Spike"];
            
            #endregion

            #region Setup
            GameManager.instance.StartCoroutine(WaitHero(() => {
                SetupOrb();
                SetupBeam();
                SetupBlast();
                SetupSpike();
            }));
            #endregion

            #region Hooks
            ModHooks.Instance.AfterSavegameLoadHook += ApplyTrigger;
            GameManager.instance.StartCoroutine(WaitSetup(()=> ModHooks.Instance.CharmUpdateHook += Instance_CharmUpdateHook));
            #endregion

 
        }
vocal spire
#

ok, boss control does not exist

#

replace
Boss Control/Nightmare King Grimm
with
Grimm Control\Nightmare Grimm Boss

#

then you should be good

small heart
#

thats what ive been saying

vocal spire
#

ok

small heart
#

now there no errors but when i do desolate dive its stuck on desolate dive

#

and no spikes

vocal spire
#

then you did something bad to the fsm

small heart
#

i didnt modify the fsm

vocal spire
#

then what do you do for spells?

small heart
#

i stoped it from preforming the spell

#

and summoned grim spkies

vocal spire
#

show me your code for this

small heart
#

Wait oh right i changed it from this ModCommon.ModCommon.OnSpellHook += onSpell; private void onSpell(Spell s) { //spawn spikes return false; }

#

to child of light code

vocal spire
#

what

#

how are you doing return right there

small heart
#
        {
            //spawn spikes
            return false;
        }```
vocal spire
#

ok

#

idk how the modcommon hooks work so idk

small heart
#

but i changed it to child of lights code

vocal spire
#

ok

#

soooo what's the code?

small heart
#

idk

#

i copy pasted

vocal spire
#

bruh

small heart
#

lol

vocal spire
#

show me the SetupSpike method

small heart
#
        {
            UnityEngine.Object.DestroyImmediate(SpikePre.LocateMyFSM("Hero Saver"));
            UnityEngine.Object.DestroyImmediate(SpikePre.GetComponent<DamageHero>());
            AddDamageEnemy(SpikePre).damageDealt = 5;

            var spikectrl = SpikePre.LocateMyFSM("Control");
            spikectrl.RemoveTransition("Up", "DOWN");
            spikectrl.RemoveTransition("Up", "SPIKES DOWN");
            spikectrl.InsertAction("Up", new Wait { time = 0.4f, finishEvent = FsmEvent.Finished }, 0);
            var downed = spikectrl.GetState("Downed");
            var floor_antic = spikectrl.GetState("Floor Antic");
            var spike_up = spikectrl.GetState("Spike Up");
            var up = spikectrl.GetState("Up");

            downed.Transitions = new FsmTransition[] { };
            floor_antic.Transitions = new FsmTransition[] { new FsmTransition { FsmEvent = FsmEvent.Finished, ToState = "Spike Up" } };
            spike_up.Transitions = new FsmTransition[] { new FsmTransition { FsmEvent = FsmEvent.Finished, ToState = "Up" } };
            up.Transitions = new FsmTransition[] { new FsmTransition { FsmEvent = FsmEvent.Finished, ToState = "Down" } };
            spikectrl.AddTransition("Downed", "HEROSPIKEUP", "Floor Antic");

            spikectrl.Fsm.SaveActions();
            SpikeCenter = new GameObject { name = "HeroSpikeCenter", layer = 23, active = true };
            UnityEngine.Object.DontDestroyOnLoad(SpikeCenter);
            SpikeCenter.transform.position = HeroController.instance.transform.position;

            setupDone++;
        }```
#

i think this is the problem var spikectrl = SpikePre.LocateMyFSM("Control");

vocal spire
#

no

#

do you have the qol mod?

small heart
#

nope

vocal spire
#

get it

small heart
#

should i refer to it

vocal spire
#

no

#

just activate it and vasi

small heart
#

What does QoL and vasi do

vocal spire
#

vasi is a dependancy qol does a lot but we need it for extra logging

small heart
#

nope

#

doest work

vocal spire
#

qol and vasi?

#

wdym

small heart
vocal spire
#

yeah

#

I never told you they would fix

#

vasi is a dependancy qol does a lot but we need it for extra logging
@vocal spire

#

now check the modlog for errors

#

that do not include Errors coming from qol

small heart
vocal spire
#

I'm gonna rewrite a lot of code brb

small heart
#

sure

vocal spire
#

ok there is a problem with SetupOrb

small heart
#

oh

#

let me comment htat out

#

rn

vocal spire
#

ok

#

comment out everything except for the spikes since that's what we want to fix rn

small heart
#

every thing nonrelated to rbs went red

vocal spire
#

wait did you actually comment out everything?

small heart
#

yup

vocal spire
#

I meant only SetupOrb SetupBeam and SetupBlast

#

lol

#

I probably could have explained that better

small heart
#

lol

#

also there a billion places where there is other spells

#

and they turn into errors

vocal spire
#

ok

#

then don't comment anything out

small heart
#

var dmg = go.AddComponent<DamageEnemies>(); this line is giving me an error

vocal spire
#

how?

small heart
#

and i just spent all that time commenting

#

under AddComponent it says Expensive method invocation

vocal spire
#

what

small heart
#

i undid all commenting and every thing is fine

#

and i think this line just mean i have to cast to object but thats just a warning i think ChildOfNightmares.ChildOfNightmares.SetupOrb ()

vocal spire
#

ok

small heart
#

Its a FSMPlayMaker problem I think [ERROR]:[UNITY] - HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex)x
[ERROR]:[UNITY] - HutongGames.PlayMaker.FsmState.OnEnter ()
[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state)
[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState)
[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.UpdateStateChanges ()
[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.DoTransition (HutongGames.PlayMaker.FsmTransition transition, Boolean isGlobal)
[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.ProcessEvent (HutongGames.PlayMaker.FsmEvent fsmEvent, HutongGames.PlayMaker.FsmEventData eventData)
[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEventTarget eventTarget, HutongGames.PlayMaker.FsmEvent fsmEvent)
[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEvent fsmEvent)
[ERROR]:[UNITY] - FSMUtility.SendEventToGameObject (UnityEngine.GameObject go, HutongGames.PlayMaker.FsmEvent ev, Boolean isRecursive)
[ERROR]:[UNITY] - FSMUtility.SendEventToGameObject (UnityEngine.GameObject go, System.String eventName, Boolean isRecursive)
[ERROR]:[UNITY] - HutongGames.PlayMaker.Actions.SendEventToGameObjectOptimized.OnEnter ()
[ERROR]:[UNITY] - HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex)
[ERROR]:[UNITY] - HutongGames.PlayMaker.FsmState.OnEnter ()
[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state)
[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState)
[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.UpdateStateChanges ()

vocal spire
#

ok?

#

almost finished with the spikes

small heart
#

ok

#

[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.DoTransition (HutongGames.PlayMaker.FsmTransition transition, Boolean isGlobal)
[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.ProcessEvent (HutongGames.PlayMaker.FsmEvent fsmEvent, HutongGames.PlayMaker.FsmEventData eventData)
[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEventTarget eventTarget, HutongGames.PlayMaker.FsmEvent fsmEvent)
[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEvent fsmEvent)
[ERROR]:[UNITY] - HutongGames.PlayMaker.Fsm.Event (System.String fsmEventName)
[ERROR]:[UNITY] - PlayMakerFSM.SendEvent (System.String eventName)

vocal spire
#

k

small heart
#

code done?

vocal spire
#
private void SetupSpike()
        {
            UnityEngine.Object.DestroyImmediate(SpikePre.GetComponent<DamageHero>());
            AddDamageEnemy(SpikePre).damageDealt = 5;

            var spikectrl = SpikePre.LocateMyFSM("Control");
            spikectrl.RemoveTransition("Up", "SPIKES DOWN");
            spikectrl.InsertAction("Up", new Wait { time = 0.4f, finishEvent = FsmEvent.Finished }, 0);
            var downed = spikectrl.GetState("Dormant");
            var up = spikectrl.GetState("Up");

            up.Transitions = new FsmTransition[] { new FsmTransition { FsmEvent = FsmEvent.Finished, ToState = "Down" } };
            spikectrl.ChangeTransition("Dormant", "SPIKES READY", "Ready");

            spikectrl.Fsm.SaveActions();
            SpikeCenter = new GameObject { name = "HeroSpikeCenter", layer = 23, active = true };
            UnityEngine.Object.DontDestroyOnLoad(SpikeCenter);
            SpikeCenter.transform.position = HeroController.instance.transform.position;

            setupDone++;
        }
#

I'm gonna go work on my mod now

small heart
#

sure

#

It doesn't work but u can work on your mod!!

jolly oriole
#

oh no, my custom reflection based JsonConverter works

vocal spire
#

lol

small heart
#

lol

jolly oriole
#

and the output is quite good

{
  "SpriteData": {
    "Anchor": "MiddleCenter",
    "HeroSize": {
      "x": 0.0,
      "y": -1.0
    },
    "offset": {
      "x": -1.0,
      "y": 0.0
    },
    "Definitions": [
      {
        "SpriteName": "Test",
        "Position": {
          "m_XMin": 1.0,
          "m_YMin": 2.0,
          "m_Width": 3.0,
          "m_Height": 4.0
        }
      }
    ],
    "Clips": [
      {
        "clipname": "9",
        "fps": 10.3,
        "frames": [
          {
            "Id": 5,
            "HasEvent": false,
            "EventInfo": "6",
            "EventInt": 7,
            "EventFloat": 8.1
          }
        ]
      }
    ]
  },
  "BoolValues": {},
  "FloatValues": {},
  "IntValues": {},
  "StringValues": {}
}
vocal spire
#

oooooooooooo

small heart
#

And i got the spike to work btw

vocal spire
#

cool

jolly oriole
#

gonna put that into SFCore lol

vocal spire
#

ok

#

when is it gonna update and how do I use it

small heart
#

@jolly oriole You made SFcore?

vocal spire
#

yeah

jolly oriole
#

yes

vocal spire
#

they did

small heart
#

oh

vocal spire
#

i mean, their name is SFGrenade

#

I'm starting to think there is something wrong with the touchpad on this pc

#

I think I can now say, customknight+ is about 40% done!

small heart
#

i didn't know youre making customknight+!!

vocal spire
#

lol

#

that's what I have been working on on here

sage holly
vocal spire
#

idk

jolly oriole
#

funniest shit i've ever seen

vocal spire
#

will be decided after ver 1

#

but

#

oh

#

wait

#

I thought you said something different

#

pets already get skins

small heart
#

oh

#

nobody saw that

vocal spire
#

customknight+ lets you use your own spritesheets

small heart
#

that isnt that useful

vocal spire
#

bruh

small heart
#

oh

vocal spire
#

have you ever been confined to the limits of the normal sprites

small heart
#

the background

vocal spire
#

?

small heart
#

and foreground

vocal spire
#

?

small heart
#

so u can use your own sprite sheets so u can change the background and foreground right

vocal spire
#

bruh

#

no

#

the knight

small heart
#

so the knights sprite sheet

vocal spire
#

have you been confined to the small square of the knight when you want to make something bigger and better

small heart
#

?

#

all i know is that purevessel skin cool

vocal spire
#

ok

#

then don't tell me my mod isn't useful

small heart
#

i dont understand

viral snow
#

have you been confined to the small square of the knight when you want to make something bigger and better
No, but thanks for the question

vocal spire
#

when making skins you are confined to the original size of the knight to draw in

small heart
#

what does customknight+ do

#

ohh

#

i understan

vocal spire
#

skins would be better if you could draw outside that

small heart
#

so u can make a more detailed or bigger knight

vocal spire
#

customknight+ lets you draw as much as you want

#

yeah

small heart
#

like 512 x 512

vocal spire
#

as much as you want

small heart
#

but it would require a good pc if its like 2048 x 2048+

#

all the player with bad pcs would basicly still have to use customknight

vocal spire
#

well

#

it can't really be used to make it higher definition

#

but it will still let you go way outside the normal bounds

small heart
#

so only bigger?

vocal spire
#

yeah

small heart
#

i have an idea for a mod now

vocal spire
#

ok

small heart
#

you know grimms puff up attack

vocal spire
#

yeah

small heart
#

ima make a mod that does that but to the knight

vocal spire
#

ok

small heart
#

when will it release btw

vocal spire
#

today, tomorrow, next week, idk

small heart
#

ok

shadow dagger
#

brooo customknight+ sounds solid

#

I'd use that

vocal spire
#

Thanks

#

It’s getting done pretty fast now, but I gotta do some family stuff rn

shadow dagger
#

yeah thats fine, Im just saying when it does get finished Ill def be using it

#

gives a lot more flexibility

#

also I can tell you know what youre doing when it comes to the code and all, so I know I can ask you for help when I need it lol

vocal spire
#

lol

small heart
#

@vocal spire whats the nkg alt to this var absFSM = abs.LocateMyFSM("Attack Commands");

#

oh

vocal spire
#

It’s all in the same fsm

#

Not everything has an equivalent alt

#

You gotta search on your own

shadow dagger
#

are there mods that have changed scenes/rooms noticeably that I can take a look at?

vocal spire
#

There is a example mod that adds a scene

#

Look for it in the api docs

shadow dagger
#

yeah I'm looking there right now, was just wondering if any existing mods have changed scenes and such

vocal spire
#

All in development

#

Test of teamwork will most likely come out really soon

shadow dagger
#

okay got it, ty

vocal spire
#

Adds 3 new rooms that are part of a new pop located across from the original pop

shadow dagger
#

does HKEdit2 ONLY work on Unity 2017.4.10f1?

#

Im assuming thats the version the game was made on?

vocal spire
#

Any 2017 I think but yes

shadow dagger
#

but not anything after, like 2019, right?

vocal spire
#

Nothing other than 2017

shadow dagger
#

got it

vocal spire
#

Might run on other years but assetbundling will always fail when loading the assetbundle in hk

shadow dagger
#

for both the FSM viewer and HKEdit, do I have to export the files to specific places?

#

so like I would download the zip, but then what

vocal spire
#

No

#

Hkedit you open with unity

#

FSMviewer is just an application

shadow dagger
#

ah okay got it, ty :)

shadow dagger
#

how would I open HKEdit with unity specifically?

vocal spire
#

Go into unity and click open project or whatever, then select the hkedit folder

shadow dagger
#

oh its just as simple as selecting the folder?

vocal spire
#

Yes

#

If it says it isn’t a project, go inside the folder

#

Then repeat

shadow dagger
#

okay I was overthinking it then, thanks for the help as always :)

#

I think I got it to work, its giving me the option of choosing a scene

vocal spire
#

Np

#

Ok

#

Works

dark wigeon
#

Hkedit basically makes the editor think the game files are project files, so if it's not the right version it will probably die, considering even a minor update makes the editor popup the upgrade project version dialog

chrome abyss
#

Is there a good way to run FSMViewR2 in Ubuntu? I'm having trouble getting it to work with Wine.

dark wigeon
chrome abyss
#

So, I tried to follow that, but winetricks told me "Unknown arg dotnet48"

#

I'm probably just going to try running this in a windows VM instead

dark wigeon
#

Did you do the -q part?

chrome abyss
#

Yeah, I did

dark wigeon
#

I remember copy pasting those two commands and it worked fine for me after that

#

Possible your wine tricks might be out of date but other than that idk

chrome abyss
#

I tried updating it and then rerunning the commands, and that didn't work either grubsad

dark wigeon
#

What about dotnet47

chrome abyss
#

That also doesn't work

dark wigeon
#

Weird

chrome abyss
#

Should I try everything between 40 and 46 lol

dark wigeon
#

Just a sec

#
potato@pop-os:~/Desktop$ wine --version
wine-5.0.2
potato@pop-os:~/Desktop$ winetricks --version
20200412 - sha256sum: 7651c93e39fcb080483c38836513bf912273a87ea97d137f6b958ed3d9628c3d
chrome abyss
#

Hm I didn't actually check the version, and it seems like I didn't actually successfully update winetricks to the latest version

#

So I'll try that again

#

Okay now it's installing properly

#

Or not... rip

dark wigeon
#

tons of errors?

chrome abyss
#

Yep

dark wigeon
#

I mean mine had tons of errors too but I let it finish and it installed

#

unless it already installed and still isn't working

chrome abyss
#

I killed it after it looked like it was just looping through the same errors

#

Probably should've taken a screenshot

dark wigeon
#

yeah just keep letting it run

#

and eventually it should stop

#

but yeah sorry to make you guys go through all this but avalonia did not support some of the same stuff that wpf had that I needed to make it work

chrome abyss
#

So, now I'm getting the error:

0009:err:module:LdrInitializeThunk Importing dlls for L"Z:\\home\\$USER\\Downloads\\FSMViewR2\\PMFSMView.exe" failed, status c0000135```
#

Hm, seems like I messed up my prefix somehow; I'll try again

chrome abyss
#

Okay, the application seems to work now, but when I try to load anything I'm told:

#

Is there a Steam path variable I need to set?

#

It might be messed up because it's being run through Wine

copper nacelle
#

it reads the registry

#

for windows steam path

small heart
#

Got dis error [ERROR]:[API] - Error: System.NullReferenceException: Object reference not set to an instance of an object [ERROR]:[API] - at ModCommon.Util.FsmUtil.GetAction (.PlayMakerFSM fsm, System.String stateName, Int32 index) [0x00000] in <filename unknown>:0 [ERROR]:[API] - at ModCommon.Util.FsmUtil.GetAction[SpawnObjectFromGlobalPool] (.PlayMakerFSM fsm, System.String stateName, Int32 index) [0x00000] in <filename unknown>:0 [ERROR]:[API] - at ModCommon.Util.FsmutilExt.GetAction[SpawnObjectFromGlobalPool] (.PlayMakerFSM fsm, System.String stateName, Int32 index) [0x00000] in <filename unknown>:0 [ERROR]:[API] - at ChildOfNightmares.ChildOfNightmares.Initialize (System.Collections.Generic.Dictionary`2 preloadedObjects) [0x00000] in <filename unknown>:0 [ERROR]:[API] - at Modding.ModLoader.LoadMod (IMod mod, Boolean updateModText, Boolean changeSettings, System.Collections.Generic.Dictionary`2 preloadedObjects) [0x00000] in <filename unknown>:0 [ERROR]:[API] - at Modding.ModLoader+<LoadMods>d__9.MoveNext () [0x00000] in <filename unknown>:0

vocal spire
#

why do I have a ping here

jolly oriole
#

probably discord being discord

vocal spire
#

yeah lol

small heart
#

Can some one help me?

vocal spire
#

?

vocal spire
#

you are referencing part of a fsm that doesn't exist

small heart
#

"Grimm Spike Holder/Nightmare Spike" is a thing

vocal spire
#

and?

small heart
#

i just added that and error

vocal spire
#

that error has nothing to do with that

#

where are you using get action

small heart
#

?

vocal spire
#

have you looked at the error?

small heart
#

Yup

vocal spire
#

where are you using GetAction<SpawnObjectFromGlobalPool> ?

small heart
#

Fixed it

dark wigeon
#

@chrome abyss I don't think fsmviewr2 has xplat steam finder so you'll just have to use regular file open instead of open scene list/open resources.assets

#

I know I have it so I'll just commit it when I get to my comp

chrome abyss
#

I think I got it to work using wine regedit

chrome abyss
#

So I was trying to follow the examples outlined in https://radiance.host/apidocs/PlayMakerFSM.html, but I got the following compile error:
ObjectCache.cs(71, 44): [CS1061] 'PlayMakerFSM' does not contain a definition for 'GetAction' and no accessible extension method 'GetAction' accepting a first argument of type 'PlayMakerFSM' could be found (are you missing a using directive or an assembly reference?)

#

The relevant code here is:

_soul = 
Object.Instantiate(fsm.GetAction<SpawnObjectFromGlobalPool>("Hit", 8).gameObject.Value);```
copper nacelle
#

get action is an extension

#

there's an implementation in modcommon if you want to use that but from what I understand rando has its own set of extensions if you're working on that

chrome abyss
#

Ah, I see. Thanks!

vocal spire
#

Similarly to the SaveGlobalsettings method, is there a LoadGlobalsettings that lets you reload them after a certain point?

#

Or is it automatically reloaded when you get the global settings

#

Or am I dumb

#

Because the api says that the globalsettings fail to load in the modlog because I used a json converter in SFCore and despite having SFCore in the mods folder, it failed to load seemingly causing the failure to load the global settings

crystal widget
#

WTF IS THIS
@sage holly Where did you find this skin?

#

The rick and morty skin

vocal spire
#

Probably a private skin

sage holly
#

in twitter

chrome abyss
#

Is there somewhere I can find documentation for PlayerData and HeroController?

jolly oriole
chrome abyss
#

So, does that mean soul is not tracked by playerdata?

jolly oriole
#

it is, i apparently just didn't include it there lol

#

i think

chrome abyss
#

I saw that under "Classes" it says "PlayerData has methods specifically for adding and removing health, soul, and geo. I will go over the health ones which should give you a good idea of how the rest work."

#

But I have no idea what the methods for adding and removing soul are called

#

"AddSoul" and "AddMP" both didn't work

copper nacelle
#

they do

#

they just don't update ui

#

the herocontroller ones update ui

#

you can use like AddMPChargeSpa, TakeMP, SetMPCharge, etc

#

It just sends an fsm event to the soul orb

chrome abyss
#

That worked; thanks!

copper nacelle
#

what

chrome abyss
#

I think you’re in the wrong channel

small heart
#

I think u mean Hollow Point

glass zodiac
#

Hey everyone, and programmers here?

#

*any

#

If so, then please @ me, I got a few question regarding a project i have been working on

young walrus
#

or you could just.... ask the question(s)

glass zodiac
#

Yeah of course, that... well that would also work

#

So basically... I have joined a team that wants to make a HK mod that adds content... like a new area. While a fair share of the artwork has been done already, we are still missing programmers. I myself would be responsible for the lore of said project, so I have no idea what the limitations are when it actually comes to programming

#

Is adding an area even remotely possible? I figure that before the project really gets going we need to know what is possible... and what isn't

jolly oriole
glass zodiac
#

very interesting, thank you!

#

so new rooms could be implemented in a way. Is it only possible to add one room as a dynamic extension, or is more possible?

#

Or does the room only kind of spawn in, without the ability of adding art assets or level design elements to the room?

jolly oriole
#

new rooms can be added as one wants, you can also add assets/elements, i just didn't do it for that video

glass zodiac
#

ohhh interesting!

#

I see that you are a coder, currently working on a platforming mod of sorts?

jolly oriole
#

yes

glass zodiac
#

I can send you some artwork from what we have been working on if you want (just you know, to take a look at the art and as a thank you for answering my questions)

jolly oriole
#

no probs

glass zodiac
#

Ok, now I'mma make an announcement: I am searching for a programmer/programmers, if you are interested dm me!

stiff otter
#

Do any of you guys know any good guides to get started?

#

Ive worked with c# and unity and modded for some other games

vocal spire
stiff otter
#

ive read the docs but I can't seem to find a good starting point

#

ill check again

vocal spire
#

Ok....

stiff otter
#

nvmd i found the tutorials

#

thanks lol

vocal spire
#

Just gonna tell you something before you start, almost nothing has equal stuff. Take nkg and radiance for example. Try to find the fire beams and light beams on each, and you get a null reference. Look hard into the object and scene hierarchy and fsms you are trying to access and you’ll find what you are looking for eventually

gusty drum
#

a while back i think i saw something here where someone was editing the map within unity. how do you get the game files back into a project?

vocal spire
#

Utiny ripper

#

Look at the api docs

#

Into the scene modding sections

gusty drum
#

ive tried using that but every mono behavior script was detached on export and maybe im lazy but i dont want to reattach 5000 mono behavior scripts

#

ill try agin i was probably doing it wrong

vocal spire
#

K

#

You have to preload objects and replace the new ones in your scene to do a lot of preserving of original things

gusty drum
#

right

vocal spire
#

gonna go see if I can remove customknight+'s dependancy on sfcore so I can finally properly load the globalsettings

jolly oriole
#

wait wut

vocal spire
#

it always tells me that it can't load sfcore in modlog

jolly oriole
#

oof

vocal spire
#

and the globalsettings fail to load

#

I had it in there the entire time

#

would have been better if I had tested it with another mod that used sfcore I guess

#

to make sure I ACTUALLY had it in there

#

wait

#

by I had it in there I mean I had it in the mods folder lol

#

might have been assumed that I meant that, might not but you never know

vocal spire
#

Me not like slow pc

vocal spire
#

hope it works this time

stiff otter
#

@vocal spire what do mean nothing has equal stuff? like its super inconsistant?

vocal spire
#

yes

#

with fsms

stiff otter
#

also what is unity ripper

vocal spire
#

have you looked at the guide

stiff otter
#

does it let you play around with it as a unity project?

vocal spire
#

in the apidocs

stiff otter
#

ok thanks

vocal spire
#

yes

#

has bugs tho

stiff otter
#

that would be cool but sounds like hell if it has bugs

#

if only unity allowed a decompile

vocal spire
#

there is only one that I know of that can't be fixed

#

and it's fine to leave

stiff otter
#

what is it

vocal spire
#

something with an animator component

#

or something

#

if you look through the guide in the apidocs, you can solve everything but that

#

gonna go test customknight+ now

#

ping if you need me

stiff otter
#

alright

vocal spire
#

also what I meant with inconsistancies in fsms is like if you look for the light beam radiance has, it will be extremely different to find grimm's fire beam. you can't always just copy fsm code from something and expect it to work on something else

stiff otter
#

uh huh

vocal spire
#

k