#archived-modding-development

1 messages · Page 516 of 1

vocal spire
#

Oh it’s also the beta?

#

No

#

Just run the installer to install the api

slender osprey
#

wait no, sorry

#

there is no exe here

vocal spire
#

Why not get it from the installer

#

Also the api isn’t the installer

#

It’s also here

#

?i

finite forumBOT
slender osprey
#

I have no idea of which installer you are talking about, this is my first time modding HK and I followed the sticky links from this channel in order x)
I should probably have tried playing with existing mods first, I'll do that. Thanks !

vocal spire
#

Yeah you should do that

worn eagle
#

be a chad and play the beta w mods

vocal spire
#

Or do that

#

You need to recompile any mod you want to play though and need to change any code that uses fsms

slender osprey
#

ok nice, I installed the api, played a bit with the debug mod, it seems to work fine 🙂
now let's not be a chad yet, and let's say I want to create a new mod with the non-beta version. Where should I start ?

vocal spire
#

Create a .net framework 3.5 class library project in your c# ide(ex: visual studio, rider)

#

Reference Assembly-Csharp.dll from the managed folder in your hk installation

#

Create a class that inherits from the Modding.Mod class

#

Done

#

Simple mod up

slender osprey
#

ah yes, my building of the API was in fact from the first line of the "getting started" page
It seems well documented

#

thank you very much

#

I'll be right back with whatever stupid idea I managed to implement

vocal spire
#

Oh also you probably want to reference UnityEngine.dll and UnityEngine.CoreModule.dll

copper nacelle
#

472

slender osprey
#

haha yes

#

I made a stupid mod that makes you die in one hit

#

very fun to play with the hooks, thanks for the tips 🙂

#

How much is your workflow automated ? now to test my files I :

  • click on build in Rider
  • manually copy the .dll from the bin directory to the game mods directory
  • launch the game
  • launch my save

Is there a way to automate the file copy, and/or to directly drop in a scene on launch ?

#

(I could probably override a menu hook to do this, but if it already exists... 😁)

jolly jungle
#

That's exactly what I do

#

After a few days it becomes a really smooth, second nature motion

slender osprey
#

haha okay

#

I feel like I could at least automate the file copy

jolly jungle
#

It didnt even cross my mind there might be somehting better

#

btw italy, where can I get the grub killing mod

slender osprey
jolly jungle
#

I wanna look at the code

worn eagle
#

You can modify the .csproj to copy the dll to your mods folder

floral blade
vocal spire
#

Hmmm

#

Copy then launch hk 🤔

slender osprey
#

okay, it was a bit weird cause the AfterBuild task override does not work in rider

#

but it works with a bit of fiddling :

    <ItemGroup>
        <ModDLL Include="bin/Debug/net35/StupidMod.dll"/>
    </ItemGroup>    
    <Target Name="CustomAfterBuild" AfterTargets="AfterBuild">
        <Message Importance="high" Text="Copying files"/>
        <Copy SourceFiles="@(ModDLL)" DestinationFolder="C:\Program Files (x86)\Steam\steamapps\common\Hollow Knight\hollow_knight_Data\Managed\Mods\"/>
    </Target>
#

I could probably add a Run clause to run HK automatically 🤔

primal latch
#

@copper nacelle trying to build the HollowKnight.Modding repository I get lots of errors like The type 'Vector2Converter' in 'F:\HollowKnight.Modding\Assembly-CSharp\Converters\Vector2Converter.cs' conflicts with the imported type 'Vector2Converter' in 'Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'F:\HollowKnight.Modding\Assembly-CSharp\Converters\Vector2Converter.cs'.

#

and The type 'TypeNameHandling' exists in both 'Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=null

fickle sparrow
#

the Assembly-CSharp.dll in your Vanilla folder is the modded one

#

you need the vanilla one for it to work correctly

primal latch
#

ah. That explains it

#

thanks

#

@fickle sparrow do you also know a fix for this error? 'KeyValuePair<string, List<string>>' does not contain a definition for 'Deconstruct' and no accessible extension method 'Deconstruct' accepting a first argument of type 'KeyValuePair<string, List<string>>' could be found (are you missing a using directive or an assembly reference?)

fickle sparrow
#

I assume this is on the master branch of the modding api?

#

make sure you have the latest beta version (1.5.66 currently) and are are using .NET Framework 4.7.2

fickle sparrow
#

if you want to compile a 1.4.3.2 modding api

#

the commit should be this

slender osprey
#

ok, had a lot of fun fooling around with random features 🙂 next step : a custom enemy !

#

again, thanks for the documentation, it's really cool 🙂

#

Quick question : how do I instantiate a specific existing enemy ?

vocal spire
#

You preload it

#

Unless the only places you instantiate it is in scenes where it already exists

slender osprey
vocal spire
#

?

slender osprey
#

ok so I know how to preload a custom enemy thanks to the docs

#

(with AssetBundle and everything)

vocal spire
#

that’s not preloading

#

Assetbundles != preloading

slender osprey
# vocal spire ?

yeah sorry about my english, I'm French and I realize I talk weird sometimes ^^

vocal spire
#

Ah ok

slender osprey
#

oh okay

vocal spire
#

Assetbundles are used to load something made in the unity editor, preloading is used to load stuff from scenes without having to visit them while playing

slender osprey
#

okay so I override GetPreloadNames in my mod class (like in the scene setup), with something like
new ValueTuple<string, string>("zone_with_an_aspid", "spitterthingy")
I should have an aspid preloaded

vocal spire
#

Yes

slender osprey
#

cool, and now to Instantiate it, what do I use ? I can't use UnityEngine.Object.Instantiate() cause I don't know which variable I can give to it

vocal spire
#

?

#

You should be able to use that

#

GameObject.Instantiate is preferred though

slender osprey
#

okay, then my question is : how do I retrieve the aspid Gameobject once it's preloaded ?

vocal spire
#

Look further in the docs for preloading

#

There’s another Initialize override that you use instead

slender osprey
#

I searched "preload" in the docs and did not find another example :c

#

oh

#

wait

#

sorry

#

I can't read

vocal spire
slender osprey
#

yeah I saw it after I sent you the link, sorry 😅😅😅😅

#

almost 10 years of programming and I still can't read sometimes

#

Great, I spawned a primal aspid every time the knights swing his sword, that's perfectly balanced

#

thank you for the help Someone 🙂

worn eagle
elder radish
#

Hello people, I need to mirror the sprite of the knight on runtime but I don't have much experience on the tk2d.

copper nacelle
#

Do you just want it like backwards?

#

Should be a relatively easy shader to write if you want to do it at runtime on a gpu

elder radish
#

reflection on the water

#

Unfortunately I dont have any shader experience but if you have any with a good resource I can handle it 😄

slender osprey
#

nothing to see here

worn eagle
fickle current
#
  1. that's a good beginner time (I think, I'm not suuuper involved)
light zodiac
#

This gives me joy

fickle current
#
  1. downpatch to inventory drop
#
  1. this is modding development, why did you put this here?
copper nacelle
#

Did you watch the video

ornate rivet
#

clearly not

#

I now have a sudden and very distinct urge to complete my eldergod mod

pure nova
#

Great time! There's a few areas you can work in, but that Dirtmouth split is an optimal route never before discovered. Any runner serious in speedrunning should start using your strategy. Thank you for your discovery.

jolly jungle
granite lodge
deep wave
#

fire: oh thanks italy for letting me kill grubs here's y-
italy: i'm not done.

worn eagle
#

you can thank tsira for this one

