#archived-modding-development
1 messages ยท Page 398 of 1
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour {
void Update ()
{
// Moving :
transform.Translate(Input.GetAxis("Horizontal")* 5f * Time.deltaTime , 0f, 0f);
// Flip :
Vector3 characterScale = transform.localScale;
if (Input.GetAxis("Horizontal") < 0)
{
characterScale.x = -0.7000511f;
}
if(Input.GetAxis("Horizontal") > 0)
{
characterScale.x = 0.7000511f;
}
transform.localScale = characterScale;
}
}
no ?
what do you mean by ''wall''
like vertical surface
built-in oob method 
can he walk through this
I am going to make an hk fangame
wait there is more ?
ya me and a couple of people are making a fangame/almost its own thing
1 leaves
i thought it was only you
also I could have fucking sworn transform.Translate ignores collisions
no the artist people did
i guessed
i dont art i program
untrue you are doing both right now
just a tip though
instead of doing Input.GetAxis over and over
do
float horInput = Input.GetAxis("Horizontal");
at the top and use horInput instead
doing multiple GetAxis per frame is just a waste
also
why?
ya but if you ever want to change the scale of the character to something else you'll need to go back and change this line of code
so instead
have a bool to track the looking direction
call it
isLookingRight
wait im not done
ok
make another method called Flip
sry for cutting your speech master
_>
so
patience
theres a function for sprites
loading script
this is true too sprite renderers have a flip
and its going to get checked regardless of how you program it
so you might aswell use that 
SpriteRenderer sr = GetComponent<SpriteRenderer>(); sr.flipX = true;
๐
with baseInputSpeed being what you get from input.getaxis
you can just do
sr.flipX = currentSpeed.X < 0;
although it depends on when you want turn around
and if you want a turn around animation
i do
well then turn around on the first frame of that animation
if you're doing something like running and you're also holding back
you don't want to instantly turn around, you'd only want to turn around once you return to idle
ok
the guy just learned to move the character left and right give him a break
you wanna learn about delegates 
here we go
sounds horrible
๐
you wont need to put in
0.70051
or whatever
it will adapt to whaever you set it
nice
or you could just flip the renderer
does that even work anyway
aren't vectors immutable
gonna say ya because it flips Swathe
also no vectors are not immutable
wut
no
vector3s 100% can be changed after creation
wtf
ya position, rotation and scale need a new vector
but just regular vector calculations
you can do whatever
why?
no idea
but that's what it is
something something .position is a property and vector3s are structs
also can't you just do
if(!lockFlip)
sr.flipX = isLookingRight = !isLookingRight;
return !lockFlip;
ya but it's probably better to flip some sort of "visual component" gameobject as opposed to just the sprite renderer
since you're probably going to have some gameobjects to represent some transforms
and unless you want to reference the looking direction every time
eeeeeh
as opposed to no comparison
because flipping the visual component flips the children's scale
why do you have children
.... because certain things needs to be in certain places relative to the sprite >_>
_>
like what
so what y'all are saying is I shouldn't be using this to rotate the knight
art
like the position for the Focus particles
you know what ill just stick to my own code
don't think that really needs to be child
hk also does effects as children of the root
and if you like jump of a wall after tapping cdash
you get all the cdash effects following you
its not the particles themselves that are childed its the follow position
also I'm actually not sure if flipping a rigidbody with a box collider is super safe for the sake of collision
even if the box collider isnt offset in x
I feel like something could fuck up
it probably isn't
especially if it sticks out
and I meant the follow position
as hollow knight has no particles
only sprites
does it
their dust aren't particles, their hit effects aren't
blood isn't
stuff that should be isn't
so I assume they aren't doing anything fancy like fire particles
fairly certain theres no particle systems
maybe theres a few
i think most of the effects are hand drawn
no i mean the actual full sprite frame by frame are in the sprite sheets
particle systems can also do sprite sheet animations
jump dust is in there, dash dust, cdash dust, cdash effects, slash is in there
also 100% the ambient fluff and stuff around the levels are particle systems
like the crystals in the air here
or this
and all of these boys
those might be
like what else would they be
ok but im not talking about random background stuff
im talking about vfx
like focus
slash
jumping
give me a moment to look at the effects
that dust bottom right is also particle systems
Slash is very likely not
again you can have particles use sprite sheets so that's not an immediate no
you can have something spawn 1 paricle
and have it go through the animation
well if its a particle thats a single sprite, at a fixed position playing an animation
its not really a particle system
pretty sure Unity renders particles differently than sprites
some strange back end shit
walking dust is very likely a particle system
the lifeblood shit is likely a particle system
its the same sprite deforming randomly
which to me is pretty obviously a particle system because that's one of the options
Size over Lifetime and separate the axis
add some variation and boom
ok let me repeat myself,
any effects like slash, cdash, jump dust are hand drawn animated sprites, with an animator and sprite renderer
random background stuff might be particles
although blood and lifeblood used to not be
but that might have been changed when they updated
hmm jumping is very clearly a animated sprite
Looks more like a particle system spawning particles at the players feet and then these particles going through a sprite sheet anim.

