FMV Injector lets you set up various methods for modifying content in the Farm Merge Valley discord game. This project follows on from @wooslow's repositorie on the same subject. Perform these steps preferably from a Google Chrome browser. There is currently no guarantee that these methods will work on other browsers. These methods go against the rules of the game's developers, and waves of bans have already occurred. I am in no way responsible for your actions. Please use this tool with full knowledge of the risks involved.
FMV Injector was made for Educational purposes |
---|
This project was created only for good purposes and personal use. |
By using this Tool, you agree that you hold responsibility and accountability of any consequences caused by your actions. |
- - giveInventoryItem - Obtain any object in unlimited quantities.
- - spawnUpgradeCard - Spawn an upgrade card.
- - spawnBubbledObject - Spawn a bubble object (gift, coins, gems, energy, crates, chests, keys, decorations).
- - removeAllObstacles - remove all obstacles (trees and stones) from the map.
- - setLuckyMergeChance - Set the lucky merge chance of objects.
Each of the methods described here works in the same way. The game needs to be “paused” at the right moment to access certain elements that are normally blocked. The differences between these methods are the information to be retrieved, the precise moment to break the script, the action to be taken to break the script, etc... Even if these parts change depending on the method, the beginning remains the same.
- Launch of Farm Merge Valley on discord (and never close it again until the end)
- Open the browser console (by pressing
CTRL
+SHIFT
+I
on Windows/Linux orCmd
+Opt
+I
on MacOS) - Your game should now be "paused". In the CONSOLE tab, write the following command and press
ENTER
:
Function.prototype.constructor = function() {};
- Click on the
Resume script execution
button (see image below) (it's the blue button)
- In the SOURCE tab, find the file named main.js located at
top/1187.discordsays.com/1187.discordsays.com/main.1401.js
(see image below)
From now on, the next steps will depend on each method. Make sure you've followed exactly the steps described in this section before moving on.
What you can get with this method ?
Parameter | Description |
---|---|
coins |
Yellow coins |
gems |
Purple gems |
exp |
Experience |
levels |
Levels |
crates |
Crates with items |
energy |
Energy for activities |
tickets |
Train tickets |
wheat |
Wheat |
egg |
Egg |
sunflower |
Sunflower |
milk |
Milk |
sugarcane |
Sugarcane |
bacon |
Bacon |
carrot |
Carrot |
goatmilk |
Goat milk |
soybeans |
Soybeans |
wool |
Wool |
corn |
Corn |
fur |
Fur |
coffeebeans |
Coffee beans |
tomato |
Tomato |
avocado |
Avocado |
truffle |
Truffle |
Click to expand the information
Make sure you've followed exactly the steps described in the “Common part of each method” section before moving on to this one.
- In
main.js
file, - Search the file (by pressing
CTRL
+F
) - Write the following command and press
ENTER
:
this['servi' + 'ces']['mapGr' + 'id']['setCo'
- There will normally be 2 results. Navigate to the second result and set a breakpoint by clicking on the left of the line in the grey area (see image below)
- Return to the game and move or remove an object (the game should stop again)
- In the CONSOLE tab, write the following command and press
ENTER
:
worldServices = this.services
- You can now go back to the
main.js
file in the SOURCE tab, then remove the breakpoint (by clicking on it again) and click on theResume script execution
button again
- In the CONSOLE tab, write the following command and press
ENTER
:
let giveInventoryItem = (target, amount) => {
return worldServices.rewardService.giveInventoryReward({
"reward": {"key": target, "amount": amount},
"parent": worldServices.mapGridView._view.parent.parent.parent
});
}
You're all set! Now all you have to do is enter the following command in the CONSOLE tab and press ENTER
:
giveInventoryItem("item", amount);
Don't forget to replace the item
argument with one of the parameters in the What you can get with this method?
table of this method, and amount
with the amount you want.
Click to expand the information
Make sure you've followed exactly the steps described in the “Common part of each method” section before moving on to this one.- In
main.js
file, - Search the file (by pressing
CTRL
+F
) - Write the following command and press
ENTER
:
this['_forc' + 'edLoo' + 't']['lengt' + 'h']
- Set a breakpoint by clicking on the left of the line in the grey area (see image below)
- Return to the game and merge items (the game should stop again)
- In the SOURCE tab, find the loot section at
Local/this/_data/loot
(see image below)
- Replace one of the elements with
“upgrade_card_1”
,“upgrade_card_2”
or“upgrade_card_3”
to suit your needs (see image below)
- You can now go back to the
main.js
file in the SOURCE tab, then remove the breakpoint (by clicking on it again) and click on theResume script execution
button again - All you have to do now is click on the merged item in the game, and the upgrade card should appear.
What you can get with this method ?
Parameter | Description |
---|---|
coin_1 |
Coins (up to coin_8) |
gem_1 |
Gems (up to gem_6) |
crate_1 |
Crates (up to crate_2) |
energy_1 |
Energy (up to energy_4) |
wood_1 |
Wood (up to wood_8) |
stone_1 |
Stone (up to stone_8) |
tool_1 |
Tool (up to tool_10) |
flower_1 |
Flower (up to flower_10) |
greenhouse_1 |
Greenhouse (up to greenhouse_12) |
reward_crate_daily_bonus |
Daily bonus gift |
reward_crate_key_bronze |
Bonze key |
reward_crate_key_silver |
Silver key |
reward_crate_key_gold |
Gold key |
reward_crate_bronze |
Bronze chest |
reward_crate_silver |
TSilver chest |
reward_crate_gold |
Gold chest |
golden_carrot |
Golden carrot |
reward_crate_key_golden_carrot |
Golden carrot key |
reward_crate_golden_carrot |
Golden carrot chest |
Click to expand the information
Make sure you've followed exactly the steps described in the “Common part of each method” section before moving on to this one.
- In
main.js
file, - Search the file (by pressing
CTRL
+F
) - Write the following command and press
ENTER
:
this['servi' + 'ces']['mapGr' + 'id']['setCo'
- There will normally be 1 results. Navigate to the second result and set a breakpoint by clicking on the left of the line in the grey area (see image below)
- Return to the game and move or remove an object (the game should stop again)
- In the CONSOLE tab, write the following command and press
ENTER
:
worldServices = this.services
- You can now go back to the
main.js
file in the SOURCE tab, then remove the breakpoint (by clicking on it again) and click on theResume script execution
button again
- In the CONSOLE tab, write the following command and press
ENTER
:
let spawnBubbledObject = (target) => {
return worldServices.rewardService.giveObjectReward({
"rewards": [target],
"container": worldServices.mapGridView._view.parent.parent.parent,
"animationEndEvent": null,
"bubblePosition": {"x": 0, "y": -200}
});
}
You're all set! Now all you have to do is enter the following command in the CONSOLE tab and press ENTER
:
spawnBubbledObject("item");
Don't forget to replace the item
argument with one of the parameters in the What you can get with this method?
table of this method.
Click to expand the information
Make sure you've followed exactly the steps described in the “Common part of each method” section before moving on to this one.- In
main.js
file, - Search the file (by pressing
CTRL
+F
) - Write the following command and press
ENTER
:
this['servi' + 'ces']['mapGr' + 'id']['setCo' + 'ntent']
- There will normally be 1 results. Navigate to the result and set a breakpoint by clicking on the left of the line in the grey area (see image below)
- Return to the game and move or remove an object (the game should stop again)
- In the CONSOLE tab, write the following command and press
ENTER
:
worldServices = this.services
- You can now go back to the
main.js
file in the SOURCE tab, then remove the breakpoint (by clicking on it again) and click on theResume script execution
button again
- In the CONSOLE tab, write the following command and press
ENTER
:
worldServices.world.getAllGameObjects().filter(x=>x.hasBehavior("hitpoints") && !x.hasBehavior("shovelable") && !x.hasBehavior("movable")).forEach(x=>worldServices.world.removeGameObject(x))
Click to expand the information
Make sure you've followed exactly the steps described in the “Common part of each method” section before moving on to this one.
- In
main.js
file, - Search the file (by pressing
CTRL
+F
) - Write the following command and press
ENTER
:
this['servi' + 'ces']['mapGr' + 'id']['setCo' + 'ntent']
- There will normally be 1 results. Navigate to the result and set a breakpoint by clicking on the left of the line in the grey area (see image below)
- Return to the game and move or remove an object (the game should stop again)
- In the CONSOLE tab, write the following command and press
ENTER
:
worldServices = this.services
- You can now go back to the
main.js
file in the SOURCE tab, then remove the breakpoint (by clicking on it again) and click on theResume script execution
button again
- In the CONSOLE tab, write the following command and press
ENTER
:
let setLuckyMergeChance = (percentage) => worldServices.mapGridView._view.parent.parent.parent._systems.find(x => x._luckyMergeChance)._luckyMergeChance = percentage;
You're all set! Now all you have to do is enter the following command in the CONSOLE tab and press ENTER
:
setLuckyMergeChance(percentage);
Don't forget to replace the percentage
argument with a number between 0 and 100. Setting 100
as an argument means that the lucky merge will always take place, and setting 0
as an argument means that the lucky merge will never take place (the default value is 5).
Discord :
- Any question ? Any malfunction ? Contact me on here.