#archived-modding-development
1 messages Β· Page 104 of 1
relatable
help...
quote totally not stolen from an actual game developer
which one
try adding logging statements, try try, catch sections
One of the devs from clicker heroes/playsaurus
if you don't do this and the mod has an exception it will fail silently
I'll just dump the main thing here and hope someone understands where the problem is
public void OnAttack(AttackDirection dir)
{
LogDebug("Attacking");
if (PlayerData.instance.equippedCharm_6)
{
LogDebug("Stronger Attack");
_tempNailDamage = PlayerData.instance.nailDamage; //Store the current nail damage.
LogDebug("Set _tempNailDamage to " + _tempNailDamage);
PlayerData.instance.nailDamage += (PlayerData.instance.maxHealth - PlayerData.instance.health); //Double the nail damage
return;
}
}
(Lemme remember where the log was, be back in eventually)
the thing in the save files
ModLog.txt?
messages are not there
no "Attacking" or "Stronger Attack" or "Finished Attacking"
LogDebug("Finished Attacking");
Only info from it is this
[INFO]:[NewFotF] - Initializing
[INFO]:[NewFotF] - Initialized
Log("Initialized");
these are all the Hooks I have
ModHooks.Instance.AttackHook += OnAttack;
ModHooks.Instance.AfterAttackHook += OnAfterAttack;
And to "Did you attack?", I killed a few to see if anything:
[INFO]:Disabling enemy Zombie Runner
[INFO]:Disabled enemy Zombie Runner
[INFO]:Destroying enemy Zombie Runner
[INFO]:Destroyed enemy Zombie Runner
(I'll change those from LogDebug to Log)
ok
Ok
it's working better now
info appears in the ModLog
I'll run 1 last test
hm
[INFO]:[NewFotF] - Attacking
[INFO]:[NewFotF] - Stronger Attack
[INFO]:[NewFotF] - Set _tempNailDamage to 21
[INFO]:[NewFotF] - Set Nail Damage to to 56
[INFO]:[NewFotF] - Finished Attacking
but I still deal 21 damage
[INFO]:[NewFotF] - Attacking
[INFO]:[NewFotF] - Stronger Attack
[INFO]:[NewFotF] - Set _tempNailDamage to 21
[INFO]:[NewFotF] - Set Nail Damage to to 56
[INFO]:[NewFotF] - Finished Attacking
[INFO]:[NewFotF] - Set Nail Damage to to 21
Log part works fine
but I still only deal 21 damage
why?
what's your afterattack
this thing?
private void OnAfterAttack(AttackDirection dir)
{
Log("Finished Attacking");
PlayerData.instance.nailDamage = _tempNailDamage;
_NailDamageTracker = PlayerData.instance.nailDamage;
Log("Set Nail Damage to to " + _NailDamageTracker);
}
ree
yes?
put this after PlayerData.instance.NailDamage = _tempNailDamage
and after PlayerData.instance.nailDamage += (PlayerData.instance.maxHealth - ......
PlayMakerFSM.BroadcastEvent("UPDATE NAIL DAMAGE");
private void OnAfterAttack(AttackDirection dir)
{
Log("Finished Attacking");
PlayerData.instance.nailDamage = _tempNailDamage;
PlayMakerFSM.BroadcastEvent("UPDATE NAIL DAMAGE");
_NailDamageTracker = PlayerData.instance.nailDamage;
Log("Set Nail Damage to to " + _NailDamageTracker);
}
also on attack u dungo
Yeah, I put it
now try it
but now it's complaining avout this
The name 'PlayMakerFSM' does not exist in the current context
OK, I have to go out now, I'll try to fix it when I get back
I have a question: Why is something like lightbringer platform exclusive? How is that possible for unity engine mods anyway?
Its a mod of the assembly csharp which is platform specific
assembly csharp is not platform specific though
it's like java bytecode
unless it's using external libraries not used by the original game that exist on unity's windows version of mono but not their linux/mac version
It is platform specific though π€
Try and use your assembly csharp on gog/linux /mac install and it won't work
the assembly c# is the same across different OSes tho
which is why I can compile the modding api for windows and use it in linux
using windows assembly c#
and windows build target
Didn't used to work like that
so the assemblies converged for HK
like they used to be different files
and now they aren't
Guess so
maybe HK used to use a third party library or something that was only compatible with windows, so the linux and mac ports used a different 3rd party library, then somewhere around the grimm update maybe they switched their windows only one to the one that works on all oses.
that's commonly why assemblies differ
keep in mind the mac/linux port was made by some dude (whose a cool dude) but who is unrelated to TC.
I think
maybe it was done in house I forgot
tbh
they didn't release it day 1 which indicates they had to rework the code for the platform and it's probable that meant they had different branches which were slightly different code wise
Speaking of platform specific bugs. Enemy HP Bar is zipped improperly. the Managed folder should be uppercase in the zip file not lowercase. This makes it impossible to install with a mod installing program on case sensitive file systems like Mac and Linux
@leaden hedge
@floral furnace you have the same problem with your tiny mod. your zip file should have a folder named hollow_knight_Data not hollow_knight_data
and because I'm on a roll I'm gonna check every API mod in the drive
the correct case sensitive format for the zip is:
hollow_knight_Data/Managed/Mods
@pearl sentinel the zip file for Boop mod should have a folder called hollow_knight_Data not hollow_knight_data.
ok I can upload it for you
Also I just finished checking and ALL other API mods are good. but @leaden hedge and @copper nacelle y'all did leave some stray desktop.ini files in the zip that you might not have wanted.
im only tempted to just boost the regular damage of nail arts alone now but meh, that would be like putting bandaid on a leaking pipe
ok I uploaded it
does ngg work lifeblood?
i just tried it and it said it was loaded i but he was normal grimm
does modcommon mess with it? maybe ill disable that
i disable everyting but ngg and it doesnt seem to work :/
guess ill have to down patch. Oh well i get two free notches now and OP flukes, not so bad
equip heavy blow to compensate for the gain of 2 notches and don't use flukenest 
No it doesn't work on lb
on the positive side, 100 more health
Why is everyone Benji?
But I wanna be Simo tho
Gradimo
Grad imo

Simow
the lawn
@compact sedge you can now escape
and it makes you leave and stuff
πͺ πΈ π¨
^
mantis lords -> MoP
i'm dashing off of the wall
i think even w/out claw you could just updash afterwards
u right, 56, but it's possible for someone to get there without mothwing cloak
just pogo, Dunker
you can pogo on the spikes
I mean
yes
^
and dash right after
yes
that's all you need to do
yeah and i did
blackmoth dash is longer
exactly
then like dash higher and hold left??
ok
you could just not hit the platform and pogo straight to the wall
that's what we said
big think
K I'm home
I can start failing to fix the mod again
still stuck on this The name 'PlayMakerFSM' does not exist in the current context
using
@rain cedar when you have time, can you review the changes I made to the gathering swarm mod using harmony. I removed the dependency on hooks dll.
Did I add what as a reference?
Playmaker.dll
wait - so we're moving from monomod to harmony?
also, for anyone using mod common, feel free to try out harmony
no move, i just added the source into mod common
you can diff with previous revision to see the differences
details on how to use it
Ok, I added PlayMaker.dll from the files as a reference
The type 'MonoBehaviour' is defined in an assembly that is not referenced. You must add a reference to assembly 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
Whyyy
then add UnityEngine as a reference
communication nodes?
Instance = this;
comms = new CommunicationNode();
comms.EnableNode( this );```
papers: always add PlayMaker, API and Unity, at the very least
tips for beating mantis lords?
no
oh, my communication node is my event manager system
Well
oh
I thought it was something related to harmony
when the other 2 start to attack i can barely even hurt them
because of modHooks = ModCommon.HarmonyInstance.Create( "com.mods.hollowknight.charming" )
that's the only harmony thing in initialize
@copper nacelle What should the thing I added do?
PlayMakerFSM.BroadcastEvent("UPDATE NAIL DAMAGE");
but, yeah, comms =/= com
update nail damage
there should be a #mod-help channel that's basically #hk-help but for mods, seeing as how often people ask for help with mods
yeah
and by that i mean mainly me and a couple other people
maybe
but whatever
oh, but thanks gradow, that did point out that i put the creation of the harmony instance after the usage
Modding is where people help each other create mods
so whoops
mod-help is where people help each other use/beat the mod
just rename the channel to #check-pins and no more help is required
^
unless pins are gonna contain tips on beating mantis lords with blackmoth
which i doubt
ptkyr lawful evil
also
yo there's like a help channel
mmmmmyes
i mean
that could work
but i think of #hk-help as something for base game assistance
there's not much I can say about mantis lords tho
beat them basically the same as you would normally
dash when they drop down and when they dash at you
stand in the corner and pray
i find it difficult to fight 2 mantis lords at once cause i dash towards one and then the other hits me
usually hitting me into spikes
then use spells/1 damage nail
1 damage old nail vs. mantis lords
who will win?
also how does the nailsmith work?
as you would expect him to
so he upgrades my nail
1.01 damage nail
he upgrades your dash
oh
It should have updated... still getting the messages right, but still dealing 21 damage
[INFO]:[NewFotF] - Set _tempNailDamage to 21
[INFO]:[NewFotF] - Set Nail Damage to to 56
[INFO]:[NewFotF] - Finished Attacking
[INFO]:[NewFotF] - Set Nail Damage to to 21
I think I put the thing where I had to
public void OnAttack(AttackDirection dir)
{
Log("Attacking");
if (PlayerData.instance.equippedCharm_6)
{
Log("Stronger Attack");
_tempNailDamage = PlayerData.instance.nailDamage; //Store the current nail damage.
Log("Set _tempNailDamage to " + _tempNailDamage);
PlayerData.instance.nailDamage += 5 * (PlayerData.instance.maxHealth - PlayerData.instance.health); //Double the nail damage
PlayMakerFSM.BroadcastEvent("UPDATE NAIL DAMAGE");
_NailDamageTracker = PlayerData.instance.nailDamage;
Log("Set Nail Damage to to " + _NailDamageTracker);
return;
}
}
show your after attack hook
private void OnAfterAttack(AttackDirection dir)
{
Log("Finished Attacking");
PlayerData.instance.nailDamage = _tempNailDamage;
PlayMakerFSM.BroadcastEvent("UPDATE NAIL DAMAGE");
_NailDamageTracker = PlayerData.instance.nailDamage;
Log("Set Nail Damage to to " + _NailDamageTracker);
}
also, I don't get harmony, Kerr, sorry
I'll have to look into it properly later
okay, and can you show me when that method gets called?
?
I got distracted and then confused
Methods were those public void things, right?
(I'm very bad with the names of things TnT)
Gradow, will you change anything about Bonfire's UI mess ? :<
uh
...S-s-senpai ?
nobody :c
Now you're just "nobody" that I didn't know
oh
Well, as they say, nobody is just a friend you haven't met
didn't know nobody had changed their display name
btw
what do you mean by UI mess?
(wherever I go the channel starts turning into #βmeme)
well
only if you want to
not like I want you to download it or anything~~, b-baka~~
oni-chan ..... >_<
Oni is demon
onii is the one you need
:triggered:
Also B L A CK M O T H G U B B E R E L E G Y
Also this charm combo is pretty OP
you get from Point A to point B wth a single click
have u tried reading the charm descriptions
imo making it so you can't pass through walls sounds impossible
OH, Sharp Shadpw now does this
btw even without it you can pass through dirtmouth's floor
try not to get yourself stuck
because the hazard respawn location is above nothingness
also, try heavy blow
ok use the loadout I posted in meme for maximum memes
w/o ss but with grubberfly
probably because collision detection is hard when you're going that fast
maybe that's some leftover code
yeah, it is
I'm moving grubber's just like with sharpshadow
ok so it's not because hit detection at 3x speed is almost impossible
Hmmm
I'm manually moving the transforms
actually, that started out as a tentative fix for not being able to dash through some enemies
wut
oh, yeah
you prolly don't have the latest version
AA fixed that old vanilla bug, papers
brb
ok
(wondering if I should just dump the whole mod somewhere to see if you can find what the problem is...)
^
Do I need an account to post it in Github?
Ok
best version control for this kind of stuff as far as I'm concerned
but if you don't have a github account yet now's a good time as any to make one
Making one right now
Repository...
what does that mean? New word for me
(English's not my first language sorry)
like this?
https://github.com/Ayugradow/Blackmoth
yes
Ok
how's it going papers?
Not Undertsanding how to put the File in the repo.....
so
...
the easiest way to get started is to use github desktop
you sure there's no desktop for 32 bit?
get 64 bit OS
do it now because it's starting to get painful to watch
didn't you say that a week ago too
W A I T I N G F O R S U M M E R B E C A U S E S C H O O L D E C I D E D T O B E S H I T F O R T H E E N D O F T H E Y E A R
wait
just download the 64 bit ver
should work, I think
I mean, the link is win32
My neurotic, stressed half won't let me do it without backing up everything
do you have anything of importance on your drive
is there any reason to not use a 64 bit OS?
other than just savefiles and some photos and shit
Y
i'd be more peeved about that than anything else
u wot m8
(I beat the Game on the barely breathing Office Computer of my Father)
I beat everything
win 64x?
(the supposedly 32 bit .exe you sent)
do you have the proper version of the api
Did you click the button on the top right?
it's on the gdrive
im bot a modder
but
i can make git gud jokes
So it says something about ""
Once installed, click the [Load Enemy Randomzier] button in the top left corner, then wait while the mod loads all of the enemy types in the game.
This process takes on average 2-5 minutes depending on the speed of your computer.
yup
Top right
what is modcommon
also in the drive
pretty sure randomizer even tells you in the mod if you don't have modcommon
Thanks!
I had no idea xD
thxxx
I finally earned all steam achivements today so i started playing mods
neat
wait 1 more question
about abilitie and charm randomizer
what is the "all bosses" "all charms" "all skills" about?
you can make it so it requires all bosses to beat the game
or all charms
or all skills
Just do all 3 and go for 107% tbh
Does This Work? Test Test
what are you doing
Not much we can do with a sln file
Can't get it to work without Win64
Is your PC from 2003?
Wtf windows 10 32 bit
idgaf about github desktop
sleep
Just use git from the command line
Gradow suggested it
if you're on windows this is the correct answer
but the website I linked is that
git for mingw
https://git-scm.com/download/win this is literally that btw
downloading the 32 bit thing you sent
installed
I
will finish it tommorow
because
sleep
@pearl sentinel I haven't tested it but I think you may have reinstated a bug I used to have in the gathering swarm thing
Where picking up a geo that's attacking a node can cause that node to never be targeted again until scene unload/load
The Disable function on geo isn't immediate so it still calls FixedUpdate after it
Meaning if attracted isn't set to false it gets added back into the tracked chasers
Wait nevermind I'm just bad at reading the commit diff
Although it does look like you're always disabling the original logic so it might never go after the player
Getting an NRE when I try to compile this for testing
[INFO]:[ModCommon] - :::: CharmingMod.UnRegisterCallbacks() ::::
[INFO]:[ModCommon] - :::: CharmingMod.RegisterCallbacks() ::::
[ERROR]:[API] - Error: System.NullReferenceException: original
at ModCommon.PatchProcessor.Patch () [0x00000] in <filename unknown>:0
at ModCommon.HarmonyInstance.Patch (System.Reflection.MethodBase original, ModCommon.HarmonyMethod prefix, ModCommon.HarmonyMethod postfix, ModCommon.HarmonyMethod transpiler) [0x00000] in <filename unknown>:0
at CharmingMod.CharmingMod.PatchGeoControl () [0x00000] in <filename unknown>:0
at CharmingMod.CharmingMod.RegisterCallbacks () [0x00000] in <filename unknown>:0
at CharmingMod.CharmingMod.Initialize () [0x00000] in <filename unknown>:0
at Modding.ModLoader.LoadMod (IMod mod, Boolean updateModText) [0x00000] in <filename unknown>:0
at Modding.ModLoader.LoadMods () [0x00000] in <filename unknown>:0 ```
Hmm, ok I'll look into it when I can
It's because you're not matching parameters on FixedUpdate, pretty sure
The hooked functions have a bool argument but that's not a thing
maybe. i was trying this out
Patches can use a parameter named __state to store information in the prefix method that can be accessed again in the postfix method. Think of it as a local variable. It can be any type and you are responsible to initialize its value in the prefix
Oh interesting
Well in any case that's not the issue anyway
Same error without those bools
I think I see the real issue
The NRE is because reflection isn't finding the Disable method
Wrong binding flags, it's a public method
Yeah that was it
Also looks like I was right about it never going after the player
Ok looks like in the pre method you need to declare __state as a ref var
ahh, well, that makes sense
I'll submit another pr with the fixes I've made
sweet
i should have some more time later this week to clean things up more and post new releases with these updates
Alright well it took me a while but I figured out how to do the stuff I needed to do
Never really worked with forked repos before
accepted the pr
Cool
also just added the missing calls to the unregister callbacks that i forgot to put in
Gathering swarm is crazy OP with this change
The extra geo from the nodes really adds up
It's great
maybe have them highlight the nodes instead of collecting them then?
I called your mods fun
heavy broken was so imbalanced at its earlier stages and i have never had so much fun with a mod
^
everything broke and it was amazing
PFFRTT
oh damn he actually went into the wall
uh its a tikky thing
Yeah heavy blow still needs more work to be finished. I'll see if I can work on it this week
i'm up for testing
Mostly to add enemies damaging each other
it's hollow knight bouncy castle edition
also i might make another video and i might or might not have permission to send it to wilbo
no pressure ofc
Oh nice
wow gathering swarm op
"hollow knight bouncy castle edition"
HK trampoline physics when. We need a mod that lets you jump at the right time to boost your enemies into spikes
it looks cool af too
HK but every surface is a trampoline
@rain cedar "Monomod hooks throw an error if you try to remove something from them that isn't in it"
I already fixed that bug many revisions ago π€
also, I'm just a ping away
I'd love to hear about bugs
Ah ok I thought that was intentional
so, there's this bug called Elderbug and he's so nice
have you given him the flower yet?
also, 0x0ade, maybe our version of hooks is using an older version of monomod then?
yeah i should probably update that
yup, looks like you're using an old HookGen
a few other bugs have been fixed as well
f.e. deeply nested types being "invisible"
cool
yeah, I had some issues with that
I saw that you're possibly switching to Harmony. I'd like to hear your reasoning so that I can make MonoMod better for other communities (f.e. Rain World, Celeste) π
I think kerr just did that because harmony is at runtime so it's easier to implement
i just didn't want to add another dependency to my mods
since i can include the harmony source in mod common
Oh, okay :) It's just that MonoMod.RuntimeDetour would allow you to do what Harmony does regarding detouring methods, minus runtime IL transpiling
while maintaining compatibility with mods using HookGen (which uses RuntimeDetour behind the scenes)
Nevertheless, I'll probably try to improve compatiblity between RuntimeDetour and Harmony
can't we instead merge our hooks.dll with modcommon?
ya'll have access to the mod common repo, feel free to add/edit w/e you want
@copper nacelle what do you think?
sure
it's just that ILMerge creates a faulty library, and IIRC your problem with ILRepack was its version selection
ilrepack was working for me as far as versions
although you need to keep in mind that the .NET Framework 3.5 builds on top of the 2.0 runtime :)
idk if it's still being weird
I see that ILRepack "only" supports the target platforms v1, v1.1, v2 and v4
using v2 for 3.5 could work just fine, but I haven't tested that myself yet
@solemn rivet is build for .net 3.5 still being weird for you w/ hooks
cause if it is i'll swap it to v2
cool
Anyways, if there are any questions / issues / feedback, please don't hesitate to ping me π
am i doing something wrong
MonoMod isn't on NuGet yet
o
sneaky
aa said use nuget for monomod so i thought it was
fake news
well I'm wrong then
it's kinda weird to redistribute prebuilt binaries in a github repo tho
that's why submodules are a thing :)
@pearl sentinel should i push to another branch and make a pr?
this might be a dumb question, but, does it inherit from the Mod namespace? If it doesn't, why not?
does what
On or ModCommon?
make a pr and i'll accept it
modcommon
modcommon inherits from mod yea
oh yeah
mod common has a load priority
oh
nice
even better
it's -1 right?
thanks Kerr!
//Load the mod common first!
public override int LoadPriority()
{
return 0;
}
and thanks 56
that should fix all future load order issues then
I mean, not literally all of them
but at least issues caused by loading a mod before its dependencies
poor 56, spends 1 month trying to get a PR accepted into the API and only needs 1 minute to get it accepted into modcommon