deep wave
#

ofc shroompog

jolly jungle
#

tsira?

jolly oriole
#

tsira.

ornate rivet
#

tsira.

quiet crest
#

😁

#

ty italy for making such a beautiful mod

primal latch
#

Hey. Since SFGrenade doesn't want to be pinged, I am using SFCore to add custom items. That adds a new inventory tab named Equipment. The mod I'm working on has support for multiple languages. How would I be able to change the name? I found the internal ID to be PANE_EQUIPMENT, but when I try to change it it keeps saying Equipment. My guess is because SFCore also edits that piece of text

quiet crest
#

holdup....grenade made sfcore why did that take me so long to connect

primal latch
#

IDK

light zodiac
primal latch
#

@light zodiac His name literally says don't @ me

jolly oriole
primal latch
#

Ok. I’ll take a look at that source.

cedar hemlock
primal latch
#

ok

cedar hemlock
#

ok

primal latch
cedar hemlock
#

lol

copper nacelle
#

Lmao

stone elm
primal latch
vocal spire
#

I’ll look into why it isn’t working, it should just be adding a hook either before or after SFCore

jolly jungle
#

What's the difference between that and double `

jolly oriole
#

literally nothing

#

wait no

#

the second one uses 2 more characters

deep wave
#

there is a difference on desktop?

#

triple backticks give code blocks
single backticks give inline code statements

#

on mobile i believe both display as inline code statements for cursed reasons

jolly oriole
#

It was about single and double

deep wave
#

oh?

#

i see no difference

twin gull
#

i'm pretty sure i got softlocked in a hk rando & was looking at the way the logic works in the rando mod. is that something relevant to this channel's interests?

steady comet
twin gull
jolly oriole
# deep wave ``oh?``

lol, whichever version i have on my phone displays the double ones as normal text, not inline code

cedar hemlock
#

otherwise i wouldn't have seen that it is `` instead of `

primal latch
#

Grenade, I made a pull request adding support for all HK-supported languages

jolly oriole
#

alright, will look at it once i'm home

primal latch
#

Ok

jolly oriole
#

