#archived-modding-development
1 messages · Page 96 of 1
Probably different uses of it
Or different prefabs with the same name
Alrighty well, that confirms you got the right name of the object
so when SpawnObjectFromGlobalPool spawns it which one of those does it spawn and does it even matter?
No real way to know without dumping all the info in the game object
w/e anyway what I really want to know is how to spawn a modified object from any action, like say I have an object stored in my game code.
CallMethodProper is your friend
Basically an action that just calls an arbitrary function
so in SpawnObjectFromGlobalPool, did you try setting
[RequiredField]
[Tooltip("GameObject to create. Usually a Prefab.")]
public FsmGameObject gameObject;
to the object you wanted to spawn?
yes idk how to link a message on discord but: 446887128878678032
yes
i don't see that array in
public class SpawnObjectFromGlobalPool : FsmStateAction
because get actions of type returns an array of all actions
and usually the array is size 1
because there's only 1 action of a certain type in a given state
oh, oh i see
and I know the array is in fact one for this too because I looked at the dump
ah, i have one idea
i think the FSM has a set of variables that it might load it after it turns on (going off of memory here so i could be wrong)
what if you changed the value one frame after the FSM has enabled
or any time after it's on
actually I have another idea and it might be my bad code... if you try to set the gameObject to a null game object would you expect anything to break?
or just add your own action like sean suggested, either one that calls a custom method or just a new copy of SpawnObjectFromGlobalPool
would you expect SpawnObjectFromGlobalPool to still work normally might be a better quesiton?
well
this is the code
public override void OnEnter()
{
GameObject value = this.gameObject.Value;
if (value != null)
{
Vector3 a = Vector3.zero;
Vector3 euler = Vector3.up;
if (this.spawnPoint.Value != null)
{
a = this.spawnPoint.Value.transform.position;
if (!this.position.IsNone)
{
a += this.position.Value;
}
euler = (this.rotation.IsNone ? this.spawnPoint.Value.transform.eulerAngles : this.rotation.Value);
}
else
{
if (!this.position.IsNone)
{
a = this.position.Value;
}
if (!this.rotation.IsNone)
{
euler = this.rotation.Value;
}
}
if (this.gameObject != null)
{
GameObject value2 = this.gameObject.Value.Spawn(a, Quaternion.Euler(euler));
this.storeObject.Value = value2;
}
}
base.Finish();
}
it checks for null
so if it's null it looks like you wouldn't get any object at all though spawning
yep
since it wouldn't be able to set values like position etc
ok I'm asking because I suspect that: obj = SpawnObjectFromGlobalPool.storeObject doesn't actually duplicate/copy the object but sets a reference instead.
but if that's the case then that means
spawnObjs[0].storeObject = obj
spawnObjs[0].gameObject = obj
don't do anything because if they did they'd break it because they'd be setting it to a null object.
*(because the object gets destroyed after spawnObjs[0].storeObject = obj is run but before that function is actually called)
Why are you even messing with storeObject? The only purpose of that is for other actions to grab the result of the object spawning
ok
You should also look into what setting an FsmGameObject to a GameObject even does
I don't trust PlayMaker to have good implicit conversions
Ok I'm fixing some code but I'm not using implicit conversion
Alright
my theory is it wouldn't actually spawn it if it was null. and that seems to be correct because switching to Object.Instantiate (which presumably gives me a non-null copy) and switching any reference to storeObject to gameObject causes it to not spawn at all.
thanks for the help. now my problem is: using Instantiate works properly but as soon as I copy it, it starts running through its cycle in an active state and despawns (as is part of its cycle). Would just setting the object to inactive fix this?
Probably
Yeah
What happened to the Super Hornet (Hornet Guardian?) mod?
Puppy happened
so, he(she?)'s taking good care of it
Probably
Alright not only does this feel totally wrong but it didn't work so... uh. what am I missing here?
CallMethodProper newShootMethod = new CallMethodProper
{
behaviour = "ClassName",
methodName = "FunctionInsideClass"
};
I can't find any code with custom CallMethodProper so idk the proper syntax
I also on loading the mod run:
GameManager.instance.gameObject.AddComponent<ClassName>();
but idk if that helps or is needed
to: whoever suggested I use CallMethodProper
Oh I'm looking at where I thought I used that and I actually used CallMethod
So idk
CallMethod methodAction = new CallMethod();
methodAction.behaviour = fsms[k].gameObject.AddComponent<SellContainer>();
methodAction.methodName = "SellAll";
methodAction.parameters = new FsmVar[0];
methodAction.everyFrame = false;
List<FsmStateAction> actions = fsms[k].FsmStates[i].Actions.ToList();
actions.Add(methodAction);
fsms[k].FsmStates[i].Actions = actions.ToArray();```
sounds like a good idea... anything sounds like one 3 hours into trying to get a feature working
Thank you so much that actually worked somehow
Nice
welp, spawning fireballs is no longer an fsm action so time to figure out how to program it.
Nice Tshirt
nice dog ❤
Cute Puppo
Ty :)
Who be best boi - kerr or kerrpupper? That be the tru question
mmm
I give 99/100 each
Hmm... the enemy HP bar mod on the google drive is not opening on 7zip
hey how do you add a gameobject as a child of a current gameobject?
oh durr GameObject.Spawn()
or instantiate using a parent
yes I understand my problem but this is awesome
obj.transform.SetParent
Close enough
are you trying to make a Flame Shield?
serious or not serious question
I'm literally just trying to modify the ball (ie make it a different size) and I have to do a lot of junk to do it because the second I access a game object it gets set active which sets its timer to distruction
and there's no way to stop it
the problem is I don't understand the linear algebra I have to mess with to get the ball to work
You mean just for calculating the velocity?
no world position
the problem is it's set relative to the child
and also the other problem
is that I want to use Spawn and not instantiate
basically I wanna store a game object in a way that won't be active but will let modify it
I haven't had issues with modifying inactive objects
so the problem is the second I do anything to the object it gets set active and the object has a timer on it after which it gets destroyed
Weird
this is why I can't just use a vanilla SpawnObjectFromGlobalPool
Can't you just set it inactive right after changing things, then?
because when I do
GameObject a = SpawnObjectFromGlobalPool.GameObject.Value it sets it active
and if I set it inactive I can't use it in functions
because unity treats it as null
That doesn't sound right
well I got a null pointer exception trying that
In randomizer I grab a reference to a shiny object and set it inactive
And I can still pass it around and instantiate more from it
cool thanks for the help now it spawns in the proper position it just has the minor problem of segfaulting
yeah setting it inactive did not work for some reason
it still ran though it's thing and by the time I did
GameObject tempObj = UnityEngine.Object.Instantiate(customGrimmball);
which is the same code you have. NullReferenceException
Awake runs immediately on scripts
Maybe something there is messing stuff up
Since that would be before you can set it inactive
well it does start running:
\----PFSM ---- Wait(, finishEvent) =
\----PFSM ---- Wait(Boolean, realTime) = False
\----PFSM ---- Wait(FsmFloat, ) = 0 :: IsNone? = False
in init
and once that wait is over it self destructs
don't ask why the float is 0
idk
That's uh.. yeah that's a lot of cloning
ugh none of this makes sense to me and now I'm confused
Dang
what the hell I've spent 5 hours trying to resize some balls
no I have my own balls it's great but my problem for the past 2 hours is getting ShootAtTarget to uhh shoot them
Seems like a pretty significant problem
the problem is FireAtTarget is using the wrong Object and I don't know how to set it to the right Object because it's not using normal objects but "FsmOwnerDefault"
FsmOwnerDefault is essentially just "GameObject?"
Uses the object if it's there
Otherwise the owner of the fsm
I can try setting FsmOwnerDefault.GameObject = mygameobject
and that for some reason doesn't work
Make sure that FsmOwnerDefault.OwnerOption = OwnerDefaultOption.SpecifyGameObject
what I didn't know about that thanks
Was that it?
idk if you have a faster setup but testing takes me about 45 secs
fuck you that actually worked
I mean thanks
but wtf I spent 6 hours on this and it's one stupid line I didn't know about
Thank you
but like I'm so mad at myself
This is why I always check everything to do with the types I don't recognize
Using dnspy
I checked some stuff but not others because it's still confusing
So like I knew about FsmOwnerDefault.OwnerOption
but idk how you learned about OwnerDefaultOption.SpecifyGameObject
By looking into what the GetOwnerDefault function does
Or something like that
Yeah Fsm.GetOwnerDefaultTarget
public GameObject GetOwnerDefaultTarget(FsmOwnerDefault ownerDefault)
{
if (ownerDefault == null)
{
return null;
}
if (ownerDefault.OwnerOption != OwnerDefaultOption.UseOwner)
{
return ownerDefault.GameObject.Value;
}
return this.GameObject;
}```
Nice
just gotta figure out how to decouple the object from grimmchild position wise I guess
maybe setting it as not its child
so uh this is gonna sound nooby but since you know this stuff is it possible to add a state to an fsm
like a whole new state with nothing inside it
or do I just have to find a state that's unimportant and modify that
I've never tried but I imagine so
what about when you make a custom fsm
I've never made a full custom one
If I was in a situation where that was an option I would just made an actual script instead
Yeah, I've never added a state. What I've done is change transitions/actions of an existing state to make them point to my script
aaaaaaaaaa
unity is decreasing my will to live rapidly
whenever i call get scene by name it says the scene is invalid
but if i pass the scene from the sceneloaded hook it works
You have to load a scene. Get just gives a scene by name that is loaded already
So I was playing randomizer and Hornet got stuck in the ground for a few seconds
oh my god again
Really, that happens in vanilla?
Only when you stagger her out of the downward dash with really good timing
Well, I feel much better about my hornet rewrite having the same behavior and that I've since fixed it
game has bugs
is there any easy way to make a floor
copy an instance of one?
i've been trying to but i've just been getting null refs
my floor has no collider
looks good 
wait would copying the tiny platforms and removing their textures work
The floor graphics and floor collider are different things in hollow knight
The floor collisions are edge colliders made by the tk2d tile map stuff
Platforms are box or polygon colliders
Then they overlay graphics that line up with the colliders
just put it in layer 8
and put HeroWalkable as its tag
and you'll be able to walk on it
is there a tag or name that applies to all enemies but no random scenery?
i'd probably put an actual texture on that
you mean your nail won't make a noise when you hit it 🤔
if you do like
a tiny jump
and slash down
instead of slashing down it slashes sideways
meh
weird must think you're either idle or running
wait have you stolen the floor 56
no i made a new floor
no it's not done
MY GOD UR SLOW
thanks
if i stream ds3 will it make you faster
what
the allknown nothing
is this 4kings
yes
yall know how to destroy a component
selecting the component itself and doing destoryall didn't work for me for some reason
Destroy (component)
what is no
how long does it usually take for crossroads to load?
no time
like 15 seconds
hmm, i must be doing something wrong then
crossroads the program or the level
the program
is this the SNES what's with layers
no clue but i was looking at another floor and it was layer 8
so i made mine layer 8
i did say
and then i remembered kdt said layer 8
layer 8 and tag
layers are a unity thing so you group stuff together
i.e. all enemies on a layer all walls / floors / roofs on another
wow I wish every FSM state action was nothing but CallMethodProper or CallMethod
would make my life a lot easier
nice
wtf
transition throws me into a black void where the pause screen is invisible
a
dreamgating over works
btw can you make your mantis gods scene a dream scene so it doesn't spawn a shade?
aaaaaaa
@copper nacelle does mantis gods mod work with boss rush?
the version that's on the drive rn should
of BR or mantis gods?
mantis gods
nice
I'mma try current mantis gods
and update when it's out
also roughly whats the recommended equipment?
endgame stuff
yea
ok let's try
are mantis gods like
stupid like phase 2 god grimm?
or are they reasonable?
reasonable
nice
Done on lifeblood update Still want to add a phase 3 tbh
and this is with me sucking at dodging
dont wanna spoil

