Guest User

Faction Example - Hacknet Extensions

a guest
May 23rd, 2017
3,987
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 10.94 KB | None | 0 0
  1. <CustomFaction name="Example Faction" id="examplefaction" playerVal="0">
  2.   <!-- You can change the starting player value with the playerVal field above. -->
  3.  
  4.   <!-- A faction is basically just a few things:
  5.  A name, a number representing the player's position in the faction,
  6.  and a set of actions that can trigger to make changes to the game state in response to actions.-->
  7.  
  8.   <!-- The value required conditional action is the most basic one. This triggers once the player's value moves from below this number to equal to or more than it. -->
  9.   <Action ValueRequired="1">
  10.     <!-- Runs a 'mission function' - for a list of these and how to use them, see the example mission file -->
  11.     <RunFunction FunctionName="changeSong" FunctionValue="6" />
  12.  
  13.     <!-- Immediately loads a mission, replacing whatever's currently there and sending the email. -->
  14.     <LoadMission MissionName="Missions/ExampleMission.xml" />
  15.    
  16.     <!-- Creates a file with the listed content on the computer with ID targetComp, in the folder path specified.
  17.    The folder specified must exist before this runs!
  18.    The file contents field here doesn't support newlines or super long content - this is recommended for just creating items with wildcard data (like programs)
  19.    For a complete list of wildcards, see the example computer file-->
  20.     <AddAsset FileName="MemForensics.exe" FileContents="#MEM_FORENSICS_EXE#" TargetComp="advExamplePC" TargetFolderpath="bin" />
  21.  
  22.     <!-- This copies a file from one computer to another.
  23.    DestFilePath + DestComp are the DESTINATION computer - where the file will end up
  24.    SourceFileName, SourceFilePath and SourceComp are the SOURCE computer - where the file exists and is taken from
  25.    This will do nothing if the file does not exist to be copied.
  26.    
  27.    This is very useful for adding complex files to a server after the session is created - create a new hidden server that's impossible to
  28.    find, define all the files you want on there, then copy them over to where you want later. -->
  29.     <CopyAsset DestFilePath="linkNode1" DestComp="advExamplePC" SourceComp="advExamplePC" SourceFileName="Test_File.txt" SourceFilePath="home" />
  30.  
  31.     <!-- This adds a new mission to a hub server. This works for both missionHubServer servers (CSEC Style), missionListingServers (Entropy style)
  32.    and also DHSDaemon servers (Bibliotheque style)-->
  33.     <!-- CSEC Style: -->
  34.     <AddMissionToHubServer MissionFilepath="Missions/TestExtensionMission1.xml" TargetComp="advExamplePC" />
  35.     <!-- Bibliotheque Style: Assignment tag is who the mission starts assigned to of the server's user list. If this tag exists, the player cant claim the mission! -->
  36.     <!-- note that adding a mission to an entropy style server, you can set the AssignmentTag to be "top" to add to the top of the list. Otherwise it'll be added to the bottom.-->
  37.     <AddMissionToHubServer MissionFilepath="Missions/TestExtensionMission1.xml" TargetComp="advExamplePC" AssignmentTag="HA0"/>
  38.    
  39.     <!-- This removes the mission from the hub server, if it exists. Works for all three specified above. -->
  40.     <RemoveMissionFromHubServer MissionFilepath="Missions/TestExtensionMission1.xml" TargetComp="advExamplePC" />
  41.    
  42.     <!-- Adds a thread to a /el message board - thread file should be a UFT-8 plaintext document. -->
  43.     <AddThreadToMissionBoard ThreadFilepath="Nodes/MessageBoardThreads/ExampleThread1.txt" TargetComp="advExamplePC" />
  44.    
  45.     <!-- Adds a message to a DHSDaemon or IRCDaemon IRC. Delay is seconds until the post appears. -->
  46.     <AddIRCMessage Author="HA0" TargetComp="advExamplePC" Delay="3.0">Hey @#PLAYERNAME# - check out the new asset that got added a few lines ago.</AddIRCMessage>
  47.     <AddIRCMessage Author="DependableSkeleton" TargetComp="advExamplePC" Delay="8.0">@channel this notifies everyone!</AddIRCMessage>
  48.    
  49.     <!-- Crashes computer with the ID TargetComp. If this is "playerComp" it will crash the player's own computer (bluscreening it) instantly.
  50.    If it's another computer, this will remove it from the netmap for 15 seconds or so, and disconnect the player if they were connected to it.
  51.    The CrashSource is the ID of a computer that the crash log will point to.
  52.    NOTE: Players are very likely to rm * entire log folders, so don't make this part of any critical path - it's almost impossible to find. Secrets only!
  53.    
  54.    **** DelayHost is the ID of a computer that can host delayable actions. Valid computers need to have one of these daemons on them:
  55.    IRCDaemon or DLCHubServer -->
  56.     <CrashComputer TargetComp="linkNode1" CrashSource="advExamplePC" DelayHost="advExamplePC" Delay="5.5" />
  57.  
  58.     <!-- Deletes a file from the target computer. Does nothing if that file does not exist. -->
  59.     <DeleteFile TargetComp="advExamplePC" FilePath="bin" FileName="Binary_File" DelayHost="advExamplePC" Delay="5.5"/>
  60.    
  61.     <!-- Loads in a new set of conditional actions from a file. Check out the file listed here for an explanation on what you can do with that -->
  62.     <AddConditionalActions Filepath="ExampleConditionalActionSet.xml" DelayHost="advExamplePC" Delay="5.5"/>
  63.    
  64.     <!-- Loads in the Hacker script defined below to execute 5.5 seconds from now, coming from source advExamplePC and targeting playerComp (The player node ID).
  65.    These can target whatever you like, and be ally scripts! RequireLogsOnSource means that this will only execute if the source comp has logs on it from the player
  66.    deleting, moving, or copying a file. You can use the ID or the IP for the source and target - either works.
  67.    RequireSourceIntact means that if the target is missing it's networking file from /sys, the hack wont happen. This means a crippled computer cant hack you back.-->
  68.     <LaunchHackScript Filepath="HackerScripts/ExampleHack.txt" DelayHost="advExamplePC" Delay="5.5" SourceComp="advExamplePC" TargetComp="playerComp" RequireLogsOnSource="false" RequireSourceIntact="true"/>
  69.    
  70.     <!-- Switches to the listed theme. You can specify any of the core Hacknet themes by name directly :
  71.    TerminalOnlyBlack, HacknetBlue, HacknetTeal, HacknetYellow, HacknetWhite, HacknetPurple, HacknetMint, HackerGreen
  72.    Or you can specify a path to a custom theme file.-->
  73.     <SwitchToTheme ThemePathOrName="Themes/ExampleTheme.xml" FlickerInDuration="3.0" DelayHost="advExamplePC" Delay="15.5" />
  74.  
  75.     <!-- Starts a 'screen bleed' effect! This is where the red line moves down from the top of the screen dramatically
  76.    The title and the first 3 lines of the content of this tag are what's shown in the bottom left alert window.
  77.    The CompleteAction conditional action set is run *only if* the red hits the bottom of the screen and the player runs out of time.
  78.    "TotalDurationSeconds" is the total time it takes for the screen bleed to go from top to bottom.
  79.    
  80.    I recommend syncing this up with various other conditions that allow you to cancel the effect if the player completes some task.-->
  81.     <StartScreenBleedEffect AlertTitle="Title" CompleteAction="Actions/HackerScriptActions.xml" TotalDurationSeconds="12.5" DelayHost="advExamplePC" Delay="3.5">Line one
  82. Line two
  83. Line Three!</StartScreenBleedEffect>
  84.  
  85.     <!-- Cancels a screen bleed effect started with the tag above -->
  86.     <CancelScreenBleedEffect DelayHost="advExamplePC" Delay="9.5" />
  87.    
  88.     <!-- Appends the content of the tag onto the file specified. Useful for adding extra data into things, making the world feel more dynamic, adding people to whitelists etc. -->
  89.     <AppendToFile DelayHost="advExamplePC" Delay="12.5" TargetComp="advExamplePC" TargetFolderpath="Whitelist" TargetFilename="list.txt">#PLAYER_IP#</AppendToFile>
  90.  
  91.     <!-- Kills all exes that contain the string mentioned, or * for all.
  92.    This is case insensitive. So the following would kill "SSHCrackExe",
  93.    but changing it to "s" would kill all exes with an s in their name.
  94.    
  95.    This is useful for doing things like killing ESequencer.exe once it's running,
  96.    or having a rival hacker close all of the player's shells.-->
  97.     <KillExe DelayHost="advExamplePC" Delay="15.5" ExeName="ssh" />
  98.  
  99.     <!-- This is a big one - Changes the alert icon (top right) to point to a new server!
  100.    Target is the ID of the server it should connect to.
  101.    Type can be one of 4 options:
  102.    mail, irc, irchub, board
  103.    
  104.    Mail is a mail server, like Jmail. If you use this, the mail server that it points to *MUST HAVE A MAIL ACCOUNT FOR THE PLAYER*
  105.    If it doesn't, it will crash when the player clicks on the icon and tries to go to their non-existent account.
  106.    
  107.    irc is a standard IRC server. Whenever an IRC log with @#PLAYERNAME# or @Channel in it is added, the player will get a notification.
  108.    Labyrinths users only.
  109.    
  110.    irchub is a DLCHubServer like Labyrinths uses. Labyrinths players only.
  111.    
  112.    board is a /el style message board. Whenever a message or thread is added that contains any other the above IRC mention strings, the player will be notified.
  113.    
  114.    IMPORTANT NOTE: Changing the type to anything other than mail is only supported with the Hacknet Labyrinths DLC installed.
  115.    -->
  116.     <ChangeAlertIcon Target="advExamplePC" Type="mail" DelayHost="advExamplePC" Delay="9.5"/>
  117.  
  118.  
  119.     <!-- Hides the target computer node from the netmap if it's visible -->
  120.     <HideNode DelayHost="advExamplePC" Delay="15.5" TargetComp="advExamplePC" />
  121.  
  122.     <!-- Reveals this user account to the player so it's details show up in the autocomplete options when the player goes to log in. -->
  123.     <GivePlayerUserAccount DelayHost="advExamplePC" Delay="15.5" TargetComp="advExamplePC" Username="mailGuy" />
  124.    
  125.     <!-- Changes the IP Address of the computer with ID in targetComp to the new IP address provided -->
  126.     <ChangeIP DelayHost="advExamplePC" Delay="15.5" TargetComp="advExamplePC" NewIP="111.111.123.124" />
  127.  
  128.     <!-- Changes the player's netmap sorting method, as if they had used NetmapOrganizer. Valid methods are:
  129.    scatter,grid,seqgrid,CHAOS-->
  130.     <ChangeNetmapSortMethod DelayHost="advExamplePC" Delay="18.5" Method="grid" />
  131.  
  132.     <!-- Saves the game! The player should be saved frequently, just incase their power dies or something. If you have extremely long missions
  133.    without email replies or any other save triggers, use this to keep the player saved and up to date.-->
  134.     <SaveGame DelayHost="advExamplePC" Delay="20.5"/>
  135.    
  136.   </Action>
  137.  
  138.  
  139.   <!-- This action trigger as soon as the player is given the "decypher" flag -->
  140.   <Action Flags="decypher">
  141.     <AddIRCMessage Author="DependableSkeleton" TargetComp="advExamplePC" Delay="8.0">decypher flag was added!</AddIRCMessage>
  142.   </Action>
  143.  
  144.  
  145.   <!-- And this one only triggers once both the player has the flag, and the score is greater than or equal to the required value -->
  146.   <Action ValueRequired="5" Flags="decypher">
  147.      <AddIRCMessage Author="DependableSkeleton" TargetComp="advExamplePC" Delay="-8.0">negative delay adds it instantly, and backdates the time to make it all fit.</AddIRCMessage>
  148.   </Action>
  149.  
  150.  
  151. </CustomFaction>
Add Comment
Please, Sign In to add comment