the main parts of each ya those are sprites
but they contain particle systems to add to the effect
also focus and charging
ya cDash is 100% just sprites
double jump falling wings are particles
like not the main wings the things you leave behind
shhhh
i mean any effect that isn't just sprites being left behind is handdrawn
hey guys sorry to interrupt but what is the command that makes all the modding stuff apper? ':D
@ Modding Staff
?
ohh
yes, that Thanks!
just thrown into a particle system
yeah all particle systems use sprites
in HK
you could but its just less control ๐
even the default unity particle system uses a sprite
and a bit jank if it's just 1 thing you're animating you know
the only way you can avoid sprites is by rendering a coloured quad
you can do plenty of stuff that looks like slash/dash dust without actually drawing all the frames and having it be exactly repeatable
for slash, it'd be perfectly fine to use crescent shape texture
and put it on a quad
and rotate it towards the screen
^
infact thats how almost every fighting game, made since gpu accelerated graphics was invented have done vfx
single texture on a quad, rotated till it looks good
unless its full 3d, inwhich case its particles Kappa
ew fighting games
it's easier to draw something than figure out how to setup a particle system to do it
but they are very important for creating atmosphere
if you look back, ambient particles fucking
everywhere in this game
its also why I assume nothing is shaders
because its probably easier just to draw for them, than program a shader effect
unless its something impossible to do without shaders like colour replacement
i changed the code of movement
public class PlayerController : MonoBehaviour {
private Rigidbody2D rb;
public float speed;
private float moveInput;
void Start()
{
rb = GetComponent<Rigidbody2D>();
}
void FixedUpdate()
{
moveInput = Input.GetAxisRaw("Horizontal");
rb.velocity = new Vector2(moveInput * speed, rb.velocity.y);
}
}
better ?
good then
HK uses a Rigidbody controller anyway so dont worry
and hk is known to be bug free
it doesnt vibrates anymore when i force the wall
you know thats not completely due to the fact it uses a rigidbody controller
because you put it in fixed update
No I think its more he was using transform.translate
and the wall kept pushing him out
but transform.Translate kept tping him in
well the collision happens after everything in fixed update
it goes fixedupdate -> collision -> update -> render
what is the key code of the z button
KeyCode.Z
wow
gottem
amazing
100% null reference
jump rising state
if( notHoldingJump || time > whatever ) change to jump falling ๐ค
remove the ability to control the character while youre in the air so you have to commit your jumps for maximum difficulty 
but why
i see
also obs is better than bandicam and the video doesn't seem to actually play anything ๐ค
Statrmachines I sleep root conditions I awake
If I say things somewhat relating to coding Iโm sure it makes me smart ๐
it does
statemachines I sleep
enum + switch for all my states I wake
statemachines I sleep
I sure get this piece of humor i completely understand it and as so I laugh at the coding joke that I understand
50 different bools I wake
using bools I sleep
putting 32 bools into an int I wake
hilarious
so for jumping just make a bool called
"isJumping"
set it to true when you jump
set it to false when you touch the ground and velocity is less than or equal to zero
have it so when you let go of space and if you're jumping
and I guess also if your velocity.y >0
set velocity.y to 0
10 seconds in
if you want to make things easier for you
have an exposed float called jumpHeight and then do some kinematics math to change that to jumpVelocity
since you care about height, not some arbitrary force value
ill try that then
what if you have variable gravity ๐
then make a property
that does the calculation on get
god forbid we multiply some floats
well that'd be super jank as you'd always jump the same height
late to the party, but shadow dash uses some particle effects
is there a way to add idle animation later ?
yes
good then
contrary to the belief of some people in this server
Unity is a game engine
and a solid one
don't you have to do somejank to get height from initial velocity like
t = u - gt
h = ut -0.5gt^2
yeah for 3d stuff
all the 2d stuff is just hacked in
theres STILL no proper hitboxes
you mean you can't have custom shapes?
its fiiiiiiiine
you can't just be like
I'd like this frame of animation have a pushbox thats this big
I'd like 2 hurtboxes at this position and size
I'd like 1 hitbox at this position and size
you've gotta spawn all those hitboxes at the start
and enable and disable them with the animator and resize them
accidently found infinite jump
do you have a way for the player to know they're on the ground
feetPos
isgrounded
so you have a bool
how is it changed
code wise
because just making a gameobject. putting it at the feet and calling it feetpos will not make the player know they;re grounded
do you want the code ?
also theres no way to access sprites from an atlas, without manually dragging every single sprite 1 by 1 into the inspector
it wasnt the only thing i made
ye show code
which means you're forced to use either animator for everything (even though theres a lot of things you can't physically do with it), or write your own animator and sprite parser
i mean its a mechanical copy of xcom
you know a good game that lacks polish?
bookworm adventures
and not having polish when you're a simple copy of something else kinda makes you just a shit game
๐ต๐ฑ
no elmos letterland is better than bookworm adventures
sure it takes from xCOM but it does enough unique stuff imo
in the same way pokemongo does unique stuff compared to ingress
bookworm is lowkey unironically good and it should be remade and published on steam
epic games store exclusive ๐
polish is effort anyway
why give a shit
99% of your players will never notice and suck ur games dick regardless
unless you make a unplayable mess of a game
thats the difference between Angry Birds and Joe's Lawn Barrage
i mean diablo3 is an incredibly polished game and its shit and no one plays it
path of exile is janky, laggy, crashes constantly
PUBG mobile tho
and is super popular