holy fuck phase 2 kicked my ass
it sucks without dash I can tell you that
aside from that I really like it so far
mantis gods are stupid like ngg if you fight them when you're supposed to in the game
with only mothwing cloak and +1 nail and only regular spell
I'd disagree
have you seen the new ones
new mantis gods are going to be after normal mantis lords
instead of replacing
i think
re
i had no floor
i did airwalk so i wouldn't have to bother testing with a floor
I really don't like how slow their discs travel
it's really annoying when they attack when the disc is out
it bugs me for some reason when both mantises do disk attacks twice in a row
and there's 4 of them
I haven't lived enough in phase 2 to judge them
i just don't like how the disk is in your way when you try to dodge the next attack
cause it'd be a joke with shadow dash
idk it's not hard to dodge it's just weird looking
it's more like
it's in the air
and he does the stab attack
and you gotta jump
and it's in your way
but I guess thats just my bad positioning
late af but you can dash onto the wall to dodge that if you don't have shade dash
.
no
u
no
u
ban
G'Morning
G'evenin
has it been updated?
@copper nacelle said the Mantis Gods mod will be updated before I wake up and I really wanna get my ass kicked for breakfast
floors are hard
yeah it's what i wanted it to be tho
or is it just black
eww
can I get the floorless, backgroundless version some time?
gross so now you can't see the floor
yes but u have to dreamgate in
is it still backgroundless?
lemme just tweak one move
the discs
make the floor dream yellow
It's raining men mantises
looks really cool
Main problem for me used to be the disks attack, as it layered with other attacks
why such a weird percentage?
hm
1 in 10 is 4.76%
because, even with a low percentage the other attacks are going by pretty fast
wow i was right
is it still broken?
a bit
should be done soonish tho
enough to be played at least
sorry for the wait and stuff
wall throw was broke
i tried to change wall throw
it was actually wall throw 1
and wall throw 2
*wall leave
yea
will you post it here when you're done?
literally unplayable imho smh
@flat forum
=D
scene needs to be dreamgated into for it to work tho
lemme give a save w/ dreamgate set up
Ok
Debug Mod could remove Dreamgates, right?
Ok, I'll download it and test if it can

