farmo
Farmo is a (mostly) incomplete farming game that (probably) won't get finished. Have fun!!
Plant wheat seed
Plant potato
Buy crops
Buy equipment
Water all
Sell all
Clear all
Quick-buy WWWWWW ($000000)
Water crop #
Sell crop #
Inventory:
Nada
CROP SHOP
we are losing money
Wheat crop
You either punch grass or you grunch pass.
Purchase ($16)
Potato
Curl them! Bake them! Poison them! Roast them! French them?????
Purchase ($40)
h
Water canister
Your plants love to get wet, so why not let them get wet??
Purchase ($8)
Exit
How to build your own custom plant
1. open inspect element ...,.
2. download the files in sources tab or if youre using firefox (go you) use the debugger tab.!!.
Dagner Zone
YOURE MAN , ENTERING NA DANGER ZONE WHERE THE CODE IS BAAAAADDD!!! avert your eye s....
3. go into index.html
add these things:
. a "plant [crop]" button in the control div
. an entry in the shop (STRONG tag in title, P tag for description, and BUTTON for purchasings
4. give the buttons ids
5. make const variables for each new button. example:
const plantWheat = document.getElementById("wheatplantbro");
const purchaseWheat = document.getElementById("wpur");
6. add this in player OBJECT inside SEEDINV inside INVENTORY: (it's really counter intuitive but if i were to change it the code would break
[yourseed]: 0 (the ABOVE OBJECT PROBABLY DOESNT HAVe A COMMA AFTER IT, add it so the thing doesnt error
7. add this in BTNS() FUNCTION:
add(!player.inventory.seedInv.[THE THING YOU ADDED IN THE LAST STEP], "hide", [THE "PLANT YOUR PLANT" BUTTON VARIABLE])
8. add this in INVENTORY() FUNCTION, INSIDE THE "inventoryEl.innerHTML = ...":
${player.inventory.seedInv.PLANT ENTNRY FROM STEP 6} [PLANT NAME] SURROUNDED BY LI TAGS (DUNNO HHOW TO BYPASS TAGS IN HTML)
9. ADD THIS AROUND THE 275th LINE BELOW WHERE ALL THE VARIABLES ARE DECLARED
10. ADD THIS BELOW ALL THE PLANT[CROP] EVENT LISTENERS
11. MAKE A "new Crop()" WHERE THE "SEE STEP 11 IS", HERE'S HOW:
crops[pointer] = new Crop(); JUST WONT DO, HERE ARE THE ARGUMENTS THEY REQUIRE:
1> PLANT TYPE, WHAT TYPE OF PLANT ARE THEY ??? NEEDS TO BE A STRING
2> THE GROWTH REQUIRED TO HARVEST THIS PLANT
3> HOW MUCH THE PLANT GROWS TOWARD THE REQUIRED GROWTH WHEN WATERED, NEEDS TO BE A MULTIPLE (OR SOMETHING LIKE THAT) OF THE MAX GROWTH
4> THE PLANT'S ID, JUST PUT "pointer" HERE
5> FERTILITY/MULTIPLICITY, HOW MANY COPIES OF THIS PLANT ARE GIVEN WHEN IT IS HARVESTED
6> WATER USAGE, HOW MUCH % OF WATER IS USED WHEN THE PLANT IS WATERED
WRITE ALL THESE ARGUMENTS IN THE ORDER THEY ARE LISTED INSIDE THE PARENTHESES
12. GO TO THE THING LABELED "class Crop" at the top of the script
13. go into it's harvest(id) prototype function
remember that type argument you made? add it in the "switch" statement like this:
YOURE Done (i think)