from a first glance i may close it though and make it similar in working as tot and other of my mods that have text (and so i don't have to change the references lol)

primal latch
#

Ok

#

Will you then add it yourself?

jolly oriole
#

yes, will then be a json with the translations inside, easier to adjust in the future

primal latch
#

👍

jolly oriole
#

why does vs want to save 'utf-8' things as 'utf-8 with BOM', which Encoding.UTF8 can't read (at lest netf35 doesn't have a thing for 'utf-8 with BOM' afaik, but i haven't checked)

primal latch
#

Thanks sfgrenade. When will the next release be?

jolly oriole
#

ig i could do that rn, though i think i up the version before lol

#

and the strongname stuff is just because i know somebody who has problems with their AV deleting mods, and apparently having a strongname prevents that lol

primal latch
#

F*ck. Sorry for the ping

jolly oriole
#

that the assembly version is 1.4.3.3 -> 1.4.3.4

primal latch
#

ah

jolly oriole
primal latch
#

The waiting game is already over

jolly oriole
#

it was quick, it was silent, it was 56 vibecollector

primal latch
#

lol

jolly oriole
#

if somebody actually wants to look through that, those are only ~83 commits

vocal spire
#

I have some free time, why not

rough pulsar
#

assembly version what

#

ah seems like this. happened

jolly oriole
cedar hemlock
#

yeah are you

rough pulsar
vocal spire
#

Idk man if being a dev of pale court doesn’t make me a trusted contributor idk what will

rough pulsar
#

56

jolly oriole
#

pale court isnt real 😤

vocal spire
#

I don’t see why we’d need to revert it back to that comment, a lot has been done since then(changing enable all installed mods to enable modding api, tot, SFCore, drpc, corrupted kin, more, all have either been added or had multiple updates)

#

(I skimmed through the comments since then)

jolly oriole
#

"audit", not "revert"

vocal spire
#

Ah, (I’m bad at GitHub)

unborn flicker
#

I don't see the point at all. The commit they reported isn't even suspicious.

vocal spire
#

Yeah

light zodiac
#

If the shas were wrong someone would have noticed cuz it would cause infinite updates

unborn flicker
#

I assume 56 just posted wyza or someone else's latest PDT version when the last gdrive was taken down, and since all 3 forks of PDT are effectively abandoned, no one has fixed it since.

rough pulsar
#

dw i'm also shit in github

vocal spire
rough pulsar
#

i don't even know what audit stands for

#

i would trust ruttie fixing my sha1 mistakes

vocal spire
#

I personally trust Ruttie

rough pulsar
#

same beehappy

jolly oriole
#

its not a github term, but it basically means to check all changes and if they were correct i think

vocal spire
#

Ah ok

rough pulsar
#

audit?

vocal spire
#

I can’t check if they’re right

#

I’m on mobile

#

Plus if something was wrong it prob was already changed

jolly oriole
rough pulsar
#

ok

vocal spire
#

And it’s easy to check and fix wrong things by just using mod installer

rough pulsar
#

does my mod's readme still appear in modinstaller2 i wonder

#

since. it's a TXT file

#

not a MD one

vocal spire
#

Readmes aren’t in mod installer 2 iirc

rough pulsar
#

that sucks zote

jolly oriole
rough pulsar
#

ah well

#

well most people seem to use modinstaller 1, but yeah this has an impact on some mods that need their README

vocal spire
deep wave
#

hollow point moment

jolly oriole
#

there's still the readme collection pinned in modding-help

rough pulsar
vocal spire
light zodiac
#

Just change all text on title screen to pls read readme

vocal spire
#

Don’t remember the name from anywhere

rough pulsar
#

yes

#

yes

#

if i only knew how to edit sprites from runtime grublaugh

jolly oriole
vocal spire
#

HeroController

#

The issue

jolly oriole
#

some person that thought it would be funny to move the old gdrive into their trash

vocal spire
#

Also does anyone have a suggestion for becoming not bad at GitHub

jolly oriole
vocal spire
#

Ok

rough pulsar
#

i barely use github grubthink

jolly oriole
#

yea, thanks to github my mod versions didn't have to be changed in modlinks

vocal spire
#

I could change mine to that therefore fixing frogcore(I think)

rough pulsar
#

i still publish a different release and then change the link in modlinks

vocal spire
#

But that’s effort

rough pulsar
#

if anyone finds a problem they don't have to ask me or anyone else for the old dll, it's literally in the releases list

worn eagle
#

anyone know where the mouse cursor is located in the scene hierarchy

rough pulsar
#

i don't think it is located anywhere

#

at least not in any scene

#

do you aim to change the cursor image?

worn eagle
#

no, trying to reuse it to pick objects on screen

vocal spire
#

Yeah not in the scene hierarchy

#

MouseToWorldPoint or something I think

jolly oriole
#

i'd look at how decomaster does it, afaik the only mod to use it

worn eagle
#

looks like we're creating it from scratch

jolly oriole
#

line 262 is apparently a version with the ingame cursor

stone elm
#

@copper nacelle You reverted back from .netstandard2.1 to netfx472, why not just match HK's .netstandard2.0? I'm not particularly invested, just wondering if there was a reason behind it other than "bleh it's not working right now, fuck it revert" (For modding api)

jolly oriole
#

.

stone elm
#

Good enough

#

Thanks

copper nacelle
#

It made everything die

#

No idea why

#

400 errors

prime urchin
#

Both 2.1 and 2.0? 'cause 2.1 isn't Unity-compatible iirc

copper nacelle
#

2.1 built but isn't compatible as you said so you get a missing method exception on int parse if your build tools are up-to-date

#

2.0 just made everything die including system types so I didn't try particularly hard to get it to build

hardy stump
#

If I have a reference to a GameObject enemy, is it possible to get its FSM object without knowing the enemy's fsm name?

#

Use case: I want to log an enemy's current action when I attack it.

#

more specifically, and forgive my naive approach:

  • I have a list of every alive enemy on the scene.
  • When I perform a parry, I want to determine which of these enemies are in a parry-able state.
steady comet
hardy stump
#

Perfect, that looks like exactly what I want

vocal spire
worn eagle
#

backticks please I beg you

vocal spire
#

I’m on mobile and can’t find them

jolly oriole
#

long press '

vocal spire
#

Oh

#

Well I didn’t do it right

jolly oriole
#

yes, those are the normal ', not `

vocal spire
#

Thanks

jolly jungle
#

Is there a reason Debug mod doesn't show Heavy Fools in the enemy list?

jolly jungle
#

Welp I can't find the name of Heavy Fools anywhere

#

Because they only get spawned in

#

Rather than are part of the scene'

#

If anyone can get me their name it'll be appreciated

jolly oriole
#

the language key is "NAME_COL_WORM"

jolly jungle
#

Wdym?

#

I need the gameobject's name

jolly oriole
#

maybe it's somewhat similar

jolly jungle
#

not the hm

#

wait

jolly oriole
#

probably part of the scene dump in the pins

jolly jungle
#

lmap

#

anyways

jolly jungle
#

Another question

#

Why does changing the skin of one enemy changes it for everything using the same spritesheet/atlas?

jolly oriole
#

because those use the same spritesheet/atlas

jolly jungle
#

You know what I mean

#

Why does it affect them?

#

I thought it's just changing only that enemy's skin

#

But nope, apparently its all instances of that enemy, and every enemy using that sheet

jolly oriole
#

i'm not that knowledgeable about unity stuff, but ig unity makes it consume less video memory to have the texture once, but the sprites are one for each object

jolly jungle
#

Any idea how to make two things using the same sheet to use, well, separate sheets?

jolly oriole
#

give it a sprite that uses another texture

jolly jungle
#

Wdym?

#

I want to have a certain colosseum enemy look different while keeping all the others that use the same sheet looking normal

jolly oriole
#

hm

#

if just assigning a texture won't work i'm not sure what will

#

oh yea

#

try giving the spritedefinition of the tk2d element of the enemy a new material (with similar settings to the original one), but supply your own texture as the main texture

jolly jungle
#

Hm

#

Nice idea

#

Is there a way to see the settings the materials have now?

#

Or can we assume they're default?

jolly oriole
#

you could, but i would advise against that, and you can look at the material settings with either hkwe2, UABE, assetsview and maybe a few others as well

jolly jungle
#

hkwe2?

jolly oriole
#

hkworldedit2

jolly jungle
#

thx

primal latch
#

All my mod code

stone elm
#

Python is fantastic, nothing like that pool

#

Amirite or amirite, Flib?

primal latch
#

@copper nacelle just wondering, will the mod installer be able to support a 120mb+ mod?

copper nacelle
#

yeah

primal latch
#

Great

#

Because god damn Fyremoth is becoming big

jolly oriole
#

don't worry, pale court may also be somewhat larger than normal mods

fair rampart
#

hi I am starting to learn modding

ornate rivet
#

somewhat larger

fair rampart
#

I have downloaded the hell mod project but I cannot make reference to Assembly-CSharp.dll because it's not supported

#

in visual studio

stone elm
#

What makes you say that? What error(s) are you seeing? Please screenshot if you cannot otherwise describe.

fair rampart
#

ok

#

probably I have to change the paths in HellMod.csproj

stone elm
#

Least complex solution: delete all the references which aren't working and reference them from your game files.

#

Make sure modding api is installed first.

fair rampart
#

yes I have instelled it before

light zodiac
#

did you add the references or did you only open the csproj?

stone elm
#

Mod makers pls ship your mods (source) with the folder you expect references to be in, not a ../../../../../../References hint path*. 😦

deep wave
#

but ../^28 is fun ax1uWide3

stone elm
#

I keep my references on a remote drive for extra complication thkstab

copper nacelle
#

../../References

#

I already have 40 copies from it copying during building I don't need 40 more

fair rampart
#

ok it seem that removing references and adding by myself is fixing the problem

stone elm
#

I get that, 56, the small issue I take with it is that there's no mention of that setup and HellMod is linked to as the example mod. It basically presents everyone who clones the repo with the same issue of having to fix references or put a folder in a particular place.

fair rampart
#

ok thanks now I have no errors in the project

worn eagle
#

how can I crop part of a tightly packed texture atlas down to a single sprite given that sprite?

#

should I use render textures?

jolly oriole
#

but that is actually more difficult than i thought

#

as other sprites can have pixels in the rect

worn eagle
#

I just dk how to surround the single sprite

#

ye

jolly oriole
worn eagle
#

time to write an edge detection shader

jolly oriole
#

if you want a general sprite extractor, that maybe won't work

#

very close is already edge detection with alpha=0

#

difficult to detect that way will be these adjacent alpha!=0 edges

dark wigeon
#

maybe uvs array? hkworldedit cropped unity sprites, but assets files have extra data on the crop shape

jolly oriole
#

this uv thing?

dark wigeon
#

a lot of stuff under m_RD

#

I figure that uvs and vertices from unity api have the same information as in m_rd but I'm not sure

#

tldr, convert uvs from 0-1 to 0-width/height, scale by texel size, then flip on y-axis

jolly oriole
#

but then there still is the problem of other sprites having their pixels in the bounding box of the one we want

dark wigeon
#

are you saying that uvs is a rectangle?

#

in the assets files it's a polygon

jolly oriole
#

it sure did sound like a bounding box where the sprite is

dark wigeon
#

I'm not on a PC but you might check that uvs is more than 4 points

worn eagle
dark wigeon
#

bad rounding in print?

#

they are probably going to be really small since they only go from 0-1

jolly oriole
#

picked a random one and let vector2 do the fancy output thing

#

no rounding this time

#

looks good?

dark wigeon
#

yes that looks better

#

tostring on vec3 probably rounds

jolly oriole
#

vec2, but same thing

dark wigeon
#

but Italy's showed more

#

yes typo whatever

jolly oriole
#

i just picked the first sprite unity gave me

worn eagle
#

how'd you get that precision grenade?

jolly oriole
#

i printed item.x, item.y

dark wigeon
#

so it could be that sprites just rect packed

#

apparently tostring has a format specifier

#

so you could just use that

jolly oriole
#

nah, i printed just both values independently

dark wigeon
#

but you could

jolly oriole
#

which is also why it's missing the ()

worn eagle
#

looks better

dark wigeon
#

what's the texture's size?

jolly oriole
#
var testSprite = GameObject.FindObjectOfType<SpriteRenderer>().sprite;
List<Vector2Int> texUVs = new List<Vector2Int>();
foreach (var item in testSprite.uv)
{
    texUVs.Add(new Vector2Int(Mathf.RoundToInt(item.x * testSprite.texture.width), Mathf.RoundToInt(item.y * testSprite.texture.height)));
}
Log($"UVs:");
foreach (var item in texUVs)
{
    Log($"({item.x}, {item.y})");
}

resulted in

UVs:
    (82, 97)
    (179, 0)
    (179, 97)
    (82, 0)
dark wigeon
#

you multiply by texture width and height not the sprite width and height

jolly oriole
#

resulted in

UVs:
    (82, 97)
    (179, 0)
    (179, 97)
    (82, 0)
dark wigeon
#

you also need to flip on the y axis texHeight - finalPointY

#

since y=0 is bottom not top

worn eagle
#

alright, now the question is how to enclose the sprite using these points

#

not an easy AABB

vocal spire
#

Like creating a new sprite of only that part?

worn eagle
#

texture2d but yes

#

this in particular is the crossroads cart

vocal spire
#

Oh well idk much about cutting tex2ds

dark wigeon
#

should be like this for the first point

vocal spire
#

There’s the read pixel stuff

dark wigeon
#

frick don't flip x axis

worn eagle
#

I shouldn't have withdrawn from my computer graphics course

jolly oriole
#

there's an algorithm i once implemented in python that does lines between points

dark wigeon
#

but yeah should be
(x*texWidth, texHeight-(y*texHeight)

vocal spire
jolly oriole
dark wigeon
#

what's this for?

#

oh lol

dark wigeon
#

you still need the indices to build the triangles

#

then you can throw it into system.drawing and it will crop from given triangles

worn eagle
#

I'm basically trying to convert a sprite to a byte array so I can send it over tcp

dark wigeon
#
  1. convert uvs to texture cords with (x*texWidth, texHeight-(y*texHeight))
  2. use triangles array and connect every 3 vertex indices together
  3. crop from triangles
#

byte array sounds pretty generic

#

what format is in the byte array

jolly oriole
#

i think there is no triangles array easily accesible in code

worn eagle
#

whatever EncodeToPNG() does

jolly oriole
#

why didn't it show up before

dark wigeon
#

looking at spriterenderer or smth?

jolly oriole
#

maybe just because 1 am

dark wigeon
#

since you're on unity you probably can't get system.drawing so gl with the actual graphical part of that

#

I had pain with both using system.drawing in unity and finding an alternative that worked in .net 3.5

jolly oriole
#

triangles has probably a multiple of 3 contents, right?

dark wigeon
#

yes

jolly oriole
#

i saw that true garmond

worn eagle
#

sprite.triangles has no relation to sprite.uv?

jolly oriole
#

it can look like this

Triangles:
    (82, 512), (82, 415), (179, 512)
    (179, 415), (179, 512), (82, 415)
dark wigeon
#

I thought they were all related no?

jolly oriole
#
for (int i = 0; i < testSprite.triangles.Length; i += 3)
{
    triangles.Add((texUVs[testSprite.triangles[i]], texUVs[testSprite.triangles[i+1]], texUVs[testSprite.triangles[i+2]]));
}
dark wigeon
#

you have to have the same amount of verts as uvs

worn eagle
#

idk I just thought that cause there were 8x3 triangle groups and 10 uv coordinates

jolly oriole
#

certainly possible

dark wigeon
#

yes

jolly oriole
#

now just somehow get the pixels out of the texture one way or another

dark wigeon
#

grenade, looks fine to me

#

two triangles make a rectangle

dark wigeon
#

my recommendation is to getpixels on the bounds and then set the other pixels to alpha

#

This will give the edge clipped size in pixels for each edge (x=left, y=bottom, z=right, w=top).

Not what we want then

#

well except for the last thing I just said

summer tapir
#

@wraith bear hey fireball, I played your enemizer mod but had to abort the seed since I got locked out of quite a few checks, i.e the entire Soul Sanctum, Nosk Check, Enraged Guardian Check, White Lady. I know you can use the clip thing but I wanted to let you know that it seems that arenas are like a 50/50 if you can progress or not

worn eagle
#

should I use like SAT to check whether a pixel is enclosed by the mesh

dark wigeon
#

you could probably go with bresenham's line algo that grenade posted earlier

#

then fill the inside by rows since triangles are always convex

jolly oriole
#

that's a nice image i drew

copper nacelle
#

how do you use bresenham to get pixels within a mesh

dark wigeon
#

just getting the rasterized outline of a vector triangle

copper nacelle
#

Oh

dark wigeon
#

so I guess try this:

  1. crop image to rectangle bounds with getpixel
  2. use the algo to get "pixels" from the three edges of each triangle
  3. loop over each row of the image and set all pixels of image from step1 to transparent that are outside the shape of the image from step 2
jolly oriole
#

Error: System.StackOverflowException nice

vocal spire
#

Fun

jolly oriole
#

recursive flood fill is trash

#

yo italy, which sprite did you inspect with the dozen UVs?

worn eagle
copper nacelle
#

just use a queue bro

jolly oriole
#

i think this is a good start, stun_impact_effect0000

worn eagle
jolly oriole
#

hm

#

may be the thing 56 linked

#

unrelieable

worn eagle
#

it seems to be getting a shape at least

jolly oriole
#

i think i got it working

#

mainly, the coordinates are not vertically inverted

#

and the test also suggests it working

worn eagle
#

:frogchamp:

jolly oriole
worn eagle
#

thanks for the help man

jolly oriole
#

np

dark wigeon
runic wind
#

how would I make a (specific) shiny impossible to interact with? Is there a relevant hook I'm missing?

nimble lake
steady comet
#

Question - are GG_Lurker and GG_Pipeway missing from the pinned scene dumps?

jolly oriole
#

Should be in gg-scenes dump

#

But idk, never looked at those

steady comet
jolly oriole
#

Well, then ig they arent

glossy pilot
#

there is no HealthManager in 1221, how should I get the HP of the enemy

copper nacelle
#

health_manager/health_manager_enemy fsm

glossy pilot
#

thanks, it works
FSMUtility.LocateFSM(gameObject, "health_manager_enemy").FsmVariables.GetFsmInt("HP").Value

vocal spire
steady comet
#

Oh that would be shroompog if you can!

tidal mantle
#

I've got a situation where I run TakeReserveMP and TakeMP on their own, and I'm running into an issue where the soul vessels ('s ui) won't respond and either won't drain into the soul orb or won't drain at all. What do I need to send to the FSM to get them to work; "MP DRAIN" doesn't seem to be working?

light zodiac
#

Search for takeMp in hero controller and see what event it sends

mellow shore
#

hey, has anyone here used firealpaca or medibang paint to draw a customknight skin? i'm finding krita rather frustrating

#

...this is also somewhat a sprite packer question, as my main problem with working with firealpaca last time was that i was doing it on the atlas sheet and a lot of it didn't line up right in the end when animated

#

but i can't figure out how spritepacker works even after watching tutorials

jolly jungle
#

pretty sure firealpaca can be used

#

I don't actually know what it is beyond an art software, but I heard its name mentioned here and then

#

there

mellow shore
#

yes, i've used it to create a skin before, but because the sprites are all spread out across the sheet mostly independent of what animation they belong to, unless you can somehow manually figure out which sprite on which part of the sheet matches which frame in which animation, manually line them all up and check them... paste each sprite individually into a separate sheet to see if it's smooth, etc...

#

the animation ends up looking very choppy

jolly oriole
#

the worst part about godump/spritepacker is the fact that it all works in your saves folder, which clogs up your cloud save space

mellow shore
#

oh, i don't... really care that much about that

#

i just can't figure out how to get it to work

vocal spire
mellow shore
#

...i would fucking love that actually

#

i wanted to make a sherma skin but the hat is too wide

vocal spire
#

well I know what I’m doing after school today

light zodiac
#

Sleep?

vocal spire
#

Yes and

#

I should probably figure out how to render stuff in the CustomKnight + editor first

jolly jungle
primal latch
vocal spire
#

Uhh I think I’ll take Mulhima’s answer as mine

primal latch
#

lol

#

Since @vocal spire isn't going to do it, how would I go about changing the bestiary sprites?

vocal spire
#

Changing every sprite from the journal list

#

(Instance)JournalList.list

primal latch
#

ok

floral blade
#

Is there a mod that allows someone to record their run and then play it back in engine like a "ghost" ? That someone else could race against ?

#

I mean I was thinking that technically multiplayer mods do the same thing but just real time right? So this might be feasible to do too, just confirming in case there's already such a mod

ornate rivet
#
  1. record how long it took you to beat the game
  2. replay the game
  3. if it took you longer, you lose
stone elm
#

The answer is no, though.

floral blade
floral blade
stone elm
#

I don't think it's as useful as you'd suggest unless you're purely ever running a singular route without variation. If you get too far behind your ghost, you'll lose it entirely and defeat the purpose. (Same for ahead) If you have to route differently, the same deal happens.

#

Maybe I'm just ignorant, I don't SR

deep wave
#

for speedrunning you know where you lose time intuitively, and if you don't you have splits that tell you what areas you lost time

floral blade
#

I mean ideally you'd be practicing a certain route , and doing it in engine with segments marked would mean you could pause /resume ghost from a certain section too right ?

deep wave
#

i like the idea, but it's just honestly not very useful with how reactive this game is to rng and general responsiveness

floral blade
deep wave
#

if you're truly a beginner then you'll either be so far ahead or so far behind of a given comparison that you wouldn't be able to see the ghost

#

there livesplit is just so much more helpful imo

jolly oriole
#

ghost's ghost would probably just be annoying for people running more consistent, as there is then just more moving stuff on the screen

deep wave
#

also; when you're starting out you don't want to reinforce bad habits or try to perfectly imitate godlike movement, you need to get that sense of intuitively knowing what you're doing without following something as a guide, unless you really dedicate yourself to optimising single segments as you start out. sr is not just "do these actions in a given order", you also have to react to being ahead/behind, making mistakes, etc

copper nacelle
#

follow the pest ghost easy 33

jolly jungle
#

Are you talking about making a kind of phantom speedrunner to follow

#

Or did I entirely misunderstand

jolly oriole
#

no, it's about adding ponys to the game

floral blade
#

I am now thinking it might not be such a brilliant idea after all.

My intention was to illustrate skips / routes with ability to slow replay what the other person does and then time against them individual section level.

copper nacelle
#

If you had like a per room option you could avoid the desync

jolly jungle
copper nacelle
#

why are you pingphobic

#

that's just dnd with extra steps

jolly oriole
#

pings bad, redesign bad, upvotes to the left <-

stone elm
#

Here I am wondering what pings have to do with dungeons and dragons until I understood

copper nacelle
#

true

deep wave
floral blade
#

That makes sense, do people also record themselves to try to see why a certain skip didn't work ?

#

for example I had to realise by failing a million times that I kept fireballing way too early, for the skip to work

#

Or is that intuitive ?

#

either way I guess this mod wouldn't be much use based on earlier info you provided.

stone elm
#

Ofc people will record themselves and review to help themselves improve. This is getting into #speedrunning territory though

copper nacelle
#

eh I think it could be neat

#

Might give it a shot

floral blade
#

Entirely unrelated question

is it at all possible to know which enemy has just damaged the player ?

#

^ I know that there's a hook to know which collider player just slashed, but what about the other way around ? Total noob question ig.

copper nacelle
#

On.HeroController.TakeDamage

floral blade
#

I see this in the api docs "public int TakeDamage( int damage )"

#

Is there an overload that would give me the collider / Go ?

copper nacelle
#

No I don't believe the modhooks give you them

#

you just on hook

floral blade
#

Okay I'll check this once

deep wave
copper nacelle
#

ngl it would be pretty useless if it didn't

deep wave
#

they call me it

floral blade
#

Wouldn't that be the whole point lol

jolly oriole
#

no, it's just so you can reflect on the dumb shit you did

floral blade
#

A fun idea with this could be , you can pogo on your ghost.

So you do one pass of a level, play the recording and use the ghost to pogo and finish the level.

Might require making puzzle levels with this mechanic in mind but could be cool.

Maybe even timed levers that need to be hit by your ghost at the right time to let you pass through

#

( I don't think this is an original idea I think an indie game did something similar but I don't recall the name)

#

So yes, you could reflect on the dumb shit you did lol

#

You could even pogo on it ;)

jolly oriole
#

italy, my algo isn't perfect

#

i hate unity

#

flood filling the left triangles resulted in the right filled 'circle'

copper nacelle
#

that's a good circle

#

how even

#

the circle is closed

jolly oriole
#

i flood fill every triangle on its own

copper nacelle
#

and the triangles look like they are ig?

jolly oriole
#

possibly one flooded outside of it?

#

oh wait no

#

it fills everything outside if i slect an edge as the middle

#

changed that and still same result

#

sadge

#

oh

#

this triangle can't get correctly filled and just fills everything apparently

#

wait, let me zoom a bit

#

the 'middle', highlighted in red

#

gaming

safe hamlet
#

what are you doing

jolly oriole
#

drawing circles

safe hamlet
#

i couldn't tell

jolly oriole
safe hamlet
#

oh i see

jolly oriole
#

tldr: extract sprites out of a texture using UVs

#

and the black/white thing i made is a boolmap to indicate which pixels are important to the sprite

safe hamlet
#

oh i was doing this at some point, tho i just ended up just cutting out rectangles and didn't do it properly

jolly oriole
#

nice

#

should be everything needed, potentially also works faster than the old version

jolly oriole
#

of course i get an NRE now

copper nacelle
#

ping for block

#

pings

#

feelsbadman

jolly oriole
#

brb gonna block myself

#

who knew excessevily logging could lag the game

#

it's only 4.8 million lines

#

yea, don't even ask what i did

#

i wouldn't tell you anyway

copper nacelle
#

Log()

jolly oriole
#

yea, i logged to both apilogger and debug log basically after every instruction to then realise it was because i missed to delete some +minX and +minY

jolly oriole
mellow shore
#

its super oversaturated

#

for context, sprite looks like this

buoyant obsidian
#

My guess is post-processing is adding saturation

#

which is only apparent now because you're using such vibrant colors

primal latch
#

Yes

jolly jungle
primal latch
#

I think it is

jolly oriole
#

Testing post processing with a completely red square yea whatever skin:

  • dirtmouth makes it slightly less saturated (95%)
  • same for the mantis bench you showed
#

example

light zodiac
#

What's the color you originally put?

vagrant ginkgo
#

Wooo red.

jolly oriole
#

255 0 0

#

out is 224, 9, 9

floral blade
#

is there an existing tool based on js / html that renders sprite animations using the knight.png ?
need something of the sort for skin remixer

jolly oriole
#

spritepacker renders animations

#

oh wait, based on js / html, then no afaik

floral blade
#

yeah 😦

#

i'll just have to write the bit myself ig , will look at spritepacker for the basics tho

floral blade
#

last 3 rows left zote

primal latch
#

What are you doing? They look really wierd

floral blade
#

i'm tagging all the eyes on knight.png

#

with quads, then the plan is to render a single eye.png into all the quads

primal latch
#

Ok

floral blade
#

so knight.png has 941 eyes (not including void ones)

fair rampart
#

hi I have a question for boss modding

#

I have downloaded the Inferno King Grimm project but I don't know where the code for Inferno King Grimm replaces NKG boss fight

#

fro example I know that this is replacing a boss but how can I say he is replacing NightmareKing Grimm?

jolly oriole
fair rampart
#

wait , I'll start with Ultimatum radiance, the code is a lot easier

vocal spire
floral blade
#

noeyes agoneyes

#

zote head eyes

floral blade
#

they look pretty weird in game, because they're not animated perfectly so they move around (which kind of works for spiral eyes) but a bit of cleanup of the eye's coordinates should fix this.

To do that i'd need to implement an animation viewer in JS. with the ability to adjust the quad's vertices or add the function in sprite packer to render the quads and move them around, is sprite packer even going to launch on mac? i think it uses forms 😐

#

but overall the effect is pretty convincing. vessel skin maker might yet happen geoman

jolly oriole
#

found more errors in my sprite dump thing

#

only a 'few' sprites

jolly jungle
#

@floral blade that's actually really cool

#

I love all your automation things

merry lotus
# floral blade they look pretty weird in game, because they're not animated perfectly so they m...
  • This looks amazing! Even if you aren't able to get a "perfect" version down, if end up releasing a program that automates the basics, and saves the results in editable layers still, then it'll make skin-making drastically more accessable.

  • In the spiral eyes image here, the two nights directly above the black circle ahead to not have their right eye marked.

  • At one point, I thought I saw someone mention that copies of the atlas files exist that indicate what each sprite is used for; you might be able to use that to now easily fix the misaligned ones, as you can just see what animation look weird the game.

floral blade
#

yeah i need to go back and recheck once if all the eyes are covered might have missed more of them.

i was hoping if i was able to get the animation thing working then i could mark left eye , right eye separately at that point and deal with any misses.

jolly oriole
runic wind
#

where can I find the code dealing with picking items up off the ground? eg charms, some abilities

jolly oriole
#

that is handled by playmaker fsms

runic wind
#

so every pickup has an fsm?

jolly oriole
#

should possibly all be called something with shiny

#

yes

runic wind
#

ok, thanks

runic wind
#

follow up, how would I get that fsm object? Not sure how to get the scene object for .locateMyFsm

#

(i'm using a scenechanged hook)

copper nacelle
#

I'd probably loop over FSMs on scene change and just check the name

#

Can't think of a more efficient way to generalize w/out having a list of scenes w/ shinies

#

I might just be stupid though

jolly oriole
#

2 options:

  • hook UnityEngine.SceneManagement.SceneManager.activeSceneChanged or UnityEngine.SceneManagement.SceneManager.sceneLoaded (i use activeSceneChanged) then find your gameobject using either GameObject.Find (or with SFCore as a dependency scene.Find also works). Then you have your GO to .LocateMyFsm on
  • hook On.PlayMakerFsm.Awake or On.PlayMakerFsm.Start, and if the name of the gameobject (or some fsm variables) is your wanted one, then execute more code
copper nacelle
#

ModHooks.Instance.OnColliderCreate might also work

#

It's on playmakerunity2dproxy

runic wind
#

oh I actually only care about a few specific scenes, so I can just get the relevant fsms when the game is first loading

copper nacelle
#

that's not going to keep your changes applied

#

unless the only thing you wanted was to read them

runic wind
#

I only need to change them in a few situations, which I'll still use a sceneloaded hook for

jolly oriole
#

getting changes applied is a challenge in itself with some specific fsms 🥴

runic wind
#

is there a general rule for which ones are problematic?

jolly oriole
#

no

#

on the spot i remember the soul statues doing that

#

because of a fsmtemplate

copper nacelle
#

Soul tyrant too I believe

runic wind
#

you said loop over fsms, is there a list of all the fsms or something?

copper nacelle
#

UnityEngine.Object.FindObjectsOfType<PlayMakerFSM>()

runic wind
#

will that be only active FSMs?

jolly oriole
#

yes

runic wind
#

great, thank you both

granite kestrel
#

Help

#

I need someone to help me with setting up my Virtual Studio

#

I don't know what is going wrong with my steps

light zodiac
#

What's the problemm

granite kestrel
#

I follow the guide on https://radiance.host

#

I add the reference of the project 'Hell Mod' just like what it says

#

Though I don't know if I'm doing it correctly or not

#

I click on Dependencies node and then add UnityEngine.dll and Assembly-CSharp.dll

light zodiac
#

If you've downloaded the example mod, delete all the references it currently has and re-add them

granite kestrel
#

Ok

#

There were still build errors

light zodiac
#

What build errors

granite kestrel
#

Nvm I solved them

#

Does anyone knows what PlayerData.instance.MPReserveMax means?

primal latch
light zodiac
#

the max amount of soul you can store in the extra soul vessels (33 if you have 1, 66 if 2 and 99 if you have all 3 extra soul vessels)

granite kestrel
#

ok

fair rampart
#

hi

#

I have an error in the Pale Prince project

#

probably there is something wrong with MonoMod.Utils.dll or is something else?

#

_blackShot is GameObject class

primal latch
#

Is .Child a function?

light zodiac
#

it is in Vasi

primal latch
#

Ok. Are you missing the reference to Vado?

fair rampart
#

I have downloaded a zip for vasi from :

primal latch
#

@fair rampart download the latest version from the mod installer

light zodiac
#

sometimes you just gotto retype the line and it works somehow

fair rampart
#

I have installed Vasi with the modInstaller but I have the same issue

worn eagle
#

blackShot.transform.Find("Beam").GetComponent<tk2dSprite>().color

jolly oriole
#

transform.Find can only find active gameobjects

fair rampart
#

if this can help

steady comet
vocal spire
#

no

#

im working on pale court instead

copper nacelle
#

checkout an older commit

floral blade
#

refactored a bit of the code, trying out a couple of skins other than default one. skins with solid color faces are really good to erase eyes out lol

#

i may have screwed up a bit

#

but i do get to make cute cross eye pure vessel ?

floral blade
#

smolnet needs a bit more cleanup to remove all the eyes from the base sprite before we can just add our own

runic wind
#

As far as I can tell, the SceneChanged hook isn't working for me. I tested EnemyEnabled as a control and it works fine (using Log debugging). Anyone know why this is happening?

copper nacelle
#

Don't use it

#

Use UnityEngine.SceneManagement.SceneManager.activeSceneChanged

hybrid hamlet
#

WOAH THIS LOOKS REALLY GOOD!!!

floral blade
#

for some reason i can't get godump to dump knight.png even though i got sprint.png

floral blade
#

i was trying to make go dump work because i need the spriteInfo.json that would tell me how to animate the png

#

i got knight.png now, but no sign of the json file

merry lotus
#

I can send it to you if you want

#

Well, when I get home, in like 40 minutes

#

You use the Krita version, right?

floral blade
#

Thanks, I'm going to try to make it work till then!

#

I'm not sure what versions exist tbh

#

There should be only one json right ?

#

Or did you mean knight.png ?

merry lotus
#

Afaik, the json is generated by the modified Krita version

#

The other version doesn't generate it

floral blade
#

The GitHub readme said it would generate one

worn eagle
#

the krita version only generates additional AnimInfo.jsons in each animation folder

floral blade
#

Would the original json have the information required to animate the sprites ?

#

Or is it just positional information to recreate the Atlas ?

floral blade
#

what does it mean when a sprite has sflipped = true ?

#

i think sflipped = true are the ones i'm not able to make a bounding box for

#

seems to work now, but what is sxr & syr ?

#

is it like padding when trying to align images for animation ?

floral blade
hardy stump
#

How might i be able to re-enable hitting enemies if I have 0 nail damage? I want collision feedback to exist

light zodiac
#

With 0 nail damage you can still hit enemies and get feedback afaik

runic wind
#

what's the best way to completely stop/disable an fsm? should I just delete all events from a state and make finished loop to itself?

jolly jungle
jolly jungle
primal latch
#

Is the project on github?

floral blade
floral blade
primal latch
floral blade
primal latch
#

Thanks

floral blade
#

is it normal for "026.Hit Crack Appear" to include crystal shards ?

#

for some reason i have these

cedar hemlock
#

dont think so

jolly oriole
#

i mean, the knight zip in discussion also includes those

cedar hemlock
#

yeah but they are only used for Cdash

floral blade
cedar hemlock
#

where

#

which folder i mean

floral blade
cedar hemlock
#

huh i dont even have that folder

#

must've not dumped them

vocal spire
floral blade
#

that makes sense i guess

#

i still don't really understand how to use sxr & syr from spriteInfo.json , and most of my animations where the sprite size changes are still wonky. i think they're related.

#

godump readme says this very suspicious line : v1.3 Add setting SpriteSizeFix.Cutted empty space of a sprite in an atlas by tk2d tool is now added back.No More Worry About Where The Fun is The Anchor!

copper nacelle
#

what's suspicious about it

floral blade
#

yes yes, fixed it

floral blade
#

for some reason, aligning each sprite to bottom right corner fixes things sethsalute

mellow shore
#

dandy what is this

#

i just spent like 15 hours making a video how how to make a knight using spritepacker and stuff

jolly oriole
#

i mean, what dandy makes looks more like picrew for skins, the base parts still have to be made manually

floral blade
#

and it's quite a long ways off at the moment

mellow shore
#

ahhh

#

it looks neat, at least!

vocal spire
#

I’ve come to the realization that I need to finish CustomKnight + soon or I will get too many ideas

floral blade
#

turns out certain sprites are still not playing nice with the animation feelsgrubman

floral blade
pearl sentinel
#

can someone make a mod where grubfather doesnt eat the grubs? i wanna get all of them but i also wanna keep my free serotonin when i walk into the room (yes i know its a metamorphosis and they dont die but i like walking into the room and seeing them)

mellow shore
#

does anyone know why spritepacker might be doing this

#

this is the idle animation, it was working fine previously. haven't touched it. all of the other animations are fine.

#

but its doing this weird thing where it's cutting off the edge of my sprites and duplicating it on the left

#

it looks fine in the spritepacker preview

dark wigeon
steel badger
runic wind
pearl sentinel
#

just tested it and it works!

hardy stump
# light zodiac With 0 nail damage you can still hit enemies and get feedback afaik

0 nail damage doesn't hit levers, destroyable objects and background, or give soul from enemies. one of the main things i want to re-enable are collisions with shields. Hitting the shield of Great Shield Zombie should cause it to counter attack, but with 0 nail damage, this doesn't happen. I want the interactions of 1 nail damage to exist for 0 nail damage, and it's strange this is a "feature" in the first place.

#

i guess a question i can ask is what happens when nail damage is -1?

hardy stump
#

i may end up setting nail damage to 1 and then giving the enemies 1 hp back after the hit. Functionally, it may allow me to do a few other things I was hoping to do :)

floral blade
floral blade
fair rampart
fair rampart
#

pyramid

cedar hemlock
#

ok

fair rampart
#

hi

#

If I want to get a gameObject (for example "Radiant Spike") where can I find all object names? For example the nail of hornet

cedar hemlock
#

its on the installer

vocal spire
#

This is modding-development

cedar hemlock
#

hollow point

cedar hemlock
fair rampart
#

I have a question about DamegeHero on different gameObjects

#

this will double every damage (exept the needle when is thrown by hornet).

#

But for the nail needle this is not working(commented code). I think that this is not the correct way to change damageDealt of the nail

vocal spire
fair rampart
#

Thanks I'll try later

#

the strange thing is that if i decomment the code , hornet does always 1 damage , even contact damage

copper nacelle
#

it's probably throwing

#

contact is never assigned to and thus null

#

and the needle has a decent change of being null as i wouldn't expect it to be a root object

fair rampart
#

I noticed that _contact_dmg is working only if it is alone in the code, the foreach looks works fine, but if I try to activate also the needle the foreach loop doesn't work any more

#

while _needle_dmg never works

vocal spire
#

That’s probably because of what 56 said

fair rampart
#

ah so being root it replaces the previous one

primal latch
dark wigeon
#

but things like loop points and framerates seem to be missing

floral blade
floral blade
# dark wigeon

This comparison really helps ! I think it's like a pixel or so of movement, I remember seeing a -1 in spritepacker somewhere I'll try seeing if a certain case needs that shift

dark wigeon
#

loop point is when it doesn't loop back to the first frame like in this animation (170.Collect Acid)

floral blade
#

Is this in the individual animation's json ?

dark wigeon
#

I don't know, I'm not using godump

floral blade
#

I'll check once brb

dark wigeon
#

seems to be called loopStart or something

floral blade
#

Yep it's there

#

{"animInfo":{"numFrames":17,"fps":12.0,"loopStart":8,"collectionName":"Knight"}}

merry lotus
#

Question:
In Visual Studio, I'm getting an error whenever I try to open a form from Mod Installer that says that I'm missing system.windows.forms.form.centertoparent. As far as I can tell though, that's part of .NET 5.0, which I do have already, according to the installer.

Is there a way to either update that, or somehow get the missing component?

stone elm
#

The winforms in .NET 5 is not the same as the winforms for .NET framework, which I believe MI is based on.

#

I'm about 60% sure since I haven't attempted to do anything with MI from source. Make sure you have the appropriate .net framework version installed as well.

deep wave
#

designer brokey for 3.5 framework i believe, just press f7 to go direct to code

merry lotus
deep wave
#

the .csproj contains the version of .net

stone elm
#

Check the project's .net ver...

#

Yes. 🙂

#

(Right click project in VS -> properties, fwiw)

floral blade
# dark wigeon

I fixed the position thingy, added loopStart and fps , but now the animations seem too fast to me lol they look similar to this though.

( fps is target fps it might run slower depending on the hardware and browser)

#

if it's all possible could you check once if it looks about right ?

dark wigeon
#

looks fine to me

#

depending on the hardware and browser
speaking of browsers, I don't think the editing/generating part works in firefox

#
ReferenceError: OffscreenCanvas is not defined                         21 offscreenworker.js:32:20
    generateSkin https://prashantmohta.github.io/HollowKnight.SkinRemixer/js/offscreenworker.js:32
    onmessage https://prashantmohta.github.io/HollowKnight.SkinRemixer/js/offscreenworker.js:19
floral blade
dark wigeon
#

ok it's an experimental feature and not enable by default

floral blade
#

i mean it should be easy to check for it and if not available do everything on main thread

dark wigeon
#

not even flags work

#

they are literally missing 2d ctx

#

amazing

floral blade
#

yeah, i think i'm going to go ahead and add support for doing things on main thread

fair rampart
#

I don't know if I nedd to get reference to hornet needle when is thrown if I have to use needleObj=GameObject.Find("Someting"); or another method

runic wind
#

Hornet’s fsm probably has a createObject or something in one of her states, should give you a bit of info

fair rampart
#

I'm looking in GG_Hornet_2.txt and for example in StateName: Throw I find ActivateGameObject (GameObject) = Needle

floral blade
#

@dark wigeon it should work on firefox (as well as any browser that supports canvas but not offscreenCanvas) as well now.

dark wigeon
#

yes it's working now in ff

#

I can't believe Firefox for Android only lets you pick from like 8 colors what a joke

floral blade
#

it must have an option to bring up a slider ?

arctic dragon
#

not on android it doesn’t 💔

floral blade
#

Even chrome by default gives only 8 but allows one to add any color

#

i could add a box for entering the hex-code for such a case, but how likely is someone to use this on a phone ? considering that to add any assets of your own you'd need the files on your phone already?

copper nacelle
#

Nah it's actually only 8 lmao

#

I wouldn't bother though

jolly oriole
#

doesn't discord delete the images from deleted messages?

#

but on the topic, firefox windows pc lets you choose any rgb color

copper nacelle
#

If anyone saw it it doesn't really matter

#

It's in the cache

#

You can straight up take it out with like very little effort

jolly oriole
#

ctrl+f5 didn't work, but other topic

jolly oriole
floral blade
#

i think ff just always uses native picker

#

ff on mac also has an ugly but different picker

#

i was going to use emojis as the play pause icons then i remembered windows didn't support nice looking emojis last time i was using it. is that still the same ?

merry lotus
#

Win10 support emoji

#

Older Windows versions don't

deep wave
#

it supports emoji but they do look like this unless you add twimoji ig

floral blade
#

i guess that's still better than using angle braces

merry lotus
#

This is specifically what those ones look like:

floral blade
#

i'll use emojis for now then, if it becomes an issue i'll swap them out for images

copper nacelle
#

press the font awesome button

#

consistent across devices and very easy to use generally

floral blade
#

true, would also impact load speed. which i anyway need to improve.

#

loading multiple knight.pngs at page load is not good for me , i will probably end up requiring that a base sprite be provided by the user even if they intend to use default knight.

#

and give them a "part erase" option that allows them to create a blank version of their base sprite

dark wigeon
# floral blade it must have an option to bring up a slider ?
#

don't worry about implementing something to manually pick, I'm just ranting

runic wind
#

is there a guide of any kind on UI stuff? or should I just copy paste code from rando recent items or something and try to make it work

light zodiac
primal latch
#

Is there a way to check if another mod is loaded?

deep wave
#

i'd on instinct say "see how serecore does it" but iirc that just checks whether the dll is in the folder

copper nacelle
#

Type.GetType

fair rampart
jolly oriole
#

doesn't work with some twp packs

vocal spire
#

Also doesn’t work for Mac iirc

merry lotus
copper nacelle
#

why would you check for files when you can check loaded assemblies or types

#

it's literally more effort

cedar hemlock
#

wa?

#

gone

nimble lake
vocal spire
#

I think the type stuff is better

runic wind
#

how do I store/retrieve information in the currently loaded save file?

runic wind
#

oh cool, that's easy

#

thanks

runic wind
#

I need to display stuff on screen, should I just steal code from rando mod or something? docs are still todo it seems

copper nacelle
#

What exactly do you need to display

runic wind
#

ideally two smallish images

#

could make do with text, at least for now

#

(two at once from a list of 20 or so)

runic wind
#

soo.... are there resources or even simple example/commented code or am I on my own?

primal latch
#

Unity documentation?

#

Or just look at debug

steady comet
runic wind
#

code from rando does way more than I need it to and has like a million classes that all reference each other zote

#

(and also uses serecore which I'd like to avoid)

safe hamlet
#

yeah you don’t need them all, just find whatever you need

#

i am sure you know how to read code

runic wind
#

reading is different than comprehending

#

but I think I'm getting there

steady comet
#

(It says it uses RandomizerMod.Randomization but it doesn't for the bit you care about)

runic wind
#

ok I think the main thing I don't know is how to get a sprite object with an image

#

rando uses serecore stuff

steady comet
#

You could look at what serecore does if you want?

#

For some you might just be able to get them from where the inventory gets them from (instead of embedded resource in the dll) but IDK

runic wind
#

I'm super out of my depth with serecore

#

whatever, I'll make it work

#

lmfao why is this here

steady comet
#

Because sometimes the rando mod needs to show you a geo icon

cedar hemlock
#

in shops you mean

primal latch
#

Why does debug mod throw a invalid scene error when opening the enemy up menu during the radiance fight?

primal latch
#

using the On.JournalList.BuildEnemyList and csharp public static void PacthJournalSprites(On.JournalList.orig_BuildEnemyList orig, JournalList self) { for(int i = 0; i < self.list.Length; i++) { Fyremoth.Instance.Log(self.list[i].GetComponent<JournalEntryStats>().convoName); if(Dictionaries.JournalNumbers.ContainsKey(self.list[i].GetComponent<JournalEntryStats>().convoName)) { self.list[i].GetComponent<JournalEntryStats>().sprite = journalBundle.LoadAsset<Sprite>(Dictionaries.JournalNumbers[self.list[i].GetComponent<JournalEntryStats>().convoName]); } } orig(self); } I'm trying to replace journal sprites, but they don't show up

primal latch
#

well, it's getting wierder and wierder. When logging all the assets in the bundle it says the sprites are in it, but when checking if it contains the sprites it returns false

primal latch
#

anyone?

jolly oriole
#

you have the sprites in the bundle as numbers? palehmm

primal latch
#

no

#

they are all spliced from a texture

#
public static void PacthJournalSprites(On.JournalList.orig_BuildEnemyList orig, JournalList self)
        {
            for(int i = 0; i < self.list.Length; i++)
            {
                Fyremoth.Instance.Log(self.list[i].GetComponent<JournalEntryStats>().convoName);
                if(Dictionaries.JournalEntries.ContainsKey(self.list[i].GetComponent<JournalEntryStats>().convoName))
                {
                    Fyremoth.Instance.Log(journalBundle.Contains(Dictionaries.JournalEntries[self.list[i].GetComponent<JournalEntryStats>().convoName]));
                    self.list[i].GetComponent<JournalEntryStats>().sprite = journalBundle.LoadAsset<Sprite>(Dictionaries.JournalEntries[self.list[i].GetComponent<JournalEntryStats>().convoName]);
                }
            }
            orig(self);
        }```
#

this is it now

jolly oriole
primal latch
jolly oriole
#

idk, never worked with multiple sprites per texture

primal latch
#

ok

primal latch
#

I got it. I just use a SpriteAtlas object now. I didn't know that those existed

light zodiac
#
public static List<Vector3> PlayerPos;
public void Update()
{
  Vector3 position = HeroController.instance.transform.position;
  PlayerPos.Add(position);
}

i dont know why but when it tries to add to the list it gives a NullReferenceException

rough pulsar
#

because you didn't initialize the list

#
public static List<Vector3> PlayerPos = new List<Vector3>();
#

@light zodiac

light zodiac
#

i feel stupid now

rough pulsar
#

also make sure to use System.Collections.Generic;

#

everyone forgets grublove

ornate rivet
#

your mom didn't forget

rough pulsar
#

Does changing focusMP_amount change the amount you need to focus immediately?

jolly oriole
#

please don't do that in update

#

use fixedupdate instead

primal latch
primal latch
rough pulsar
#

huh

#

before that it didn't really do much

#

also do mods work in public beta i wonder

#

88% sure it won't

#

ok

#

it doesn't

copper nacelle