I'll tell you in a bit
throw might be a bit fast cause i just did it
the PC's gotta start up
cool

now to try and fix the transition
:ech:
Scene Manager missing from scene Fungus2_15
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Exception in responders to SceneLoad.Complete. Attempting to continue load regardless.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
found it
and this
NullReferenceException: Object reference not set to an instance of an object
at SceneParticlesController.BeginScene () [0x00000] in <filename unknown>:0
at SceneParticlesController.SceneInit () [0x00000] in <filename unknown>:0
at GameCameras.StartScene () [0x00000] in <filename unknown>:0
at GameCameras.SceneInit () [0x00000] in <filename unknown>:0
how do you get debugging info in your thing
just looking in output_log
it says filename unknonw
I really hope someone here can tell me
is there a gdb but for mono that I can use on unity
this is the best you can do iirc
is there a gdb but for mono
if the answer is no then c# is a dead language to me
and if the answer is yes
then why aren't you using it
there probably is but probably not usable for hk
why not
cause i remember asking about debugging
the whole point of GDB is you can attach to any running process no matter how many threads it has
and when you pause that thread you can see debugging info if you built it in
and print memory
etc
and if that causes the game to freeze then oh well
because the games state, running or not, doesn't matter
i think vs has a debugger
Did I stutter I asked if mono does
ok
idgaf about VS because unity doesn't use VS
use it
and keep your pdb file in your mods folder
and i attached vs to it
so it can load it
the pdb file has all the file information
so without it you can view all ram but can't tell on what line you made an error
that's why i gave the save
oof
yeah entering normally very broken rn
put in saves folder
already has dgate set
ok
but in abilities
No problem, Debug mod has the "all charms" thing
fixed anyway
Gonna try it now

