#archived-modding-development
1 messages ยท Page 19 of 1
sean will probably want your modlog.txt
No, I see the problem
It's an easy fix
Like super easy
I just forgot to change something that's still checking player data
Alright it's up
And now I've moved to bed for the third time
Don't go finding any more bugs I need to fix
after soul master?
yeah
yes
ok
desolate dive does too
I'm guessing Elder Baldurs won't spit baldurs if you have dive instead of fireball?
oh, did he randomize the spells too now?
oh, I thought the vengeful spot is also randomized
is the new version already on the drive?
KDT: @Gradow when you wake up or whatever, what do you reckon to making the more powerful spells require higher intwhat do you mean?
did you find the pin @sturdy whale
yes
and instead of just giving you the upgraded versions of spells, the game gives you a certain amount of "levels"
maybe,
no, that doesn't sound good
you could use those to make an already OP str/dex/lck build even more op
I'm not sure, it's just thats a pretty common trope in these sorts of games, that you require X in a stat to use a spell
if anything its a nerf to nail builds
because you cant use the op spells
unless you spec into int
yeah
but that would make the shade soul drop useless, no? I mean, reather than useles... you go out of your way to get it, but can't use it due to lack of stats
that sounds more and more like an arpg
I guess the pale ore would be useless on a spell build 
yeah
no, I agree with you
that sounds like a good idea
sigh
I should have made this using the modding api
bonfire mod would synergize greatly with randomizer
well, in a few days / weeks
you're going to have to recode it anyway for grimm troupe
but that shouldn't be tremendously more work
Now that I've downloaded randomizer which files do I extract and where?
^
C:\Program Files (x86)\Steam\steamapps\common\Hollow Knight
ok
it should ask you to overwrite hollow_knight_Data
just say yes to everything
also
make a backup
of C:\Program Files (x86)\Steam\steamapps\common\Hollow Knight\hollow_knight_Data\Managed\assembly-csharp.dll
on steam you can always verify, so it's not a huge issue if you don't make a backup
but it's quicker and safer if you do
also @solemn rivet the earlier you port it to the api, the less of a pain it'll be
you've got less features than you will in future 
but I don't know how to
I have 0 coding experience
I literally don't know what to do
Is fury of the fallen supposed to give you always a movement ability? I think I never got something else
I can try and reverse-engineer the mods that are currently ported
no
but that would take a LOOOOOONG time and effort
so both README.txt and hollow_knight_data go to hollow knight folder
yup
the readme doesn't need to go but yeah
done
all you need is a cs file that look like
using System;
using Modding;
namespace BonfireMod
{
public class BonfireMod : Mod {
public override void Initialize() {
ModHooks.Instance.whateverHookYouWant += YourFunction
}
}
}
and compile it as a dll
your functions work the exact same as they do in dnspy
you can tell if its a randomizer
it says randomizer at the bottom
did you extract the randomizer zip
so you have a C:\Program Files (x86)\Steam\steamapps\common\Hollow Knight\Randomizer this folder
KDT: I'll give it a try this next week
if you start the game, does it say at the bottom right of the title screen "randomizer" ?
Nope
C:\Program Files (x86)\Steam\steamapps\common\Hollow Knight\hollow_knight_Data\Managed\Mods do you have this folder
no
oh, you didn't extract the randomizer then
randomizer should have a readme and 2 folders
the randomizer needs the modding api
you extract the randomizer zip to the same place
do I put the randomizer in the mods folder?
you extract the zip to the same place
so there should be a Randomizer folder by your exe and a Randomizer.dll inside the Mods folder
extracting to hollow knight folder
it should look like this
dont mind the backup folder
also yea, you need the modding api
which is in the drive too (at the bottom right)
I believe he already extracted the modding api
hmm
but forgot to install the randomizer
also, he changed the elder baldurs, now I understand
done
ok now it should work
what's this easy randomizer?
its the difficultly of the tricks required to complete the game
easy shouldnt require difficult tricks to progress
or possible difficulty
hehe
if you've never speedran before
you potentially need to do queen station -> fungal, fireball skip
Im in the same boat as you tho, I did now 3 randomizer runs, all took me around 3 hours
before I played once 100% + 100% steel mode and a 5 hour speedrun for the achievement
skip the wraith then?
this is a thing you might have to do
holy
you can't if mantis claw is there
you can do it with double jump too
dram nail chamr?
its random
charms and abilities are mixed up
so I start out with dream nail
charms, skills and spells are all in the same pool
lets beat the game
monarch wings are not critical?
nope
you don't get them in nmg
oh yea, thats true
getting dash saves more time than not
I dont even know how you want to do c peak without the dash ๐ค
I mean its possible to beat the game nmg without getting dash 
not that'd be faster if you decided to put yourself through it
and yes, claw can spawn on c.dash
and yeah you can not have dash before then
hopefully that happens to the race in a few hours 
no one can finish the run
can you get to the c.dash then? without claws?
first boss dead
if you get monarch wings yes
masks are not random
same with soul vessel shards
will the race be now on the new version?
masks, vessels, notches, rancid eggs, ismas tear, void soul / king soul and some keys are static
the race should be on the new version
how long does a randomizer run take you normally kdt?
around 1hr30 -> 2hr
depends on how long it takes to find dream nail
I think this version is slower due to spells being random
the last two runs I did I was struggling finding the claws 
Yo, you guys got it updated then?
In Google Drive?
yep
the baldur doesn't close in ancestral mound
and the floors after soul master are broken if you dont have dive
Same with Greenpath baldur?
nope
Ooh
you've gotta get dive or spirit to get past that one
you can damage baldurs with dive?
So.... Farm for geo and go through CP
jesus, Im always learning new shit
I got 4/6 spells in shops
let me try*
the last run I did
You guys weight them?
I don't think they are weighted
another run I did, none of them were in shops
and vengeful spirit was at lifeblood core
nah, normal dive is not damaging
oh yeah he added in some new charms
...good to know
wait, there's a rando race today?
Yeah 2 hours
you can see whats new
I would like to participate but Im a turtle
anyone streaming it?
risky
so city crest is in the same place
oh btw @young walrus the spells work like dash
what about the wraith?
3 dives
in the ancestral mound?
so if you get lv2 spell you get the lv1 one instead
and the lv1 becomes the lv2 one
yeah dive does more damage
and wraiths is random
it can be any item
so I can get stuck if I get something that doesnt kill the baldur?
no
So dream nail.... Is that the same?
the baldur doesn't close
easy mode has failsafes so you won't get stuck, no matter how bad luck you're having
you shouldn't be able to get stuck
"shouldnt"
theoretically
I got gubberfly elegy
You guys fix the abyss softlock?
instead of wrait
if you actually can legit get stuck you should post a bug report 
im doing hard btw
yea, I had a hard lock yesterday
oh
but I think he fixed it?
you mean the hardsave if you can't get out
Yeah
I don't think so
Lol
in hard you can get stuck if you're not familiar with some bugs and glitches
and exploits
will the race be on easy or hard?
hard nmg
sharp shadow
most useless mod ever
I believe its using srl for now
I think we want to not use it though if we can in the future because discrepencies in timing methods
but for now its on srl
glad I got this
I think I might have gotten an impossible seed...
what happened?
I haven't been able to find mantis claw or double jump, and I'm pretty sure I've check all the charms/spells I can get
check the modlog
even had to buy a simple from sly to get to flukenest, lol
hmm, spell twister is mantis claw and shade soul is double jump
I can't get to either of them with just superdash and dash
s+q
save+quit = s+q
hmm can't you get to CoT with just dash
You can with dive
I'm not sure if you can get to spell twister though without claw
you have to get first the mantis claw
otherwise you gonna be stuck like me in the abyss
Oh wait, I misunderstood you KDT
but I dont know if you can get to the claw without jump
I think you can superdash to the door
I got to CoT, but I can't get up to soul sanctum
hmm, wheres the shade soul key
sly probably, but only after getting shopkeeper's key in crystal peak
Which again, can't get to it
oh bestiary is the same
the 2 baldurs for baldur shell still only spitting fire
do you have fireball?
i have shade soul even
did you update?
yeah, coz the baldur in greenpath spat? i got to baldur shell
sean might have wrote the wrong scene name
and hallownest seals are the same
relics are random
you get a random relic when you pick one up
well, none of the spells have any requirements
so the game thinks you can get to all of them with no abilities @wispy root
Hmmm.... rip
I got stuck
what you got?
Shade soul and descending dark, both I think you can get with either mantis claw or double jump
ill just make it claw / dash / dream nail
so you can always beat the game without going there
with the elegy you can maybe kill the the baldurs under howling cliffs
for now
for the shell spot
dash/superdash/mantis claw/vengeful spirit would help you there
temp randomizer hotfix
its ok, i got the baldur shell now, u can kill baldur with 2 shade soul
just gotta save warp after
maybe someone can try get there with lv 1 fireball
i'll try when i'm done
yes, replace the one you've got
okay, so I'll try and port the bonfire mod to the modding API while it's still early in development
wish me luck
good luck 
after this much time randomizer shouldnt break
you know the randomizer is super new right?
it is?
and definitely still in development
i thought more people would try it
it's technically still being developed
many people do
it's just that not that many people play HK mods at all
its easier to get into than glass soul
it shouldnt break but this is an entirely new mechanic that got added hours ago 
what new mechanic
spells
So.... google drive is up to date, except the xml
kinda makes sense
which you've put in the race channel
hard
and you haven't speedrun before?
I really have nowhere to go
you're going to have a bad time
no speedrun can bypass this
Hard implements a bunch of speedrun strats
like what
like shade skips, fireball air stalls, explosion pogo
shade skips?
yeah probably just make sure everyone has that xml
shade skips requires you to die and then pogo off the ghost
thats a fireball air stall
I would not be able to do that with my dpad hehe
yup
have you been to salubra?
maybe I should just grind for the lantern and go to crystal canyon
what movement abilities do you have?
none!
yes
did you check salubra?
you don't need any
shade skip 
are store bought charms different?
yep
if sly and salubra don't help you, then you'll have to shade skip
you have to shade to salubra
I mean, to actually progress into new areas
the race is in an hour right?
I've done a few nmg runs myself and wouldn't dare try the hard mode randomizer
I fail explosion pogo more often than not
hmm, I did the hard one now a few times
maybe I was lucky idk
and I dont speedrun
yea
alright I got an upspell
scream?
thats not helping for progress
so vengeful wraith can get you to the other side but the scream cant?
it has recoil
more like slight knockback
does howling wraith cancel falling animation like vengeful spirit does?
never tried it
I'd assume so
yes
although it instantly causes you to fall at a fixed speed until you hit the ground
there's also a momentary increase in height before the drop
does the shade have range limit?
yes
best place for early geo grinding?
Movement ability skips within Hollow Knight. The first and last come with caveats. The first leads to an essence tree which will produce out of reach essence...
but you probably can't get there yet
done
salubra had the dash
mothwing cloak
she also has dreamgate
very interesting
yes I got thorns of agony
my favorite charm~
does hard require any oob?
oob?
out of bounds
got desolate drive
im fucked
im at crystal peak without mantis claw
the only way to leave now is through the passage to resting grounds
and I dont have the lantern
Went through the darkness?
Does anyone happen to have a single image that contains all the icons for the charms + abilities + special items (basically a spritemap for inventory+charms).
probably not
I know i could build one from the images on the wiki, but if i can avoid putting 60 something images together ๐
Thoughts: https://iamwyza.github.io/HollowKnightRandomizerTracker/Index.html ? Basically a tracker for the randomizer for commentators to use.
Known things.
#1 the images are just pulled from game screenshots, as such, things like the charms still have some of the background on them which meh.
#2 because I used greyscale to indicate having the item or not, several items are difficult or impossible to decern.
Otherwise, it's fairly simple/straightforward to use. Click on an item, it lights up, click again, and greys out. Reset clears everything. "t" shows the borders around the items to show clickable area (mostly a debug feature).
it's really hard to tell when one is clicked vs not
mmhmm, that'd be #2 on the list. HK is such a grey/muted game which makes alot of these not pop, a better way to indicate having it would be nice, but not sure a good one that wouldn't look bad (but I'm absolutely garbage at UI/prettyness on stuff, functional I can do, pretty I can't)
i mean, even to put a bright white light behind them to make it super obvious would be enough
or a green lithgt
light
thats every sprite you should need
or just something
so how would i implement this?
you just open the web page
each individual racer would have their own thing on stream?
Just use the same color as admins here, the highlight will light up at village then.
well, for example for super metroid
oh, do they check it off?
the tracker is on the restream box
so it's up to a commentator or tracker to keep it
since the racers aren't going to have time
in SM and LTTP, they do a dedicated person for tracking
no. it'd be players doing it
they can't auto do it
trackers and commentators are separate, because it's too much for 1 person
i'd want it on my stream anyways
oh kk, so i'b basically just have a browsersource open and someone else would be checking it
or an auto one like kdt said
auto would be better
Would be sick, you could play in chinese aswell then
but that's significantly more complicated ๐
except that a webpage reading from a local text file requires you to override security settings
not a json file
Chrome/IE/FF all block local file system access by default I think
also you'd use the obs built in thing
so the bg is transparent
without having to chroma key
yeah, there it is, by default, browsers like chrome block local file system access unless you launch them with the equivalent to "--allow-file-access-from-file" flag
it's a security feature
there is a difference between doing file://c/somefile.json and trying to open it via javascript (which would be required in order to read it on demand). Reading it via the file:// method will work, but if you tried, for example, to do $.getJSON("somefile.json"), then you get this
that said, this doesn't have to be in the browser. Could just as easily write it as a c# program
did it in a browser cause it was quick, dirty, proof of concept
and it makes it easy to make it available to the masses ๐
though i suppose the number of folks who will use it number in the dozens
or less
true
all randomizers spread like wildfire
Do they do randomizer races at agdq?
they are this one ๐
they are this year for LTTP
but just having HK at agdq will help
plus you know... i can bring it up
it's not like i won't have a mic
if someone can get the json file generated, I can make it parse. but later, dinner now and wife is giving me the look
sean will have to do it
I can't just dump the playerdata
the randomizer makes all of them wrong
Should be, yeah
would be cool to have dreamers on the tracker
doable I guess
let me try this
is there a hook for setBool sean if not can I get one 
There is both GetBool and GetBoolInternal
Calling GetBool also calls hooks to mods
Internal does not
I mean a hook to be called when something gets set
so I can save whenever playerdata gets updated
I guess on level change works for now
There's a hook to SetBool
anychance there is a simple mapping from the names in _Sprites, to what would be in this json file?
or would the names vary enough we'd need to maintain a mapping
looking at a few, seems right
so basically, thinking:
{
[
{
"name": "Charm1",
"has": "true"
},
{
"name": "Charm2",
"has": "false"
}
]
}
It's gotCharm_x in PlayerData
hasFireball_1, hasFireball_2?
oh is it
fireballLevel
no fireball is an int
right
but
could keep the coding simpler if it's just that every thing in the tracker is represented as a "item", doesn't have to be though, could just use the int values for the spells
well you're going to have to do something weird with spells anyway
and with dashes
you can just do bool fireball1 = fireballLevel &1, fireball2 = fireballLevel&2
if you want it to be a bool
sort of ๐ - javascript being non-strongly typed makes that a little weird. not a huge deal just so long as i know what the format of the json is
also this en_ui file is weird, it's like it wants to be XML, but isn't
It's pretty easy to turn it into proper XML
yeah
already done
doesn't it make it less weird
so will the json have the values from that UI file, or is it going to be more like what Sean posted with the gotCharm_x, got_Lovekey, got_something, got_arcaneegg?
gotCharm_x
but the the x is the same the x in the ui file
so CHARM_NAME_5 is baldur shell
so gotCharm_5 = baldur shell
ah, k, so use UI file to look at the values in the 7z sprite folder to get the right charm # for the right image
cool, gotta run, but will tackle more of this later. Don't think it's going to be terribly difficult now that i have a good idea of what we'll have.
for now I'll probably just dump the entire save file
incase people want to track other stuff in there at some point
@buoyant wasp
you can even do stuff like, see what people have equipped