also fuck this means I have to update all my dlls thanks
you're welcome
still On
great
I'll give it a go
can you bump the modcommon version so I can implement a check if hooks are in that version of modcommon
sure
merged your pr
also you should have access to mod common repo so i don't think your need to make a pr?
yeah
just didn't wanna accidentally do something that's bad practice
and then write to master
should I bump the ModCommonSettingsVar.ModCommonVersion var
@compact sedge 0.0.3
ask kerr
It'd be helpful for me to have that variable to check if the hooks are in there
feel free to bump them up
i don't think there's ever really harm in moving the version up if you make a change
just throw all the dlls in Managed into Vanilla
no refs or anything
vanilla dlls are better to put in vanilla cause then you don't get hooks for the modapi stuff tho
ok one sec let me go find the non-beta dlls
but putting modded dlls works fine
wait hold up so I need 1) a vanilla folder with vanilla DLLs
2) modding API assembly c# to build the rest of modcommon?
yes
and 1 is just a folder and 2 I can add as a reference
yeah
all good
also not your code 56 but modcommon needs to be built in debugging mode apparently
because it's using unsafe code
neat
uhh putting DLLs in the Vanilla folder doesn't work because it doesn't check there
it checks the release folder
bin/Debug/ or bin/Release
aa
pls fix
tbh
vanilla folder isn't needed
cause it references assembly-csharp and playmaker anyways
no it is because it references modded assembly-csharp not vanilla and it needs the firstpass one too
what
firstpass shows up in debug anyways
and a hooked modded assembly-csharp is the same anyways
re
only if you add firstpass as a ref
now what are your references for Mantis Gods
Assembly-CSharp, UnityEngine, UnityEngine.UI, Playmaker
same with this
idek what firstpass does
well it wasn't showing up when I built it
re
but uh anyway if I delete the bin folder and build this is what I get
oh yea
and here's my refs
so it doesn't copy over the firstpass for some reason
can someone else git clone and build and see if I'm crazy or something
dunno
I'm editing the xml then
has anyone uploaded the dll to gdrive yet?
ok
well anyway I got my mods folder sorted out so all is well for me
neat
also double checked by downloading the zip
and building it
worked Β―_(γ)_/Β―
xml updated
fyi you're adding as a ref the modding API assembly-csharp from seanpr's branch/the drive not yours right?
what
for building modcommon
no need to reference the API
it was already referenced so i just hooked it
now you have hooks for your hooks
big meme
ok now I'm confused because without the modding api assembly I can't build modcommon because modcommon uses elements from the modding api
but ur saying you are just adding the normal Assembly-CSharp.dll
no i forgot to change it
does normal mean the API one
now it does
ok
should be able to just clone, change refs to your file locations, and hit build
ok
ok I figured out the "problem"
If you have the firstpass DLL in the same folder as the normal assembly csharp it copies it over but if not it ignores it yet still builds without error
even if you don't actually reference it
I have a folder called Mods on my desktop which has all the custom DLLs plus a few vanilla game ones
but I didn't have the firstpass in there
because I never needed it to build anything before
I just added that one my mouse is over
I do the Assembly-CSharp is modified
it's the API built over vanilla lifeblood
isn't that literally the same
no the vanilla Assembly-CSharp has no modding api
wdym
why not just add your assembly reference as asdjfklasjdfasdf/Managed/Assembly-CSharp.dll
i mean
my real hollow knight folder is running lifeblood beta but all the DLLs I use for this are built against lifeblood regular.
that way they'll not crash in a weird way
o
Windows is case insensitive
so it doesn't matter on windows
but on not-windows hollow_knight_data and hollow_knight_Data are different paths
ok
beta release of the berserk mod
no readmes yet
on KBM berserk is bound to Backspace (because why not)
on controllers, it's bound to L3+R3
that's what happens when you use controller
L3 is clicking the left stick
oh duhh nvm
so you have to click both sticks
thanks steam controller for only having one real stick
so I can click a stick and a pad
probably doesn't feel as nice
but I have no idea how to make a UI for that
eh this is my revenge for cheating with my controller
I could add it as a setting tho
having to click a pad
globalsetting int
^
no, I mean, I know how to save it IF it's an int
It's an enum
if it isn't, then I have to figure out
Which is an int
all data can be reduced to an arbitrary number of bools π
uh this is silly but how do you get the modlog using debug mod?
it's not appearing in the console
That's not related to debug mod
ok for some reason I thought debug mod let you view the modlog ingame
It is a thing but it's not from debug mod is all
Idk how to activate it, never used it
Looks like there's a bool in api global settings ShowDebugLogInGame
uh I have a problem. I'm trying to switch the texture on a GameObject, but every time I set the GameObject to a new texture it just overlaps with the previous ones
Here's my code:
GameObject canvas;
GameObject plane = CanvasUtil.CreateCanvas(RenderMode.ScreenSpaceOverlay, new Vector2(1920, 1080));
plane.SetActive(true);
...
Sprite renderSprite = Sprite.Create(fireBalls[currentImg], new Rect(0, 0, FBTEXTURE_WIDTH, FBTEXTURE_HEIGHT), new Vector2(0, 0));
canvas = CanvasUtil.CreateImagePanel(plane, renderSprite, new CanvasUtil.RectData(new Vector2(FBTEXTURE_WIDTH, FBTEXTURE_HEIGHT), new Vector2(200f, 0f)));
What I expect is the sprite I place to be replaced every time this second bit of code is run but instead it overlaps with the previous sprites.
You want to do
canvas.GetComponent<Image>().sprite = renderSprite;
On subsequent runs
Right now you're just adding a new image panel each time
what if I need to change the dimensions of the image panel
Then you change sizeDelta on the RectTransform component
so, I'm having a bit of an issue
uh there's no Image component of the canvas
what types can the modding api serializer save?
You're still calling CreateImagePanel at least once, right?
Modding API serializer is the Unity serializer
oh
Which is extremely limited
yeah canvas is a GameObject built with CanvasUtil.CreateImagePanel
so I was trying to save it as a string and parse it to int[]
I'm getting a typeloadexception tho
For string?
dunno, doesn't say
private Key[] GetKeyArrayFromString(string var)
{
return var.Split(',').Select(n => Convert.ToInt32(n)).Select(i => (Key)i).ToArray();
}```
but I know that this is what's causing it
I see
_berserkToggle.berserkKb.AddDefaultBinding(GetKeyArrayFromString(GlobalSettings.Keys));
and it does accept key[]
maybe it's my naming? If I change it from var to something else...
it might be mistaking var for a generic type
it does compile nicely and all
changed it to keys, let's see...
at BerserkMod.Berserker.Initialize () [0x00000] in <filename unknown>:0
at Modding.ModLoader.LoadMod (IMod mod, Boolean updateModText) [0x00000] in <filename unknown>:0
at Modding.ModLoader.LoadMods () [0x00000] in <filename unknown>:0```
nope
hm...
well
I hope people don't want to bind it to multiple keys
cause I'm gonna remove the key[] parsing for now
Thank you so much seanpr it works perfectly :) (video in #297468195026239489)
also, for some reason you can't bind PlayerActions to controller button combos, but you can to key combos
so I'm gonna make berserk trigger on a single button/key press
because I'm lazy
ok, it works perfectly
beta tentative release of the berserkmod with rebindable key/button
when I do make a readme, I'll add a list of all key/button codes for rebinding
a while ago i saw a video in here where someone was using blackmoth and just continuously dashed in the corner to defeat hornet
how do i do that
it was amazing
cheat
rip
he was using turbo
well
this
what's a turbo?
^
damned snail shaman
original concept snail shaman when?