Damage was set to 185 for some reason?
That first mantis was.... quick
whoops
Gonna set that back to.... 21?
yea
Health is 7/9
whoops
Fight is much harder now too
mantis gods
you didnt put download also im doing a rw rn ree
re
it's set to 1/10 for phase 2
gonna speed up the projectile and slow the throw i think
yeah
idk
lmao
Oh, by the way, how quick did you make their jumping away animation after the discs attack?
now they're just
too fast
disappearing
like
i just fixed that
nice
Also, right now the floor is completely invisible, can you make it black at least (like in the Temple of the Black Egg)
I scares me
it confuses me
help
but the light of the Knight is above it?
wdym
ok so current bugs are
- transition broke
- spikes are missing
- particles broke
and the throw
huh
but here
hey what mod is that owo
it doesn't
mantis gods beta
mantis gods alpha
ah\
Mantis Knight Demolishers
yes
mantis gods pre-release early access edition
The Mantis Desolators
The Mantis I'm-dying-to-them-for-the-13th-time-damn-it-someone-help-me
Yeah, it was a good buff

y e s
ok now i've beat 1st phase
video or not real
meme
are you standing where the spikes are supposed to be
yes spikes don't exist
yes
gonna fix that
well
soon™
makes the fight easier
if you stand where the spikes are they start boomeranging you into oblivion
otherwise their attack have no problem reaching you there
if your changing a lot of attack FPSes you should use a dictionary @copper nacelle
so you can just iterate through it
oh
that'd be neat
wait no
some are multipliers and some are just fps rn
too much effort
maybe after i fix bugs
or be lazy and use 2 arrays instead of a dictionary
why not
reee scaling
Oh
also then niko'd play w/ 1 hp mod and win instantly
Um
that's current health
I know
so be low on health and its easier
EXACTLY
that would mess up my muscle memory if you did that
look for instances where there are waits, not just animations
and change the length of those waits
Make longer Phase transition so I can get a breath
if you haven't already
i already did that
How much longer is it?
We only need a 3rd Phase now
that was to fix the nre
what was the vim command to delete stuff with a phrase
oh right
:%g/nre pls/d
ez
if vs didn't have a vim plugin i'd die
you use vim in vs
yes

