-
Notifications
You must be signed in to change notification settings - Fork 24
/
mc_profile.rpy
865 lines (784 loc) · 42.8 KB
/
mc_profile.rpy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
label hero_profile:
scene bg h_profile
$ global_flags.set_flag("keep_playing_music")
# $ pytfall.world_quests.run_quests("auto") Goes against squelching policy?
$ pytfall.world_events.run_events("auto")
$ renpy.retain_after_load()
show screen hero_profile
with dissolve
$ hero.inventory.set_page_size(18)
while 1:
$ result = ui.interact()
# To kill input error during team renaming:
if not result:
pass
elif result[0] == 'control':
if result[1] == 'return':
$ pytfall.hp.show_item_info = False
$ pytfall.hp.item = False
hide screen hero_profile
hide screen hero_equip
# Reset filters (prevents crap from happening in shops):
$ hero.inventory.male_filter = False
$ hero.inventory.apply_filter('all')
# Taking care of Ren'Pys annoying reserves... <-- Prolly obsolete after I rewrote the last label func.
if pytfall.hp.came_from.startswith("_"):
jump mainscreen
else:
jump expression pytfall.hp.came_from
elif result[0] == "dropdown":
if result[1] == "loc":
$ renpy.show_screen("set_location_dropdown", hero, pos=renpy.get_mouse_pos())
elif result[1] == "home":
$ renpy.show_screen("set_home_dropdown", hero, pos=renpy.get_mouse_pos())
elif result[0] == 'hero':
if result[1] == 'equip':
$ came_to_equip_from = "hero_profile"
$ eqtarget = hero
jump char_equip
elif result[0] == "remove_from_team":
$ hero.team.remove(result[1])
elif result[0] == "rename_team":
if result[1] == "set_name":
$ hero.team.name = renpy.call_screen("ht_input")
init:
screen hero_profile():
default tt = Tooltip("")
default lframe_display = "status"
default rframe_display = "skills"
key "mousedown_3" action Return(['control', 'return'])
# HERO SPRITE ====================================>
add Transform(hero.show("sprofile", resize=(550, 550)), alpha=0.97) align(0.65, 0.9)
# BASE FRAME 2 "bottom layer" and portrait ====================================>
add "content/gfx/frame/h_profile.png"
add hero.show("cportrait", resize=(100, 100)) pos (64, 8) # portrait should be between "Base Frame 2" and "Base Frame 1" :Gismo
# BATTLE STATS ====================================>
fixed:
xysize (270, 270)
pos (300, 413)
add Transform(child=RadarChart((float(hero.attack)/hero.get_max("attack")), (float(hero.defence)/hero.get_max("defence")), (float(hero.agility)/hero.get_max("agility")),
(float(hero.luck)/hero.get_max("luck")), (float(hero.magic)/hero.get_max("magic")), 112, 126, 148, blue), alpha=0.4) align (0.5, 0.5)
add Transform(child=RadarChart((float(hero.attack)/hero.get_max("attack")), (float(hero.defence)/hero.get_max("defence")), (float(hero.agility)/hero.get_max("agility")),
(float(hero.luck)/hero.get_max("luck")), (float(hero.magic)/hero.get_max("magic")), 65, 126, 148, blueviolet), alpha=0.3) align (0.5, 0.5)
add Transform(child=RadarChart((float(hero.attack)/hero.get_max("attack")), (float(hero.defence)/hero.get_max("defence")), (float(hero.agility)/hero.get_max("agility")),
(float(hero.luck)/hero.get_max("luck")), (float(hero.magic)/hero.get_max("magic")), 33, 126, 148, aquamarine), alpha=0.2) align (0.5, 0.5)
add ProportionalScale("content/gfx/interface/images/pentagon1.png", 250, 250) align (0.01, 0.5)
fixed:
frame:
pos (375, 402)
background Frame(Transform("content/gfx/frame/stat_box_proper.png", alpha=0.9), 10, 10)
has hbox
add ProportionalScale("content/gfx/interface/images/atk.png", 24, 24)
text("{size=-5}{font=fonts/Rubius.ttf}{color=[red]}[hero.attack]|%d"%(hero.get_max("attack"))) outlines [(1, "#0d0d0d", 0, 0)]
frame:
pos (223, 483)
background Frame(Transform("content/gfx/frame/stat_box_proper.png", alpha=0.9), 10, 10)
has hbox
add ProportionalScale("content/gfx/interface/images/def.png", 24, 24)
text("{size=-5}{font=fonts/Rubius.ttf}{color=#dc762c}[hero.defence]|%d"%(hero.get_max("defence"))) outlines [(1, "#0d0d0d", 0, 0)]
frame:
pos (255, 643)
background Frame(Transform("content/gfx/frame/stat_box_proper.png", alpha=0.9), 10, 10)
has hbox
add ProportionalScale("content/gfx/interface/images/agi.png", 24, 24)
text("{size=-5}{font=fonts/Rubius.ttf}{color=#1E90FF} [hero.agility]|%d"%(hero.get_max("agility"))) outlines [(1, "#0d0d0d", 0, 0)]
frame:
pos (495, 643)
background Frame(Transform("content/gfx/frame/stat_box_proper.png", alpha=0.9), 10, 10)
has hbox
add ProportionalScale("content/gfx/interface/images/luck.png", 24, 24)
text("{size=-5}{font=fonts/Rubius.ttf}{color=#00FA9A}[hero.luck]|%d"%(hero.get_max("luck"))) outlines [(1, "#0d0d0d", 0, 0)]
frame:
pos (526, 483)
background Frame(Transform("content/gfx/frame/stat_box_proper.png", alpha=0.9), 10, 10)
has hbox
add ProportionalScale("content/gfx/interface/images/mag.png", 24, 24)
text("{size=-5}{font=fonts/Rubius.ttf}{color=#8470FF}[hero.magic]|%d"%(hero.get_max("magic"))) outlines [(1, "#0d0d0d", 0, 0)]
# LEFT FRAME (Stats/Friends/Etc) ====================================>
vbox:
xsize 217
pos (8, 110)
# NAME^ LVL (ok for 1m lvls) ====================================>
text (u"[hero.name]") style "TisaOTMol" size 28 xalign 0.492 ypos 5
hbox:
spacing 1
if (hero.level) <10:
pos (89, 11)
elif (hero.level) <100:
pos (86, 11)
elif (hero.level) <10000:
pos (77, 11)
else:
pos (73, 11)
label "{color=#CDAD00}Lvl" text_font "fonts/Rubius.ttf" text_size 16 text_outlines [(1, "#3a3a3a", 0, 0)]
label "{color=#CDAD00}[hero.level]" text_font "fonts/Rubius.ttf" text_size 16 text_outlines [(1, "#3a3a3a", 0, 0)]
if lframe_display == "status":
# STATS ====================================>
null height 20
$ stats = ["constitution", "charisma", "intelligence", "fame", "reputation"]
vbox:
style_group "proper_stats"
spacing 1
xsize 212
frame:
xysize (212, 27)
xalign 0.5
text "Health:" xalign 0.02 color "#CD4F39"
if hero.health <= hero.get_max("health")*0.3:
text (u"{color=[red]}%s/%s"%(hero.health, hero.get_max("health"))) xalign 1.0 style_suffix "value_text" xoffset -6 yoffset 4
else:
text (u"{color=#F5F5DC}%s/%s"%(hero.health, hero.get_max("health"))) xalign 1.0 style_suffix "value_text" xoffset -6 yoffset 4
frame:
xysize (212, 27)
xalign 0.5
text "MP:" xalign 0.02 color "#009ACD"
if hero.mp <= hero.get_max("mp")*0.3:
text (u"{color=[red]}%s/%s"%(hero.mp, hero.get_max("mp"))) xalign 1.0 style_suffix "value_text" xoffset -6 yoffset 4
else:
text (u"{color=#F5F5DC}%s/%s"%(hero.mp, hero.get_max("mp"))) xalign 1.0 style_suffix "value_text" xoffset -6 yoffset 4
frame:
xysize (212, 27)
xalign 0.5
text "{color=#43CD80}Vitality:" xalign (0.02)
if hero.vitality <= hero.get_max("vitality")*0.3:
text (u"{color=[red]}%s/%s"%(hero.vitality, hero.get_max("vitality"))) xalign 1.0 style_suffix "value_text" xoffset -6 yoffset 4
else:
text (u"{color=#F5F5DC}%s/%s"%(hero.vitality, hero.get_max("vitality"))) xalign 1.0 style_suffix "value_text" xoffset -6 yoffset 4
for stat in stats:
frame:
xysize (212, 27)
xalign 0.5
text '{}'.format(stat.capitalize()) xalign 0.02 color "#79CDCD"
text ('%d/%d'%(getattr(hero, stat), hero.get_max(stat))) xalign 1.0 style_suffix "value_text" xoffset -6 yoffset 4
null height 5
# LOCATION ====================================>
button:
style_group "ddlist"
action Return(["dropdown", "loc"])
alternate Return(["dropdown", "home"])
text "{image=content/gfx/interface/icons/move15.png}Location:\n [hero.location]":
if len(str(hero.location)) > 18:
size 15
else:
size 16
hovered tt.Action("Change MCs Home/Location.")
null height 3
# ELEMENTAL ALIGNMENT ====================================>
$ els = [Transform(e.icon, size=(90, 90)) for e in hero.elements]
frame:
style_group "content"
background Frame(Transform("content/gfx/frame/ink_box.png", alpha=0.5), 10, 10)
xysize (210, 120)
xalign 0.5
$ x = 0
$ els = [Transform(i, crop=(90/len(els)*els.index(i), 0, 90/len(els), 90), subpixel=True, xpos=(x + 90/len(els)*els.index(i))) for i in els]
$ f = Fixed(*els, xysize=(90, 90))
add f xcenter 150 ycenter 55
viewport:
draggable True
edgescroll (15, 10)
xysize (200, 110)
align (0, 0.5)
# yoffset 33
has vbox spacing -4
for e in hero.elements:
textbutton "{=TisaOTM}{size=14}[e.id]":
background None
action NullAction()
hovered tt.Action("%s" % e.desc)
add ProportionalScale("content/gfx/interface/images/elements/hover.png", 90, 90) pos (105, 10)
elif lframe_display == "friends":
# FRIEND LIST ====================================>
null height 26
viewport:
xysize (200, 500)
scrollbars "vertical"
draggable True
mousewheel True
xalign 0.5
has vbox spacing 4 xfill True
$ temp = sorted(list(hero.friends | hero.lovers), key=attrgetter("name"))
for char in temp:
frame:
background Frame(Transform("content/gfx/frame/ink_box.png", alpha=0.6), 5, 5)
top_padding 10
bottom_padding 3
xpadding 5
xmargin 0
ymargin 0
xminimum 180
align (0.5, 0.5)
has vbox spacing 1 xalign 0.5
button:
ypadding 1
xpadding 1
xmargin 0
ymargin 0
align (0.5, 0.5)
style "basic_choice2_button"
action NullAction()
add char.show("portrait", resize=(120, 120), cache=True) align (0.5, 0.5)
text "{=TisaOTMolxm}[char.nickname]" align (0.5, 1.0) yoffset 5 xmaximum 190
if char in hero.lovers:
add ProportionalScale("content/gfx/interface/images/love.png", 35, 35) xalign 0.5
else:
add ProportionalScale("content/gfx/interface/images/friendship.png", 35, 35) xalign 0.5
# BUTTONS on the "bottom layer" ------------------------------------>
hbox:
style_group "pb"
spacing 1
pos (1142, 156)
button:
action SetScreenVariable("rframe_display", "skills"), With(dissolve)
text "Skills" style "pb_button_text"
button:
action SetScreenVariable("rframe_display", "traits"), With(dissolve)
text "Traits" style "pb_button_text"
# RIGHT FRAME ====================================>
vbox:
pos (1124, 60)
xsize 153
frame:
xalign 0.5
yfill True
background Frame (Transform("content/gfx/frame/MC_bg3.png", alpha=0.6), 10, 10)
xysize (153, 60)
text (u"{color=#CDAD00} Day [day]") font "fonts/Rubius.ttf" size 26 outlines [(1, "#3a3a3a", 0, 0)] align (0.5, 0.6)
null height 2
frame:
xalign 0.5
xysize 142, 22
style_prefix "proper_stats"
text "Gold:" size 16 outlines [(1, "#3a3a3a", 0, 0)] color gold xalign .1
text "[hero.gold]" size 14 outlines [(1, "#3a3a3a", 0, 0)] style_suffix "value_text" color gold xalign .9 yoffset 2
# ATTACKS/MAGIC SKILLS ====================================>
if rframe_display == "skills":
vbox:
pos (1125, 205)
style_group "proper_stats"
frame:
background Frame("content/gfx/frame/hp_1.png", 5, 5)
xysize (160, 192)
has vbox
label (u"Attack:") text_size 20 text_color ivory text_bold True xalign .45 text_outlines [(3, "#3a3a3a", 0, 0), (2, "#8B0000", 0, 0), (1, "#3a3a3a", 0, 0)]
viewport:
xysize (160, 155)
scrollbars "vertical"
draggable True
mousewheel True
has vbox spacing 1
for entry in hero.attack_skills:
frame:
xysize (147, 25)
button:
background Null()
xysize (147, 25)
action NullAction()
text "[entry.name]" idle_color ivory size 15 align .5, .5 hover_color crimson
hovered tt.action(entry.desc)
hover_background Frame(im.MatrixColor("content/gfx/interface/buttons/choice_buttons2h.png", im.matrix.brightness(0.10)), 5, 5)
frame:
background Frame("content/gfx/frame/hp_1.png", 5, 5)
xysize (160, 192)
has vbox
label (u"Magic:") text_size 20 text_color ivory text_bold True xalign .45 text_outlines [(3, "#3a3a3a", 0, 0), (2, "#104E8B", 0, 0), (1, "#3a3a3a", 0, 0)]
viewport:
xysize (160, 155)
scrollbars "vertical"
draggable True
mousewheel True
has vbox spacing 1
for entry in hero.magic_skills:
frame:
xysize (147, 25)
button:
background Null()
xysize (147, 25)
action NullAction()
text "[entry.name]" idle_color ivory size 15 align .5, .5 hover_color crimson
hovered tt.action(entry.desc)
hover_background Frame(im.MatrixColor("content/gfx/interface/buttons/choice_buttons2h.png", im.matrix.brightness(0.10)), 5, 5)
# TRAITS ====================================>
elif rframe_display == "traits":
frame:
pos (1125, 205)
background Frame("content/gfx/frame/hp_1long.png", 5, 5)
xysize (160, 389)
style_group "proper_stats"
has vbox
label (u"Traits:") text_size 20 text_color ivory text_bold True xalign .45
viewport:
xysize (160, 150)
draggable True
mousewheel True
has vbox spacing 1
# for i in range(200):
# add Solid("#F00", xysize=(100, 20))
for trait in list(t for t in hero.traits if not any([t.personality, t.race, t.elemental])):
if not trait.hidden:
frame:
xysize (147, 25)
button:
background Null()
xysize (147, 25)
action NullAction()
text trait.id idle_color ivory size 15 align .5, .5 hover_color crimson
hovered tt.Action(u"%s"%trait.desc)
hover_background Frame(im.MatrixColor("content/gfx/interface/buttons/choice_buttons2h.png", im.matrix.brightness(0.10)), 5, 5)
null height 10
label (u"Effects:") text_size 20 text_color ivory text_bold True xalign .45
viewport:
xysize (160, 150)
draggable True
mousewheel True
has vbox spacing 1
for effect, val in hero.effects.iteritems():
if val['active']:
frame:
xysize (147, 25)
button:
background Null()
xysize (147, 25)
action NullAction()
text "[effect]" idle_color ivory size 15 align .5, .5 hover_color crimson
hovered tt.Action(u"%s"%val.get("desc", "No Description availible."))
hover_background Frame(im.MatrixColor("content/gfx/interface/buttons/choice_buttons2h.png", im.matrix.brightness(0.10)), 5, 5)
# TOOLTIP TEXT ====================================>
hbox:
spacing 1
pos (621, 602)
xysize (657, 114)
yfill True
if isinstance(tt.value, BE_Action):
$ element = tt.value.get_element()
if element:
fixed:
xysize (100, 100)
yalign 0.5
if element.icon:
$ img = ProportionalScale(element.icon, 90, 90)
add img align (0.5, 0.5)
text tt.value.desc style "content_text" size 18 color "#ecc88a" yalign 0.1
else:
text (u"{=content_text}{color=#ecc88a}%s" % tt.value) size 18
# BASE FRAME 1 "top layer" ====================================>
add "content/gfx/frame/h_profile2.png"
# BUTTONS and UI elements on the "top layer" ====================================>
hbox:
style_group "pb"
spacing 3
pos (492, 9)
button:
action SetScreenVariable("lframe_display", "status"), With(dissolve)
text "Status" style "pb_button_text"
hovered tt.Action("Show Hero Stats")
button:
action Show("hero_team", transition=dissolve)#, With(dissolve)
text "Team" style "pb_button_text"
hovered tt.Action("Show [hero.team.name]!")#, With(dissolve)
button:
action Return(['hero', 'equip'])#, With(dissolve)
text "Equipment" style "pb_button_text"
hovered tt.Action("Take a look at your inventory.")
button:
action Show("hero_finances")#, With(dissolve)
text "Finance" style "pb_button_text"
button:
action If(hero.friends | hero.lovers, true=[SetScreenVariable("lframe_display", "friends"), With(dissolve)])
text "Friends" style "pb_button_text"
# AP ====================================>
frame:
xalign .45
ypos 50
background ProportionalScale("content/gfx/frame/frame_ap2.png", 190, 80)
label "[hero.AP]":
pos (130, -2)
style "content_label"
text_color ivory
text_size 22
imagebutton:
pos (900, 7) # (178, 70)
idle im.Scale("content/gfx/interface/buttons/close2.png", 35, 35)
hover im.Scale("content/gfx/interface/buttons/close2_h.png", 35, 35)
action Return(['control', 'return'])
hovered tt.Action("Return to previous screen!")
# EXP BAR ====================================>
fixed:
pos (259, 697)
bar:
value hero.stats.exp + hero.stats.goal_increase - hero.stats.goal
range hero.stats.goal_increase
left_bar ("content/gfx/interface/bars/exp_full.png")
right_bar ("content/gfx/interface/bars/exp_empty.png")
thumb None
maximum (324, 18)
hbox:
spacing 10
pos (90, -17)
xmaximum 160
xfill True
add "content/gfx/interface/images/exp_b.png" ypos 2 xalign 0.8
text "[hero.exp]/[hero.goal]" style "proper_stats_value_text" bold True outlines [(1, "#181818", 0, 0)] color "#DAA520"
screen hero_equip(): # This is not used any longer...?
modal True
zorder 1
default tt = Tooltip(None)
# Useful keymappings (first time I try this in PyTFall):
if pytfall.hp.show_unequip_button():
key "mousedown_2" action Return(["item", "unequip"])
elif pytfall.hp.show_equip_button():
key "mousedown_2" action Return(["item", "equip"])
else:
key "mousedown_2" action NullAction()
key "mousedown_4" action Return(["hero", "next_page"])
key "mousedown_5" action Return(["hero", "prev_page"])
# Doll...
use eqdoll(char=hero)
# Inventory ------------------------------------------------------------>
vbox:
at slide(so1=(600, 0), t1=0.7, eo2=(1300, 0), t2=0.7)
pos (394, 440)
spacing 3
hbox:
spacing 52
use paging(ref=hero.inventory, use_filter=True)
use items_inv(char=hero)
# Buttons:
frame:
background Frame("content/gfx/frame/p_frame2.png", 10, 10)
style_group "basic"
xpadding 10
ypadding 10
yanchor 60
has hbox
textbutton 'Close':
hovered tt.Action("Take a look at your inventory.")
action Return(['hero', 'equip'])
if renpy.get_screen('hero_equip') and not hero.inventory.male_filter:
textbutton "Male Filter":
hovered tt.Action("Filter out all items suitible for only girls.")
action Return(['hero', 'male_filter'])
if renpy.get_screen('hero_equip') and hero.inventory.male_filter:
textbutton "Unisex Filter":
hovered tt.Action("Show all items.")
action Return(['hero', 'unisex_filter'])
if pytfall.hp.show_equip_button():
textbutton "Equip":
hovered tt.Action("Equip this item.")
action Return(['item', 'equip'])
if pytfall.hp.show_unequip_button():
textbutton "Unequip":
hovered tt.Action("Unequip this item.")
action Return(['item', 'unequip'])
# Item Info ------------------------------------------------------------------------>
showif pytfall.hp.show_item_info:
frame:
at fade_in_out()
xalign 0.986
ypos 43
background Frame("content/gfx/frame/frame_dec_1.png", 30, 30)
xpadding 30
ypadding 30
xysize (555, 400)
use itemstats(item=pytfall.hp.item, size=(580, 350), style_group="content", mc_mode=True)
screen ht_input():
zorder 1
modal True
add Transform("content/gfx/images/bg_gradient2.png", alpha=0.3)
frame:
background Frame (Transform("content/gfx/frame/ink_box.png", alpha=0.65), 10, 10)
style_group "content"
align(0.5, 0.5)
xysize (350, 150)
vbox:
spacing 20
align(0.5, 0.5)
label "{color=#F5F5DC}{size=28}Enter your team name:" xalign 0.5
input default "Player Team" length 20 xalign 0.5 style "content_label_text" color "#CDAD00" size 22
screen hero_team():
zorder 1
modal True
key "mousedown_3" action Hide("hero_team"), With(dissolve)
default tt = Tooltip("Welcome to MC profile screen!")
add Transform("content/gfx/images/bg_gradient2.png", alpha=0.3)
# Hero team ====================================>
frame:
style_prefix "proper_stats"
align .54, .4
background Frame(Transform(im.Twocolor("content/gfx/frame/ink_box.png", white, black), alpha=0.7), 5, 5)
padding 10, 5
has vbox spacing 10
hbox:
spacing 2
xalign .5
label "[hero.team.name]" text_color "#CDAD00" text_size 30
imagebutton:
idle im.Scale("content/gfx/interface/buttons/edit.png", 24, 30)
hover im.Scale("content/gfx/interface/buttons/edit_h.png", 24, 30)
action Return(["rename_team", "set_name"]), With(dissolve)
hovered tt.Action("Rename Heroes team!")
for member in hero.team:
$ img = member.show("portrait", resize=(120, 120), cache=True)
hbox:
spacing 7
# Portrait/Button:
fixed:
align .5, .5
xysize 120, 120
imagebutton:
padding 1, 1
align .5, .5
style "basic_choice2_button"
idle img
hover img
selected_idle Transform(img, alpha=1.05)
action NullAction()
python:
if member.front_row:
img = ProportionalScale("content/gfx/interface/buttons/row_switch.png", 40, 20)
else:
img = im.Flip(ProportionalScale("content/gfx/interface/buttons/row_switch.png", 40, 20), horizontal=True)
imagebutton:
align (0, 1.0)
idle Transform(img, alpha=0.9)
hover Transform(img, alpha=1.05)
insensitive im.Sepia(img)
action If(member.status != "slave", true=ToggleField(member, "front_row"))
# Name/Status:
frame:
xsize 162
padding 10, 5
background Frame(Transform("content/gfx/frame/P_frame2.png", alpha=0.6), 5, 5)
has vbox spacing 4 xfill True
fixed:
xysize 158, 25
xalign .5
text "{=TisaOTMolxm}[member.name]" xalign .06
if not member == hero:
imagebutton:
xalign .92
idle ProportionalScale("content/gfx/interface/buttons/close4.png", 24, 30)
hover ProportionalScale("content/gfx/interface/buttons/close4_h.png", 24, 30)
action Return(["remove_from_team", member])
hovered tt.Action("Remove %s for %s!"%(member.nickname, hero.team.name))
# HP:
fixed:
ysize 25
bar:
left_bar ProportionalScale("content/gfx/interface/bars/hp1.png", 150, 20)
right_bar ProportionalScale("content/gfx/interface/bars/empty_bar1.png", 150, 20)
value member.health
range member.get_max("health")
thumb None
xysize (150, 20)
text "HP" size 14 color "#F5F5DC" bold True xpos 8
$ tmb = red if member.health <= member.get_max("health")*0.3 else "#F5F5DC"
text "[member.health]" size 14 color tmb bold True style_suffix "value_text" xpos 125 yoffset -8
# MP:
fixed:
ysize 25
bar:
left_bar ProportionalScale("content/gfx/interface/bars/mp1.png", 150, 20)
right_bar ProportionalScale("content/gfx/interface/bars/empty_bar1.png", 150, 20)
value member.mp
range member.get_max("mp")
thumb None
xysize (150, 20)
text "{color=#F5F5DC}MP" size 14 bold True xpos 8
$ tmb = red if member.mp <= member.get_max("mp")*0.3 else "#F5F5DC"
text "[member.mp]" size 14 color tmb bold True style_suffix "value_text" xpos 125 yoffset -8
# VP
fixed:
ysize 25
bar:
left_bar ProportionalScale("content/gfx/interface/bars/vitality1.png", 150, 20)
right_bar ProportionalScale("content/gfx/interface/bars/empty_bar1.png", 150, 20)
value member.vitality
range member.get_max("vitality")
thumb None
xysize (150, 20)
text "{color=#F5F5DC}VP" size 14 bold True xpos 8
$ tmb = red if member.vitality <= member.get_max("vitality")*0.3 else "#F5F5DC"
text "[member.vitality]" size 14 color tmb bold True style_suffix "value_text" xpos 125 yoffset -8
button:
style_group "pb"
xalign 0.5
xsize 120
action Hide("hero_team"), With(dissolve)
text "Close" style "pb_button_text"
screen hero_finances():
modal True
zorder 1
key "mousedown_3" action Hide("hero_finances"), With(dissolve)
add Transform("content/gfx/images/bg_gradient2.png", alpha=0.3)
frame:
background Frame (Transform("content/gfx/frame/ink_box.png", alpha=0.65), 10, 10)
style_group "content"
align (0.5, 0.5)
xysize (1120, 600)
# side "c r":
# area (20, 43, 1110, 495)
viewport id "herofin_vp":
style_group "stats"
draggable True
mousewheel True
if day > 1 and hero.fin.game_fin_log.has_key(str(day-1)):
$ fin_inc = hero.fin.game_fin_log[str(day-1)][0]["private"]
$ fin_exp = hero.fin.game_fin_log[str(day-1)][1]["private"]
if pytfall.hp.finance_filter == 'day':
label (u"Fin Report (Yesterday)") xalign 0.4 ypos 30 text_size 30
# Income:
vbox:
pos (50, 100)
label "Income:" text_size 20
null height 10
hbox:
vbox:
xmaximum 170
xfill True
for key in fin_inc:
text "[key]"
vbox:
null height 1
spacing 4
for key in fin_inc:
$ val = fin_inc[key]
text "[val]" style_suffix "value_text"
# Expense:
vbox:
pos (450, 100)
label "Expense:" text_size 20
null height 10
hbox:
vbox:
xmaximum 170
xfill True
for key in fin_exp:
text ("[key]")
vbox:
null height 1
spacing 4
for key in fin_exp:
$ val = fin_exp[key]
text ("[val]") style_suffix "value_text"
python:
total_income = 0
total_expenses = 0
for key in fin_inc:
total_income += fin_inc[key]
for key in fin_exp:
total_expenses += fin_exp[key]
total = total_income - total_expenses
vbox:
align (0.80, 0.60)
text "----------------------------------------"
text ("Revenue: [total]"):
size 20
xpos 15
if total > 0:
color lawngreen style_suffix "value_text"
else:
color red style_suffix "value_text"
hbox:
style_group "basic"
align (0.5, 0.9)
textbutton "Show Total" action SetField(pytfall.hp, "finance_filter", "total")
elif pytfall.hp.finance_filter == 'total':
label (u"Fin Report (Game)") xalign 0.4 ypos 30 text_size 30
python:
income = dict()
for _day in hero.fin.game_fin_log:
for key in hero.fin.game_fin_log[_day][0]["private"]:
income[key] = income.get(key, 0) + hero.fin.game_fin_log[_day][0]["private"][key]
# Income:
vbox:
pos (50, 100)
label "Income:" text_size 20
null height 10
hbox:
vbox:
xmaximum 170
xfill True
for key in income:
text ("[key]")
vbox:
null height 1
spacing 4
for key in income:
$ val = income[key]
text ("[val]") style_suffix "value_text"
python:
expenses = dict()
for _day in hero.fin.game_fin_log:
for key in hero.fin.game_fin_log[_day][1]["private"]:
expenses[key] = expenses.get(key, 0) + hero.fin.game_fin_log[_day][1]["private"][key]
# Expense:
vbox:
pos (450, 100)
label "Expense:" text_size 20
null height 10
hbox:
vbox:
xmaximum 170
xfill True
for key in expenses:
text ("[key]")
vbox:
null height 1
spacing 4
for key in expenses:
$ val = expenses[key]
text ("[val]") style_suffix "value_text"
python:
game_total = 0
total_income = sum(income.values())
total_expenses = sum(expenses.values())
game_total = total_income - total_expenses
vbox:
align (0.80, 0.60)
text "----------------------------------------"
text ("Revenue: [game_total]"):
size 20
xpos 15
if game_total > 0:
color lawngreen style_suffix "value_text"
else:
color red style_suffix "value_text"
hbox:
style_group "basic"
align (0.5, 0.9)
textbutton "{size=-3}Show Daily" action SetField(pytfall.hp, "finance_filter", "day")
hbox:
pos (750, 100)
vbox:
xmaximum 140
xfill True
if hero.fin.property_tax_debt:
text ("Property:\n(Tax Debt") color red size 20 outlines [(2, "#424242", 0, 0)]
if hero.fin.income_tax_debt:
text ("Income:\n(Tax Debt)") color crimson size 20 outlines [(2, "#424242", 0, 0)]
if day != 1:
text "Taxes:\n(This week)" size 20 outlines [(2, "#424242", 0, 0)]
vbox:
if hero.fin.property_tax_debt:
null height 4
spacing 4
text ("[hero.fin.property_tax_debt]\n ") color red style_suffix "value_text"
if hero.fin.income_tax_debt:
null height 4
spacing 4
text ("[hero.fin.income_tax_debt]\n ") color crimson style_suffix "value_text"
if day != 1:
python:
days = calendar.days.index(calendar.weekday())
taxes = hero.fin.get_total_taxes(days)
null height 4
spacing 4
text ("[taxes]\n ") style_suffix "value_text"
# vbar value YScrollValue("herofin_vp")
button:
style_group "basic"
action Hide('hero_finances')
minimum (250, 30)
align (0.5, 0.96)
text "OK"