gotCharm_x for charms
xxxLevel for spells
"maskBrokenLurien":true,"maskBrokenHegemol":true,"maskBrokenMonomon":true these are dreamers I think
most of it is self explanitory
if your not sure which variable is which you can ask 
but im going to sleep so don't ask me
oh heres the plugin
for now it just saves to playerData.json in your save folder
Fixed the greenpath baldurs and put in more accurate requirements for baldur shell
XML entry for baldur shell is a bit of a monster now
https://pastebin.com/3ER4wsCG
I need to implement a way to do proper boolean algebra in the XML so this doesn't happen
@leaden hedge - how often would it dump? Any way of determining if something changed? (IE can we add a flag to the dump that says, "inventory/skills/spells" changed, since it looks like there is alot of data here that is likely to change each time the file is persisted)
there is modding for hollow knight?
several ๐
several modding
pinned google drive has all mods
oh if you're getting into modding get UABE and dnspy
i just want to know what is there to mod
like... everything
hrm
it's modding. that's the point. you can do whatever you want. your imagination is the only limitation
that and some coding stuffs
probably
You probably won't make new areas or enemies, but everything else is fair game
There is a randomizer, there is a debug mod for practicing stuff, there are mods that completely change the way you get power (like the bonfire mod), or different ways of doing combat
any mod updates that Sean hasn't put into the drive folder himself?
me and KDT are cooking something up for the randomizer, but it's not ready yet.
alright
Nude mods when
do it yourself
Considering the following:
Shortening the Mods drive folder pin
Copying the two guide pins (replacing audio and extracting game assets) to a drive folder and pinning that (or adding it to the Mods drive folder pin)
@small nest, @buoyant obsidian, @leaden hedge: Please consider editing your pinned posts and adding "<" and ">" to the ends of your links so that the previews don't show up to save on space
Done
thank you
I wanna say keep the pins pinned, the drive folder isn't exactly more accessible
Yeah
I wish there was a way to rearrange the pins, it'd be like a welcome message if it was at the top
Yeah, lemme unpin and repin it
I just wish there was an easier way to provide info and keep tabs besides a scroll history of posts
Oh repinning works like that? Nice
could maybe just edit the post in lobby?
how so?
@cedar raven I added some platforms to get you out of City without wall jump, just gonna change a couple more things then I'll put this build up https://imgur.com/a/90N6P
I mean simo would have to do it
No, I mean, what would you recommend putting there and why there instead of as a pin in the relevant channel?
You can do that, Seanpr!?
I mean I'm not exactly creating new platforms here
I'm making copies and moving them where I want them
So could you make copies of enemies too?
Visibility isn't the problem, it's ease of access, and looking tidy
can you clone zote? 
Lol
lobby still has the same problem of having to scroll to see everything
All zotes in cof
haha
Colors are subject to change. The sprites need to be normalized in size, their actual sizes are all slightly different which makes aligning them yucky. But, It reads from the json file provided by @leaden hedge and marks the charms you have based on that and marks the ones you have equipped too. Currently have 3 sets of sizes that can be tweaked, and location of where the charms go can be tweaked too. Next up, abilities and items, which should be fairly easy now that i have the rest working.
this is overlayed via OBS Browser source btw
I can make the randomizer output a json file every time you get something
yeah, kdt, did something where he's dumping basically the contents of the save file
it's up a few dozen messages earlier
Oh, I see
did a dll for it too, but i don't know how often it's being updated, not that it matters too much
thats neat
it's target is primarily Randomizer, but honestly there isn't a reason why you couldn't use it for normal stuff either i suppose
so, if I go for example to glowing womb but I'd get dashmaster, it would mark the dashmaster?
in the randomizer
yup
that's the goal
the idea was to make it so that if you're casting, it's easy for viewers to see what you have
since if you show up to a race like 20minutes in, you have no idea what the players might have at that point unless they menu and you can catch it
yea, its a good idea
(not original, totally stole this idea from Super Metroid Randomizer, which I think stole it from A Link To the Past Randomizer ;))
though the implementation is original
I wonder if it would be possible to make it an twitch extension
what file do you read?
the json file?
yeah, kdt is generating a json file based on the contents of the save, or something to that effect
and i'm just putting a timer into the overlay change checks the file every X seconds and updates the overlay based on the data there
yeah, i'll push it up here before i go to bed
or at least, what i have so far. still more work to do before it's done
Hmm.... So is there a way to have two PCs talk to each other about this? Lol. Or have the overlay interact with chat commands like a lot of LTTP runners have?
no need
I have a two PC setup
So I can't have my gaming PC have the program since I can't key it with obs onto the overlay
Gaming and streaming pc
Yeah
if they are networked, you could map the drive where the json file get's written to
the browser doesn't need to care if the json file is over the network as long as it can reach it i think
I'll have to test that
otherwise....idk, I'd have to think about it. adding server communication is a great deal more complicated than simply reading status data from a file ๐
Yeah. That's why I was thinking bot commands could do the same thing that the json is
Just change the state of a bit in the code
And thus change the overlay
yup, but then you'd need a server even if it's a small local one in order to do cross client communication
The info is for chat anyways. I don't need it
Why? My boy is on my stream pc
Bot*
If I have the info overlay on the same PC as the bot
It could just affect the charm overlay
i suppose as long as there is a library already out there (there has to be i assume) that can interact with the bot, that's pretty doable.
we'd just need a bot on the game PC that can post and then on the streaming PC it would need to login and listen for bot commands to update the overlay
I mean... I'd just have viewers donit
which I suspect wouldn't be super dificult
Do it
Increases chat interaction
Whitelist people I trust
I don't care if they mess with it. Like I said.... I don't need it
It's for the viewers
yeah, it wouldn't be hard to add the ability to do that as long as a JS bot client already exists. if it does, should be straight forward to swap out the "read from json file" for "listen to bot events"
Yeah that's what I'm thinking
Would it also retain the click to change functionality too?
right now, click to change doesn't exist (because this version is automatically doing it and i did new code because of the updates), but adding it in again would be trivial
i rewrote most of the prototype once i found out i could get the data without interaction from the user
๐
so, yes
Put up a new randomizer build with some requirements updates and hard lock fixes
Also this ugly button in the top left for logging the randomization without being in game
Useful for finding a good seed to race on
Lol
so when you press it, it dumps the spoiler log?
Yeah
oh, there's a question, is the randomizer seed in the save data?
Do we have versioning yet? Coordinating what version with others is a bit confusing RN
cause if it is, I want to put the seed # in my UI overlay too
Yeah, good point, I should add a version number text
All the randomizer save data is in .rnd files
Which are just plain text
k
Could just put version right after the randomizer text on the title screen
^
i thought the mod-framework was going to start putting the Version# in the lower left corner
or was i imagining things
It's on the to do list
ah
There's a lot of things I should do
does the randomizer mod randomize relics
can a movement item appear in a relic spot
Nah
Movement items are restricted to places that aren't terrible to get
Can't get them from relics, grubfather, or seer
Closer, all skills, spells, relics now in and working. items are displaying, but not working yet.
how to install blackmoth?
do i just move the .modbundle file into the hollow knight folder?
and then start a new game on 'classic mode?'
For the modbundle method you need the mod installer
does this work with upgraded versions of spells/movements?
movements??
items
bah
I can guarantee you the item thing doesn't work with spells in randomizer, at least
With randomizer the spell variables in playerdata do nothing
It's saved in the randomizer save file
hang on, so, started blackmoth, and chose classic mode
arent you supposed to get dash ability from the start?
cuz im not
Yeah, you're meant to have it from the beginning
hmm
im in king's pass
lemme check controls
yeah, their normal
weird
hm
it said 'blackmoth knight' in the title and all
Weird
You can try the modding api version of the mod
Which I am biased towards anyway
I'll help you with the reasoning, then
Because it's better in every way to shitty non-compatible mods

