Plants vs. Zombies 2 Hacking Tools/Sen

*Everyone is free to contribute to this article.*
**Sen** (Lotus in Vietnamese) is an open source project designed for decode and encode the custom file formats found in PopCap's Games, mostly for Plants vs. Zombies 2. It is developed by Haruma with the purpose bringing Vietnamese technology across overseas.

The tutorials here are written for newest version of Sen.

## Installation

Windows, Linux or Macintosh users can install Shell - Console Project

Android, iOS Users can wait until Engine is released in a near future.

## Modules Composite

* Shell: Written in C#, has powerful functions and high performance in speed.
	+ View source: Shell

* Script: Written in TypeScript, is the API call which perform Shell functions.
	+ View source: Script

* Internal: Written in C++ and C, is the internal library which perform many functions from C++ external libraries. This project is using CMake to support cross platform.
	+ View source: Internal

* Engine: Written in Dart, using Flutter framework to support most popular platforms.
	+ View source: Engine

## Acknowledgement

* TwinStar: for his awesome project TwinStar.ToolKit and file explaination.
* PPP, JNR, 花园摆-米浴, Vi, Allah: These are the people help with Sen localization. Thanks to them for translating Sen to their native languages to help other people.

## Visual Studio Code Integration

* User can integrate Sen with Visual Studio Code by edit environment path and add Sen contains directory.

* You can call Sen through few command line like this and Sen will get "./test.js", execute the function JS Evaluate:
	+ sen ./test.js -method "js\_evaluate"

## Customize Sen

* Sen has the Scripts directory which allows the Users to customize the tool logic.

### Change Language

* Go to "<directory-contains-script>/Modules/Customization/entry.json" and change the property "language". Here are 6 languages supported by Sen, if you have more you can translate and send Haruma through Discord or GitHub and it will be committed in Sen.
	+ 1. English
	+ 2. Chinese
	+ 3. Spanish
	+ 4. Russian
	+ 5. Portuguese
	+ 6. Vietnamese
* For example, if I want to set the tool language to "Chinese", I only need to edit the property "language" to "Chinese" and Sen will apply it directly.
* Example in Picture:

The default language from "English" has been changed to "Chinese".

### Other Entry

* `notification\_when\_finish`: Allow Sen to send notification after function execute finish or error.
* `override`: File override, if not allow the tool will ask the Users to choose new path if file or directory already exists.
* `use\_trailing\_commas`: JSON Serializer, allow Sen to write trailing commas JSON.
* `debugger`: Show Debug Messages and Stack.
* `execute\_again\_after\_error`: Allow Sen to re-execute the function has been failed to execute.
* `format\_time`: Format time spent timer output.
* `execute\_function\_if\_exists\_one`: If there is one function displayed, Sen will execute it directly.

### Method Customization

* Go to "<directory-contains-script>/Modules/Customization/Methods/<method-you-want-to-customize>.json" and edit them. The options are the selection number when Sen display, except for some exception. By default, it will automatically ask if the value is "?", and input it other value will make it fill the option argument directly.