victory @charred parrot
this time i got some help from the nternet
now i need to study
by
woop woop
basically an indie hit already
also if you want a good resource for beginners
his code is pretty poor but it does the job when starting
so does anybody know if bonfire makes enemies scale to your level?
ohhhh
and here I was avoiding the broken stats
and now everything takes wayyyy more hits lol
@charred parrot I learned most of my knoeldge from there already 
I wonder how that will work with the boss upgrade mods I Installed
And thta was the channel that lead me to hollow knight
physics stuffs
basically, move the colliders a bit, is there a thing in my path?
returns number of things in path
collision ez mode
oh yeah unity collider checks suck
can't even say what you want to collide with
or which hitboxes you want to collide from
do you see a layers variable in that arg
do you see tags in that arg
all you get is direction and distance
contactfilters don't even work right iirc
and it outputs to a RaycastHit2D
ye sounds slow
and RaycastHits have a property which is the collider it interacted with
looks fine to me
that's how it's supposed to look
because reasons
you can disable it in the config file
wait
really? because I cant leave
I defeated the mantis lords and then tried to go into deepnest but it was locked then I came back to this and the walls no work either
cant get out as far as I can tell
yeah im not sure what conflict or bug may have happened
not really sure why it's even a thing
wow I tried to fight them out of curiosity
the "god" part wasnt joking
maybe those boss upgrade mods are a bit difficult for me lol
Two pings 
@jovial vault
@jovial vault
@jovial vault make it three
Such great mods
@charred parrot
speedrunning isnt real