Yes that is what I said
Yeah, I did that a few days ago
any reason not to just replace the regular version with it?
Alright
@rain cedar how about folders that hold the individual game version mod zips? did it with Glass Soul as an example
Sure, that looks a lot better than 2-3 files per mod
@rain cedar - so the save data for spells won't work the way that @leaden hedge did it then? hmm, how to test that, guess I'll have to run a rando until i can find a randomized spell and see what he did
also, yay, all the things, i think:
You can see exactly where everything is if you look in ModLog.txt in your save folder
So you don't have to hunt a spell down
hmm, were you talking about a different mod when you said
| I can guarantee you the item thing doesn't work with spells in randomizer, at least
just wanted to make sure i was getting the right data ๐
I was talking about your thing
I don't use the spell variables in PlayerData because it messes with the pickups spawning
ah
wonder if KDT thought of that already
sigh - OBS doesn't allow for local JSON anymore with Browser Source, it adopted webkit with CORS too
I can get spells to work via randomizer
Nah, don't worry about it
I just dumped playerData, but I guess I could check the same variable sean used to calculate it
I will try to override the save/load functions to have the right values
That might mess with your thing, though
Or run after it
No way to choose which code runs first
if I do GetBool(_fireball)
or whatever you used, that'd work right?
assuming randomizer is installed
Yeah, do whichever is greater between PlayerData.fireballLevel and GetInt("_fireballLevel")
I'm pretty sure GetInt returns 0 if it's not found
Maybe not, though
Probably better to double check that
also for now @buoyant wasp it'll just change on scene change, until I can write a hook that gets called whenever something gets picked up
works for me
I don't get what you're suggesting
oh you're saying SetPlayerBoolHook gets called whenever you pick something
not that you've got to hook every specific variable
There we go, drive folder all updated, individual zips in folders instead of individual folders in zips
Yeah, it gets called whenever a bool is set
So you can just check if it's a bool that corresponds to an item
Not entirely sure on how/if to use tags to let people know which mods use the api, have modbundle option, drm free option, etc.
Just having something like [DRM-Free] in the zip title makes sense to me
I think that's fine, then
Folder names are already too long to show for me
Wouldn't help to add more
already too long? with just author and mod name?
oh, i use list view for the mod folder
should i put the mod name before the author name?
alright then
Is there a way to set the default view for the folder?
Or is it just a user preference exclusively?
user pref as far as i know
Alright
Oh well
@leaden hedge - So, while older versions of OBS might have allowed local file access, new versions use strict CORS because they use webkit. So then, we have to approach this some other way. in order to make the data available. There is an option to disable that security, but it applies to all open chromium browsers, which, no.
One approach would be to look into doing a very light version of this: https://gist.github.com/flq/369432#file-httpfileserver-cs or this https://codehosting.net/blog/BlogEngine/post/Simple-C-Web-Server - though instead of having it look for stuff to serve up, the only thing it ever would serve up would be the playerData.json contents as a JSONP on localhost:someport.
I guess doing via a tiny webserver might work
the big thing is just making sure it doesn't impact the game's performance (if indeed it works at all). I'm trying to think of other approaches, but...
@rain cedar when does NewGameHook get called before or after playerdata gets set?
cool just making sure I can dump the json in there, and it'll actually be empty
@buoyant wasp have you tried starting obs with the --disable-web-security arguement
yup, it stops erroring but then won't load the data. From what I read, you have to exit out of all instances of chrome in order for it to take effect fully
pretty annoying they'd just remove the best functionality of the browser source
yes/no. They didn't remove it, they simply updated chromium, and chromium has this baked in.
and IE/Firefox both changed their engines to behave the same way, so outside of custom compiling a browser engine, they're kind of stuck
wish they would have added an option that says "trust this page" or "grant this page access to this directory"
or you know, hey this webpage is local and makes no external requests
maybe its safe to let it read files
that'd be too easy
we certainly wouldn't want easy
this might also be an option: https://github.com/sta/websocket-sharp - websockets would afford us one bonus in that instead of having to write the entire json every time something changes, you could just write to the socket on change for the thing that changes. apparently works with unity, so might work here too.
in any case, about time for bed here, so, good luck ๐
How are you doing the alert?
its a websocket
public void updateJson(string var, bool value)
{
if (var.StartsWith("gotCharm_") || var.StartsWith("equippedCharm_") || var.StartsWith("has") || var.StartsWith("maskBroken") || var == "overcharmed")
{
ss.Broadcast("{\""+var+"\":\""+value.ToString()+"\"}");
updateJson();
}
}
And I guess that's hooked to SetBool?
I see
Well there's no way to tell what is actually being set from the SetBool function
Other than by running the randomizer logic yourself, I guess
I think it would work with a hook to SetBoolInternal
well if you dumped randomizer values to a json, you could just look at that
Which doesn't currently exist
to figure out what gotCharm_6 actually was
Yeah, I could do that
that way I don't have to make this work for every mod
every mod can just make a different webpage
also fireball and scream work as expected
but quake returns -9999
did you call it _diveLevel or something?
No, I'm looking for _quakeLevel
{
if (name.StartsWith("_"))
{
name = name.Substring(1);
}
return pd.GetIntInternal(name);
}
if (string.IsNullOrEmpty(name))
{
return 0;
}
if (name == "_fireballLevel")
{
return _fireball1 + _fireball2;
}
else if (name == "_quakeLevel")
{
return _quake1 + _quake2;
}
else if (name == "_screamLevel")
{
return _scream1 + _scream2;
}```
There's the relevant bit of my GetInt function
oh
mb lol
int randomFireballLevel = ModHooks.Instance.GetPlayerInt("_fireballLevel");
int randomQuakeLevel = ModHooks.Instance.GetPlayerInt("_quakeLevelLevel");
int randomScreamLevel = ModHooks.Instance.GetPlayerInt("_screamLevel");
Nice
@dapper folio give me edit priveleges 
send me a message with the email you want to have privileges
@rain cedar is the a hook for when the application quits I know monobehaviours can do OnApplicationQuit() but I don't want to create a gameobject and attach it somewhere just for that
just to tell the websocket its game is closing
it probably shouldn't display anything unless its in game
You can probably check if the process is running
Sounds tedious, though
Not sure where to even hook for application quit
alright I think everything I need to do is done
unless wyza can't get default -> randomizer working on the javascript side
@buoyant wasp the json responses look like
{
"var" : "name",
"value":"true|false|int"
}
theres a few keywords, GameExiting, NewSave and SaveLoaded, everything else is a game variable
and the mod is in the google drive
oh and if you send "json" to the server, it'll respond with playerData in a json
@leaden hedge - is there any debug logging for this? When i drop in the dll, load the game, and load the test html, i get "connectoin refused" for localhost:11420
you can check the modlog
oh did you refresh the page
for somereason it only ever accepts the first request
hmm, that'll be problematic. cause OBS sometimes refreshes browser source (for example if you change the scene or show/hide the source). it'll also make development and debugging really, really hard if every time you need to refresh the html you have to close/start the game.
but in this case, the modlog helped. Looks like i have a old version of the mod framework and/or randomizer
missing the QuitHandler
ah the link just above where sean at'd me has it
yeah, got it

