#Copyright 2023 Bellkitsu. #This program is released free of charge for you to use. #You may not redistribute this program in any way. #Thank you Compiled Dragon for giving advice to me. import tkinter as tk from tkinter import ttk CW = 300 CH = 600 LXM = (CW / 2) LYM = (CH / 2) #SkinColor = MCP[SCN] #HairColor = MCP[HCN] #ShirtColor = MCP[16] #PantsColor = MCP[3] #ShoeColor = MCP[3] #SleeveColor = MCP[2] #LineColor = MCP[LCN] #HatColor = MCP[HACN] LineSmooth = 0 root = tk.Tk() root.title('Vavfig Character Maker') frame = tk.Frame(root) frame.pack() #Name = tk.Frame(Frame) #Name.pack(side = Side) TabTool = tk.Frame(root) TabTool.pack(side = tk.TOP) Bottom = tk.Frame(root) Bottom.pack(side = tk.BOTTOM) IconSave = tk.PhotoImage(file = "Icons\Icon-Save.png") IconSaveAs = tk.PhotoImage(file = r"Icons\Icon-SaveAs.png") IconOpen = tk.PhotoImage(file = r"Icons\Icon-Open.png") IconNew = tk.PhotoImage(file = r"Icons\Icon-New.png") IconCopy = tk.PhotoImage(file = r"Icons\Icon-Copy.png") IconPaste = tk.PhotoImage(file = r"Icons\Icon-Paste.png") def Label(Frame, Name, Text): Name = tk.Label(Frame, text = Text) Name.pack(side = tk.LEFT) def Button(Frame, Name, Text, Image, Command, Pack): Name = tk.Button(Frame, text = Text, image = Image, command = Command) Name.pack(side = Pack) CanvasArea = ttk.Frame(Bottom) CanvasArea.pack(side = tk.LEFT) CGrid = tk.Frame(CanvasArea) CGrid.pack(side = tk.RIGHT) BGrid = tk.Frame(CanvasArea) BGrid.pack(side = tk.RIGHT) TGrid = tk.Frame(CanvasArea) TGrid.pack(side = tk.LEFT) VersionNumber = tk.Label(TGrid, text = 'Vavfig Character Maker v.1.0') VersionNumber.grid(row = 1, column = 0) CopyrightNotice = tk.Label(TGrid, text = '© Bellkitsu. Special thanks to Compiled Dragon for giving advice to me.') CopyrightNotice.grid(row = 2, column = 0) MainCanvas = tk.Canvas(CanvasArea, bg = 'white', height = CH, width = CW) MainCanvas.pack(side = tk.LEFT) def Head0(LX, LY, SX, SY, MC, LT, LO, LS): pass def Head1(LX, LY, SX, SY, MC, LT, LO, LS): HS1 = MainCanvas.create_polygon(((-15 * SX) + LX), ((00 * SY) + LY), ((15 * SX) + LX), ((00 * SY) + LY), ((55 * SX) + LX), ((-20 * SY) + LY), ((45 * SX) + LX), ((-40 * SY) + LY), ((45 * SX) + LX), ((-60 * SY) + LY), ((35 * SX) + LX), ((-80 * SY) + LY), ((15 * SX) + LX), ((-90 * SY) + LY), ((-15 * SX) + LX), ((-90 * SY) + LY), ((-35 * SX) + LX), ((-80 * SY) + LY), ((-45 * SX) + LX), ((-60 * SY) + LY), ((-45 * SX) + LX), ((-30 * SY) + LY), ((-35 * SX) + LX), ((-10 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) def HairBack0(LX, LY, SX, SY, MC, LT, LO, LS, HL, SL): pass def HairBack1(LX, LY, SX, SY, MC, LT, LO, LS, HL, SL): HBS1 = MainCanvas.create_polygon(((-55 * SX) + LX), ((-45 * SY) + LY), ((-55 * SX) + LX), ((-45 * SY) + LY), ((-55 * SX) + LX), ((-60 * SY) + LY), ((-40 * SX) + LX), ((-85 * SY) + LY), ((-15 * SX) + LX), ((-100 * SY) + LY), ((15 * SX) + LX), ((-100 * SY) + LY), ((40 * SX) + LX), ((-85 * SY) + LY), ((55 * SX) + LX), ((-60 * SY) + LY), ((55 * SX) + LX), ((-45 * SY) + LY), ((55 * SX) + LX), ((-45 * SY) + LY), ((55 * SX) + LX), ((-10 * SY) + LY + HL), ((55 * SX) + LX), ((-10 * SY) + LY + HL), ((45 * SX) + LX), ((0 * SY) + LY + HL + SL), ((45 * SX) + LX), ((0 * SY) + LY + HL + SL), ((35 * SX) + LX), ((-10 * SY) + LY + HL), ((35 * SX) + LX), ((-10 * SY) + LY + HL), ((25 * SX) + LX), ((0 * SY) + LY + HL + SL), ((25 * SX) + LX), ((0 * SY) + LY + HL + SL), ((15 * SX) + LX), ((-10 * SY) + LY + HL), ((15 * SX) + LX), ((-10 * SY) + LY + HL), ((5 * SX) + LX), ((0 * SY) + LY + HL + SL), ((5 * SX) + LX), ((0 * SY) + LY + HL + SL), ((-5 * SX) + LX), ((-10 * SY) + LY + HL), ((-5 * SX) + LX), ((-10 * SY) + LY + HL), ((-15 * SX) + LX), ((0 * SY) + LY + HL + SL), ((-15 * SX) + LX), ((0 * SY) + LY + HL + SL), ((-25 * SX) + LX), ((-10 * SY) + LY + HL), ((-25 * SX) + LX), ((-10 * SY) + LY + HL), ((-35 * SX) + LX), ((0 * SY) + LY + HL + SL), ((-35 * SX) + LX), ((0 * SY) + LY + HL + SL), ((-45 * SX) + LX), ((-10 * SY) + LY + HL), ((-45 * SX) + LX), ((-10 * SY) + LY + HL), ((-55 * SX) + LX), ((0 * SY) + LY + HL + SL), ((-55 * SX) + LX), ((0 * SY) + LY + HL + SL), fill = MC, outline = LO, width = LT, smooth = LS) def HairFront0(LX, LY, SX, SY, MC, LT, LO, LS): pass def HairFront1(LX, LY, SX, SY, MC, LT, LO, LS): HFS1 = MainCanvas.create_polygon(((5 * SX) + LX), ((-100 * SY) + LY), ((0 * SX) + LX), ((-100 * SY) + LY), ((15 * SX) + LX), ((-100 * SY) + LY), ((45 * SX) + LX), ((-85 * SY) + LY), ((60 * SX) + LX), ((-50 * SY) + LY), ((60 * SX) + LX), ((-50 * SY) + LY), ((45 * SX) + LX), ((-60 * SY) + LY), ((45 * SX) + LX), ((-60 * SY) + LY), ((40 * SX) + LX), ((-50 * SY) + LY), ((40 * SX) + LX), ((-50 * SY) + LY), ((30 * SX) + LX), ((-60 * SY) + LY), ((30 * SX) + LX), ((-60 * SY) + LY), ((15 * SX) + LX), ((-45 * SY) + LY), ((15 * SX) + LX), ((-45 * SY) + LY), ((0 * SX) + LX), ((-60 * SY) + LY), ((0 * SX) + LX), ((-60 * SY) + LY), ((-10 * SX) + LX), ((-50 * SY) + LY), ((-10 * SX) + LX), ((-50 * SY) + LY), ((-15 * SX) + LX), ((-60 * SY) + LY), ((-15 * SX) + LX), ((-60 * SY) + LY), ((-25 * SX) + LX), ((-45 * SY) + LY), ((-25 * SX) + LX), ((-45 * SY) + LY), ((-25 * SX) + LX), ((-0 * SY) + LY), ((-25 * SX) + LX), ((-0 * SY) + LY), ((-46 * SX) + LX), ((-20 * SY) + LY), ((-46 * SX) + LX), ((-20 * SY) + LY), ((-46 * SX) + LX), ((-65 * SY) + LY), ((-35 * SX) + LX), ((-82.5 * SY) + LY), ((-12.5 * SX) + LX), ((-95 * SY) + LY), ((5 * SX) + LX), ((-95 * SY) + LY), fill = MC, outline = MC, width = (LT / 2), smooth = LS) HFSL1 = MainCanvas.create_line(((1 * SX) + LX), ((-100 * SY) + LY), ((0 * SX) + LX), ((-100 * SY) + LY), ((15 * SX) + LX), ((-100 * SY) + LY), ((45 * SX) + LX), ((-85 * SY) + LY), ((60 * SX) + LX), ((-50 * SY) + LY), ((60 * SX) + LX), ((-50 * SY) + LY), ((45 * SX) + LX), ((-60 * SY) + LY), ((45 * SX) + LX), ((-60 * SY) + LY), ((40 * SX) + LX), ((-50 * SY) + LY), ((40 * SX) + LX), ((-50 * SY) + LY), ((30 * SX) + LX), ((-60 * SY) + LY), ((30 * SX) + LX), ((-60 * SY) + LY), ((15 * SX) + LX), ((-45 * SY) + LY), ((15 * SX) + LX), ((-45 * SY) + LY), ((0 * SX) + LX), ((-60 * SY) + LY), ((0 * SX) + LX), ((-60 * SY) + LY), ((-10 * SX) + LX), ((-50 * SY) + LY), ((-10 * SX) + LX), ((-50 * SY) + LY), ((-15 * SX) + LX), ((-60 * SY) + LY), ((-15 * SX) + LX), ((-60 * SY) + LY), ((-25 * SX) + LX), ((-45 * SY) + LY), ((-25 * SX) + LX), ((-45 * SY) + LY), ((-25 * SX) + LX), ((-0 * SY) + LY), ((-25 * SX) + LX), ((-0 * SY) + LY), ((-45 * SX) + LX), ((-20 * SY) + LY), ((-45 * SX) + LX), ((-20 * SY) + LY), fill = LO, width = LT, smooth = LS) def LeftEye0(LX, LY, SX, SY, LO, LT, LS): pass def LeftEye1(LX, LY, SX, SY, LO, LT, LS): MainCanvas.create_line(((35 * SX) + LX), ((-50 * SY) + LY), ((35 * SX) + LX), ((-20 * SY) + LY), fill = LO, width = LT, smooth = LS) def RightEye0(LX, LY, SX, SY, LO, LT, LS): pass def RightEye1(LX, LY, SX, SY, LO, LT, LS): MainCanvas.create_line(((-5 * SX) + LX), ((-50 * SY) + LY), ((-5 * SX) + LX), ((-20 * SY) + LY), fill = LO, width = LT, smooth = LS) def Shirt0(LX, LY, SX, SY, MC, LT, LO, LS): pass def Shirt1(LX, LY, SX, SY, MC, LT, LO, LS): MainCanvas.create_polygon(((10 * SX) + LX), ((0 * SY) + LY), ((10 * SX) + LX), ((0 * SY) + LY), ((-15 * SX) + LX), ((0 * SY) + LY), ((-15 * SX) + LX), ((0 * SY) + LY), ((-25 * SX) + LX), ((80 * SY) + LY), ((-25 * SX) + LX), ((80 * SY) + LY), ((25 * SX) + LX), ((80 * SY) + LY), ((30 * SX) + LX), ((75 * SY) + LY), ((30 * SX) + LX), ((75 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) def Pants0(LX, LY, SX, SY, MC, LT, LO, LS): pass def Pants1(LX, LY, SX, SY, MC, LT, LO, LS): MainCanvas.create_polygon(((-20 * SX) + LX), ((40 * SY) + LY), ((20 * SX) + LX), ((40 * SY) + LY), ((30 * SX) + LX), ((75 * SY) + LY), ((25 * SX) + LX), ((80 * SY) + LY), ((-25 * SX) + LX), ((80 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) def Pants2(LX, LY, SX, SY, MC, LT, LO, LS): MainCanvas.create_polygon(((-20 * SX) + LX), ((40 * SY) + LY), ((20 * SX) + LX), ((40 * SY) + LY), ((30 * SX) + LX), ((75 * SY) + LY), ((25 * SX) + LX), ((80 * SY) + LY), ((-25 * SX) + LX), ((80 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) MainCanvas.create_line(((5 * SX) + LX), ((80 * SY) + LY), ((2.5 * SX) + LX), ((50 * SY) + LY), fill = LO, width = LT, smooth = 0) def LeftLeg0(LX, LY, SX, SY, MC, LT, LO, LS): pass def LeftLeg1(LX, LY, SX, SY, MC, LT, LO, LS): MainCanvas.create_polygon(((15 * SX) + LX), ((85 * SY) + LY), ((20 * SX) + LX), ((87.5 * SY) + LY), ((25 * SX) + LX), ((85 * SY) + LY), ((25 * SX) + LX), ((80 * SY) + LY), ((20 * SX) + LX), ((77.5 * SY) + LY), ((15 * SX) + LX), ((80 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) def RightLeg1(LX, LY, SX, SY, MC, LT, LO, LS): pass def RightLeg1(LX, LY, SX, SY, MC, LT, LO, LS): MainCanvas.create_polygon(((-10 * SX) + LX), ((85 * SY) + LY), ((-15 * SX) + LX), ((87.5 * SY) + LY), ((-20 * SX) + LX), ((85 * SY) + LY), ((-20 * SX) + LX), ((80 * SY) + LY), ((-15 * SX) + LX), ((77.5 * SY) + LY), ((-10 * SX) + LX), ((80 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) def LeftArm0(LX, LY, SX, SY, MC, LT, LO, LS): pass def LeftArm1(LX, LY, SX, SY, MC, LT, LO, LS): MainCanvas.create_polygon(((10 * SX) + LX), ((0 * SY) + LY), ((10 * SX) + LX), ((0 * SY) + LY), ((20 * SX) + LX), ((45 * SY) + LY), ((30 * SX) + LX), ((45 * SY) + LY), ((30 * SX) + LX), ((40 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) def RightArm0(LX, LY, SX, SY, MC, LT, LO, LS): pass def RightArm1(LX, LY, SX, SY, MC, LT, LO, LS): MainCanvas.create_polygon(((-15 * SX) + LX), ((0 * SY) + LY), ((-15 * SX) + LX), ((0 * SY) + LY), ((-20 * SX) + LX), ((47.5 * SY) + LY), ((-30 * SX) + LX), ((47.5 * SY) + LY), ((-30 * SX) + LX), ((42.5 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) def LeftSleeve0(LX, LY, SX, SY, MC, LT, LO, LS): pass def LeftSleeve1(LX, LY, SX, SY, MC, LT, LO, LS): MainCanvas.create_polygon(((10 * SX) + LX), ((0 * SY) + LY), ((10 * SX) + LX), ((0 * SY) + LY), ((25 * SX) + LX), ((20 * SY) + LY), ((25 * SX) + LX), ((20 * SY) + LY), ((12.5 * SX) + LX), ((25 * SY) + LY), ((12.5 * SX) + LX), ((25 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) def RightSleeve0(LX, LY, SX, SY, MC, LT, LO, LS): pass def RightSleeve1(LX, LY, SX, SY, MC, LT, LO, LS): MainCanvas.create_polygon(((-15 * SX) + LX), ((0 * SY) + LY), ((-15 * SX) + LX), ((0 * SY) + LY), ((-27.5 * SX) + LX), ((20 * SY) + LY), ((-27.5 * SX) + LX), ((20 * SY) + LY), ((-15 * SX) + LX), ((25 * SY) + LY), ((-15 * SX) + LX), ((25 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) def HatFront0(LX, LY, SX, SY, MC, LT, LO, LS): pass def HatFront1(LX, LY, SX, SY, MC, LT, LO, LS): MainCanvas.create_polygon(((-75 * SX) + LX), ((-55 * SY) + LY), ((-75 * SX) + LX), ((-55 * SY) + LY), ((75 * SX) + LX), ((-55 * SY) + LY), ((75 * SX) + LX), ((-55 * SY) + LY), ((60 * SX) + LX), ((-65 * SY) + LY), ((60 * SX) + LX), ((-65 * SY) + LY), ((60 * SX) + LX), ((-65 * SY) + LY), ((-60 * SX) + LX), ((-65 * SY) + LY), ((-60 * SX) + LX), ((-65 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) MainCanvas.create_polygon(((-60 * SX) + LX), ((-65 * SY) + LY), ((-60 * SX) + LX), ((-65 * SY) + LY), ((-45 * SX) + LX), ((-85 * SY) + LY), ((-15 * SX) + LX), ((-105 * SY) + LY), ((15 * SX) + LX), ((-105 * SY) + LY), ((45 * SX) + LX), ((-85 * SY) + LY), ((60 * SX) + LX), ((-65 * SY) + LY), ((60 * SX) + LX), ((-65 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) def HatBack0(LX, LY, SX, SY, MC, LT, LO, LS): pass def HatBack1(LX, LY, SX, SY, MC, LT, LO, LS): MainCanvas.create_polygon(((-65 * SX) + LX), ((-115 * SY) + LY), ((-65 * SX) + LX), ((-115 * SY) + LY), ((55 * SX) + LX), ((-45 * SY) + LY), ((55 * SX) + LX), ((-45 * SY) + LY), ((55 * SX) + LX), ((-115 * SY) + LY), ((55 * SX) + LX), ((-115 * SY) + LY), ((-65 * SX) + LX), ((-45 * SY) + LY), ((-65 * SX) + LX), ((-45 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) MainCanvas.create_polygon(((-5 * SX) + LX), ((-80 * SY) + LY), ((-5 * SX) + LX), ((-80 * SY) + LY), ((-65 * SX) + LX), ((-15 * SY) + LY), ((-65 * SX) + LX), ((-15 * SY) + LY), ((-45 * SX) + LX), ((-0 * SY) + LY), ((-45 * SX) + LX), ((-0 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) MainCanvas.create_polygon(((-5 * SX) + LX), ((-80 * SY) + LY), ((-5 * SX) + LX), ((-80 * SY) + LY), ((55 * SX) + LX), ((-15 * SY) + LY), ((55 * SX) + LX), ((-15 * SY) + LY), ((35 * SX) + LX), ((-0 * SY) + LY), ((35 * SX) + LX), ((-0 * SY) + LY), fill = MC, outline = LO, width = LT, smooth = LS) def Char1(HT, LET, RET, HBT, HFT, HABT, HAFT, HC, HHC, HAC, LX, LY, SX, SY, LT, LO, LS, HL, SL): HABT(LX, LY, SX, SY, HAC, LT, LO, LS) HBT(LX, LY, SX, SY, HHC, LT, LO, LS, HL, SL) HT(LX, LY, SX, SY, HC, LT, LO, LS) LET(LX, LY, SX, SY, LO, LT, LS) RET(LX, LY, SX, SY, LO, LT, LS) HFT(LX, LY, SX, SY, HHC, LT, LO, LS) HAFT(LX, LY, SX, SY, HAC, LT, LO, LS) HI = list((Head0, Head1)) LEI = list((LeftEye0, LeftEye1)) REI = list((RightEye0, RightEye1)) HBI = list((HairBack0, HairBack1)) HFI = list((HairFront0, HairFront1)) HABI = list((HatBack0, HatBack1)) HAFI = list((HatFront0, HatFront1)) MCP = list(('White', 'light grey', 'grey', 'dim grey', 'black', 'beige', 'brown', 'brown4', 'red', 'red2', 'orange', 'orange2', 'yellow', 'yellow2', 'green', 'green2', 'blue', 'blue2', 'purple', 'purple2')) SCN = 5 HCN = 14 HACN = 2 LCN = 4 HN = 1 LEN = 1 REN = 1 HBN = 1 HFN = 1 HABN = 1 HAFN = 1 def UpdateCanvas(): global SCN global HCN global HACN global LCN global HN global LEN global REN global HBN global HFN global HABN global HAFN MainCanvas.delete("all") Char1(HI[HN], LEI[LEN], REI[REN], HBI[HBN], HFI[HFN], HABI[HABN], HAFI[HAFN], MCP[SCN], MCP[HCN], MCP[HACN], LXM, LYM, 1, 1, 5, MCP[LCN], LineSmooth, 0, 0) #Colors def ReduceSCN(): global SCN SCN = SCN - 1 UpdateCanvas() def AddSCN(): global SCN SCN = SCN + 1 UpdateCanvas() def ReduceHCN(): global HCN HCN = HCN - 1 UpdateCanvas() def AddHCN(): global HCN HCN = HCN + 1 UpdateCanvas() def ReduceHACN(): global HACN HACN = HACN - 1 UpdateCanvas() def AddHACN(): global HACN HACN = HACN + 1 UpdateCanvas() def ReduceLCN(): global LCN LCN = LCN - 1 UpdateCanvas() def AddLCN(): global LCN LCN = LCN + 1 UpdateCanvas() #Body Types def ReduceHN(): global HN HN = HN - 1 UpdateCanvas() def AddHN(): global HN HN = HN + 1 UpdateCanvas() def ReduceLEN(): global LEN LEN = LEN - 1 UpdateCanvas() def AddLEN(): global LEN LEN = LEN + 1 UpdateCanvas() def ReduceREN(): global REN REN = REN - 1 UpdateCanvas() def AddREN(): global REN REN = REN + 1 UpdateCanvas() def ReduceHBN(): global HBN HBN = HBN - 1 UpdateCanvas() def AddHBN(): global HBN HBN = HBN + 1 UpdateCanvas() def ReduceHFN(): global HFN HFN = HFN - 1 UpdateCanvas() def AddHFN(): global HFN HFN = HFN + 1 UpdateCanvas() def ReduceHABN(): global HABN HABN = HABN - 1 UpdateCanvas() def AddHABN(): global HABN HABN = HABN + 1 UpdateCanvas() def ReduceHAFN(): global HAFN HAFN = HAFN - 1 UpdateCanvas() def AddHAFN(): global HAFN HAFN = HAFN + 1 UpdateCanvas() SCT = tk.Label(CGrid, text = 'Colors') SCT.grid(row = 0, column = 0) SCR = tk.Button(CGrid, text = '