b&
@fair rampart
hello I'm brand new to modding hollow knight! I'd love to install the bonfire mod but I'm on version 1.4.3.2. Can I still use the mod?
its listed in the mod installer for the current version so dont see why not
@late jacinth Oh I didn't know there was a mod installer. I was looking at the google doc. Got it!
same here, before i found out about that
its gold, installs everything you want, and can manual disable each before you load the game
oh my God it's perfect
yo who made this they deserve all of the praise what a blessing
theres a donation link at the bottom of the menu ๐
@ Gradow
but ya, for uis noobs who randomly search google for answers, this should be plasted on top of the google docs page ๐
๐ ikr
yea, why is the google docs sheet there?? I'm a bit confused
you're asking why a place to store all the mods exists?
well it's where the mods are stored
the installer duh
they have to exist somewhere
Make the installer compile from github source
Make the installer compile from source
that is what he said
Source engine that is
wow we're tmodloader now
who
Nexus mods the website
galaxy brain
They had a nexus mod loader and then they killed it
Vortex thatโs it
Yeah vortex it sucks
i get thay have to be stored, but thats the first place random people find when googlng fo rmods.
plus i found out the hard way i was using an outdated youtube tutorial to install mods ๐
so itd be nice if somekind of notice was on the doc page for dummies like me ... for the actual mod installer
Exactly. When I Googled hollow knight mods, it was the first thing that popped up. The installers is literally sent from God and that's should be the first thing someone finds
it is !
56 help why unity didnt save my settings , im sure i pressed save project
Do you have enough space
yes ?
the cod files are fine at least
ok
unity saves scenes and project settings separately I think
idk I just click control+S
and it all ends up fine
your code should though is saved through visual studio
yes it did
also sugar im late bec i was at an awards ceremony, but it looks good!
i got a super heavy medal and trophy i could probably knock someone out with these
whose code is this
@charred parrot debates and academics yeet
also hmmmm that seems just about the right amount of spaghetti
some random tutorial I found
why store the component in a variable when you can get the component every single physics frame
twice
is there a way to prevent my hollow knight crashing a lot when using custom knight, randomizer 2, and enemy health bar mods?
send crash log
alright, gimme a minute i gotta play until it crashes again
it should be here /Library/Application Support/Steam/steamapps/common/Hollow Knight/hollow_knight.app/
i dont see any crash files god damnit
i dont see crash files what the hell do i send to u
i love hollow knight mods but there are so many issues
do you think that i should play without randomizer or custom knight or something
do you want a google doc with the problem report
@jovial vault thanks a lot
np
im just done with mods
I never started
i like them a lot but compared to like minecraft and shit its so complex
its hard to mod hollow knight you see
this is an indie game
built on unity
and fsm
finite state machines
Well, now it is
you just install an installer and install forge
But back then you had to manually edit the jar file
compared to hollow knight where it takes me like 3 hours to get one mod to work
Also, there's an installer for hk too
minecraft was built in java and the developers are active, plus an active community to update the forge
So idk what you're on about
im "on about" that minecraft mods are easier which is true
getting them to work is another thing
you mean mod compatability? minecraft has issues with that too
plus ive never had the issues youve stated so something but be varied
not that i ever experienced in my like 2 plus years of minecraft modding
you modded minecraft?
Also you seem to be missing that minecraft has been around for idk like 10 years
i used mods
difference between mod it and use mods
yeah yeah yeah im just saying its annoying to make mods work on hollow knight
well the base game isnt really mod friendly
and the devs dont really add support for modding
nobody else seems to have so many troubles though
as i do lol
also i wish the devs made some sort of modding support, after like 2 and a half playthroughs it gets kinda stale
Minecraft has had like
a decade to get its shit together
modding in early minecraft was terrible
Wow the one year old installer is less developed than 10 years of forge
Surprising
Terraria modding is where itโs at
Because you get a dll file and then change the values to what the guide tells you to
who
nine parchments
sine on me
looks bad
dont insult my game nine parchments
its great, but its unpopular
i hoped some1 knew the game, the game file type themselves i never was able to identify.
i downloaded programms to tell me what file type it was but none could tell me^^
i might look into it actually
what genre is it?
Hurr can we mod X hard boss by adding obscure difficult thing Y
i still have knights of lurien and moss crusader to do ๐ฆ not sure if nate wanted to do moss charger superboss though
Knightmere im lazy please send me a link to the thing you told me to look at before bothering 56
kk
whomst
C# Basic Syntax - Learn C# in simple and easy steps starting from basic to advanced concepts with examples including Overview, Environment setup, Program Structure, Basic Syntax, Data Types, Type Conversion, Variables, Constants, Operators, Decision Making, Loops, Methods, Nu...
Ill just try to mildly understand that
i am too
HK is plastered everywhere
i got nine parchments because it was 5 dollars and that was money left over from buying a different game and played 9 minutes of it before not playing it
Hey guys where do mod suggestions go
your brain so you can make them
But not only am I hopelessly lazy but I possess none of the skills necessary to mod this game
if i can do it you can do it
X
From my phone?
...
no shut up
dont do any coding at all make sure 56 is wrong
so he can stop self deprecating
impossible
56 stop self deprecating
self-deprecati๐n
Hey don't go stealing my post of lame punner
So in the bonfire mod, how do the extra masks work?
will someone PLEASE mod Dark Souls 1 or 3 to make this an armor/weapon set i can use
Good news, I figured out how to fix the particles
Bad news, it looks shit.
pls help
https://streamable.com/csr3b
there are other particles?
yes, very tiny sparks coming out
they say no
massive brain i know
ngl i'm not sure that's how that works
How'd you try and change it
they're not actually particles, they're trails of particles
actually making the particles bigger would make the trail thiccer too
then make the trail smaller
incredible
yea I'll make them bigger 
what sprites did you use for those grenades?
Also in case anyone has problems like this in the future where the particles dont emit in your desired direction:
Set the startSpeed to 0
Go to the VelocityOverLifeTime module and make the simulated world space set to World (this is different from setting the main module's simulated world space)
Change the velocity over life time in the z to be between -1 and 1 (and change the x and y to what direction you want the particles to go into)
this fixes it because unity magic
is this what you used for the grenade? i cant tell
I didnt make them
mino did
and the inspiration was from the grenade thingy in the silksong trailer
they look like pufferfish
pompilo or whatever
nuclear bomb pufferfish
iSn'T thAT JuST pRojECtIlE SpAM ?? ?
tell me they dont look like tiny spiked atomic bombs
they dont
well what do they look like then
if only I knew how to change the color
pls let this work
it didn't work
lies
nvm I know why
my material is wrong
thanks 56
but I dont want it to be white or black
using multiply made it completely black and using additive made it white
maggotPrime
i've definitely used additive w/ blue particles
I want to make it go between 2 colors with this
trl.colorOverLifetime = new ParticleSystem.MinMaxGradient(Color.red,Color.yellow);
then do it

that works in unity though
What's your material
Default-Particle
that is not your material
I copied the code from your PP and it still doesn't work
rend.material = new Material(Shader.Find("Particles/Additive"))
{
mainTexture = Resources.FindObjectsOfTypeAll<Texture>().FirstOrDefault(x => x.name == "Default-Particle")
};```
ok
it still only makes white particles
wait nvm there might be a few reds in there
ok
color black is transparent or something for particles/additive
i remember because my particles stopped existing
makes sense
looks very meh still
might just move on tbh
just realized the nkg fire is acting weird (also I need to find a good mixture of color for it still)
sigh
u kujw rgR == oy s vpp;
holy shit
my hand was adjusted one key off from the right
i like that fire it is cool
ok then I'll move on
you mean the nkg fire or the particles coming from the grenade
i would not have mind if you just reused the nkg fire and didnt alter it
it works as fire
alright then
or you could have just toned down the pink and make it look red, kind of like tribbo from silksong's teaser
testing this is pain
u mean trying to find that one bug
wtf I gave it orange and it gave me white
new Color(255f, 99f, 71f)
that's orange right?
sigh
SiGHI 
for color?
yea
ye
I always forget
Figure 1 (above): GIF of me impatiently waiting for death
Figure 1 (above): GIF of me impatiently waiting for 56 to stream
oh shit did I make the movement un-oob-able
I just tossed this mofo at 1000m/s at a super thin wall and it stopped at exactly the same distance
We'll see
We'll see
Figure 6 (above): Exhibit of Figure 3 attached with a GIF
(see Figure 3 on page 32)
ttacco play roblox with me
AddForce still does nothing wow amazing why am i not surprised
hmm?
I need it moving my angle, last time i wrote this i literally had to check each 8 directions and applied their own Vector 2d but i cant implement bullet deviation without doing something hacky or spaghetti, so ive read AddForce should be able to handle the degree/angle
no wait omega brain idea
velocity overrides forces
i only use one of them, this is just me saying velocity alone works, but addforce alone doesnt
add force alone doesnt work?
it doesnt
A clip from the TFS parody of DBZ to be used as a reaction to various things
indeed
nice name camm
thanks
"System.Math class use radians" no wonder Cos 0 and Sin 0 returns 1 and 0 for some fucking reason
This just in, 0 in radians is a different value than 0 in degrees
taco
i did use that for reference

but i was expecting
Cos 0 and Sin 0 to return 1,0 . what what fuck im getting confused

NO WAIT i meant to say, Math Cos 0 kept returning -0.66
i was expecting it to be 1
turns out System.Math was accepting radians, Cos Rad of 0 is -0.66
so now i have to convert it to degrees first
but 0 rad is 0 deg
tf

i am literally at lost with myself
i blame lack of sleep
i am literally at lost with myself
ok
Maybe because cos(40) is literally -0.66
taco u ok
Also 56 don't you mean multiple
i, i dont know anymore
What are you trying to do?
Vector2 x and y vals by a given degree
the resulting Cos and Sin i then multiply with the bullet speed
what is going on with me 
well, i was planning on giving the bullet deviations in a 360 degree angle but since add force didnt work i manually tried doing it with Velocity
If you're having trouble with the actual rotation part here's this from another project I have
public Vector2 Rotate(Vector2 origin, float r)
{
r *= (float)Math.PI / 180;
return new Vector2(
(float)((Math.Cos(r) * (X - origin.X)) - (Math.Sin(r) * (Y - origin.Y))),
(float)((Math.Sin(r) * (X - origin.X)) + (Math.Cos(r) * (Y - origin.Y)))) + origin;
}```
You could adapt this to Unity by making it an extension
And replace X and Y with self.x and self.y
Assuming your extension this variable is named self
ok ok thanks, ill try messing around with this
Yeah got it working now, it was all just because i didnt convert the degree to radians first
Kept getting confused on why Cos 20 returned .40 and somehow i got confused and thought 1,0 = 90 degrees 
i even drew this
you swapped x and y
yeah
yeet
skeet
s
s
Oh yeah baby. Show me that V
no
Why? Can't you see the absolute value in such a thing?
you want the V?
okay
Help! Everyone has been teleported away randomly! As the heroic Captain Viridian, it's up to you to find your friends, bring them back to safety, and save the universe! VVVVVV is a platform game all about exploring one simple mechanical idea - what if you reversed gravity...
$4.99
4074
81
Don't forget that 1,0 is 90 degrees
Trig is fun because itโs easy and you dont need to think about jt
Which is also why it gets boring
understandable have a nice day
56 what are you doing in math rn
bec im curious how different the us and a level systems are
Math is for losers clearly
then there's multivar and linear
and I think I want to take differential equations too
multivariate is fun
Ah yeah youre a year below me
linear was too
Im doing that stuff rn and its pretty okay
Then diff eq destroyed me
Diff eqs arent too bad
ik I'm just dumb
me irl
Integration gets messy but that only at undergrad level
Im doing trignometric calc and complex nos
nos?
numbers
How did you do diff eq when you're doing precalc stuff now
talking to mino
Ew
no like, complexerโข numbers

Differential equations
Calc is good shut up
Pretty not straight there
Gnarly
common core sounds like a nightmare from what i know
lmao imagine calc lmao
Someone teach me random variables
1, 0
we just take 8-10 subjects for freshman and sophmore year and then 3-4 in junior and senior year
hey hey tbf i was doing the 0,1 concept until midway my brain just decided it wanted to die so 1,0 hapepned
h
H
do I get 3 college credits over the summer
ะฝ
Only if you ask nicely
Same
til, Cos(0) is -0.66
i mean, technically it is
wait apparently you said zero wtv my brain was pretty much not willing to commit the live anyway so wtv
yes people regularly use the number 40rads
just like when im trying to calculate the sin of 2291 degrees
Forty radians hmmmmmmmmmmmmm
help how do i lower the frame rate in ps
in photoshop?
yes
do you have the timeline open
top right theres this
then theres set timeline framerate
oh yes thanks i already got the time line open but i never considered pressing the button at top right
you can't set per frame duration for some reason


