- The simplest way is to download the .py file and place it in the same directory as the file you wish to use, such as a Jupyter notebook or another .py file
- You can import the file by using
import PSO_Battle_Parameter_Editor as psoto import it with aliaspso
Data is loaded and manipulated using the Table class. This can be done by by calling the Table constructor which takes two arguments:
- Battle parameter file location
- Episode number (1,2,4)
An example is:
file = pso.Table('BattleParamEntry.dat',episode=1)
There are 4 main sections to the file:
- Stats Data
- Attack Data
- Resist Data
- Movement Data
To get the most well-documented values in a neat table, there is the get_merged_table method, which takes the following parameters:
- Difficulty (int): 0 for normal; 1 for hard; 2 for very hard; 3 for ultimate.
- Verbose (bool, optional): Prints everything while parsing
Sample use:
file.get_merged_table(difficulty=0)
set_stat_property(self, value, stat, enemy, difficulty)
set_resist_property(self, value, stat, enemy, difficulty)
To avoid potentially ruining game files, there are some safeguards. The relevant method is write which has the following parameters:
- new_file_name: the file name that the modified data will be exported as. The library will not modify the read-in file unless you choose for this parameter to be the same name.
- overwrite (optional with default False): if there already exists a file with the chosen name, the method will warn you that a file with that name already exists and not write out the data. If you wish to allow overwriting the file, you can set overwrite=True.
Sample use:
file.write('test_param.dat')
Code by John Della Rosa
File information based on Newserv/fuhttps://github.com/fuzziqersoftware/newserv
Inspired by Solybum