arkhist / hacknet-pathfinder Goto Github PK
View Code? Open in Web Editor NEWHacknet Labyrinths Modloader in C#
License: MIT License
Hacknet Labyrinths Modloader in C#
License: MIT License
From oxygencraft's DebugMod. The commands "themeAttack" and "strikerAttack" works for the author, but does throw errors for me. Using latest files "Pathfinder 2.0.1" and "DebugMod 1.7.5b".
The author made a custom version that should make this message appear in the console when I enter the specific command "strikerAttack":
But even that won't appear in my end and still throws the error:
Thank you very much for your time.
SAAddMissionToHubServer
causes an NRE on Trigger
if:
MissionListingServer
andAssignmentTag
specified on the action or it is blankThis happens because the game tries to call ToLower
on the AssignmentTag
string to compare against "top"
, but the string instance is null
.
In source this could be fixed by replacing .
with ?.
(assuming C# 8), but I imagine the IL modification is more complex.
Caching and multithreading might be good solutions for improving theme switching. The loading of themes could also be badly optimized and redone a bit.
In the case of multithreading, techniques such as skipping frames might even be employed.
Would a Linux/Mac port be possible?
Harmony is easier to read and write than the raw Mono.Cecil patches, and they should be easier for plugin developers to understand when they need to reference the PF source.
I get a Stack Overflow Exception when starting pathfinder 2.1 prerelease 3.
Current message looks like an error, which it is not.
When I try to use a default Hacknet executable, I either get Execution failed
or nothing at all. Have verified that this only happened on Pathfinder as the executables work fine on default unmodified Hacknet. Has happened on old save and brand new save.
Tracking issue for any TODO:
comments.
"Error reporting":
MemoryDumpFile
executor, on memoryInfo == null
NetworkMap
executor, on !Enum.TryParse<NetmapSortingAlgorithm>(...)
LoadMission
, catch
block for ComputerLoader.readMission
LoadMission
, on endFuncData == null
LoadMission
, on postingData
== nullfilesystem
executor, on rootInfo == null
PathfinderHooks.cs, L321: "Refactor that null out", onLoadSaveFile
Hook, OSLoadSaveFileEvent
construction.
Much of the event manager from master should be brought over to the rewrite, including but not limited to:
Either can be a wrapper around GUI.doButton or our own impl, if we use doButton it should be viable to start at int.MinValue and increment per button created, although this could still cause some problems, so own our version is probably preferable?
Relies on #36.
Mods will be placed in a Mod folder in the extension folder, be recognized by Pathfinder, loaded dynamically then unloaded as soon as the player leaves the extension.
Post to further the list of necessary events to patch and add.
EventManager.CallEvent should return Exceptions instead of only swallowing them and moving on.
Mod Extensions login screen show native game accounts.
Should give mod authors more freedom when designing extensions with better configuration and logging
Utils.SuperSmartTwimForWidth can probably use caching in FileEntry. A possible reimplem can be considered.
This could improve FPS on big files.
If initiated on a clean Hacknet install, it will leave multiple hanging files behind.
It as well will passively complain about improperly handling non-existent PathfinderPatcher.exe in a clean install.
Just forgot to prefix the command with mono
So probe and login are the only commands acting appropriately, pull up the probe or login screens on the Display Module, however nothing else is working.
Vanilla commands aside from disconnect/dc report to the terminal but don't perform Display Module operations, leaving at the normal connected to a computer screen, disconnect/dc simply force connect you back to the player's computer, even if you're already connected to to it when you do the command.
Custom commands however just make the Display Module stop displaying upon completion
All button actions related to those commands operate the same way.
An AnimatedTexture class would make having predefined animations much easier, should probably come with helper methods to generate animations from some popular formats like GIF/APNG/whatever else people think might be helpful (and would be simple enough to implement ._.)
The spacing between config options is not enough, so the config options' texts typically draw over each other.
Hacknet's node lookup performance is O(n) using a list.
Using a Dictionary (or multiple ones) would increase performance.
Linux users have to download System.Xml.Linq.dll, but doing so isn't mentioned in the readme
https://github.com/lugia19/HacknetIRCLink
I fixed this mod a few minutes ago, and it needs to have its dependencies (ChatSharp.dll) in the .exe folder. How to make so that the dependencies are checked inside the mod folder ?
And remove all SAX classes and references as well.
Existing References:
Existing Namespace:
Existing Classes:
"I just realized the code checks for computer.adminIP == os.thisComputer.adminIP instead of computer.adminIP == os.thisComputer.ip"
Custom Actions loading isn't attached to the following places:
DelayableActionSystem::Update
DelayableActionSystem::InstantlyResolveAllActions
(this is a debug method that isn't normally called)FastDelayableActionSystem::DeserializeActions
Faction::loadFromSave
, from the initial content load path -- save loading is already replacedSo when I try to disable a mod and I use the mod's command, it still functions. I'll try to provide images soon.
We need to ensure compatibility with the standard vanilla Hacknet, including extensions and save loading, when unmoddied.
Current Incompatibilities include:
Please comment regarding incompatible behavior with vanilla.
On the login screen of nodes with a known user, sometimes the password of the known user will display properly. This is purely a visual bug.
The Readme currently does not properly explain building Pathfinder, nor does it address common problems. (like in the Wiki's FAQ)
It perhaps could also use an demonstrative example IMod snippet.
Possibly as an optional thing if people want to create hidden commands.
Hacknet.Helpfile
controls the help command but looks pretty static. Maybe override it so that you can easily inject command help into it.
The game has several frequently added/asked to add things that Pathfinder supported out of the box. These interfaces should also appear in the rewrite.
Currently, ActionsLoader is inconsistent with the rest of the loader replacements. It uses a switch statement to check an element's type instead of the much more extensible IExecutor
, which is used by all of the other loaders.
What should be done:
ActionsLoader
.LoadActionSets
and ReadAction
to use said executors.ReadAction
to LoadAction
for consistency with other method names.This issue pertains to names we have yet to refactor and are or should consider for refactoring. Please post refactoring suggestions below.
This list will stay open perpetually as long as refactoring for naming is considered.
Currently:
SaveLoaderReplacement, ContentLoaderReplacement, ReplacementCommons
into new Replacement
namespace (#27)SaveLoaderReplacement:LoadFaction
-> ReplacementCommons:LoadFaction
ContentLoaderReplacement
-> ComputerLoaderReplacement
Game.OS.Extensions:Write
-> WriteLine
(12ea319)Game.OS.Extensions:WriteSingle
-> WriteAppend
(12ea319)Needs to also be written out, should commit for this issue just before release.
In the base game, forgetting to specify an url
attribute for the addWebServer
element causes either a NullReferenceException
or an ArgumentNullException
, depending on locale settings (latter for en-us
, former for everything else).
This could be replaced with an early error in Replacements/ContentLoader
.
Relevant line:
https://github.com/Arkhist/Hacknet-Pathfinder/blob/6ab4243/PathfinderAPI/Replacements/ContentLoader.cs#L505
Base game has some issues that can be fixed without affecting vanilla game/dlc/existing extensions.
Attempting to save the games gives a NullReferenceException where none exists on Windows, stacktrace is as follows
Spawning thread for command save!(SJN!*SNL8vAewew57WewJdwl89(*4;;;&!)@&(ak'^&#@J3KH@!*
[Error : Hacknet] System.Exception: Exception occurred during threaded execute ---> System.NullReferenceException: Object reference not set to an instance of an object
at Pathfinder.Replacements.SaveWriter.GetHacknetSaveElement (Hacknet.OS) <0x00017>
at Pathfinder.Replacements.SaveWriter.SaveWriteReplacementPrefix (Hacknet.OS&,string) <0x000c7>
at (wrapper dynamic-method) Hacknet.OS.DMD<Hacknet.OS..writeSaveGame> (Hacknet.OS,string) <0x0003c>
at Hacknet.OS.threadedSaveExecute (bool) <0x00127>
at (wrapper dynamic-method) Hacknet.ProgramRunner.DMD<Hacknet.ProgramRunner..ExecuteProgram> (object,string[]) <0x035e3>
at (wrapper dynamic-method) Hacknet.OS.DMD<Hacknet.OS..threadExecute> (Hacknet.OS,object) <0x00074>
Allow mods to unload, i.e remove their listeners, unregister their content, free memory.
Current implem does twice the work. Using ConfigEntries in the very beginning would make options easier to save.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.