Skip to content

xkllkx/Pokemon_Scenario_Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pokemon_Scenario_Generator

This repository demonstrates using Pillow and OpenCV to create a Pokémon game scenario generator. The application is divided into two main parts:

Character Info Edit

Allows users to edit the character's name and HP.

Animation Generate

Continues from the first part to progressively generate multiple game scenes and create a game animation.

# Installation ```bash pip install pillow opencv-python ```

How to use this repo

Character Info Edit

User define variable

  • Font
font = ImageFont.truetype("Silver.ttf", 60)
  • Character model pick
im = Image.open("f_w_model.jpg")
  • Character HP
player1_start_XY = [976,268] # XY # main character HP left-coor
player1_end_XY = [751,268] # left

player2_start_XY = [403,63] # XY # opponent character HP left-coor
player2_end_XY = [180,63] # left

# only player1 need HP num
num_start_XY = [868,279] # left top

player1_full_blood = 20
player1_current_blood = 10

player2_full_blood = 20
player2_current_blood = 15
  • Output Scenario (png)
im.save("f_w.png","png")

Run T2P_PIL_finish.py to generate single Pokémon game scenario.

python T2P_PIL_finish.py

Animation Generate

User define variable

  • As mentioned above

  • animation_fps

picture_num = 50
twinkle_num = 4 # slash on/off * 2

picture_name = 0
  • output folder
filename = "w_g_bb_2"
  • slash twice
black = Image.open("black.jpg")
twinkle = 0
  • animation
size = (1009,348) # image size
print(size)

Run picture_2_movie_final.py to generate scenarios and Pokémon game Animation.

python picture_2_movie_final.py

About

Pokémon game scenario and animation generator

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages