From c35e08b4d5f83c26a570c38398f191472ada9286 Mon Sep 17 00:00:00 2001 From: Daniel Xie Date: Mon, 8 May 2017 12:40:53 -0500 Subject: [PATCH] Small UI improvements, small bug fix with NeuroFlux cost, added tooltips to Crimes --- README.md | 45 ++-------------------------------- css/menupages.css | 7 ++---- css/styles.css | 7 +++--- index.html | 49 ++++++++++++------------------------- src/Augmentations.js | 5 +++- src/Constants.js | 58 ++++++++++++++++++++++++++++---------------- src/Location.js | 9 +++++++ 7 files changed, 73 insertions(+), 107 deletions(-) diff --git a/README.md b/README.md index 8de063bee..6f4313e8a 100644 --- a/README.md +++ b/README.md @@ -2,62 +2,22 @@ Netburner Idle Game TESTING TODO: - hack() and sleep() in a script - hack() seems to be working - - Sleep() seems to be working - Creating the foreign server network doesn't seem to be working - --Seems to be fixed - Script RAM Usage and corresponding terminal commands + If a server has no more money available it cannot be hacked anymore Should work automatically...because your money gained percentage will be multiplied by 0 When the game is loaded re-load all of the scripts in runningScripts - Seems to be working - Update skill level on cycle - If a script has bad syntax...it fucks everything up when you try to run it so fix that - Try catch for script? - Check that killing scripts still works fine (TESTED - LOoks to work fine) - Check that if script has bad syntax it wont run at all and everthing works normally (Seems to work fine) - Check if script throws during runtime it shuts down correctly (seems to work fine) Adjust leveling formula. Goes up way too high at first http://gamedev.stackexchange.com/questions/55151/rpg-logarithmic-leveling-formula - might be too slow now? - - Scripts tab that shows script stats - Seems to work, at least the basics (for online production) - Script offline progress - - Delete a script from Active scripts when the WorkerScript is deleted - Seems to work - - Server growth - Implemented but it might need to be balance/formula readjusted - - ctrl+C functionality for all running command like hack(), analyze(), and tail - Implemented for hack() and analyze(). Seems to work - - Saving/Loading factions - No errors thrown when saving/loading game at the start - - Scroll all the way down when something is post()ed - - Purchasing Servers - - Work - Companies - Add possible CompanyPositions for every Company - Applying/working for companies - - Factions + Change Company pages to display "apply for promotion" and other stuff when you are already employed there - Augmentations rm command seems to work - Make it so that a script cannot be edited if it is running + Traveling @@ -76,7 +36,6 @@ Tasks TODO: New server hostname in Purchase Server Pop-up Box needs limits..don't think the ones set in HTML work - Tutorial and help - INTERACTIVE TUTORIAL Secret Servers Hack time formula needs rebalancing I think, so does hack exp formula diff --git a/css/menupages.css b/css/menupages.css index 48102617c..5d216f55d 100644 --- a/css/menupages.css +++ b/css/menupages.css @@ -209,11 +209,8 @@ text-decoration: none; background-color: #555; color: #FFFFFF; - padding: 4px 4px 4px 4px; - border-top: 1px solid #333333; - border-right: 1px solid #333333; - border-bottom: 1px solid #333333; - border-left: 1px solid #333333; + padding: 4px; + border: 1px solid #333333; width: 50%; } diff --git a/css/styles.css b/css/styles.css index 47298106b..c9d4aa532 100644 --- a/css/styles.css +++ b/css/styles.css @@ -90,10 +90,8 @@ tr:focus { color: #FFFFFF; padding: 6px; margin: 6px; - border-top: 1px solid #333333; - border-right: 1px solid #333333; - border-bottom: 1px solid #333333; - border-left: 1px solid #333333; + border: 1px solid #333333; + width: 50%; } .a-link-button:hover { @@ -113,6 +111,7 @@ tr:focus { border-left: 1px solid #333333; pointer-events: none; cursor: default; + width: 50%; } diff --git a/index.html b/index.html index 34e9775b3..6a6dc67eb 100644 --- a/index.html +++ b/index.html @@ -499,7 +499,7 @@
Getting Started - Networking + Servers & Networking Hacking Scripts Netscript Programming Language @@ -582,34 +582,15 @@ In the Slums you can commit crimes to earn money and experience. Crime attempts are not always successful. Your chance at successfully committing a crime is determined by your stats.

- Shoplift - Attempt to shoplift from a low-end retailers - - Mug someone - Attempt to mug a random person on the street - - Deal Drugs - Attempt to deal drugs - - Traffick Illegal Arms - Attempt to smuggle illegal arms into the city and sell them to gangs and criminal organizations - - Homicide - Attempt to murder a random person on the street - - - Grand Theft Auto - Attempt to commit grand theft auto - - Kidnap and Ransom - Attempt to kidnap and ransom a high-profile target - - Assassinate - Attempt to assassinate a high-profile target - - Heist - Attempt to pull off the ultimate heist - + Shoplift + Mug someone + Deal Drugs + Traffick Illegal Arms + Homicide + Grand Theft Auto + Kidnap and Ransom + Assassinate + Heist
@@ -661,14 +642,16 @@

-


WARNING: Purchasing an Augmentation resets most of your progress, including:
+


WARNING: Purchasing an Augmentation resets most of your progress, including:

Stats/Skill levels and Experience
Money
- Scripts
+ Scripts on every computer but your home computer
+ Purchased servers
+ Hacknet Nodes
Faction/Company reputation

Purchasing an Augmentation lets you start over with the perks and benefits granted by all - of the Augmentations you have ever purchased (purchasing an Augmentation does not reset the benefits - of Augmentations you have previously purchased). + of the Augmentations you have ever purchased. Also, you will keep any scripts and RAM upgrades + on your home computer (but you will lose all programs besides NUKE.exe).

