#archived-modding-development
1 messages ยท Page 22 of 1
I have no idea how you even managed to write this, or even understand the json enough to come to the conclusion you needed to do this
but I guess that's fine
the parameters are slightly off
because playerDataBoolTest doesn't offset correctly
although, playerDataBoolTest, has a true / false string that says what event its doing
but its either a variable or a literaly so 
that makes SO much more sense now
yeah in the case charm_19 isn't equipped it calls finished
and instantly goes to the end state
skipping the last setFsmInt
at some point ill actually get this viewer to a usable state
I had to change int basedamage = 20; to byte basedamage = 20;
oh yeah
will it break everything and make my life miserable?
yup
first I thought of doing a typecast, but simple declaring it as a byte made way more sense
technically you should do int -> bytearray
then value[0] = bytearray[0]
value[1] = bytearray[1]
but I doubt spells will do over 255 damage
like everything else I'll make it so it's not THAT op
that is actually a nice idea
some sort of ultimate
"but I doubt spells will do over 255 damage" - The exact same thing that has resulted in the speedrunning bugs of 1 shotting bosses for decades
now I'm getting a null reference error
fml
Wyza: "but I doubt spells will do over 255 damage" - The exact same thing that has resulted in the speedrunning bugs of 1 shotting bosses for decades
hidden feature of the bonfire mod: you can underflow your spell damage and do 255
pretty much
er do you have go set 
overflow/underflow is like the bread and butter of glitches the world over because the dev either didn't think it'd be possible to go outside those bounds, or they were somehow constrained by the environment
wouldn't really make a difference
infact this makes it better if theres an underflow
otherwise it'd unflow to 2.1b damage instead of 255
255 damage vs 32k?
I'm simply calling that code you posted earlier inside PlayMakerUnity2DProxy.Start()
i guess it depends on the size of the int ๐
ah, right, i so rarely work with something that small.
and thats a signed one too, a short is a 65535
though a regular int is -2.1b to 2.1b isn't it?
or is that a signed int
ah, right, signed int lets you go negative
4,294,967,295 is max unsigned int
unsigned is >= 0
so i guess it'd be good too since going below 0 with the signed int would mean that you'd be healing enemies (maybe?, dunno if the damage calculation checks the value that way )
yes you can't go negative with this setup
as -1 byte just = 255 when converted to an int
that'd be an interesting thing to have happen though, some sort of vampiric/leech mechanic on enemies that would cause them to heal instead of get hurt in certain cases
though with a lack of health indicators, that'd probably be more frustrating than fun
I think the most interesting thing you could do, is make certain enemies heal others
ooh, that'd be neat
here's how it's set-up:
{
PlayMakerFSM fsm = FSMUtility.LocateFSM(go, "Set Damage");
for (int i = 0; i < fsm.FsmStates.Length; i++)
{
if (fsm.FsmStates[i].Name == "Set Damage")
{
FieldInfo[] fieldInfo = typeof(ActionData).GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
for (int j = 0; j < fieldInfo.Length; j++)
{
if (fieldInfo[j].Name == "byteData")
{
List<byte> value = new List<byte>();
byte basedamage = 0;
value[0] = basedamage;
byte shamandamage = 30;
value[14] = shamandamage;
fieldInfo[j].SetValue(fsm.FsmStates[i].ActionData, value);
fsm.FsmStates[i].LoadActions();
}
}
}
}
}```
and it's called in PlayMakerUnity2DProxy.Start() when the go has "damages_enemy"
are you doing it on upspell or fireball?
ok do Debug.Log(0) Debug.Log(1) etc
between each line
and see what the biggest number is
ok
btw, here's the error:
at ModData.spellDamage (UnityEngine.GameObject go) [0x00000] in <filename unknown>:0
at PlayMakerUnity2DProxy.Start () [0x00000] in <filename unknown>:0
(Filename: Line: -1)```
it returns that for every go
if I don't restrict it to only run on go that have "damages_enemy" then every line in output.txt is that exception, with no "FSM Name: "
yeah, it's completely overriding the code
not even printing how many times it has run
this reminds me of when I was trying to implement a castlevania-like bestiary which shows which enemy you've hit last in the bottom right
no matter what I did, it always returned this error
actually, I did manage to fix it
nvm
at ModData.spellDamage (UnityEngine.GameObject go) [0x00000] in <filename unknown>:0
at PlayMakerUnity2DProxy.Start () [0x00000] in <filename unknown>:0
(Filename: Line: -1)
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
at System.Collections.Generic.List`1[System.Byte].set_Item (Int32 index, Byte value) [0x00000] in <filename unknown>:0
at ModData.spellDamage (UnityEngine.GameObject go) [0x00000] in <filename unknown>:0
at PlayMakerUnity2DProxy.Start () [0x00000] in <filename unknown>:0
(Filename: Line: -1)```
welp
I tried
here's the call:
{
GameManager.instance.modData.spellDamage(base.gameObject);
Debug.Log("FSM name: " + base.gameObject.name);
}```
it's not printing any FSM names tho
put it before the spellDamage call
ok
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
FSM tag: Hero Spell
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
NullReferenceException: Object reference not set to an instance of an object
at ModData.spellDamage (UnityEngine.GameObject go) [0x00000] in <filename unknown>:0
at PlayMakerUnity2DProxy.Start () [0x00000] in <filename unknown>:0
(Filename: Line: -1)```
same thing for every other spell
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
FSM tag: Hero Spell
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
at System.Collections.Generic.List`1[System.Byte].set_Item (Int32 index, Byte value) [0x00000] in <filename unknown>:0
at ModData.spellDamage (UnityEngine.GameObject go) [0x00000] in <filename unknown>:0
at PlayMakerUnity2DProxy.Start () [0x00000] in <filename unknown>:0
(Filename: Line: -1)```
and so on
wait
no Hit U worked ish 
it got arguement out of range
maybe Fireball(Clone) doesn't have a "Set Damage" fsm?
:x
it has too many interactions
but it only hits once
so just changing damageDealt works
fml
not sure how fireball works
they did something different because of flukenest / shamanstone / defenders crest
is the fsm called "damageDealt" or "Damage Dealt"?
damageDealt is the variable in damages_enemy
oh yeah
okay, no errors
now to see if it works
so, it worked... Until it stopped working
fireball passed through everything...
dive still killed things
and the edge of scream's hitbox also still killed things
but then fireball began killing stuff too
Object Pool attached to GlobalPool has run out of Fireball prefabs, Instantiating an additional one. this might be the cause
the new instantiated fireball must be somehow skipping the damage check
rip
here's the code, if you're interested:
{
if (FSMUtility.LocateFSM(go, "Set Damage") != null)
{
PlayMakerFSM fsm = FSMUtility.LocateFSM(go, "Set Damage");
for (int i = 0; i < fsm.FsmStates.Length; i++)
{
if (fsm.FsmStates[i].Name == "Set Damage")
{
FieldInfo[] fieldInfo = typeof(ActionData).GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
for (int j = 0; j < fieldInfo.Length; j++)
{
if (fieldInfo[j].Name == "byteData")
{
List<byte> value = new List<byte>();
int basedamage = 0;
value[0] = (byte)basedamage;
int shamandamage = 30;
value[14] = (byte)shamandamage;
fieldInfo[j].SetValue(fsm.FsmStates[i].ActionData, value);
fsm.FsmStates[i].LoadActions();
Debug.Log(i.ToString() + j.ToString());
}
}
}
}
return;
}
if (go.tag == "Hero Spell" || go.name == "Q Fall Damage")
{
FSMUtility.LocateFSM(go, "damages_enemy").FsmVariables.GetFsmInt("damageDealt").Value = 0;
}
}```
for dive and scream, the first code returns this exception
Parameter name: index
at System.Collections.Generic.List`1[System.Byte].set_Item (Int32 index, Byte value) [0x00000] in <filename unknown>:0
at ModData.spellDamage (UnityEngine.GameObject go) [0x00000] in <filename unknown>:0
at PlayMakerUnity2DProxy.Start () [0x00000] in <filename unknown>:0 ```
unrelated heres the fsm_viewer, most things work now
dive only works the first time, fireball only works two times
weird
scream seems to work undefinitely, BUT the hitbox is broken
if the enemy is "inside" the scream, it doesn't get hit
if it's on the border of the scream animation, it gets hit
yeah
like, the reason dive breaks on the first time is that Q Fall Damage only runs once, but Hit L/R run 3 times per cast
ignore that one 
So, since I have time to think about implementing Int properly, I'm thinking about the balance of the mod
and for that purpose I've started to put together a google sheets with all the data for stat increases
https://docs.google.com/spreadsheets/d/1a95HWAF9lwtAWgNrBf6jA8Yk07V8VDI1MafpaEhD0nU/edit?usp=sharing
I would be very grateful if anyone could comment on those numbers
That actually looks really nice
@cedar raven / @young walrus - I've pushed updated version of the beta for the tracker. Fixes:
- Initial Setup is now easier. Instead of having the copy pasta url to start it, just go to Index.html, it'll get things all pre-configured. (including prompting you for the size you stream at to preset the size of the container)
- Fixes Void heart always showing/ kingsoul never showing. Should now properly show left/right/full/void. Probably never going to be used in a rando, but it'll still handle it now
- Sly's key now has a 2nd border that is red if you given him the key (instead of it disappearing/going grey as if you never picked it up). So Grey = not gotten, Green = gotten, but not given, red = given.
- Added a button to give you the URL to copy. In non-local versions, this will, (hopefully), generate a goo.gl tiny URL instead of copypasta. That's still a bit experimental, and since you're both running locally right now, doesn't really matter.
basically same as the last beta build. download the zip, and run Index.html. for Mickely, add your usual ?url=gamingpc.
@buoyant wasp : @lethal path spells were showing lv2 when they weren't 
ciplax said his worked fine though
@lethal path - when you get back, does your save file still have the spells in that state? if so, can you send it over to me? want to try and replicate the problem
I'll download and try it out tomorrow
np
Same link as before to download it?
done ๐
๐
@rain cedar - any reason there isn't a button to generate a new random number for the seed? I noticed that it generates the random number the first time you click the randomizer button (which sets it to easy), then clicking gain to go to "hard" doesn't change the seed #. Would assume the seed # would be different for easy hard?
The seed doesn't contain anything that determines easy/hard
It's just separate generation, so you get separate permutations for the same seed based on difficulty/steel soul
ah
did you see the message in race discussion?
Yeah I'm working on it
There is state "Check" on "Toll Gate Machine" FSM with string of value "hasLantern"
Just gonna change that to always be true
I uploaded a version of the fsm viewer btw
its up about 6hrs ago
its not perfect, gotta add more parameter types
and add arrays etc
and floats don't work for somereason dunno why
Weird
@leaden hedge @rain cedar - not sure which of you can fix this, but found a bug with PlayerDataTracker and rnd.js
if rnd.js exists
but i load a non-randomized save file. when i request "random" from the tracker, it serves up that file. Can we have a check in there to see if the save file is a randomizer save file and return undefined if it isn't
I could update that to check against mods
oh wait
you mean if the save isn't randomized at all
right
I thought sean deleted rnd.js on load if it wasnt randomized
I was going to but I thought I didn't have to do that anymore
its just that one case, it needs deleting
unless theres something in the file
to determine if its random or not
I can just check that then
right, basically just need to know "is this save a randomizer save or a non-randomizer save". if there is something in the playerdata.instance, i can use that too
@buoyant wasp Just put one up that removes the rnd.js on file load/new game
thanks
@leaden hedge - when there is no rando file, if i send("random"), it doesn't return anything at all. Looks like you need to check for the files existance. If it doesn't exist can "random" return, something like { "disabled" : true }
10/19/2017 1:11:01 AM|Error|WebSocket.messages:0|System.IO.IsolatedStorage.IsolatedStorageException: Could not find file "C:\Users\iamwy\AppData\LocalLow\Team Cherry\Hollow Knight\rnd.js".
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0
at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000] in <filename unknown>:0
at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0
at System.IO.File.ReadAllText (System.String path, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0
at System.IO.File.ReadAllText (System.String path) [0x00000] in <filename unknown>:0
at PlayerDataDump.SocketServer.getRandom () [0x00000] in <filename unknown>:0
@buoyant wasp Tracker isn't showing mothwing cloak for ciplax
I think I have an idea for getting isma's tear into the randomizer without too much effort
You go to sleep
Randomizer? Can you elaborate
Swaps item placement semi-randomly
So I can get monarch wings instead of mothwing cape?
Also it is coded in a way that you cant softlock yourself
That's very interesting, actually
For example, if you get desolate dive instead of vengeful spirit, you'll have to go to Crystal peak first
Although technically, you can already go there before greenpath...
Alright I'm at least 80% sure there's no problems with this implementation for isma's
Uploaded the new build with that and shape of unn
@rain cedar I don't know if its intended, but the randomizer (at least in the 20 or so tests I did), would almost never spawn 2 requirement items in the same "pool", so once you get an item that lets you go to different items you might aswell assume the rest of the items that you could get to previously were garbage.
I assume a side-effect of the new algorithm to reduce the chances of loads of items being in shops
When did you update? Used to be you would never get two useful items in one set of reachable items
But I changed that
yesterday
Yeah, get the latest build, should be better
It still might be too rare
Hard to balance this
it probably depends on the first item you get
Yeah for sure it depends pretty heavily on how powerful the first items you can get are
I think that it should depends on the size of the pool of items
It does
That just means it depends on item power as well, indirectly
Better item -> Larger pool of reachable items
ye I got myself a spreadsheet 
You can just look at the randomization on github if you want
I'm open to suggestions on how to improve it
Function name is Randomize
Line 596
Guess I should put some comments in that function before I forget what I was going for
do you need cdash to get to ismas if you have ismas?
Unless you do the skip past the spike tunnel, yeah
But I haven't tried that so I don't know how hard it is
Maybe I'll add it in if it's not too bad
you added glowing womb skip in
I think the glowing womb tunnel is more lenient
I didn't have trouble getting it
Maybe I got lucky
dash, fireball and claw iirc
and was the requirement for greenpath changed with MoP and longnail?
Nah it's still at mark of pride only
I'm a bit hesitant to change that because the randomizer would almost never choose to make you do that
It's very biased towards the single item requirements early on right now
could it tie longnail to MoP instead? so.... have it keep the MoP requirement, but if MoP spawns in the first area, then Longnail has to?
I think that's overcomplicating things
yeah. would keep the requirement bias the same though shrugs
..... i just don't want to do MoP only. lol
I'd be more afraid of the crystal peak dark room than that if I were you
meh.
i'm not too worried about that
plus there's always the slow safety strat
....farming for lantern.

Sounds fun
why is this seed a thing 312908378
make lantern cheaper imo if you're going to do this
What's wrong with that seed?
The lantern might be something else too?
oh you can now?
no. lantern is static
can at least get to dream nail now
its still pretty bad
just have to do 1 dark room
nah this seed, gotta do dreamnail to get glowing womb, then you've gotta desolate dive
then kill flukemarm to get vs
then queen station skip
Why would you have to do queen station with fireball?
If you can get to soul master you can get past the station easily
Or even just enter from crossroads
@cedar raven - was mothwing cloak not showing on the current overlay, or the new beta branch version? (i know you have both, wasn't sure which you were using)
can you get to fungal with just dive?
Oh I see you meant you get dive from something
or is there a mistake with flukenest only requiring dive
Not that you have to go to dive
i mean.... that's still pretty intuitive though. there's only 1 route you can go with just dive
<requirements>
<requirementSet easy="true" hard="true" hardpermadeath="true">
<requirement>Mantis Claw</requirement>
<requirement>Desolate Dive</requirement>
</requirementSet>
<requirementSet easy="true" hard="true" hardpermadeath="true">
<requirement>Mantis Claw</requirement>
<requirement>Descending Dark</requirement>
</requirementSet>
<requirementSet easy="false" hard="true" hardpermadeath="true">
<requirement>Desolate Dive</requirement>
</requirementSet>
<requirementSet easy="false" hard="true" hardpermadeath="true">
<requirement>Descending Dark</requirement>
</requirementSet>
</requirements>
yep it is
How do you get to City with just dive, though?
break the ground
down through grave
near soul eater
yeah
Oh yeah
Man I don't even remember the reasoning for half these requirements I put
That makes sense, though
how do you get up to resting grounds with just dive?
Worst case scenario buy the key from sly
oh, right, changed ๐
that would definitely be worst case. lol
Nah Mick it's not bad since you can get to Lemm with just dive
So 950 wouldn't be grindy
the one to the left of the save room near soul master?
it would a little. not many relics you can get with just dive
could get the one in CoT on the right
can kill gorgeous hustk
husk*
yeah, wouldn't be that bad
Oh right gorgeous husk
even if the relic on the right is only 200
Even with shit rng there would be no grinding
Alright I think the dive only req on flukenest is fine as is
whelp, @leaden hedge is going to start looking for seeds now for this weekend and a proxy to hand it out
theres a race in a bit
What time?
7-8cest
Someone should put it in #races-announcements
grimm troup in 1 week...sigh i'm gonna finish the UI overlay for randomizer just in time to be broken
wont change alot
when hidden dreams came out, how many variables did they change for existing stuff?
none
nice
they just added 2
oh, any chance you can fix the rnd.js bug sometime in the next 8 hours?
and make "version" return json por favor
ye one sec
hah (no really, anytime in the next 8 hours, at work, so can't do anything until then anyway) 
@rain cedar ok with the current randomizer, theres a very high chance apparently of dive / ismas, and they only go to one item
so if you get ismas your next item is almost guaranteed to be at shape of unn, and dive you have to kill flukenest
Ok I'll up the chance for branching item paths
Right now for each non-dead end item there's a 10% chance to be considered on every slot
What do you think is a good chance?
Much higher and it will just start spamming good items everywhere
Also dive/ismas shouldn't be any more common than any other item that unlocks other paths
ye but theres like a 25% chance they are in the first 3 dead ends
maybe don't have dead ends that point directly to another dead end
or make it less likely
I mean if it points to another dead end it's by definition not a dead end
Because it leads somewhere
i mean... getting dive at dream nail leads you to either greenpath or fluke marm
beyond that though.... there's not much that specific item can give you alone
its ok as a first item
but once you can get into greenpath it only leads to flukenest
I will up the chance for additional items to be considered to 25% and we'll see how that works
That change is up on the drive if you want to mess with seeds @leaden hedge
Can I put the debug mode into the same instance of the game where I also have the randomizer?
or do I have a to make a new one?
Yeah they're compatible
to get dash back
Fireball also stops you from going too high
that skip would technically be possible with dashmaster instead of fireball
Dashmaster is way harder
I don't want to have to do that
XTREME MODE when
lol
Could be interesting to try to maximize hard skips instead of just allowing them
Would probably be awful
man, I cant get the dash after fireball fast enough out
yea, thats what I meant ๐
lol
seems also possible with howling wraith
Stick LuL
current with fb is down, nail, left, dash, fireball repeat
i'll give you some more stick movement
fighting stick PogChamp
gotta move my entire hand
That's your own fault for using a controller not even slightly suited for platformers
didn't say it was impossible just hard 
d pad for life
and honestly stick is fine for platformers, pretty sure arcade games didn't have a dpad
after 234978 attemots
doing that in a run will be difficult
because not cheats FeelsBadMan
just cheat on the sly
when I start a new save, the UI of the debug mode is always on. Is there a way to disable it on default?
Nah, there isn't
is it ok to rename the DebugMod.dll in the mods folder to disable it?
oh ok
will there be one more update today to the randomizer?
probably not before the race
Yeah not before the race unless there's something pressing
are you entering @summer tapir ?
yea
hmm, I just downloaded the latest version but I dont see the version string in the title screen
Do you have the latest modding api as well?
@buoyant wasp i'll just update the tracker to the latest one
no, i meant, were you using the new one from last night, or the "main" one that i did over the weekend?
just so i know where to look ๐
@leaden hedge is the stuff in git the most recent version of playerdatatracker? if not can you push the most recent stuff up?
updated
thanks
I've rebalanced bonfire to be faithful to what's in the spreadsheet I posted earlier. Will upload it as soon as I get home
Next update will be a full stats screen
i really wanna play bonfire, but i'm sad cause I still need to work on hundo and the dlc is out next week
Is someone around atm who uses the new debugmod and could check something for me?
not enough time
you mean like the author @rain cedar ?
but i use it, by no means an expert tho
Yes I am aware that he's around but he said he cant test what I need right now
i can test something if you'd like
I have a list of simple steps I need someone to confirm whether or not it triggers a bug
I knwo the author is Seanpr, I designed the UI for the mod
I'll PM you the steps
k
Question, what's the Font that is used by the game? do we have that?
k, maybe i'll get lucky and it's a standard font for web ๐
no
wrong
bleh
are they? (IE using them in the randomizer overlay would be bad?)
i paid for HK and downloaded unity studio therefore I own those fonts
trust me im a lawyer
I believe you are allowed to use it
also ๐ค
ended up going with Constantine. It's basically identical, but without any question on legality. In mods, i can see how we could get away with it since the font is in the game, but since this is a website technically (even if it's just an overlay for the game), I have no desire to infringe on someone's rights. (valid or otherwise)
Cajun Pro
@rotund ether sue these guys to death!!!!!!!
Also dies TC even own that font?? Lol
Some other guy probably does
Johnny Fontman I believe his name is
yeah if you can make good fonts
call it dingwings
https://drive.google.com/open?id=0B_b9PFqx_PR9UzMxeHdva2hFT1U New patch of the Bonfire Mod is up!
Still haven't implemented Int stat yet (me and KDT ran into some technical difficulties) but I redid most of the formulas for how the stats impact the gameplay
Also I cleaned up the code (it was fugly)
maybe update the readme 
if anyone is interested I also rehosted the github page for the mod, but instead of hosting the .dll there, i'm hosting only the .cs of the classes/methods changed by the mod
@hazy sentinel thank you for reminding me of that!
done
should KDT be credited in Bonfire?
I believe they do deserve more credit than they are getting right now
alright
If this is true for any other mods and any other modder, let me know. I only know what I know, it's why I encourage modders having editing privileges
does someone have the 3 parts of kingsoul in higher res than the wiki? preferrable something 156px or bigger
try extracting assets
^
use the unity studio pinned to the channel
woah
thank you very much
boi extract the assets
it's not that i'm lazy, but someone has already gone through the effort of extracting it all and I hate re-inventing the wheel
do you also hate having all 4700 sprite sheets on hand
only 850 mb 
thats 850mb less hollow knight rule 34 
to be honest, outside of doing this overlay, I don't really plan to mod HK. so i dont' really plan to need the assets beyond these and KDT is like magic, you ask for a icon and it appears almost instantly
i'm not even sure he's human
hey, i'm trying to configure Visual Studio to understand the RandomizerMod solution. Is there some magic to do where I point VisualStudio at my Hollow Knight installation so that the assembly references are resolved?
yes
right click the project
properties
reference paths
C:\Program Files (x86)\Steam\steamapps\common\Hollow Knight\hollow_knight_Data\Managed\
also I found a bug lol
bug
is it Hornet?
oh, btw, warning
if you cast wraiths on the first frame avaliable after casting it
it does't make a second one
doing go into howling cliffs with debug mod
yeah KDT I keep running into that on radiance fights 
and turn on all the stuff in the enemies pane and then pause
it won't end well for you
also, while testing Int yesterday I found out that, for some reason, the Plant Traps in greenpath have a "damages enemy" fsm
wait
I thought plant traps were those enemies that hide under the foliage to bite you
@leaden hedge that worked. thanks!
as do spikes and acid
anyway, memory leak in debug mod will crash the game after a minute
the embraced one found it, i just confirmed it, so he gets the credit ๐
dunno why it's only there though
ok I see the problem with the spells @solemn rivet
it pools the spells, and calls set damage whenever they are recreated
so it only works on the first cast of each spell except fireball 1 / 2
which can have 4/5
I thought it was that
so, if we could get PlayMakerFSM playMakerFSM = FSMUtility.LocateFSM(go, "Set Damage"); for (int i = 0; i < playMakerFSM.FsmStates.Length; i++) { if (playMakerFSM.FsmStates[i].Name == "Set Damage") { FieldInfo[] fields = typeof(ActionData).GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); for (int j = 0; j < fields.Length; j++) { if (fields[j].Name == "byteData") { List<byte> list = new List<byte>(); int num = 0; list[0] = (byte)num; int num2 = 30; list[14] = (byte)num2; fields[j].SetValue(playMakerFSM.FsmStates[i].ActionData, list); playMakerFSM.FsmStates[i].LoadActions(); Debug.Log(i.ToString() + j.ToString()); } } } }to work it should be fine, right?
or if I have the old code run every frame...
I have an idea anyway
let me check 
I'l check if mine works
Can you run Hollow Knight in Visual Studio and debug the RandomizerMod with the debugger?
@solemn rivet there are a couple of problems that I've noticed with the bonfire mod
unity and steam generally don't like it
I haven't tried though
why do you want to debug it?
- Either enemies have more health or old nail/spells do less damage than regular HK at base, cause I've noticed things taking more hits to kill
they do
@leaden hedge it'd be nice to step through code I write to make sure it's all working as expected. But logging-based debugging works too.
@deep pilot enemies have increased HP
yep logging based is probably the best bet
and it increases with progress
- Hitboxes for the nail/spells seem wrong. I'm not able to hit the Elder Baldur in the Ancestral Mound when standing on the ground
Yes
fml
I forgot to remove the test code for making Int work
it sets spells damage to 0
but only the first few casts tho
KDT reported something like 4 or 5 earlier
[00:14] KDT: ok I see the problem with the spells @solemn rivet
[00:14] KDT: it pools the spells, and calls set damage whenever they are recreated
[00:14] KDT: so it only works on the first cast of each spell except fireball 1 / 2
[00:14] KDT: which can have 4/5
Alright
I feel there's something awkward about the nail hitbox as well, though
There were sometimes where I straight up swung through aspid hatchlings like they weren't there
what is this "Int" people are talking about?
And took damage as a result
that's a consequence of the code
I'll remove it
it basically sets the "damage dealt" of anything with "damages enemy" to 0
so you can jump into spikes/acid and take no damage, for instance
@broken fable Intelligence
another stat of the Bonfire Mod, currently under development
ok thanks
In RandomizerMod, some functions are declared with comments that list "Token:", "RID:", "RVA:", "File Offset:". What do those mean?
@leaden hedge mine didn't work
ok I've got everything but fireballs working
Another question I have while I'm booting up the revised mod is does luck modify the drop amount from larger common enemies?
Like Husk Warriors?
should
Cause I've noticed that with luck lvl. 2 I'm still getting 45 geo dropped per warrior killed.
that is weird
oh
that's because that table is wrong
I'm referencing the wrong column to calculate the drop rates
duh
fixed it
but in code it's right tho
and even that is an approximation
playMakerFSM.FsmVariables.GetFsmInt("Geo Med").Value *= 1 + this.modData.statLck / 20;
playMakerFSM.FsmVariables.GetFsmInt("Geo Large").Value *= 1 + this.modData.statLck / 20;```
basically what I'm doing is counting how many of each type of geo the enemy drops, and multiplying THAT by 105%
what happened to the randomizer mod in google drive? folder looks empty
so it will always be <= actual 105% dropped geo
was there 2 hours ago
wow bug
playMakerFSM.FsmVariables.GetFsmInt("Geo Small Extra") needs to be done too
thats for fragile greed 
Med / Large too
Alright, vengeful spirit seems to be right again as far as I can tell
randomizer in the drive isn't empty
@broken fable
ok, sorry. i guess i needed to refresh the page
thank you so much for all the feedback @deep pilot ! If you have any other questions or comments, please feel free to tell me!
and thank you for the quick responses as well!
but, yeah
just be aware that increased drop rate in the spreadsheet can differ (only slightly) from the actual increase
due to rounding issues
say, if an enemy drops 20 small geo, it'll increase to 21 small geo. But if it drops 10 small geo and 10 medium geo, you'll get no increase (because 105% of 10 is rounded down to 10)
I believe that's what's happening with Husk Warriors
can't be sure, tho
anyway, gtg now
just got a hard lock seed where it wants me to go down to shade cloak with only shade cloak and super dash
not possible to reach hornet
is that in easy or hard mode?
if you're in easy mode, you're supposed to have monarch wings before going to shade cloak.
no its hard
its techncially possible afaik to get to hornet2 with just dash
its just really hard
according to the xml, hard mode shade cloak requires: (Mantis Claw AND Monarch Wings) OR (Mantis Claw AND Mothwing Cloak) OR (Mantis Claw AND Shade Cloak) OR (Mantis Claw AND Crystal Heart) OR (Mothwing Cloak AND Shade Cloak)
yes
the last one
is just so you can get from abyss to shade cloak
it's technically true
that all of those are doable
but the last one is very hard
how do you climb up to hornet 2 without mantis claw or monarch wings?
well thats what this xml is saying 
pogo on
s?
that's a lot of aspid pogos
its only in there because someone went down there and got softlocked at shade cloak iirc
when i call Modding.ModHooks.ModLog() where does that go? on screen? in a file?
save folder
%appdata%/locallow/team cherry
fwiw, my %APPDATA% points into the Roaming directory, so for me it's %APPDATA%/../LocalLow/Team Cherry/ModLog.txt. I'm on Windows 7, if that matters.
yeah it will point to roaming
is there an easy way to figure out which room Ruins1_01 is?
not really
you can call LoadLevel("Ruins1_01")
GameManager.instance.LoadScene ("Ruins1_01")
I'm guessing you'd usually enable the debug mod, and it would tell you the name of each room you go in?
yes
theres a hook
ModHooks.Instance.SceneChanged
pretty sure has scene from and scene to
yeah. i'm just reading the randomizer scene handler, and it adds platforms in a few rooms, but i'm not sure which ones they are. Ruins1_01 and Ruins1_02. i'm guessing those are the top left entrance from the city crest gate.
thanks for your help kdt. i'm out for the night.
so, this could be a thing or not, but watching Mickley's stream this evening, him and a few others noticed that the game seems to run slower with the randomizer. wondering why this would be.
What do you mean by "slower"?
I'm skipping around in his vod and the game looks fine
I added GC.Collect calls after randomization and scene load, so it's gonna add menu lag when loading and increase your load time a bit
If that's what you mean
@buoyant wasp @young walrus
it has some lag when opening inventory. it also messes with my inputs more than usual. less responsive than the unmodded game
and yeah. loads are definitely longer
I'm modifying the spell control fsm on every load, which I'm sure hurts load time noticeably
I could try to figure out where that's actually necessary
Not sure about it being less responsive, though
i also do run a song bot while playing rando, which i'm sure adds to it
Go to sleep Sean
I'm seeing very similar fps and cpu usage between randomizer and vanilla
And less memory used in randomizer than vanilla
I'm not sure how well I can fix a problem I can't reproduce
You probably wanna get rid of your forced GC collects
People had game freezes in really random spots like killing an enemy
It'll be late at work today but I'll help you out when I'm back
GC is the only thing I could think of that would affect that
Since TC calls GC.Collect when you kill things
Wait what?
Team Cherry hides garbage collection with hitstop
To make it less noticeable that it lags
?
That explains the extreme hit stop
You should see the hitstop ciplax gets
Especially since unity has their runtime based on .net 2.0
@vale zenith https://clips.twitch.tv/FairObservantFlamingoBatChest For when you're able to look at this
A hornet fight Ciplax had
Send me a pm
So lazy
I won't scroll up through 8 hours of chat after work man
I tagged you so you can just look at recent mentions
Good point
But fine I'll pm you too
Git better pc :^)
...
Well, in any case, I'm gonna remove the GC stuff because it seems to be making things worse instead of better
So, KDT, how did you manage to make the spells work?
@solemn rivet Something's still definitely not working with Luck and geo drops from enemies
I'm at lvl 10 Luck (which should translate to 148% geo dropped) but I'm only getting 45 geo consistently from husk warriors
hmm...
In contrast, equipping Fragile Greed immediately increases the geo drop from husk warriors to 54 geo
well, something's weird
can you enter the area with the husk warrior using this .dll and then send me the output_log.txt?
because I set the code to simply multiply dropped geo by luck and it worked perfectly
so entering the area right outside the bench below Hornet1, I get this list of geo:
Total geo: 25-0-0-0-0-0
Total geo: 10-0-0-0-0-0
Total geo: 50-0-0-0-0-0
Total geo: 45-0-0-0-0-0
Total geo: 45-0-0-0-0-0
Total geo: 45-0-0-0-0-0
Total geo: 25-0-0-0-0-0
Total geo: 45-0-0-0-0-0
Total geo: 25-0-0-0-0-0
Total geo: 25-0-0-0-0-0
Total geo: 45-0-0-0-0-0
Total geo: 45-0-0-0-0-0```
where's the output log?
where the managed folder is
the output log
I made it so that it outputs the geo amount for every enemy in the scene
ok
well, for some reason that enemy does not have a "health_manager_enemy" then
oh, wait
Actually, the enemy's name is "Husk Guard"
My bad
But it's still only dropping 45 geo
yeah, the enemy with higher geo counted has
Total geo: 20-0-0-0-0-0
now I have to find a way to access that enemy's geo pool to change it
because it apparently doesn't have a health bar
which doesn't make any sense
Look for health_manager too, not just health_manager_enemy
wut
now that's interesing
okay, so the enemy with Total geo: 20-0-0-0-0-0 IS the Husk Guard
the code I just sent you was supposed to double every enemy's dropped geo
yeah
Which is 20 geo more than base
that's because it is coded to have 20 geo, so double 20=40
so I assume I'm not reading the right variables to change the big geo coins
the other 25 are probably coming from big geo
but it says it shouldn't have any big geo
yup
so, here's the code:
hme.FsmVariables.GetFsmInt("Geo Small Extra").Value *= 2;
hme.FsmVariables.GetFsmInt("Geo Med").Value *= 2;
hme.FsmVariables.GetFsmInt("Geo Med Extra").Value *= 2;
hme.FsmVariables.GetFsmInt("Geo Large").Value *= 2;
hme.FsmVariables.GetFsmInt("Geo Large Extra").Value *= 2;```
maybe big geo isn't called Geo Med or Geo Large
but rather something else
One thing I'm still not understanding though is that the small geo apparently is being correctly read in, but even so there is no change in the overall geo when leveling up luck
how much luck did you have again?
10
yeah, if it was working, even with small geo, you should be getting around 75 geo
instead of 65
Before you just multiplied all the geo counts by 2 I also went by Greenpath and the Moss Knights also dropped their default geo amounts of 40
Now with the factor of 2 added, Moss Knights drop 70 geo each
yeah, so there's definitely some geo I'm not counting
it's probably 30 small + 2 big
and for Husk it's 20 small + 5 big
and I'm only doubling small
okay, I have an idea to fix at least small geo
I'd offer help to try and figure out what the large geo variable names are, but I have absolutely zero experience with fsm stuff
same here
You could probably just do the change in HeroController.AddGeo
Just do some check like amount < 200 to avoid messing with lemm
also
I added a line to print every object on scene that has "health_manager"
and walked around a bit
but didn't find any
you could try Geo Medium Instead
but all enemies I encountered have health_manager_enemy
KDT I'll try that and Geo Big instead of Large
ignore the -428443584
thats actually 1.5
unless for some reason, certain enemies have different variables for this
Total hme geo for Moss Knight : 30-0-0-0-0-0
ignore the "hme", I was trying to figure out if health_manager_enemy and health_manager fsms had different amounts of geo
if (hme != null)
{
Debug.Log(array[i].name + " has health_manager_enemy FSM.");
hme.FsmVariables.GetFsmInt("Geo Small").Value *= (int)(1f + (float)(this.modData.statLck / 20));
hme.FsmVariables.GetFsmInt("Geo Small Extra").Value *= 2;
hme.FsmVariables.GetFsmInt("Geo Medium").Value *= 2;
hme.FsmVariables.GetFsmInt("Geo Medium Extra").Value *= 2;
hme.FsmVariables.GetFsmInt("Geo Large").Value *= 2;
hme.FsmVariables.GetFsmInt("Geo Large Extra").Value *= 2;
Debug.Log(string.Concat(new object[]
{
"Total hme geo for " + array[i].name + " : ",
hme.FsmVariables.GetFsmInt("Geo Small").Value,
"-",
hme.FsmVariables.GetFsmInt("Geo Small Extra").Value,
"-",
hme.FsmVariables.GetFsmInt("Geo Med").Value,
"-",
hme.FsmVariables.GetFsmInt("Geo Med Extra").Value,
"-",
hme.FsmVariables.GetFsmInt("Geo Large").Value,
"-",
hme.FsmVariables.GetFsmInt("Geo Large Extra").Value
}));
}```
and yes you did
@rain cedar - re performance. I haven't noticed it myself, but as I haven't played enough rando myself, i can't comment. inventory loads take longer (which as you said was expected), but the basic consensus was that the timings just felt off on alot of things. inputs sometimes felt laggy/eaten, etc. I know, from a programing perspective, that's not alot to go on.
brb
honestly was hoping there was some way to hook in the debugger in VS/.Net or something to give you more data or some sort of better picture
or perhaps some logging you could add to a version of the randomizer for a while that would provide some statistical data
Not sure what data I could log that would be useful
I mean nothing I'm doing changes that kinda stuff
And I can't even reproduce any problems myself
It runs just as well as the vanilla game for me
if only I had uploaded the fsm_viewer 
Hey, don't judge me
you know whats weird
theres this state you can't get to
but thats checking against longnail to spawn extra geo
Maybe long was the old fragile greed?
Yeah...
Just as a side-note @solemn rivet , I believe your spreadsheet should have Level 1 luck be 105% dropped geo based on your math.
Instead of 100%
Level 1 is the base of any stat
I can make them all start at 0,but I find it ugly
Level 1 is the default
Because you start at one though and your geo calculation is 1+(luck)/20
you start at 1.05, right?
I fixed it to luck-1,but after changing it to *2, and then back to 1+luck/20 I forgot to subtract 1
Ah, that makes sense
In the spreadsheet you can see the -1 in the formula
I swapped back to the public release version of the bonfire mod, so you didn't have the luck-1 changed yet in that version.
Yup
Of course, the geo drops in that version also aren't fixed yet, so it doesn't actually mean anything 
But I have a few ideas on how to fix it all, now that we have the actual names
Problem is, I'm not near my pc rn
No worries, there's no need to rush
The issue is that luck/20 is converted to an int
So if luck<20, it's rounded down to 0
I'll rewrite it in such a way that it multiplies by 1+luck/20 before converting to int
That should fix it in theory
Does C# type casting work the same way it does in C?
I assume so
Cause couldn't you just do luck / 20.0
And that would auto-cast the fraction to a float?
Yeah
Well, luck-1
So it first casts 1+luck/20 to int, and then it multiplies geo
am i correct in interpreting that this code is looking for a baldur in fungal wastes? https://github.com/MyEyes/RandomizerMod/blob/9d80cc777043d0d03462b692b463470b3a1694bd/RandomizerMod/SceneHandler.cs#L194
i thought the only baldurs in the game were in ancestral mound, cross roads to green path transition, and howling cliffs at baldur shell charm.
The internal scene names are just different from what you would expect
Fungal wastes, greenpath, and queen's gardens rooms all start with "Fungus"
Also the baldur shell room is named as being in greenpath
do we have a map somewhere that puts the room names in conjunction with their actual location visually?
No, but maybe RainingChain would be willing to add that to his map if we got him a list of scene names
https://rainingchain.com/hollowknight/map
yeah, i was going to use his map to put together the list of relics
for you, but then realized that room names were all wrong
and i haven't had a chance to run all over the map to figure out what they all are yet
@rain cedar - I know you added the list of available mods, but any way we can get their version string too? (maybe instead of List<string>, Dictionary<string, string> ?)
(or some other data structure if dictionaries are frowned on in unity)
dictionaries are fine in csharp
Yeah, wouldn't be hard to do that
oh, i know they are fine in csharp
i use them all the time
but i don't know if they are fine for games ๐
also @rain cedar my tracker, checks against a webpage on github
to get a version string
then compares that to the installed one
so if you're out of date it tells you
could probably add something like that to the randomizer
I could but I'm lazy
has anyone done any research into how the in-game map is stored? like the shapes of rooms and which rooms you've explored to get enabled on the map and stuff?
like if i wanted to add custom pins to the map in a mod i make, does anyone know how to do that yet?
you can check the map fsm
it stores data about it in playerData
but the rendering is done in the fsm
@solemn rivet here's a suggestion: can you make it so that resilience increases your i-frames (in the way stalwart shell does)?
cause at this point, I think resilience is the least value stat to pour your geo into
especially since you can't heal blue hearts
that's an idea wataniyob
upgraded bonfire to fix geo issues
doesnt the dlc will give us custom pins?
Won't the dlc Content Pack will give us custom pins?
yes
Q: I've never modded a game before but I'm really interested in the Randomizer. What do I need to do to get this set up? Am I able to switch freely between the unmodded game and the randomized one? Please help.
yeah
you have to select a randomizer difficultly before you start a save
and you can choose no randomization
as for setting it up, in the google drive there are 2 mods
"Modding API" and "Randomizer"
simply extract both of those zips to your hollow knight installation
remember to put the old DLLs back if you are doing speed runs
even if you don't use the mods, having them installed during a speedrun DQs
your hollow knight installation can be found be right clicking on hollow knight in steam, properties, local files
@buoyant wasp that's good to know! Thanks
also generally just having the modding api installed, is technically fine 
as it does nothing, and has no tells
you should uninstall it
but theres no way for anyone to tell
Gotcha - don't worry about uninstalling it until I'm getting times worth bragging about lol
if you stream, there is also a randomizer overlay (see pin) which lets viewers see what you've picked up
What's the overlay called?
Hollow Knight Randomizer Tracker ๐
Okay so I'm putting these in the "Hollow Knight" folder, not in "Hollow Knight Data" correct?
yes, they should overwrite the Data folder
yeah, it was obvious when i opened them lol
@solemn rivet the new version of the mod seems to have fixed the luck -> extra geo conversion
thanks!
so, something i've noticed about the google drive, is that when something is updated isn't clear on the front page. For example if you look @ KDT's Player Data Tracker, the "last updated" is Oct 16, except that if you go inside the folder, you then see that the zip file was updated on the 19th. I don't really know there is a way to fix that, but it is confusing.
yeah, I don't quite understand why the folder doesn't update
maybe add a "last update: 00/00/00" to the folder?
Isn't this how folder dates usually work though?
I think it only changes the date/time if you rename the folder
Or maybe only if you add/delete things in the folder
^
If you overwrite existing files with new versions, then I'm guessing it doesn't consider it to be an "update"
@rain cedar - is there any chance that the randomizer mod could delete the rnd.js when hollow knight first starts if it exists? I know you changed it to delete if you load a non-random save, but I'm adding the Seed # to the UI overlay. when you first start HK, if the last thing you did was a rando run, then the rnd.js will still be there from the last run. (which then will get loaded into the UI). As soon as they start a new run, the rnd.js will get updated, but it'd be nice to not have an errant seed loaded even for that period of time
can you make the UI only show up when the game is running?
cant you just change to a scene without the ui whenever the game isn't running?
nah, Im just curious if its possible to check for the state of the game
currently, I can't
you get an onquit message
i can check if the UI is connected i suppose
and you can't connect until its started 
i guess my biggest worry is this sequence (if i were to use the loadgame event to show the UI the first time, to avoid errantly showing seed # wrong)
* Player starts game
* UI hides until first load/new game
* Player is playing
* OBS does something odd and reloads the UI page
* Because I wait to show the UI until the first save load, the UI is missing until the next time the runner saves/quits or picks up an item (or some other event triggers the broadcast)
there is this speedgaming channel which hosts a lot of randomizer races in different games
I wonder if it possible to get in contact with them at some point
we're a step ahead 
(in fact i'm watching SM Rando on SG1 right now ๐ )
i think for now, i'm just gonna leave the logic as is. it'll show the wrong seed until they start the game if the sequence of events happens to make that file exist, but once they start, it'll be right and it solves the issue of weirdness if the overlay restarts mid game
it's how it works today, just no one notices cause the seed# isn't there
You wanna try out the stuff we talked about tomorrow Wyza? Dunno what your schedule is like.
yeah, i should be around all day, kid is sick, so i'm not going anywhere ๐
that happy smiley
Ew that's no fun
not really, no, but such is life
is there a button in debug mod that grants relics?
darn, was hoping the save game editor would let me do it, but it doesn't have one either
@rain cedar anyway to tell what relic/artifact actually gets picked up? Seems like the event that i'm getting passed shows the vanilla relic in the name, not the randomized one you get.
I'm already deleting the rnd.js on first scene load for a new game
And yeah for relics the best way I think is for KDT to run the relic randomization on his end
@leaden hedge Added the logarithmic weighting like you suggested
Bonfire Mod interface upgrade https://drive.google.com/drive/folders/0B_b9PFqx_PR9UzMxeHdva2hFT1U?usp=sharing
it shows all stats on the level up screen - including geo, crit damage and focus cost