I'm a nano skrub
p a i n
vim is really great once you get used to
like
ci"
to change the stuff in quotes
or di"
to delete the stuff in quotes
sure that's nice but I'm bad
lol
just
remove the Boomerang attack
only make it appear when you're on walls
it's set to the only attack there
ree
I layers with other attacks way too much reeeee
that's the intent tho
harder dodging
gonna speed up the shot so it's less stacky tho
IMPOSIBRU DOGING
imo i'm balancing it rn
also the tip of the lance is still 1 damage
gonna fix that
i wonder if niko'll manage to no damage this
How good IS Niko to try no damaging this?
p good
no damaged the old one
ok i think i balanced throw decently
managed phase 1 w/ only 1 damage taken
maybe too easy
nvm
Oh, why would the Attack.fps=PlayerHealth*something stack?
more balance
cause
it'd use the modified values
so like
let's say attack is 21 right
now health is 5
so 21 * 5
now health is 4
so 21 * 5 *4
now health is 3
so 21 * 5 * 4 * 3
etc
mhm
it would just get endlessly faster/stronger
yeah
Beat Phase 1 first try, without trying to dodge too hard
let's see Phase 2
and die immediately
well I think I just finished my second mod
neat
I'm gonna do a lot more testing before I publish

Break My mask into pieces
This is the second Phase
Concentration,
No Breathing
Attack everywhere not a slight chance of Healing
but if you're using infinite grimm some of the settings only apply after you've done a lot of damage to grimm (notch cost for one)
and others apply right away
what is your second mod?
grimmchild upgrades
It's called Grimmchild Upgrades and all it does is buff grimmchild but make it cost more
SUPER GRIMMCHILD
it's designed as an integration/addon to infinite grimm
but you can use it without it
How did you set it how much to cost?
not a smart way because it also will end up increasing the cost of carefree melody
it's bearable
but idc because if you seriously are playing my mods on a banishment save then you should die
jk
just buff it too
no
yes
carefree melody deserves nothing
PlayerData.instance.charmCost_40 = notchesCost;
it needs a buff to be even close to useable
just check the grimmchild level
I'll fix carefree melody
before setting cost
PlayerData.instance.charmCost_40 = 5?
yeah I'm gonna check if they killed NKG before doing it
ree
carefree needs an entire remake for it to be viable
check the charm upgrade level u dungo
eer
here's the strength and costs at different levels
just change the last cost var 🤔
these are weighted averages so 0.5 speed mod avg means that your speed is halfway between default and maximum
this but make carefree melody cost 12
I could the 6th element in that vector isn't actually used
make it like void heart and 12
because the 6th element in that one and useGhostBall are to just take the option set in the global config
tbh that's what carefree melody users deserve
but I won't
because they already lost the ability to fight infinite grimm
and that's punishment enough
yes it is they just don't know it
Eventually
yes
Well, I found a strategy
should i stream it
ok
nice
should i give them a title card or anything
like the full screen thing radiance and nkg do
yea
Hey how do I recalculate notches used
I need to auto overcharm the player when their grimmchild is upgraded
no I don't wanna set the var manually
I want to recalc the amount of notches they have
and if they are overcharmed then set it
Won't it be easier to just set it
what if they had empty slots
PlayerData.instance.CalculateNotcheseUsed()
ty
Maybe
3rd Phase - now each Mantis throws 2 Boomerangs at once
Or, alternatively
Mantises throw the Traitor Lord Discs
4th phase, first mantis comes to life
and... uh oh... she wasn't a mantis after all... it's actuallly... the radiance!!!

The Mantis Lords now throw discs in a way similar to The Radiance's Sword attack, except it comes back after reaching the end of the terrain
nice 6 fps stream btw
nice segfault enemyhpbar programmers

this is why I don't use debug mod
ok i think throw is def balanced for 1st phase now
Gotta Balance it for Phase 2 as well
geeze watching the stream and phase 2 looks like a cluster****
speed up the boomerang but slow down their reactions after throwing it
Make Boomerangs stupid fast and time after the throw to take as long as the Boomerang takes to travel
i think i'll beat phase 2
So that you're either only dealing with normal attacks or boomerangs
make boomerangs so fast that you can dash in any direction and avoid them with shadow dash
semi soon™
hm
i am in pain
great 0.5 FPS Stream
Hmmm
obs?
yeah
It drops to really low sometimes
probably twitch/your bandwidth
is there a place I can find the info on ALL charms without trying to get it out of the HK Data itself or do I have to learn to use some FSM tool or something
wiki
I mean the code

