Giter Site home page Giter Site logo

hacknet-pathfinder's People

Contributors

4310v343k avatar arkhist avatar canadahonk avatar fayti1703 avatar luky92 avatar pandier avatar samrose512 avatar seeker1437 avatar soundofscooting avatar spartan322 avatar tenesiss avatar windows10ce avatar ypetremann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hacknet-pathfinder's Issues

"Event Listener Call Failed" and blank "Exception:" error

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".

e7

The author made a custom version that should make this message appear in the console when I enter the specific command "strikerAttack":

m1

But even that won't appear in my end and still throws the error:

e9

Thank you very much for your time.

[BaseGameFix] SAAddMissionToHubSrver NRE

SAAddMissionToHubServer causes an NRE on Trigger if:

  • the target daemon is a MissionListingServer and
  • there is no AssignmentTag specified on the action or it is blank

This 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.

Theme switching performance

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.

*nix

Would a Linux/Mac port be possible?

Reimplement important patches in Harmony

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.

  • Catalog the intentions of every patch in Pathfinder/PathfinderHooks.cs
  • Cull unused or unnecessary patches
  • Reimplement in in Harmony
  • Implement some new patches previously not feasible where they would be useful

Trying to use default executables doesn't work

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.

TODO Comments in code

Tracking issue for any TODO: comments.

Event Manager Framework

Much of the event manager from master should be brought over to the rewrite, including but not limited to:

  • Subscription to an event "Type" through a static method, type being chosen by either generics or a type parameter
  • Priority system for events, allowing some events to run before or after others based on an int priority or possibly by mod ID/debug name
  • Proper error handling and giving plugin authors choices about how their handler should be invoked (if at all) if an exception occurs elsewhere.
  • Quick and efficient way to invoke event handlers, this is done with a delegate MethodInvoker + a generator for said delegate to wrap around event handlers on master. I feel this could be done better especially since making DMDs for each event handler seems extreme, but I need to look into it more.
  • Testing for event manager to ensure it works as intended
  • Docs for event manager to describe use of methods, especially warning about the cost of using non-generic overloads

Button class

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?

Extension Specific Mods

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.

Events To Add

Post to further the list of necessary events to patch and add.

  • TerminalEvent (#46)
  • TerminalWriteEvent (#46) - canceling prevents writing to terminal
  • TerminalWriteAppendEvent (#46) - canceling prevents writing to terminal
  • TerminalWriteLineEvent (#46) - canceling prevents writing to terminal
  • TerminalDrawEvent

Replace PF chainloader with a BepInEx one

Should give mod authors more freedom when designing extensions with better configuration and logging

New hardpatcher

  • Find place to inject
  • Create bootstrapper for BepInEx

New chainloader

  • Create a basic chainloader for testing
  • Create a basic plugin base class
  • Implement hot-reloading/extension plugins in chainloader

Text rendering performance

Utils.SuperSmartTwimForWidth can probably use caching in FileEntry. A possible reimplem can be considered.
This could improve FPS on big files.

Cake Build doesn't clean Hacknet Directory properly

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.

Commands screwing with Display Module

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.

AnimatedTexture class

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 ._.)

Node lookup performance

Hacknet's node lookup performance is O(n) using a list.

Using a Dictionary (or multiple ones) would increase performance.

Finalize replacement of SAX classes with EventExecutor

And remove all SAX classes and references as well.

Existing References:

  • ContentLoaderReplacement (#27)
  • DatabaseDaemonHandler (#39)
  • HandlerListener (#39)
  • MissionInstance (#39)
  • MissionUtility (#39)
  • SerializableAction (#39)
  • Serializablecondition (#39)
  • SerializableHandler (#39)

Existing Namespace:

  • Sax.Net (Pathfinder/Util/Sax directory) (#39)

Existing Classes:

  • SaxProcessor (#39)

Action Loading not universally attached

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 replaced

Exceptions should be handled contextually in Hooks

Upon closing #33, certain hooks should be designed to handle Exceptions according to their context.

Should be handled in game with terminal report (alongside Console report):

  • Commands (#35)
  • Executables (#35)
  • PortHacks (#35)
  • Daemons

Should Crash to Menu:

  • SaveLoader
  • Content(/Computer)Loader

Compatibility with Vanilla Game

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.

Login info bug

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.

Tweak the Readme

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.

Suggestion: Make command handler inject into help

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.

Interfaces for common interactions

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.

  • Daemons
  • Commands
  • Executables
  • Ports
  • Conditional Action Sets (ex OnConnect, Instantly)
    • Actions (ex AddAsset, AddIRCMessage)
  • Mission Goals
  • Possibly some convenient wrappers around frequently used GUI components?

Rewrite ActionsLoader to use the executor system

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:

  • Add executor interfaces to ActionsLoader.
  • Rewrite LoadActionSets and ReadAction to use said executors.
  • Optionally rename ReadAction to LoadAction for consistency with other method names.

Name Refactoring

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)

Update Documentation

Needs to also be written out, should commit for this issue just before release.

Tracker for base game issues fixed in rewrite

Base game has some issues that can be fixed without affecting vanilla game/dlc/existing extensions.

  • DHS autoclears the remaining missions even if you tell it not to due to returning too early
  • SendEmail goal searches in the account folder instead of the inbox folder
  • DoesNotHaveFlags is missing from the lookup table for action types
  • SCInstantly doesn't null check current mission, leading to exceptions
  • SCOnConnect has faulty boolean logic for it's null check
  • HHBS (Striker hack) creates unused folders where it should use the extension save folder

Saving Not Functional On Linux

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>

Mod Unloading

Allow mods to unload, i.e remove their listeners, unregister their content, free memory.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.