Purchase Cancel diff --git a/src/Augmentations.js b/src/Augmentations.js index baa32b6f8..777059f72 100644 --- a/src/Augmentations.js +++ b/src/Augmentations.js @@ -776,7 +776,10 @@ initAugmentations = function() { var oldAug = Augmentations[AugmentationNames.NeuroFluxGovernor]; NeuroFluxGovernor.owned = oldAug.owned; NeuroFluxGovernor.level = oldAug.level; - var mult = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, NeuroFluxGovernor.level-1); + var mult = 1; + if (NeuroFluxGovernor.level > 1) { + mult = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, NeuroFluxGovernor.level-1); + } NeuroFluxGovernor.setRequirements(1000 * mult, 1000000 * mult); delete Augmentations[AugmentationNames.NeuroFluxGovernor]; } else { diff --git a/src/Constants.js b/src/Constants.js index 9df58e26d..096c8861e 100644 --- a/src/Constants.js +++ b/src/Constants.js @@ -139,7 +139,7 @@ CONSTANTS = { TutorialHackingText: "In the year 2077, currency has become digital and decentralized. People and corporations " + "store their money on servers. By hacking these servers, you can steal their money and gain " + "experience.

" + - "Gaining root access
" + + "Gaining root access
" + "The key to hacking a server is to gain root access to that server. This can be done using " + "the NUKE virus (NUKE.exe). You start the game with a copy of the NUKE virus on your home " + "computer. The NUKE virus attacks the target server's open ports using buffer overflow " + @@ -155,7 +155,7 @@ CONSTANTS = { "opened.
" + "Once you have enough ports opened and have ran the NUKE virus to gain root access, the server " + "can then be hacked by simply calling the 'hack' command through terminal, or by using a script.

" + - "Hacking mechanics
" + + "Hacking mechanics
" + "When you execute the hack command, either manually through the terminal or automatically through " + "a script, you attempt to hack the server. This action takes time. The more advanced a server's " + "security is, the more time it will take. Your hacking skill level also affects the hacking time, " + @@ -172,12 +172,12 @@ CONSTANTS = { TutorialScriptsText: "Scripts can be used to automate the hacking process. Scripts must be written in the Netscript language. " + "Documentation about the Netscript language can be found in the 'Netscript Programming Language' " + - "section of the 'Tutorial' tab. Running a script requires RAM. The more complex a script is, the more RAM " + + "section of this 'Tutorial' page.

Running a script requires RAM. The more complex a script is, the more RAM " + "it requires to run. Scripts can be run on any server you have root access to.

" + "Here are some Terminal commands that are useful when working with scripts:
" + "free - Shows the current server's RAM usage
" + "kill [script] - Stops a script that is running
" + - "nano [script] - Edit a script
" + + "nano [script] - Create/Edit a script
" + "ps - Displays all scripts that are actively running on the current server
" + "run [script] - Run a script
" + "tail [script] - Displays a script's logs
" + @@ -223,6 +223,7 @@ CONSTANTS = { "while ([cond]) {
    [code]
}

" + "As long as [cond] remains true, the code block [code] will continuously execute. Example:

" + "i = 0;
while (i < 10) {
    hack('foodnstuff');
    i = i + 1;
};

" + + "This code repeat the 'hack('foodnstuff')' command 10 times before it stops and exits. " + "Note that a semicolon is needed at closing bracket of the while loop, UNLESS it is at the end of the code

" + "For loop
" + "A for loop is another control flow statement that allows code to by repeated by iterations. The structure is:

" + @@ -241,17 +242,18 @@ CONSTANTS = { " Ishima
" + " Volhaven

" + "To travel between cities, visit your current city's travel agency through the 'World' page. " + - "From the travel agency you can travel to any other city. Doing so costs money.
" + - "Each city has its own set of companies and unique locations. ", + "From the travel agency you can travel to any other city. Doing so costs money.

" + + "Each city has its own set of companies and unique locations. Also, certain content is only available to you " + + "if you are in certain cities, so get exploring!", TutorialJobsText: "Hacking is not the only way to gain money and experience! Located around the world are many " + "different companies which you can work for. By working for a company you can earn money, " + - "train your various labor skills, and unlock powerful passive perks.
" + + "train your various labor skills, and unlock powerful passive perks.

" + "To apply for a job, visit the company you want to work for through the 'World' menu. The company " + "page will have options that let you apply to positions in the company. There might be several different" + - "positions you can apply for, ranging from software engineer to business analyst to security officer.
" + + "positions you can apply for, ranging from software engineer to business analyst to security officer.

" + "When you apply for a job, you will get the offer if your stats are high enough. Your first position at " + "a company will be an entry-level position such as 'intern'. Once you get the job, an button will appear on " + - "the company page that allows you to work for the company. Click this button to start working.
" + + "the company page that allows you to work for the company. Click this button to start working.

" + "Working occurs in 8 hour shifts. Once you start working, you will begin earning money, experience, " + "and reputation. The rate at which you money and experience depends on the company and your position. " + "The amount of reputation you gain for your company is based on your job performance, which is affected by " + @@ -259,22 +261,23 @@ CONSTANTS = { "other actions such as using your terminal or visiting other locations (However, note that any scripts you have " + "running on servers will continue to run as you work!). It is possible to cancel your work shift before the " + "8 hours is up, but doing so will result in you gaining only half of all of the money, experience, and reputation " + - "that you had earned up to that point.
" + + "that you had earned up to that point.

" + "As you continue to work at a company, you will gain more and more reputation at that company. When your stats " + "and reputation are high enough, you can get a promotion. You can apply for a promotion on the company page, just like " + - "you applied for the job originally. Higher positions at a company provide better salaries and stat gains", + "you applied for the job originally. Higher positions at a company provide better salaries and stat gains.", TutorialFactionsText: "Throughout the game you may receive invitations from factions. There are many different factions, and each faction " + "has different criteria for determining its potential members. Joining a faction and furthering its cause is crucial " + - "to progressing in the game and unlocking endgame content.
" + + "to progressing in the game and unlocking endgame content.

" + "It is possible to join multiple factions if you receive invitations from them. However, note that joining a faction " + - "may prevent you from joining other rival factions.
" + + "may prevent you from joining other rival factions.

" + "The 'Factions' link on the menu brings up a list of all factions that you have joined. " + "You can select a Faction on this list to go to that Faction page. This page displays general " + "information about the Faction and also lets you perform work for the faction. " + "Working for a Faction is similar to working for a company except that you don't get paid a salary. " + "You will only earn reputation in your Faction and train your stats. Also, cancelling work early " + - "when working for a Faction does not result in reduced experience/reputation earnings.
" + - "Earning reputation for a Faction unlocks powerful upgrades. These upgrades vary from faction to faction. ", + "when working for a Faction does NOT result in reduced experience/reputation earnings.
" + + "Earning reputation for a Faction unlocks powerful Augmentations. Purchasing and installing these Augmentations will " + + "upgrade your abilities. The Augmentations that are available to unlock vary from faction to faction.", TutorialAugmentationsText: "Advances in science and medicine have lead to powerful new technologies that allow people to augment themselves " + "beyond normal human capabilities. There are many different types of Augmentations, ranging from cybernetic to " + "genetic to biological. Acquiring these Augmentations enhances the user's physical and mental faculties.
" + @@ -282,11 +285,24 @@ CONSTANTS = { "corporations and organizations that create them. Therefore, the only way for the player to obtain Augmentations is " + "through Factions. After joining a Faction and earning enough reputation in it, you will be able to purchase " + "its Augmentations. Different Factions offer different Augmentations. Augmentations must be purchased in order to be installed, " + - "and they are fairly expensive.
" + - "Unfortunately, installing an Augmentation has side effects. All of your stats and experience will be reset to 1. " + - "You will lose all of your digital assets as well, such as your money, programs, scripts, and purchased servers. " + - "You will lose all of the reputation you have earned from every company and faction and will no longer be an employee " + - "or member of any. The only thing you will keep when you install an Augmentation is all of the past Augmentations " + - "you have installed. ", + "and they are fairly expensive.

" + + "Unfortunately, installing an Augmentation has side effects. You will lose most of the progress you've made, including your " + + "skills, stats, and money. You will have to start over, but you will have all of the Augmentations you have installed to " + + "help you progress.

" + + "To summarize, here is a list of everything you will LOSE when you install an Augmentation:

" + + "Stats/Skills
" + + "Money
" + + "Scripts on all servers EXCEPT your home computer
" + + "Purchased servers
" + + "Hacknet Nodes
" + + "Company/faction reputation
" + + "Jobs and Faction memberships
" + + "Programs
" + + "TOR router
" + + "Gym memberships

" + + "Here is everything you will KEEP when you install an Augmentation:

" + + "Every Augmentation you have installed
" + + "Scripts on your home computer
" + + "RAM Upgrades on your home computer", } \ No newline at end of file diff --git a/src/Location.js b/src/Location.js index 32178a95c..7afeb32e0 100644 --- a/src/Location.js +++ b/src/Location.js @@ -833,22 +833,31 @@ displayLocationContent = function() { slumsDescText.style.display = "block"; slumsShoplift.style.display = "block"; slumsShoplift.innerHTML = "Shoplift (" + (shopliftChance*100).toFixed(3) + "% chance of success)"; + slumsShoplift.innerHTML += ' Attempt to shoplift from a low-end retailers '; slumsMug.style.display = "block"; slumsMug.innerHTML = "Mug someone (" + (mugChance*100).toFixed(3) + "% chance of success)"; + slumsMug.innerHTML += ' Attempt to mug a random person on the street '; slumsDealDrugs.style.display = "block"; slumsDealDrugs.innerHTML = "Deal Drugs (" + (drugsChance*100).toFixed(3) + "% chance of success)"; + slumsDealDrugs.innerHTML += ' Attempt to deal drugs '; slumsTrafficArms.style.display = "block"; slumsTrafficArms.innerHTML = "Traffick Illegal Arms (" + (armsChance*100).toFixed(3) + "% chance of success)"; + slumsTrafficArms.innerHTML += ' Attempt to smuggle illegal arms into the city and sell them to gangs and criminal organizations '; slumsHomicide.style.display = "block"; slumsHomicide.innerHTML = "Homicide (" + (homicideChance*100).toFixed(3) + "% chance of success)"; + slumsHomicide.innerHTML += ' Attempt to murder a random person on the street'; slumsGta.style.display = "block"; slumsGta.innerHTML = "Grand Theft Auto (" + (gtaChance*100).toFixed(3) + "% chance of success)"; + slumsGta.innerHTML += ' Attempt to commit grand theft auto '; slumsKidnap.style.display = "block"; slumsKidnap.innerHTML = "Kidnap and Ransom (" + (kidnapChance*100).toFixed(3) + "% chance of success)"; + slumsKidnap.innerHTML += ' Attempt to kidnap and ransom a high-profile target '; slumsAssassinate.style.display = "block"; slumsAssassinate.innerHTML = "Assassinate (" + (assassinateChance*100).toFixed(3) + "% chance of success)"; + slumsAssassinate.innerHTML += ' Attempt to assassinate a high-profile target '; slumsHeist.style.display = "block"; slumsHeist.innerHTML = "Heist (" + (heistChance*100).toFixed(3) + "% chance of success)"; + slumsHeist.innerHTML += ' Attempt to pull off the ultimate heist '; break; default: console.log("ERROR: INVALID LOCATION");