Night.png);">
Apprendre


Vous êtes
nouveau sur
Oniromancie?

Visite guidée
du site


Découvrir
RPG Maker

RM 95
RM 2000/2003
RM XP
RM VX/VX Ace
RM MV/MZ

Apprendre
RPG Maker

Tutoriels
Guides
Making-of

Dans le
Forum

Section Entraide

Tutos: Checklist de la composition (...) / Sorties: Dread Mac Farlane - episode 8 / Sorties: Dread Mac Farlane - episode 7 / Jeux: Ce qui vit Dessous / News: Quoi de neuf sur Oniromancie (...) / Chat

Bienvenue
visiteur !




publicité RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions légales

403 connectés actuellement

29372807 visiteurs
depuis l'ouverture

2173 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

Le Temple de Valor

RPG Fusion

Leo-Games

Tous nos partenaires

Devenir
partenaire



Messages postés par Voximilien
Nombre de messages référencés sur Oniromancie (non supprimés): 128

Aller à la page: 1 2 3 4

Posté dans Screen de la semaine - Joyeux Noël !

Voximilien - posté le 26/12/2017 à 15:27:12. (128 messages postés)

Merci ! :D

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Joyeux Noël !

Voximilien - posté le 26/12/2017 à 14:39:07. (128 messages postés)

Merci. :)
Ça marche, j'y penserais ! :p

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Joyeux Noël !

Voximilien - posté le 26/12/2017 à 14:08:35. (128 messages postés)

Yeaaaaaaaah !
Et en cadeau, je vous montre la taille originale de ce que j'avais fait.

image

» Liste de scripts | » XP - Options

Posté dans Forum - [VX Ace] Game_Battler script de base

Voximilien - posté le 10/12/2017 à 01:32:12. (128 messages postés)

Ça fera 15€ le service. :D

Portion de code : Tout sélectionner

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
#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  A battler class with methods for sprites and actions added. This class 
# is used as a super class of the Game_Actor class and Game_Enemy class.
#==============================================================================
 
class Game_Battler < Game_BattlerBase
  #--------------------------------------------------------------------------
  # * Constants (Effects)
  #--------------------------------------------------------------------------
  EFFECT_RECOVER_HP     = 11              # HP Recovery
  EFFECT_RECOVER_MP     = 12              # MP Recovery
  EFFECT_GAIN_TP        = 13              # TP Gain
  EFFECT_ADD_STATE      = 21              # Add State
  EFFECT_REMOVE_STATE   = 22              # Remove State
  EFFECT_ADD_BUFF       = 31              # Add Buff
  EFFECT_ADD_DEBUFF     = 32              # Add Debuff
  EFFECT_REMOVE_BUFF    = 33              # Remove Buff
  EFFECT_REMOVE_DEBUFF  = 34              # Remove Debuff
  EFFECT_SPECIAL        = 41              # Special Effect
  EFFECT_GROW           = 42              # Raise Parameter
  EFFECT_LEARN_SKILL    = 43              # Learn Skill
  EFFECT_COMMON_EVENT   = 44              # Common Events
  #--------------------------------------------------------------------------
  # * Constants (Special Effects)
  #--------------------------------------------------------------------------
  SPECIAL_EFFECT_ESCAPE = 0               # Escape
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :battler_name             # battle graphic filename
  attr_reader   :battler_hue              # battle graphic hue
  attr_reader   :action_times             # action times
  attr_reader   :actions                  # combat actions (action side)
  attr_reader   :speed                    # action speed
  attr_reader   :result                   # action result (target side)
  attr_accessor :last_target_index        # last target
  attr_accessor :animation_id             # animation ID
  attr_accessor :animation_mirror         # animation flip horizontal flag
  attr_accessor :sprite_effect_type       # sprite effect
  attr_accessor :magic_reflection         # reflection flag
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    @battler_name = ""
    @battler_hue = 0
    @actions = []
    @speed = 0
    @result = Game_ActionResult.new(self)
    @last_target_index = 0
    @guarding = false
    clear_sprite_effects
    super
  end
  #--------------------------------------------------------------------------
  # * Clear Sprite Effects
  #--------------------------------------------------------------------------
  def clear_sprite_effects
    @animation_id = 0
    @animation_mirror = false
    @sprite_effect_type = nil
  end
  #--------------------------------------------------------------------------
  # * Clear Actions
  #--------------------------------------------------------------------------
  def clear_actions
    @actions.clear
  end
  #--------------------------------------------------------------------------
  # * Clear State Information
  #--------------------------------------------------------------------------
  def clear_states
    super
    @result.clear_status_effects
  end
  #--------------------------------------------------------------------------
  # * Add State
  #--------------------------------------------------------------------------
  def add_state(state_id)
    if state_addable?(state_id)
      add_new_state(state_id) unless state?(state_id)
      reset_state_counts(state_id)
      @result.added_states.push(state_id).uniq!
    end
  end
  #--------------------------------------------------------------------------
  # * Determine if States Are Addable
  #--------------------------------------------------------------------------
  def state_addable?(state_id)
    alive? && $data_states[state_id] && !state_resist?(state_id) &&
      !state_removed?(state_id) && !state_restrict?(state_id)
  end
  #--------------------------------------------------------------------------
  # * Determine States Removed During Same Action
  #--------------------------------------------------------------------------
  def state_removed?(state_id)
    @result.removed_states.include?(state_id)
  end
  #--------------------------------------------------------------------------
  # * Determine States Removed by Action Restriction
  #--------------------------------------------------------------------------
  def state_restrict?(state_id)
    $data_states[state_id].remove_by_restriction && restriction > 0
  end
  #--------------------------------------------------------------------------
  # * Add New State
  #--------------------------------------------------------------------------
  def add_new_state(state_id)
    die if state_id == death_state_id
    @states.push(state_id)
    on_restrict if restriction > 0
    sort_states
    refresh
  end
  #--------------------------------------------------------------------------
  # * Processing Performed When Action Restriction Occurs
  #--------------------------------------------------------------------------
  def on_restrict
    clear_actions
    states.each do |state|
      remove_state(state.id) if state.remove_by_restriction
    end
  end
  #--------------------------------------------------------------------------
  # * Reset State Counts (Turns and Steps)
  #--------------------------------------------------------------------------
  def reset_state_counts(state_id)
    state = $data_states[state_id]
    variance = 1 + [state.max_turns - state.min_turns, 0].max
    @state_turns[state_id] = state.min_turns + rand(variance)
    @state_steps[state_id] = state.steps_to_remove
  end
  #--------------------------------------------------------------------------
  # * Remove State
  #--------------------------------------------------------------------------
  def remove_state(state_id)
    if state?(state_id)
      revive if state_id == death_state_id
      erase_state(state_id)
      refresh
      @result.removed_states.push(state_id).uniq!
    end
  end
  #--------------------------------------------------------------------------
  # * Knock Out
  #--------------------------------------------------------------------------
  def die
    @hp = 0
    clear_states
    clear_buffs
  end
  #--------------------------------------------------------------------------
  # * Revive from Knock Out
  #--------------------------------------------------------------------------
  def revive
    @hp = 1 if @hp == 0
  end
  #--------------------------------------------------------------------------
  # * Escape
  #--------------------------------------------------------------------------
  def escape
    hide if $game_party.in_battle
    clear_actions
    clear_states
    Sound.play_escape
  end
  #--------------------------------------------------------------------------
  # * Add Buff
  #--------------------------------------------------------------------------
  def add_buff(param_id, turns)
    return unless alive?
    @buffs[param_id] += 1 unless buff_max?(param_id)
    erase_buff(param_id) if debuff?(param_id)
    overwrite_buff_turns(param_id, turns)
    @result.added_buffs.push(param_id).uniq!
    refresh
  end
  #--------------------------------------------------------------------------
  # * Add Debuff
  #--------------------------------------------------------------------------
  def add_debuff(param_id, turns)
    return unless alive?
    @buffs[param_id] -= 1 unless debuff_max?(param_id)
    erase_buff(param_id) if buff?(param_id)
    overwrite_buff_turns(param_id, turns)
    @result.added_debuffs.push(param_id).uniq!
    refresh
  end
  #--------------------------------------------------------------------------
  # * Remove Buff/Debuff
  #--------------------------------------------------------------------------
  def remove_buff(param_id)
    return unless alive?
    return if @buffs[param_id] == 0
    erase_buff(param_id)
    @buff_turns.delete(param_id)
    @result.removed_buffs.push(param_id).uniq!
    refresh
  end
  #--------------------------------------------------------------------------
  # * Erase Buff/Debuff
  #--------------------------------------------------------------------------
  def erase_buff(param_id)
    @buffs[param_id] = 0
    @buff_turns[param_id] = 0
  end
  #--------------------------------------------------------------------------
  # * Determine Buff Status
  #--------------------------------------------------------------------------
  def buff?(param_id)
    @buffs[param_id] > 0
  end
  #--------------------------------------------------------------------------
  # * Determine Debuff Status
  #--------------------------------------------------------------------------
  def debuff?(param_id)
    @buffs[param_id] < 0
  end
  #--------------------------------------------------------------------------
  # * Determine if Buff Is at Maximum Level
  #--------------------------------------------------------------------------
  def buff_max?(param_id)
    @buffs[param_id] == 2
  end
  #--------------------------------------------------------------------------
  # * Determine if Debuff Is at Maximum Level
  #--------------------------------------------------------------------------
  def debuff_max?(param_id)
    @buffs[param_id] == -2
  end
  #--------------------------------------------------------------------------
  # * Overwrite Buff/Debuff Turns
  #    Doesn't overwrite if number of turns would become shorter.
  #--------------------------------------------------------------------------
  def overwrite_buff_turns(param_id, turns)
    @buff_turns[param_id] = turns if @buff_turns[param_id].to_i < turns
  end
  #--------------------------------------------------------------------------
  # * Update State Turn Count
  #--------------------------------------------------------------------------
  def update_state_turns
    states.each do |state|
      @state_turns[state.id] -= 1 if @state_turns[state.id] > 0
    end
  end
  #--------------------------------------------------------------------------
  # * Update Buff/Debuff Turn Count
  #--------------------------------------------------------------------------
  def update_buff_turns
    @buff_turns.keys.each do |param_id|
      @buff_turns[param_id] -= 1 if @buff_turns[param_id] > 0
    end
  end
  #--------------------------------------------------------------------------
  # * Remove Battle States
  #--------------------------------------------------------------------------
  def remove_battle_states
    states.each do |state|
      remove_state(state.id) if state.remove_at_battle_end
    end
  end
  #--------------------------------------------------------------------------
  # * Remove All Buffs/Debuffs
  #--------------------------------------------------------------------------
  def remove_all_buffs
    @buffs.size.times {|param_id| remove_buff(param_id) }
  end
  #--------------------------------------------------------------------------
  # * Automatically Remove States
  #     timing:  Timing (1: End of action 2: End of turn)
  #--------------------------------------------------------------------------
  def remove_states_auto(timing)
    states.each do |state|
      if @state_turns[state.id] == 0 && state.auto_removal_timing == timing
        remove_state(state.id)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Automatically Remove Buffs/Debuffs
  #--------------------------------------------------------------------------
  def remove_buffs_auto
    @buffs.size.times do |param_id|
      next if @buffs[param_id] == 0 || @buff_turns[param_id] > 0
      remove_buff(param_id)
    end
  end
  #--------------------------------------------------------------------------
  # * Remove State by Damage
  #--------------------------------------------------------------------------
  def remove_states_by_damage
    states.each do |state|
      if state.remove_by_damage && rand(100) < state.chance_by_damage
        remove_state(state.id)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Determine Action Times
  #--------------------------------------------------------------------------
  def make_action_times
    action_plus_set.inject(1) {|r, p| rand < p ? r + 1 : r }
  end
  #--------------------------------------------------------------------------
  # * Create Battle Action
  #--------------------------------------------------------------------------
  def make_actions
    clear_actions
    return unless movable?
    @actions = Array.new(make_action_times) { Game_Action.new(self) }
  end
  #--------------------------------------------------------------------------
  # * Determine Action Speed
  #--------------------------------------------------------------------------
  def make_speed
    @speed = @actions.collect {|action| action.speed }.min || 0
  end
  #--------------------------------------------------------------------------
  # * Get Current Action
  #--------------------------------------------------------------------------
  def current_action
    @actions[0]
  end
  #--------------------------------------------------------------------------
  # * Remove Current Action
  #--------------------------------------------------------------------------
  def remove_current_action
    @actions.shift
  end
  #--------------------------------------------------------------------------
  # * Force Action
  #--------------------------------------------------------------------------
  def force_action(skill_id, target_index)
    clear_actions
    action = Game_Action.new(self, true)
    action.set_skill(skill_id)
    if target_index == -2
      action.target_index = last_target_index
    elsif target_index == -1
      action.decide_random_target
    else
      action.target_index = target_index
    end
    @actions.push(action)
  end
  #--------------------------------------------------------------------------
  # * Calculate Damage
  #--------------------------------------------------------------------------
  def make_damage_value(user, item)
    value = item.damage.eval(user, self, $game_variables)
    value *= item_element_rate(user, item)
    value *= pdr if item.physical?
    value *= mdr if item.magical?
    value *= rec if item.damage.recover?
    value = apply_critical(value) if @result.critical
    value = apply_variance(value, item.damage.variance)
    value = apply_guard(value)
    @result.make_damage(value.to_i, item)
  end
  #--------------------------------------------------------------------------
  # * Get Element Modifier for Skill/Item
  #--------------------------------------------------------------------------
  def item_element_rate(user, item)
    if item.damage.element_id < 0
      user.atk_elements.empty? ? 1.0 : elements_max_rate(user.atk_elements)
    else
      element_rate(item.damage.element_id)
    end
  end
  #--------------------------------------------------------------------------
  # * Get Maximum Elemental Adjustment Amount
  #     elements : An array of attribute IDs
  #    Returns the most effective adjustment of all elemental alignments.
  #--------------------------------------------------------------------------
  def elements_max_rate(elements)
    elements.inject([0.0]) {|r, i| r.push(element_rate(i)) }.max
  end
  #--------------------------------------------------------------------------
  # * Apply Critical
  #--------------------------------------------------------------------------
  def apply_critical(damage)
    damage * 3
  end
  #--------------------------------------------------------------------------
  # * Applying Variance
  #--------------------------------------------------------------------------
  def apply_variance(damage, variance)
    amp = [damage.abs * variance / 100, 0].max.to_i
    var = rand(amp + 1) + rand(amp + 1) - amp
    damage >= 0 ? damage + var : damage - var
  end
  #--------------------------------------------------------------------------
  # * Applying Guard Adjustment
  #--------------------------------------------------------------------------
  def apply_guard(damage)
    damage / (damage > 0 && guard? ? 2 * grd : 1)
  end
  #--------------------------------------------------------------------------
  # * Damage Processing
  #    @result.hp_damage @result.mp_damage @result.hp_drain
  #    @result.mp_drain must be set before call.
  #--------------------------------------------------------------------------
  def execute_damage(user)
    on_damage(@result.hp_damage) if @result.hp_damage > 0
    self.hp -= @result.hp_damage
    self.mp -= @result.mp_damage
    user.hp += @result.hp_drain
    user.mp += @result.mp_drain
  end
  #--------------------------------------------------------------------------
  # * Use Skill/Item
  #    Called for the acting side and applies the effect to other than the user.
  #--------------------------------------------------------------------------
  def use_item(item)
    pay_skill_cost(item) if item.is_a?(RPG::Skill)
    consume_item(item)   if item.is_a?(RPG::Item)
    item.effects.each {|effect| item_global_effect_apply(effect) }
  end
  #--------------------------------------------------------------------------
  # * Consume Items
  #--------------------------------------------------------------------------
  def consume_item(item)
    $game_party.consume_item(item)
  end
  #--------------------------------------------------------------------------
  # * Apply Effect of Use to Other Than User
  #--------------------------------------------------------------------------
  def item_global_effect_apply(effect)
    if effect.code == EFFECT_COMMON_EVENT
      $game_temp.reserve_common_event(effect.data_id)
    end
  end
  #--------------------------------------------------------------------------
  # * Test Skill/Item Application
  #    Used to determine, for example, if a character is already fully healed
  #   and so cannot recover anymore.
  #--------------------------------------------------------------------------
  def item_test(user, item)
    return false if item.for_dead_friend? != dead?
    return true if $game_party.in_battle
    return true if item.for_opponent?
    return true if item.damage.recover? && item.damage.to_hp? && hp < mhp
    return true if item.damage.recover? && item.damage.to_mp? && mp < mmp
    return true if item_has_any_valid_effects?(user, item)
    return false
  end
  #--------------------------------------------------------------------------
  # * Determine if Skill/Item Has Any Valid Effects
  #--------------------------------------------------------------------------
  def item_has_any_valid_effects?(user, item)
    item.effects.any? {|effect| item_effect_test(user, item, effect) }
  end
  #--------------------------------------------------------------------------
  # * Calculate Counterattack Rate for Skill/Item
  #--------------------------------------------------------------------------
  def item_cnt(user, item)
    return 0 unless item.physical?          # Hit type is not physical
    return 0 unless opposite?(user)         # No counterattack on allies
    return cnt                              # Return counterattack rate
  end
  #--------------------------------------------------------------------------
  # * Calculate Reflection Rate of Skill/Item
  #--------------------------------------------------------------------------
  def item_mrf(user, item)
    return mrf if item.magical?     # Return magic reflection if magic attack
    return 0
  end
  #--------------------------------------------------------------------------
  # * Calculate Hit Rate of Skill/Item
  #--------------------------------------------------------------------------
  def item_hit(user, item)
    rate = item.success_rate * 0.01     # Get success rate
    rate *= user.hit if item.physical?  # Physical attack: Multiply hit rate
    return rate                         # Return calculated hit rate
  end
  #--------------------------------------------------------------------------
  # * Calculate Evasion Rate for Skill/Item
  #--------------------------------------------------------------------------
  def item_eva(user, item)
    return eva if item.physical?    # Return evasion if physical attack
    return mev if item.magical?     # Return magic evasion if magic attack
    return 0
  end
  #--------------------------------------------------------------------------
  # * Calculate Critical Rate of Skill/Item
  #--------------------------------------------------------------------------
  def item_cri(user, item)
    item.damage.critical ? user.cri * (1 - cev) : 0
  end
  #--------------------------------------------------------------------------
  # * Apply Normal Attack Effects
  #--------------------------------------------------------------------------
  def attack_apply(attacker)
    item_apply(attacker, $data_skills[attacker.attack_skill_id])
  end
  #--------------------------------------------------------------------------
  # * Apply Effect of Skill/Item
  #--------------------------------------------------------------------------
  def item_apply(user, item)
    @result.clear
    @result.used = item_test(user, item)
    @result.missed = (@result.used && rand >= item_hit(user, item))
    @result.evaded = (!@result.missed && rand < item_eva(user, item))
    if @result.hit?
      unless item.damage.none?
        @result.critical = (rand < item_cri(user, item))
        make_damage_value(user, item)
        execute_damage(user)
      end
      item.effects.each {|effect| item_effect_apply(user, item, effect) }
      item_user_effect(user, item)
    end
  end
  #--------------------------------------------------------------------------
  # * Test Effect
  #--------------------------------------------------------------------------
  def item_effect_test(user, item, effect)
    case effect.code
    when EFFECT_RECOVER_HP
      hp < mhp || effect.value1 < 0 || effect.value2 < 0
    when EFFECT_RECOVER_MP
      mp < mmp || effect.value1 < 0 || effect.value2 < 0
    when EFFECT_ADD_STATE
      !state?(effect.data_id)
    when EFFECT_REMOVE_STATE
      state?(effect.data_id)
    when EFFECT_ADD_BUFF
      !buff_max?(effect.data_id)
    when EFFECT_ADD_DEBUFF
      !debuff_max?(effect.data_id)
    when EFFECT_REMOVE_BUFF
      buff?(effect.data_id)
    when EFFECT_REMOVE_DEBUFF
      debuff?(effect.data_id)
    when EFFECT_LEARN_SKILL
      actor? && !skills.include?($data_skills[effect.data_id])
    else
      true
    end
  end
  #--------------------------------------------------------------------------
  # * Apply Effect
  #--------------------------------------------------------------------------
  def item_effect_apply(user, item, effect)
    method_table = {
      EFFECT_RECOVER_HP    => :item_effect_recover_hp,
      EFFECT_RECOVER_MP    => :item_effect_recover_mp,
      EFFECT_GAIN_TP       => :item_effect_gain_tp,
      EFFECT_ADD_STATE     => :item_effect_add_state,
      EFFECT_REMOVE_STATE  => :item_effect_remove_state,
      EFFECT_ADD_BUFF      => :item_effect_add_buff,
      EFFECT_ADD_DEBUFF    => :item_effect_add_debuff,
      EFFECT_REMOVE_BUFF   => :item_effect_remove_buff,
      EFFECT_REMOVE_DEBUFF => :item_effect_remove_debuff,
      EFFECT_SPECIAL       => :item_effect_special,
      EFFECT_GROW          => :item_effect_grow,
      EFFECT_LEARN_SKILL   => :item_effect_learn_skill,
      EFFECT_COMMON_EVENT  => :item_effect_common_event,
    }
    method_name = method_table[effect.code]
    send(method_name, user, item, effect) if method_name
  end
  #--------------------------------------------------------------------------
  # * [HP Recovery] Effect
  #--------------------------------------------------------------------------
  def item_effect_recover_hp(user, item, effect)
    value = (mhp * effect.value1 + effect.value2) * rec
    value *= user.pha if item.is_a?(RPG::Item)
    value = value.to_i
    @result.hp_damage -= value
    @result.success = true
    self.hp += value
  end
  #--------------------------------------------------------------------------
  # * [MP Recovery] Effect
  #--------------------------------------------------------------------------
  def item_effect_recover_mp(user, item, effect)
    value = (mmp * effect.value1 + effect.value2) * rec
    value *= user.pha if item.is_a?(RPG::Item)
    value = value.to_i
    @result.mp_damage -= value
    @result.success = true if value != 0
    self.mp += value
  end
  #--------------------------------------------------------------------------
  # * [TP Gain] Effect
  #--------------------------------------------------------------------------
  def item_effect_gain_tp(user, item, effect)
    value = effect.value1.to_i
    @result.tp_damage -= value
    @result.success = true if value != 0
    self.tp += value
  end
  #--------------------------------------------------------------------------
  # * [Add State] Effect
  #--------------------------------------------------------------------------
  def item_effect_add_state(user, item, effect)
    if effect.data_id == 0
      item_effect_add_state_attack(user, item, effect)
    else
      item_effect_add_state_normal(user, item, effect)
    end
  end
  #--------------------------------------------------------------------------
  # * [Add State] Effect: Normal Attack
  #--------------------------------------------------------------------------
  def item_effect_add_state_attack(user, item, effect)
    user.atk_states.each do |state_id|
      chance = effect.value1
      chance *= state_rate(state_id)
      chance *= user.atk_states_rate(state_id)
      chance *= luk_effect_rate(user)
      if rand < chance
        add_state(state_id)
        @result.success = true
      end
    end
  end
  #--------------------------------------------------------------------------
  # * [Add State] Effect: Normal
  #--------------------------------------------------------------------------
  def item_effect_add_state_normal(user, item, effect)
    chance = effect.value1
    chance *= state_rate(effect.data_id) if opposite?(user)
    chance *= luk_effect_rate(user)      if opposite?(user)
    if rand < chance
      add_state(effect.data_id)
      @result.success = true
    end
  end
  #--------------------------------------------------------------------------
  # * [Remove State] Effect
  #--------------------------------------------------------------------------
  def item_effect_remove_state(user, item, effect)
    chance = effect.value1
    if rand < chance
      remove_state(effect.data_id)
      @result.success = true
    end
  end
  #--------------------------------------------------------------------------
  # * [Buff] Effect
  #--------------------------------------------------------------------------
  def item_effect_add_buff(user, item, effect)
    add_buff(effect.data_id, effect.value1)
    @result.success = true
  end
  #--------------------------------------------------------------------------
  # * [Debuff] Effect
  #--------------------------------------------------------------------------
  def item_effect_add_debuff(user, item, effect)
    chance = debuff_rate(effect.data_id) * luk_effect_rate(user)
    if rand < chance
      add_debuff(effect.data_id, effect.value1)
      @result.success = true
    end
  end
  #--------------------------------------------------------------------------
  # * [Remove Buff] Effect
  #--------------------------------------------------------------------------
  def item_effect_remove_buff(user, item, effect)
    remove_buff(effect.data_id) if @buffs[effect.data_id] > 0
    @result.success = true
  end
  #--------------------------------------------------------------------------
  # * [Remove Debuff] Effect
  #--------------------------------------------------------------------------
  def item_effect_remove_debuff(user, item, effect)
    remove_buff(effect.data_id) if @buffs[effect.data_id] < 0
    @result.success = true
  end
  #--------------------------------------------------------------------------
  # * [Special Effect] Effect
  #--------------------------------------------------------------------------
  def item_effect_special(user, item, effect)
    case effect.data_id
    when SPECIAL_EFFECT_ESCAPE
      escape
    end
    @result.success = true
  end
  #--------------------------------------------------------------------------
  # * [Raise Parameter] Effect
  #--------------------------------------------------------------------------
  def item_effect_grow(user, item, effect)
    add_param(effect.data_id, effect.value1.to_i)
    @result.success = true
  end
  #--------------------------------------------------------------------------
  # * [Learn Skill] Effect
  #--------------------------------------------------------------------------
  def item_effect_learn_skill(user, item, effect)
    learn_skill(effect.data_id) if actor?
    @result.success = true
  end
  #--------------------------------------------------------------------------
  # * [Common Event] Effect
  #--------------------------------------------------------------------------
  def item_effect_common_event(user, item, effect)
  end
  #--------------------------------------------------------------------------
  # * Effect of Skill/Item on Using Side
  #--------------------------------------------------------------------------
  def item_user_effect(user, item)
    user.tp += item.tp_gain * user.tcr
  end
  #--------------------------------------------------------------------------
  # * Get Effect Change Rate by Luck
  #--------------------------------------------------------------------------
  def luk_effect_rate(user)
    [1.0 + (user.luk - luk) * 0.001, 0.0].max
  end
  #--------------------------------------------------------------------------
  # * Determine if Hostile Relation
  #--------------------------------------------------------------------------
  def opposite?(battler)
    actor? != battler.actor? || battler.magic_reflection
  end
  #--------------------------------------------------------------------------
  # * Effect When Taking Damage on Map
  #--------------------------------------------------------------------------
  def perform_map_damage_effect
  end
  #--------------------------------------------------------------------------
  # * Initialize TP
  #--------------------------------------------------------------------------
  def init_tp
    self.tp = rand * 25
  end
  #--------------------------------------------------------------------------
  # * Clear TP
  #--------------------------------------------------------------------------
  def clear_tp
    self.tp = 0
  end
  #--------------------------------------------------------------------------
  # * Charge TP by Damage Suffered
  #--------------------------------------------------------------------------
  def charge_tp_by_damage(damage_rate)
    self.tp += 50 * damage_rate * tcr
  end
  #--------------------------------------------------------------------------
  # * Regenerate HP
  #--------------------------------------------------------------------------
  def regenerate_hp
    damage = -(mhp * hrg).to_i
    perform_map_damage_effect if $game_party.in_battle && damage > 0
    @result.hp_damage = [damage, max_slip_damage].min
    self.hp -= @result.hp_damage
  end
  #--------------------------------------------------------------------------
  # * Get Maximum Value of Slip Damage
  #--------------------------------------------------------------------------
  def max_slip_damage
    $data_system.opt_slip_death ? hp : [hp - 1, 0].max
  end
  #--------------------------------------------------------------------------
  # * Regenerate MP
  #--------------------------------------------------------------------------
  def regenerate_mp
    @result.mp_damage = -(mmp * mrg).to_i
    self.mp -= @result.mp_damage
  end
  #--------------------------------------------------------------------------
  # * Regenerate TP
  #--------------------------------------------------------------------------
  def regenerate_tp
    self.tp += 100 * trg
  end
  #--------------------------------------------------------------------------
  # * Regenerate All
  #--------------------------------------------------------------------------
  def regenerate_all
    if alive?
      regenerate_hp
      regenerate_mp
      regenerate_tp
    end
  end
  #--------------------------------------------------------------------------
  # * Processing at Start of Battle
  #--------------------------------------------------------------------------
  def on_battle_start
    init_tp unless preserve_tp?
  end
  #--------------------------------------------------------------------------
  # * Processing at End of Action
  #--------------------------------------------------------------------------
  def on_action_end
    @result.clear
    remove_states_auto(1)
    remove_buffs_auto
  end
  #--------------------------------------------------------------------------
  # * Processing at End of Turn
  #--------------------------------------------------------------------------
  def on_turn_end
    @result.clear
    regenerate_all
    update_state_turns
    update_buff_turns
    remove_states_auto(2)
  end
  #--------------------------------------------------------------------------
  # * Processing at End of Battle
  #--------------------------------------------------------------------------
  def on_battle_end
    @result.clear
    remove_battle_states
    remove_all_buffs
    clear_actions
    clear_tp unless preserve_tp?
    appear
  end
  #--------------------------------------------------------------------------
  # * Processing When Suffering Damage
  #--------------------------------------------------------------------------
  def on_damage(value)
    remove_states_by_damage
    charge_tp_by_damage(value.to_f / mhp)
  end
end
 



» Liste de scripts | » XP - Options

Posté dans Forum - Un nouveau de plus qui ce présente

Voximilien - posté le 17/11/2017 à 15:47:47. (128 messages postés)

Gouki31 a dit:


Bonjour à toute et à tous, je me présente [...] chômeur professionnel



Yeah ! Quelqu'un qui est dans le milieu du chômage professionnel ! Ça fait plaisir de voir un collègue dans cette branche de métier! :D

Gouki31 a dit:


Voila voilà, je ne c'est pas trop quoi dire d'autre, j'ai toujours du mal à me présenter sur les forum ou autre, ce que je peux dire de plus, ses comme tout le monde, j'aime les manga, j'aime les jeux vidéo, et là musique :)

J'espère que cette présentation suffira.


Déjà, t'es un des rares en ce moment à passer par la présentation avant de poster quelque chose d'autre, rien que pour ça, c'est pas mal. x)

Bienvenue. :)

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - L'horreur continue

Voximilien - posté le 26/09/2017 à 01:49:43. (128 messages postés)

Yeaaaaaaaaaaah ! :D

HuLijin a dit:


GG Voximilien !


winterskill a dit:


Mais je trouve la victoire de voximilien bien méritée!


Verehn a dit:


Voximilien, ça devient une habitude ! :)

Bravo les gens. :kirby



Merci, les gars ! ;D
Je veux pas trop perdre cette habitude, c'est gratifiant et j'aime ça. o/

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Elina

Voximilien - posté le 02/08/2017 à 16:14:41. (128 messages postés)

1mag0 a dit:


J'ai également des ressources pour "minecraft" si tu veux en création maison. Dit moi en mp si ça t'intéresse.



Pour le moment, je n'en ai pas besoin mais je te redirai ça quand ce sera nécessaire. Merci de l'info ! ;)

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Elina

Voximilien - posté le 01/08/2017 à 16:29:23. (128 messages postés)

@1mag0:
Les ressources Minecraft ? C'est vrai, je n'y avais pas pensé. D'autant qu'avec les ressources packs, il y a le choix concernant les blocs. Ce qui me fait un peu peur avec ça, c'est la déformation des textures pour faire le rendu isométrique.

Merci de m'avoir rappelé que ce jeu existait ! :p

» Liste de scripts | » XP - Options

Posté dans Forum - Demandes de ressources

Voximilien - posté le 01/08/2017 à 12:15:49. (128 messages postés)

Yo !
Je t'ai changé la couleur de ton character en bleu, comme tu l'as demandé.

image

Par contre pour le reste, je peux pas trop aider. x)

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Elina

Voximilien - posté le 31/07/2017 à 23:42:49. (128 messages postés)

Verehn a dit:


J'ai rajouté la mention "et d'autres" par rapport à tes graphs utilisés, dans la déclaration. Mais ça serait pas grave si tout venait d'Ankama, de toute façon. ;) Ceux qui se font tailler cruellement en général c'est plutôt ceux qui utilisent innocemment les RTP (*jette un regard au staff* :pfr).

J'espère que tu n'abandonneras pas ton projet en perspective RM habituelle par contre. Il avait l'air chouette.


Nan, t'inquiète ! Je prends pas ça mal. ;)
Mais merci du rajout de la mention. ^^

Je vais probablement refaire des maps isométriques mais je vais également retourner aux sources, j'ai encore des choses à faire. ;)


Elemsis a dit:


J'aime bien le screen de Voximilien, même si ça manque de vie, mais je suppose que comme beaucoup de makers il sait pas encore koman on mé d gen. :kirby


Merci. :)
C'est surtout qu'en terme de ressources isométrique, y a pas grand chose. Gratuites ou accessible par diverses méthodes, je veux dire... :')
En terme de monstres ou animaux, y a rien de très folichon, et j'ai pas envie de pomper intégralement les ressources d'Ankama. x)


Nemau a dit:


Voximilien > un peu dommage que ce ne soit que du rip (mapping exclu bien sûr), sans mise en scène qui plus est, en revanche je salue l'originalité (par rapport à ce qu'on voit d'habitude sur Oniro j'entends).


Je ne cherche pas forcément à faire des mises en scène. Cette fois-ci, je cherchais à faire un peu plus original que d'habitude. Je ne connais pas du tout le monde de l'isométrie, j'essaye d'y aller petit à petit.

Mais grâce à vos retours, je pourrais m'améliorer par la suite.

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Elina

Voximilien - posté le 31/07/2017 à 16:28:00. (128 messages postés)

Je trouve ça très dommage que les gens pensent que c'est du full Ankama...
Alors qu'en réalité, il y en a peu.

Tous les blocs, ne sont pas d'Ankama. C'est-à-dire, tout ce qui a servi à faire l'herbe, la terre, les chemins de terres, bref tous les blocs de sol viennent d'ici : https://www.assetstore.unity3d.com/en/content/27944

L'arbre, le plus gros , je l'ai trouvé ici : http://andbychev.deviantart.com/art/1-453620527
(Il n'y avait pas de protection Deviant Art dessus quand je l'avais pris à l'époque)

Et le reste des ressources, c'est-à-dire, arbre, pierres, fleurs, plantes, ça vient de Dofus 2.


J'ai fait une map isométrique, parce que je n'ai encore jamais fait ce genre de map auparavant et je voulais me tester. Ça change un peu de l'ordinaire, et j'aimerais maîtriser le plus de genre possible.

» Liste de scripts | » XP - Options

Posté dans Galerie - Assaut dans le temple

Voximilien - posté le 11/06/2017 à 22:59:56. (128 messages postés)

Merci ! :D

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Assaut dans le temple

Voximilien - posté le 05/06/2017 à 11:40:05. (128 messages postés)

Yeaaaah !
J'avais fait une version de nuit également de cette map, et je savais vraiment pas laquelle mettre, du coup, j'ai pris la plus visible. x)

Monos a dit:


Il est super le screen de voxichoux.


Elemsis a dit:


Très fan du screen vainqueur, même en temps que participant je croisais les doigts pour que ce soit lui qui gagne! x)
GG, super map.



Merci les gars, ça fait super plaisir ! :D
Ça m'encourage pour la suite. ^w^

Félicitations à vous également ! Il y avait beaucoup de screens intéressants ! :)

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Polaris 03 ~ Laboratoire biochimique

Voximilien - posté le 29/05/2017 à 08:39:07. (128 messages postés)

Erf... Je voulais participer cette semaine, j'étais prêt à envoyer mon screen, mais j'ai vu qu'après 21h c'était mort...

GG à vous 3 pour cette semaine ! :)

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Après-midi au village

Voximilien - posté le 18/04/2017 à 22:00:01. (128 messages postés)

Bravo à toi, image !

C'est un tileset qui reste simple mais efficace. :)
Très sympa en tout cas.

Bravo aux autres participants également ! Ça change un peu d'avoir du full custom. :p

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Une nuit mouvementée

Voximilien - posté le 16/04/2017 à 10:41:04. (128 messages postés)

Merci. :)

» Liste de scripts | » XP - Options

Posté dans Galerie - Une nuit mouvementée

Voximilien - posté le 13/04/2017 à 19:07:10. (128 messages postés)

Haha ! C'est vrai ! :)
J'essaye toujours au mieux d'ajouter ce genre de détail du mieux possible, mais c'est pas toujours évident pour certains cas. ^^

» Liste de scripts | » XP - Options

Posté dans Galerie - Une nuit mouvementée

Voximilien - posté le 12/04/2017 à 18:22:55. (128 messages postés)

Merci. :)
Pourtant je n'y connais pas grand chose concernant le placement des ombres et des lumières.

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Une nuit mouvementée

Voximilien - posté le 11/04/2017 à 08:44:44. (128 messages postés)

Jason Malkovitch a dit:


Même avis que les autres, un excellent travail Voximilien !


Nemau a dit:


Bravo Voximilien !


peron a dit:


Ovarb Neilimixov !
Belle map, couleur claquante et on sent une intrigue...rien qu'en regardant. C'est énervant c'est si bien fait !



Merci à vous, ça fait plaisir. Et bravo à toi également Peron pour le Pixel Art ! Bien que le personnage me fait un peu penser aux Razmoket. xD

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Une nuit mouvementée

Voximilien - posté le 10/04/2017 à 18:59:06. (128 messages postés)

Immudelki a dit:


Beaucoup d'originalité dans les propositions, ça fait plaisir à voir!
Et une belle victoire de la part de Voximillien qui reste bien mystérieux dans ses apparitions sur Oniro ;) Du beau travail!


Haha, c'est cool d'être mystérieux. Ça donne un genre et tout ! :D
Merci. :)

Sylphlorian a dit:


Effectivement ton screen Voxi est vraiment plaisant pour les yeux.


Merci, ça fait plaisir ! :p

Sahone a dit:


Bravo à Voximilien et aux autres!


Merci. :)

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Une nuit mouvementée

Voximilien - posté le 10/04/2017 à 08:39:09. (128 messages postés)

Yeaaaaaaaaah ! :D
Je varie un peu mes maps, ce serait ennuyeux sinon. :)

Félicitations aux autres également ! C'était une belle semaine. :)

» Liste de scripts | » XP - Options

Posté dans Forum - [RPG Maker XP] Script de timer avancé

Voximilien - posté le 06/04/2017 à 08:39:05. (128 messages postés)

J'avais trouvé un script avec ce que je cherchais mais qui avait un bug assez important. J'ai essayé de le bidouiller pour le corriger, en vain. C'était le script de Eron qui se nommait Sprite Timer Mejorado.

Puis, en retournant sur la page quelques jours après, j'ai pu constater que l'Admin a publié un post pas plus tard qu'hier avec sa version du script qui est totalement fonctionnelle ! Et avec quelques caractéristiques que je cherchais, dont les millisecondes et la pause.

C'est un script de Wecoc :
Source : http://mundo-maker.foroactivo.com/t13819-xp-wecoc-s-timer-upgrade-v1-0

Script :

Portion de code : Tout sélectionner

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
#==============================================================================
    # ** Wecoc's Timer Upgrade v1.0
    #------------------------------------------------------------------------------
    # Autor: Wecoc
    # Adaptación del "Sprite_Timer Mejorado" de Eron
    #------------------------------------------------------------------------------
    # Para usarlo a parte de con los comandos de siempre,
    # desde Llamar Script podéis usar éstos métodos directamente:
 
    # timer.set(time, x, y, show_numbers, font_name, font_size, font_color)
    #    Ejemplo 1: timer.set(5)
    #    Ejemplo 2: timer.set(10, 0, 0)
    #    Ejemplo 3: timer.set(5, 5, 5, true, "Verdana", 35, Color.new(255, 200, 20))
 
    # timer.time
    # timer.hour      |   timer.h
    # timer.min       |   timer.m
    # timer.sec       |   timer.s
    # timer.milisec   |   timer.ms
 
    # timer.play
    # timer.pause
    # timer.stop
    # timer.reset
 
    # timer.pause?
 
    # timer.add_time(time)
 
    # timer.x
    # timer.y
    # timer.z
    # timer.font
    # timer.size
    # timer.color
 
    # timer.hpos = value # 0: Izquierda, 1: Centro, 2: Derecha
    # timer.vpos = value # 0: Arriba, 1: Centro, 2: Abajo
 
    # timer.x = x
    # timer.y = y
    # timer.z = z
    # timer.font = font
    # timer.size = size
    # timer.color = color
 
    # timer.show_numbers
    # timer.show_numbers = true / false
 
    # timer.forward
    # timer.forward = true / false
 
    # timer.format
    # timer.format = [format, [parameters]]
 
    # timer.speed
    # timer.speed = speed
 
    #==============================================================================
 
    class Scene_Map         ;   attr_reader :spriteset      ;   end
    class Scene_Battle      ;   attr_reader :spriteset      ;   end
    class Spriteset_Map     ;   attr_reader :timer_sprite   ;   end
    class Spriteset_Battle  ;   attr_reader :timer_sprite   ;   end
 
    #==============================================================================
 
    class Interpreter
      def timer
        return $scene.spriteset.timer_sprite
      end
      def command_124
        @parameters[0] == 0 ? timer.set(@parameters[1]) : timer.stop
      end
    end
 
    class Game_System
      attr_accessor :timer_font_name
      attr_accessor :timer_font_size
      attr_accessor :timer_font_color
      attr_accessor :timer_format
      attr_accessor :timer_x
      attr_accessor :timer_y
      attr_accessor :timer_z
      attr_accessor :timer_counter
      attr_accessor :timer_reset_time
      attr_accessor :timer_speed
      attr_accessor :timer_show_numbers
      attr_accessor :timer_pause
      attr_accessor :timer_forward
      #--------------------------------------------------------------------------
      # * Initialize
      #--------------------------------------------------------------------------
      alias wecoc_timer_ini initialize unless $@
      def initialize
        wecoc_timer_ini
        @timer_font_name = "Arial"
        @timer_font_size = 32
        @timer_font_color = Color.new(255,255,255)
        @timer_format = ["%02d:%02d", ['m', 's']] # 00:00
        @timer_x = 552
        @timer_y = 8
        @timer_z = 500
        @timer_counter = -1
        @timer_reset_time = -1
        @timer_speed = 1.0
        @timer_show_numbers = true
        @timer_pause = false
        @timer_forward = false
      end
    end
 
    #==============================================================================
 
    class Sprite_Timer < Sprite
      #--------------------------------------------------------------------------
      # * Initialize
      #--------------------------------------------------------------------------
      def initialize
        super
        self.x = $game_system.timer_x
        self.y = $game_system.timer_y
        self.z = $game_system.timer_z
        get_bitmap_size
      end
      #--------------------------------------------------------------------------
      # * Dispose
      #--------------------------------------------------------------------------
      def dispose
        self.bitmap.dispose if self.bitmap != nil
        super
      end
      #--------------------------------------------------------------------------
      # * Obtener tamaño de la bitmap
      #--------------------------------------------------------------------------
      def get_bitmap_size
        self.bitmap = Bitmap.new(1,1)
        refresh_font
        text_array = []
        format = $game_system.timer_format
        format[1].size.times { text_array.push(0) }
        text = sprintf(format[0], *text_array)
        w = self.bitmap.text_size(text).width + 16
        h = self.bitmap.text_size(text).height
        self.bitmap = Bitmap.new(w, h)
        refresh_font
      end
      #--------------------------------------------------------------------------
      # * Refresh
      #--------------------------------------------------------------------------
      def refresh
        self.bitmap.clear
        counter = $game_system.timer_counter
        speed = $game_system.timer_speed.to_f
        @ms = (counter.to_f * (60 * speed) / Graphics.frame_rate).to_i
        @s = (@ms.to_f / 60).floor
        @m = (@s.to_f / 60).floor
        @h = (@m.to_f / 60).floor
        @ms %= 60
        @s %= 60
        @m %= 60
        @h %= 24
        if $game_system.timer_show_numbers == true
          refresh_font
          draw_current_time
        end
      end
      #--------------------------------------------------------------------------
      # * Obtener fuente actual
      #--------------------------------------------------------------------------
      def refresh_font
        self.bitmap.font.name  = $game_system.timer_font_name
        self.bitmap.font.size  = $game_system.timer_font_size
        self.bitmap.font.color = $game_system.timer_font_color
      end
      #--------------------------------------------------------------------------
      # * Dibujar el tiempo en la pantalla
      #--------------------------------------------------------------------------
      def draw_current_time
        text_array = []
        format = $game_system.timer_format
        for i in 0...format[1].size
          case format[1][i]
            when 'ms' then text_array.push @ms
            when 's'  then text_array.push @s
            when 'm'  then text_array.push @m
            when 'h'  then text_array.push @h
          end
        end
        text = sprintf(format[0], *text_array)
        self.bitmap.draw_text(self.bitmap.rect, text, 1)
      end
      #--------------------------------------------------------------------------
      # * Definir tiempo
      #--------------------------------------------------------------------------
      def set(time, x=self.x, y=self.y, show=$game_system.timer_show_numbers,
        name=$game_system.timer_font_name, size=$game_system.timer_font_size,
        color=$game_system.timer_font_color)
        $game_system.timer_working = true
        $game_system.timer_counter = time * Graphics.frame_rate
        $game_system.timer_reset_time = time
        $game_system.timer_show_numbers = show
        self.x, self.y = x, y
        self.font = name if name != $game_system.timer_font_name
        self.size = size if size != $game_system.timer_font_size
        self.color = color if color != $game_system.timer_font_color
        refresh
      end
      #--------------------------------------------------------------------------
      # * Obtener tiempo actual (en segundos)
      #--------------------------------------------------------------------------
      def time
        return @s + (@m * 60) + (@h * 60 * 24)
      end
      #--------------------------------------------------------------------------
      # * Obtener parámetros de tiempo
      #--------------------------------------------------------------------------
      attr_reader :h, :m, :s, :ms
      def hour    ; return @h   ; end
      def min     ; return @m   ; end
      def sec     ; return @s   ; end
      def milisec ; return @ms  ; end
      #--------------------------------------------------------------------------
      # * Definir X
      #--------------------------------------------------------------------------
      def x=(x)
        super(x)
        $game_system.timer_x = x
      end
      #--------------------------------------------------------------------------
      # * Definir Y
      #--------------------------------------------------------------------------
      def y=(y)
        super(y)
        $game_system.timer_y = y
      end
      #--------------------------------------------------------------------------
      # * Definir Z
      #--------------------------------------------------------------------------
      def z=(z)
        super(z)
        $game_system.timer_z = z
      end
      #--------------------------------------------------------------------------
      # * Definir posición horizontal
      #--------------------------------------------------------------------------
      def hpos=(value)
        case value
        when 0 # Izquierda
          self.x = 8
        when 1 # Centro
          self.x = 640 / 2 - self.bitmap.width / 2
        when 2 # Derecha
          self.x = 640 - self.bitmap.width - 8
        end
      end
      #--------------------------------------------------------------------------
      # * Definir posición vertical
      #--------------------------------------------------------------------------
      def vpos=(value)
        case value
        when 0 # Arriba
          self.y = 8
        when 1 # Centro
          self.y = 480 / 2 - self.bitmap.height / 2
        when 2 # Abajo
          self.y = 480 - self.bitmap.height - 8
        end
      end
      #--------------------------------------------------------------------------
      # * Empezar temporizador
      #--------------------------------------------------------------------------
      def play
        $game_system.timer_pause = false
      end
      #--------------------------------------------------------------------------
      # * Parar temporizador
      #--------------------------------------------------------------------------
      def pause
        $game_system.timer_pause = true
      end
      #--------------------------------------------------------------------------
      # * Comprobar si el temporizador está pausado
      #--------------------------------------------------------------------------
      def pause?
        return $game_system.timer_pause
      end
      #--------------------------------------------------------------------------
      # * Terminar temporizador
      #--------------------------------------------------------------------------
      def stop
        $game_system.timer_counter = -1
        $game_system.timer_working = false
        return
      end
      #--------------------------------------------------------------------------
      # * Volver a iniciar temporizador
      #--------------------------------------------------------------------------
      def reset
        set($game_system.timer_reset_time)
      end
      #--------------------------------------------------------------------------
      # * Añadir tiempo (en segundos, puede ser valor negativo)
      #--------------------------------------------------------------------------
      def add_time(value)
        $game_system.timer_counter += (value) * Graphics.frame_rate
        $game_system.timer_counter = [0, $game_system.timer_counter].max
        refresh
      end
      #--------------------------------------------------------------------------
      # * Nombre de la fuente
      #--------------------------------------------------------------------------
      def font
        return $game_system.timer_font_name
      end
      #--------------------------------------------------------------------------
      def font=(name)
        $game_system.timer_font_name = name
        self.bitmap.font.name = name
        get_bitmap_size
      end
      #--------------------------------------------------------------------------
      # * Tamaño de la fuente
      #--------------------------------------------------------------------------
      def size
        return $game_system.timer_font_size
      end
      #--------------------------------------------------------------------------
      def size=(size)
        $game_system.timer_font_size = size
        self.bitmap.font.size = size
        get_bitmap_size
      end
      #--------------------------------------------------------------------------
      # * Color de la fuente
      #--------------------------------------------------------------------------
      def color
        return $game_system.timer_font_color
      end
      #--------------------------------------------------------------------------
      def color=(color)
        $game_system.timer_font_color = color
        self.bitmap.font.color = color
      end
      #--------------------------------------------------------------------------
      # * Formato del texto
      #--------------------------------------------------------------------------
      def format
        return $game_system.timer_format
      end
      #--------------------------------------------------------------------------
      def format=(format)
        $game_system.timer_format = format
        get_bitmap_size
        refresh
      end
      #--------------------------------------------------------------------------
      # * Mostrar números
      #--------------------------------------------------------------------------
      def show_numbers
        return $game_system.timer_show_numbers
      end
      #--------------------------------------------------------------------------
      def show_numbers=(show_numbers)
        $game_system.timer_show_numbers = show_numbers
      end
      #--------------------------------------------------------------------------
      # * Modo forward
      #--------------------------------------------------------------------------
      def forward
        return $game_system.timer_forward
      end
      #--------------------------------------------------------------------------
      def forward=(forward)
        $game_system.timer_forward = forward
      end
      #--------------------------------------------------------------------------
      # * Definir velocidad
      #--------------------------------------------------------------------------
      def speed
        return $game_system.timer_speed
      end
      #--------------------------------------------------------------------------
      def speed=(speed)
        $game_system.timer_speed = speed.to_f
      end
      #--------------------------------------------------------------------------
      # * Update
      #--------------------------------------------------------------------------
      def update
        super
        self.visible = $game_system.timer_working
        if self.visible == true && $game_system.timer_counter >= 0
          if !self.pause?
            $game_system.timer_counter += $game_system.timer_forward ? 1 : -1
            $game_system.timer_counter = [$game_system.timer_counter, 0].max
          end
          refresh
        end
      end
    end



Ses add-ons :

Portion de code : Tout sélectionner

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
#==============================================================================
# ** Wecoc's Timer Upgrade AddOns
#------------------------------------------------------------------------------
# Autor: Wecoc
# Éste script requiere el Wecoc's Timer Upgrade
# Es una colección de Add-Ons independientes para Sprite_Timer
#==============================================================================
 
#==============================================================================
# * 1. Bold & Italic
#------------------------------------------------------------------------------
# Permite poner los números en negrita o cursiva
#   timer.bold = true/false
#   timer.italic = true/false
#==============================================================================
 
class Game_System
  attr_accessor :timer_font_bold
  attr_accessor :timer_font_italic
  #--------------------------------------------------------------------------
  alias timer_addons_font_ini initialize unless $@
  def initialize
    timer_addons_font_ini
    @timer_font_bold = false
    @timer_font_italic = false
  end
end
 
#==============================================================================
 
class Sprite_Timer < Sprite
  #--------------------------------------------------------------------------
  alias addons_font_bold_italic refresh_font unless $@
  def refresh_font
    addons_font_bold_italic
    self.bitmap.font.bold = $game_system.timer_font_bold
    self.bitmap.font.italic = $game_system.timer_font_italic
  end
  #--------------------------------------------------------------------------
  def bold
    return $game_system.timer_font_bold
  end
  #--------------------------------------------------------------------------
  def bold=(bold)
    self.bitmap.font.bold = bold
    $game_system.timer_font_bold = bold
    get_bitmap_size
  end
  #--------------------------------------------------------------------------
  def italic
    return $game_system.timer_font_italic
  end
  #--------------------------------------------------------------------------
  def italic=(italic)
    self.bitmap.font.italic = italic
    $game_system.timer_font_italic = italic
    get_bitmap_size
  end
end
 
#==============================================================================
# * 2. Label
#------------------------------------------------------------------------------
# Permite asignar un texto encima del contador
#   table.label = ""
#   table.label = "Título"
#   table.label = ["V: %1", ["$game_variables[10]"]]
#==============================================================================
 
class Game_System
  attr_accessor :timer_label, :timer_label_data, :timer_label_size
  #--------------------------------------------------------------------------
  alias timer_addons_label_ini initialize unless $@
  def initialize
    timer_addons_label_ini
    @timer_label = ""       # Título por defecto
    @timer_label_data = []  # Datos almacenados en el título
    @timer_label_size = 20  # Tamaño de la fuente del label
  end
end
 
#==============================================================================
 
class Sprite_Timer < Sprite
  #--------------------------------------------------------------------------
  def label
    return $game_system.timer_label
  end
  #--------------------------------------------------------------------------
  def label_data
    return $game_system.timer_label_data
  end
  #--------------------------------------------------------------------------
  def get_label
    return "" if self.label == ""
    label_text = self.label.clone
    n = 0
    loop do
      if label_text.include?("%")
        label_text.gsub!("%#{(n+1).to_s}", eval(self.label_data[n]).to_s)
        n += 1
      else
        break
      end
    end
    return label_text
  end
  #--------------------------------------------------------------------------
  def label=(label)
    label = "" if label == nil
    if label.is_a?(Array)
      $game_system.timer_label      = label[0]
      $game_system.timer_label_data = label[1]
    else
      $game_system.timer_label = label
    end
    get_bitmap_size
    refresh
  end
  #--------------------------------------------------------------------------
  def get_bitmap_size
    self.bitmap = Bitmap.new(1,1)
    refresh_font
    text_array = []
    format = $game_system.timer_format
    format[1].size.times { text_array.push(0) }
    text = sprintf(format[0], *text_array)
    w = self.bitmap.text_size(text).width + 16
    h = self.bitmap.text_size(text).height
    if self.label != ""
      self.bitmap.font.size = $game_system.timer_label_size
      label_text = self.get_label
      lw = self.bitmap.text_size(label_text).width + 32
      lh = self.bitmap.text_size(label_text).height
      w = [w, lw].max
      h = h + lh + 8
    end
    self.bitmap = Bitmap.new(w, h)
    refresh_font
  end
  #--------------------------------------------------------------------------
  def draw_current_time
    text_array = []
    format = $game_system.timer_format
    for i in 0...format[1].size
      case format[1][i]
        when 'ms' then text_array.push @ms
        when 's'  then text_array.push @s
        when 'm'  then text_array.push @m
        when 'h'  then text_array.push @h
      end
    end
    text = sprintf(format[0], *text_array)
    if self.label != ""
      self.bitmap.font.size = $game_system.timer_label_size
      label_text = self.get_label
      lh = self.bitmap.text_size(label_text).height
      lrect = Rect.new(0, 4, self.bitmap.width, lh)
      self.bitmap.draw_text(lrect, label_text, 1)
      self.bitmap.font.size = $game_system.timer_font_size
      rect = Rect.new(0, lh, self.bitmap.width, self.bitmap.height - lh)
    else
      rect = Rect.new(0, 0, self.bitmap.width, self.bitmap.height)
    end
    self.bitmap.draw_text(rect, text, 1)
  end
end
 
#==============================================================================
# * 3. Back Color
#------------------------------------------------------------------------------
# Permite asignar un color de fondo
#   timer.back_color = color
#==============================================================================
 
class Game_System
  attr_accessor :timer_back_color
  #--------------------------------------------------------------------------
  alias timer_addons_back_ini initialize unless $@
  def initialize
    timer_addons_back_ini
    @timer_back_color = Color.new(0, 0, 0, 0) # Color por defecto
  end
end
 
#==============================================================================
 
class Sprite_Timer < Sprite
  #--------------------------------------------------------------------------
  def back_color
    return $game_system.timer_back_color
  end
  #--------------------------------------------------------------------------
  def back_color=(color)
    $game_system.timer_back_color = color
  end
  #--------------------------------------------------------------------------
  alias addons_back_color_draw draw_current_time unless $@
  def draw_current_time
    self.bitmap.fill_rect(self.bitmap.rect, $game_system.timer_back_color)
    addons_back_color_draw
  end
end
 
#==============================================================================
# * 4. Sound Effects
#------------------------------------------------------------------------------
# Permite asignar un sonido para cada segundo, así como uno cada n segundos
# y uno cuando llega a 00:00
#   $game_system.timer_sound_effects = true/false
#==============================================================================
 
class Game_System
  attr_accessor :timer_sound_effects
  #--------------------------------------------------------------------------
  alias timer_addons_sound_ini initialize unless $@
  def initialize
    timer_addons_sound_ini
    @timer_sound_effects = true
  end
end
 
#==============================================================================
 
class Sprite_Timer < Sprite
  alias addons_sound_upd update unless $@
  def update
    sec = self.sec
    addons_sound_upd
    if $game_system.timer_sound_effects == true
      if $game_system.timer_counter >= 0 && !self.pause?
        new_sec = self.sec
        if new_sec != sec
          # Sonido al cambiar segundo (opcional)
          Audio.se_play("Audio/SE/032-Switch01", 50, 100)
          if new_sec > 0 && new_sec % 5 == 0
            # Sonido cada 5 segundos (opcional)
            Audio.se_play("Audio/SE/032-Switch01", 40, 80)
          end
        end
        if $game_system.timer_counter == 1
          # Sonido al llegar a 00:00 (opcional)
          Audio.se_play("Audio/SE/057-Wrong01", 100, 100)
        end
      end
    end
  end
end
 
#==============================================================================
# * 5. Auto-pause
#------------------------------------------------------------------------------
# Para el reloj automáticamente cuando estás interactuando con un evento de mapa
#   $game_system.timer_auto_pause = true/false
#==============================================================================
 
class Game_System
  attr_accessor :timer_auto_pause
  #--------------------------------------------------------------------------
  alias timer_auto_pause_ini initialize unless $@
  def initialize
    timer_auto_pause_ini
    @timer_auto_pause = true
  end
end
 
#==============================================================================
 
class Game_Temp
  attr_accessor :timer_auto_paused
  #--------------------------------------------------------------------------
  alias timer_auto_pause_ini initialize unless $@
  def initialize
    timer_auto_pause_ini
    @timer_auto_paused = false
  end
end
 
#==============================================================================
 
class Sprite_Timer < Sprite
  #--------------------------------------------------------------------------
  def pause?
    return $game_system.timer_pause || $game_temp.timer_auto_paused
  end
  #--------------------------------------------------------------------------
  alias timer_auto_pause_upd update unless $@
  def update
    timer_auto_pause_upd
    if $game_system.timer_auto_pause && $game_system.map_interpreter.running?
      $game_temp.timer_auto_paused = true
    else
      $game_temp.timer_auto_paused = false
    end
  end
end
 
#==============================================================================
# * 6. Pause Color & Opacity
#------------------------------------------------------------------------------
# Permite asignar un color y opacidad especiales al texto cuando el reloj
# está pausado
#==============================================================================
 
class Sprite_Timer < Sprite
  alias addons_font_paused refresh_font unless $@
  def refresh_font
    addons_font_paused
    if self.pause?
      # Color del texto en modo pausado (opcional)
      self.bitmap.font.color = Color.new(255, 255, 50, 200)
    end
  end
  
  alias addons_font_paused_upd update unless $@
  def update
    addons_font_paused_upd
    self.opacity = 255
    if self.pause?
      # Opacidad de la bitmap en modo pausado (opcional)
      self.opacity = 128
    end
  end
end



» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - L'éveil

Voximilien - posté le 27/03/2017 à 18:05:17. (128 messages postés)

C'est dommage... J'ai voulu participer cette semaine, mais j'y ai pensé trop tard. Je voulais envoyer mon screen hier à 23h mais c'était déjà verrouillé. :'(

Félicitations à vous !

» Liste de scripts | » XP - Options

Posté dans Forum - Une école de jeux-vidéo?

Voximilien - posté le 27/03/2017 à 00:16:54. (128 messages postés)

frenchouf a dit:


C'est quand même dingue comment le métier du jeu vidéo est représenté comme un piège à con!



C'est clair !
Après quand tu lis les avis sur différents sites concernant les écoles, y en a quasiment aucune de bien. Donc y a de quoi se poser des questions sur la rentabilité d'être dans une école spécialisée jeu vidéo.

S'il n'y avait pas d'enjeu financier important, ça pourrait valoir le coup de tenter, mais ce n'est pas le cas.
Personnellement, j'ai pas envie d'emprunter 25,000€ avec 0 garanti derrière de trouver un job et 0 garanti d'apprendre correctement. J'ai vu des avis sur certaines écoles comme quoi tu es laissé seul à ton sort avec des tutos, et puis débrouille toi avec ça. Pour 0€, je fais la même chose.

Après, est-ce que le diplôme a vraiment une valeur ? Je vais souvent voir les annonces sur Afjv et les entreprises demandent souvent X années d'expériences (ce qui est ultra débile en soi, puisque personne ne veut te former, donc les X années, j'sais pas comment ils peuvent trouver si personne ne fait rien, m'enfin). Je n'ai pas encore vu d'annonce comme quoi il faut un diplôme de Niveau II pour faire le métier, il faut juste les compétences.

En cherchant un peu désespérément une solution alternative sur Internet, j'ai trouvé un p'tit truc qui n'a rien à voir avec les écoles, mais qui peut bien aider à se développer. Le problème étant que ça n'existe pas en France... Mais au Québec. Ça s'appelle Studio XP. C'est géré par les gars d'Ubisoft Montréal. Ils t'apprennent quelques trucs et également les bases de Unity. Ça reste quelque chose de payant, bien évidemment. Après, je ne sais pas si ça vaut le coup.

Perso, je pense me tourner vers un peu de programmation et vers quelque chose dans le graphisme/infographie/dessin en passant par une Manaa. Ce sera toujours moins coûteux qu'une école de jeux random, et il y a moins de risques. Et puis, je préfère faire ça plutôt que de retenter désespérément les concours ultras durs chaque année et perdre du temps.

» Liste de scripts | » XP - Options

Posté dans Forum - [RPG Maker XP] Script de timer avancé

Voximilien - posté le 17/03/2017 à 15:47:46. (128 messages postés)

Okay, merci ! :)
Je vais essayer de bidouiller un truc de mon coté.

Je vais aussi continuer de chercher si il existe un script ou des bouts de scripts à assembler.

» Liste de scripts | » XP - Options

Posté dans Forum - Joyeux anniversaire !

Voximilien - posté le 17/03/2017 à 15:42:14. (128 messages postés)

Joyeux anniversaire, bande de gens bons ! o/

» Liste de scripts | » XP - Options

Posté dans Forum - [RPG Maker XP] Script de timer avancé

Voximilien - posté le 16/03/2017 à 15:11:03. (128 messages postés)

Salut !

Non, non, pas besoin de développer un script pour moi ! Je te remercie, mais je ne veux pas demander à quelqu'un de me faire quelque chose comme ça.

En fait, je voulais juste savoir si quelqu'un avait un script comme celui-ci qui traîne sur son PC, puisque que beaucoup de ressources pour XP ont disparus.

Ou simplement savoir si avec de la bidouille, on peut faire un script qui fonctionne en RGSS1.

» Liste de scripts | » XP - Options

Posté dans Forum - [RPG Maker XP] Script de timer avancé

Voximilien - posté le 15/03/2017 à 01:48:20. (128 messages postés)

Domaine concerné: Script
Logiciel utilisé: RPG Maker XP
Salut !

Je suis à la recherche d'un script depuis un moment pour la version XP de RPG Maker. Le timer est quelque peu limité et avoir plus d'options serait un gros plus.

J'ai déjà trouvé des scripts plus ou moins avancés pour les versions VX Ace et MV, mais pas grand chose de très folichon pour XP.

Je m'explique. Ce que j'essaye d'avoir dans ce script, ce sont des options où on peut :
• Figer/défiger le minuteur (avec une option qui permet de laisser afficher le minuteur quand il est en pause),
• Avoir la possibilité de mettre les millisecondes et que le décompte soit fluide,
• Ajouter/enlever X temps sans forcément réinitialiser le minuteur à chaque fois,
• Avoir la possibilité d'attribuer une image de fond pour le minuteur qui change d'opacité (en même temps que le minuteur) quand le joueur passe sur le même coin de l'écran pour plus de lisibilité.

(Les millisecondes c'est le truc bonus, tant pis si ça ne marche pas pour XP.)

Est-ce qu'un tel script existe pour XP ? Est-ce qu'un script avec ces options est réalisable pour la version XP ou est-ce que le RGSS1 est trop faible pour gérer ça ?


Voici ce que j'ai trouvé pour les versions VX Ace et MV.
VX Ace :

Portion de code : Tout sélectionner

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
#------------------------------------------------------------------------------#
#  Galv's Variable Timer Functions
#------------------------------------------------------------------------------#
#  For: RPGMAKER VX ACE
#  Version 1.2
#------------------------------------------------------------------------------#
#  2012-10-24 - Version 1.2 - updated alias names for compatibility
#  2012-09-28 - Version 1.1 - Timer sprites now dispose when invisible.
#                             (thanks to Falcao's advice to do so)
#  2012-09-28 - Version 1.0 - release
#------------------------------------------------------------------------------#
#
#  This script allows a bit more control over the timer and how it looks
#  - Use a custom graphic for the timer
#  - Change font, text size and colour of numbers
#  - Variable speed that can count up or down
#  - Additional script calls for functionality (see below)
#
#
#  The below can be used in event script calls.
#------------------------------------------------------------------------------#
#  To freeze the timer:
#  $game_timer.freeze
#------------------------------------------------------------------------------#
#  To unfreeze the timer:
#  $game_timer.unfreeze
#------------------------------------------------------------------------------#
#  To increase time (x is number of seconds):
#  $game_timer.increase(x)
#------------------------------------------------------------------------------#
#  To decrease time (x is number of seconds):
#  $game_timer.decrease(x)
#------------------------------------------------------------------------------#
#  To set timer to equal a variable (y is variable ID to use):
#  $game_timer.set(y)
#------------------------------------------------------------------------------#
#  To increase timer by a variable (y is variable ID to use):
#  $game_timer.increase_var(y)
#------------------------------------------------------------------------------#
#  To decrease timer by a variable (y is variable ID to use):
#  $game_timer.decrease_var(y)
#------------------------------------------------------------------------------#
#
#  Event commands for the timer still work.
#  eg. (start, stop, conditional branch, set variable to timer)
#
#------------------------------------------------------------------------------#
 
#------------------------------------------------------------------------------#  
#  !!!!! WARNING - I am a learning scripter. Use this at your own risk!!!!!!
#------------------------------------------------------------------------------#
 
$imported = {} if $imported.nil?
$imported["Variable_Timer"] = true
 
module Variable_Timer
 
#------------------------------------------------------------------------------#
#  SCRIPT SETUP OPTIONS
#------------------------------------------------------------------------------#
 
  TIME_SPEED_VAR = 1    # The ID of the variable that sets the timer speed.
                        # Change this variable in-game to the speed per second.
                        # Negatives count down, positives count up. 0 pauses.
 
  HIDE_TIMER_SWITCH = 1       # Switch ID to turn on/off the timer visibility.
 
  ABORT_BATTLE = false        # When timer reached 0 in battle it would abort 
                              # the combat. Choose if that's true or false.
   
 
  TIMER_GRAPHIC = "timer"     # Graphic in /Graphics/System folder to use.
                              # put "" If you don't want a graphic.
 
  TIMER_FONT = "Arial"        # Font of timer numbers. Make it "" for default.
 
  TEXT_SIZE = 28              # Size of timer numbers.
 
  R = 0                       # Colour of numbers using RGB values
  G = 255                     # (red, green, blue)
  B = 0
 
#------------------------------------------------------------------------------#
#  END SCRIPT SETUP OPTIONS
#------------------------------------------------------------------------------#
 
end
 
class Game_Timer
 
  #--------------------------------------------------------------------------
  # * OVERWRITE Update
  #--------------------------------------------------------------------------
  def update
    return if @freeze_time
    if @working && @count > 0
        @count += $game_variables[Variable_Timer::TIME_SPEED_VAR]
      on_expire if @count == 0 && Variable_Timer::ABORT_BATTLE
    end
    if @working && @count < 0
      @count = 0
    end
  end
   
  def freeze
    @freeze_time = true
  end
 
  def unfreeze
    @freeze_time = false
  end
   
  def increase(time)
    @count += time * Graphics.frame_rate
  end
 
  def decrease(time)
    @count -= time * Graphics.frame_rate
  end
   
  def set(var)
    @count = $game_variables[var] * Graphics.frame_rate
  end
   
  def increase_var(var)
    @count += $game_variables[var] * Graphics.frame_rate
  end
   
  def decrease_var(var)
    @count -= $game_variables[var] * Graphics.frame_rate
  end
 
end # Game_Timer
 
 
class Sprite_Timer < Sprite
 
  alias galv_vartimer_dispose dispose
  def dispose
    @timer_sprite.dispose if !@timer_sprite.nil?
    galv_vartimer_dispose
  end
 
  def create_timer_sprite
    @timer_sprite = Sprite.new
    @timer_sprite.bitmap = Cache.system(Variable_Timer::TIMER_GRAPHIC)
    @timer_sprite.opacity = 255
    @timer_sprite.x = Graphics.width - @timer_sprite.bitmap.width
  end
   
  alias galv_vartimer_create_bitmap create_bitmap
  def create_bitmap
    galv_vartimer_create_bitmap
    self.bitmap.font.name = Variable_Timer::TIMER_FONT unless Variable_Timer::TIMER_FONT == ""
    self.bitmap.font.size = Variable_Timer::TEXT_SIZE
    self.bitmap.font.color.set(Variable_Timer::R, Variable_Timer::G, Variable_Timer::B)
  end
 
  alias galv_vartimer_update_visibility update_visibility
  def update_visibility
    galv_vartimer_update_visibility
    if $game_timer.working? && !$game_switches[Variable_Timer::HIDE_TIMER_SWITCH]
      create_timer_sprite if @timer_sprite.nil? || @timer_sprite.disposed?
    else
      @timer_sprite.dispose if !@timer_sprite.nil?
      self.visible = false
    end
  end
   
end # Sprite_Timer < Sprite



MV :


(Je sais que MV est en Java et que c'est différent de VX et XP.)

Portion de code : Tout sélectionner

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
/*:
 * @plugindesc Gives developers move control over the visual and mechanical aspects of the game's timer system.
 * @author SumRndmDde
 *
 * @param Timer Format
 * @desc The format of the timer text. Use the following codes:
 *   %1 - hours | %2 - minutes | %3 - seconds | %4 - frames
 * @default %2:%3:%4
 *
 * @param Timer Position
 * @desc The position of the timer.            TOP-L  TOP  TOP-R
 * Use the following position codes.     BOT-L  BOT  BOT-R
 * @default TOP
 *
 * @param Timer Start SE
 * @desc The sound effect played when a timer starts. Leave blank to disallow. Use the format: file, volume, pitch, pan
 * @default
 *
 * @param Timer Expire SE
 * @desc The sound effect played when a timer expires. Leave blank to disallow. Use the format: file, volume, pitch, pan
 * @default Bell3, 80, 100, 0
 *
 * @param Pause Color
 * @desc This is the color of the text when the timer is paused.
 * @default #FFFF00
 *
 * @param Use Background
 * @desc If 'true', a subtle background will be used for the timer to help it become more readable.
 * @default true
 *
 * @param == Auto Settings ==
 * @default
 *
 * @param Use Auto-Stop
 * @desc If 'true', then the timer will automatically stop itself and leave the screen when finished.
 * @default true
 *
 * @param Use Auto-Pause
 * @desc If 'true', then the timer will automatically pause while events are running.
 * @default true
 *
 * @param Auto-Pause Opacity
 * @desc This is the opacity of the timer during automatic pausing.
 * @default 120
 *
 * @param Use Auto-Abort
 * @desc If 'true', then battles will be automatically aborted when the timer ends.
 * @default true
 *
 * @param == Label Settings ==
 * @default
 *
 * @param Default Label
 * @desc This is the text of the label by default. Leave blank to use no label.
 * @default
 *
 * @param Label Font Size
 * @desc The font size of the text used for the label.
 * @default 22
 *
 * @param == Font Settings ==
 * @default
 *
 * @param Timer Font
 * @desc The font used for the timer's text.
 * @default GameFont
 *
 * @param Timer Font Size
 * @desc The size of the font used for the timer.
 * @default 32
 *
 * @param Timer Italic
 * @desc If 'true', then the timer's text will be italicized.
 * @default false
 *
 * @param Timer Text Color
 * @desc The color of the timer's text.
 * @default #ffffff
 *
 * @param Timer Outline Color
 * @desc The color of the timer's outline.
 * @default rgba(0, 0, 0, 0.5)
 *
 * @help
 *
 * Timer Upgrade
 * Version 1.01
 * SumRndmDde
 *
 *
 * This plugin gives developers move control over the visual and mechanical 
 * aspects of the game's timer system.
 *
 *
 * ==============================================================================
 *  Plugin Commands
 * ==============================================================================
 *
 * The following Plugin Commands can be used to manipulate the extra mechanics
 * of the upgraded timer:
 *
 *
 *
 *   SetTimer [frames] [seconds] [minutes] [hours]
 *
 * Using this command, the frames, seconds, minutes, and hours can be set on the
 * game timer. This allows users to surpass the default settings for the MV
 * engine and specify the count down to frames.
 *
 * For example, if you wish to set the timer to 3 minutes, you would do:
 *   SetTimer 0 0 3 0
 *
 * If you wished to set the timer to 30 frames and 60 seconds, do:
 *   SetTimer 30 60 0 0
 *
 *
 *
 *   AddTimer [frames] [seconds] [minutes] [hours]
 *
 * Using this command, frames, seconds, minutes, and hours can be added to the 
 * game timer. Instead of replacing the timer value, this command adds to the 
 * current value.
 *
 * For example, if you wanted to add 5 minutes to the timer, you would do:
 *   AddTimer 0 0 5 0
 *
 * If you wanted to add 30 frames and 1 hour, you would do:
 *   AddTimer 30 0 0 1
 *
 *
 *
 *   PauseTimer
 *
 * Using this command, the timer can be paused. This keeps the timer at its
 * current position until unpaused or restarted.
 *
 *
 *
 *   UnpauseTimer
 *
 * Using this command, the timer can be unpaused. This will let the timer 
 * continue from when it was paused.
 *
 *
 *
 *   SetExpireCommonEvent [id]
 *
 * Using this command, the expire Common Event can be set up. This is a Common
 * Event that will automatically play once the Timer ends. Once the Common
 * Event has been played, it will no longer be the expire Common Event.
 *
 *
 *
 *   SetTimerLabel [text]
 *
 * This command allows you to change the timer label in the middle of the game.
 * Setting this to blank would remove the label.
 *
 *
 * ==============================================================================
 *  End of Help File
 * ==============================================================================
 * 
 * Welcome to the bottom of the Help file.
 *
 *
 * Thanks for reading!
 * If you have questions, or if you enjoyed this Plugin, please check
 * out my YouTube channel!
 *
 * https://www.youtube.com/c/SumRndmDde
 *
 *
 * Until next time,
 *   ~ SumRndmDde
 */
 
var SRD = SRD || {};
SRD.TimerUpgrade = SRD.TimerUpgrade || {};
SRD.PluginCommands = SRD.PluginCommands || {};
 
var Imported = Imported || {};
Imported["SumRndmDde Timer Upgrade"] = 1.01;
 
(function(_, $) {
 
"use strict";
 
//-----------------------------------------------------------------------------
// SRD.TimerUpgrade
//-----------------------------------------------------------------------------
 
const params = PluginManager.parameters('SRD_TimerUpgrade');
 
_.format = String(params['Timer Format']);
_.pos = String(params['Timer Position']);
_.start = String(params['Timer Start SE']);
_.stop = String(params['Timer Expire SE']);
_.pauseColor = String(params['Pause Color']);
_.back = String(params['Use Background']).trim().toLowerCase() === 'true';
 
_.autoStop = String(params['Use Auto-Stop']).trim().toLowerCase() === 'true';
_.autoPause = String(params['Use Auto-Pause']).trim().toLowerCase() === 'true';
_.autoOpacity = parseInt(params['Auto-Pause Opacity']);
_.abort = String(params['Use Auto-Abort']).trim().toLowerCase() === 'true';
 
_.default = String(params['Default Label']);
_.labelSize = parseInt(params['Label Font Size']);
 
_.font = String(params['Timer Font']);
_.size = parseInt(params['Timer Font Size']);
_.italic = String(params['Timer Italic']).trim().toLowerCase() === 'true';
_.color = String(params['Timer Text Color']);
_.outline = String(params['Timer Outline Color']);
 
_.updateBooleans = function() {
        this.usesHours = !!(this.format.match(/%1/));
        this.usesMinutes = !!(this.format.match(/%2/));
        this.usesSeconds = !!(this.format.match(/%3/));
        this.usesFrames = !!(this.format.match(/%4/));
};
 
_.getLowestType = function() {
        if(this.usesFrames) return 0;
        else if(this.usesSeconds) return 1;
        else if(this.usesMinutes) return 2;
        return 3;
};
 
_.setupPosition = function() {
        this.vert = (!!this.pos.match(/top/i)) ? 0 : 1;
        if(!!this.pos.match(/-l/i)) {
                this.horz = -1;
        } else if(!!this.pos.match(/-r/i)) {
                this.horz = 1;
        } else {
                this.horz = 0;
        }
};
 
_.setupSoundEffects = function() {
        if(this.start) {
                const info = this.start.split(/\s*,\s*/);
                this.start = {
                        name: info[0], 
                        volume: parseInt(info[1]),
                        pitch: parseInt(info[2]),
                        pan: parseInt(info[3])
                }
        }
        if(this.stop) {
                const info = this.stop.split(/\s*,\s*/);
                this.stop = {
                        name: info[0], 
                        volume: parseInt(info[1]),
                        pitch: parseInt(info[2]),
                        pan: parseInt(info[3])
                }
        }
};
 
_.updateBooleans();
_.setupPosition();
_.setupSoundEffects();
 
//-----------------------------------------------------------------------------
// SRD.PluginCommands
//-----------------------------------------------------------------------------
 
$['settimer'] = function(args) {
        const v = $gameVariables._data;
        let result = eval(args[0]);
        if(args[1]) result += (eval(args[1]) * 60);
        if(args[2]) result += (eval(args[2]) * 60 * 60);
        if(args[3]) result += (eval(args[3]) * 60 * 60 * 60);
        $gameTimer.start(result);
};
 
$['addtimer'] = function(args) {
        const v = $gameVariables._data;
        let result = $gameTimer.getFrames();
        if(args[0]) result += (eval(args[0]));
        if(args[1]) result += (eval(args[1]) * 60);
        if(args[2]) result += (eval(args[2]) * 60 * 60);
        if(args[3]) result += (eval(args[3]) * 60 * 60 * 60);
        if(result < 0) result = 0;
        $gameTimer.start(result);
};
 
$['pausetimer'] = function(args) {
        $gameTimer.pause();
};
 
$['unpausetimer'] = function(args) {
        $gameTimer.unpause();
};
 
$['setexpirecommonevent'] = function(args) {
        $gameTimer.setExpireCommonEvent(parseInt(args[0]));
};
 
$['settimerlabel'] = function(args) {
        if(args.length === 0) {
                $gameTimer.setLabel('');
        } else {
                let text = '';
                for(let i = 0; i < args.length; i++) {
                        text += String(args[i]) + " ";
                }
                $gameTimer.setLabel(text);
        }
};
 
//-----------------------------------------------------------------------------
// Game_Interpreter
//-----------------------------------------------------------------------------
 
if(!SRD.Game_Interpreter_pluginCommand) {
 
SRD.Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
        const com = command.trim().toLowerCase();
        if($[com]) {
                $[com].call(this, args);
                return;
        }
        SRD.Game_Interpreter_pluginCommand.apply(this, arguments);
};
 
}
 
//-----------------------------------------------------------------------------
// Game_Timer
//-----------------------------------------------------------------------------
 
_.Game_Timer_initialize = Game_Timer.prototype.initialize;
Game_Timer.prototype.initialize = function() {
        _.Game_Timer_initialize.apply(this, arguments);
        this._onExpireCommonEvent = 0;
        this._isPaused = false;
        this._label = _.default;
};
 
_.Game_Timer_update = Game_Timer.prototype.update;
Game_Timer.prototype.update = function(sceneActive) {
        if(!this._isPaused && !this.isAutoPaused()) {
                _.Game_Timer_update.apply(this, arguments);
        }
};
 
Game_Timer.prototype.isAutoPaused = function() {
        return _.autoPause && $gameMap.isEventRunning() && SceneManager._scene.constructor === Scene_Map;
};
 
Game_Timer.prototype.getCount = function(type) {
        switch(type) {
                case 0: return this._frames;
                case 1: return Math.floor(this._frames / 60);
                case 2: return Math.floor(this._frames / (60 * 60));
                case 3: return Math.floor(this._frames / (60 * 60 * 60));
        }
};
 
Game_Timer.prototype.getLabel = function() {
        if(!this._label) return '';
        let text = this._label;
        text = text.replace(/\\V\[(\d+)\]/gi, function() {
                return $gameVariables.value(parseInt(arguments[1]));
        }.bind(this));
        return text;
};
 
Game_Timer.prototype.setLabel = function(label) {
        this._label = label;
};
 
_.Game_Timer_start = Game_Timer.prototype.start;
Game_Timer.prototype.start = function(count) {
        _.Game_Timer_start.apply(this, arguments);
        if(_.start) AudioManager.playSe(_.start);
        this.unpause();
};
 
_.Game_Timer_stop = Game_Timer.prototype.stop;
Game_Timer.prototype.stop = function(count) {
        _.Game_Timer_stop.apply(this, arguments);
        this.unpause();
};
 
Game_Timer.prototype.getFrames = function() {
        return this._frames;
};
 
Game_Timer.prototype.setExpireCommonEvent = function(id) {
        this._onExpireCommonEvent = id;
};
 
Game_Timer.prototype.onExpire = function() {
        if(_.abort) BattleManager.abort();
        if(_.stop) AudioManager.playSe(_.stop);
        this.playExpireCommonEvent();
        if(_.autoStop) this.stop();
};
 
Game_Timer.prototype.playExpireCommonEvent = function() {
        if(this._onExpireCommonEvent !== 0) {
                $gameTemp.reserveCommonEvent(this._onExpireCommonEvent);
                this._onExpireCommonEvent = 0;
        }
};
 
Game_Timer.prototype.pause = function() {
        this._isPaused = true;
};
 
Game_Timer.prototype.unpause = function() {
        this._isPaused = false;
};
 
Game_Timer.prototype.isPaused = function() {
        return this._isPaused;
};
 
//-----------------------------------------------------------------------------
// Scene_Base
//-----------------------------------------------------------------------------
 
Scene_Base.prototype.createTimer = Spriteset_Base.prototype.createTimer;
 
//-----------------------------------------------------------------------------
// Scene_Map
//-----------------------------------------------------------------------------
 
_.Scene_Map_createSpriteset = Scene_Map.prototype.createSpriteset;
Scene_Map.prototype.createSpriteset = function() {
    _.Scene_Map_createSpriteset.apply(this, arguments);
    this.createTimer()
};
 
//-----------------------------------------------------------------------------
// Scene_Battle
//-----------------------------------------------------------------------------
 
_.Scene_Battle_createSpriteset = Scene_Battle.prototype.createSpriteset;
Scene_Battle.prototype.createSpriteset = function() {
    _.Scene_Battle_createSpriteset.apply(this, arguments);
    this.createTimer();
};
 
//-----------------------------------------------------------------------------
// Spriteset_Base
//-----------------------------------------------------------------------------
 
Spriteset_Base.prototype.createTimer = function() {};
 
//-----------------------------------------------------------------------------
// Sprite_Timer
//-----------------------------------------------------------------------------
 
_.Sprite_Timer_initialize = Sprite_Timer.prototype.initialize;
Sprite_Timer.prototype.initialize = function() {
        this.initMembers();
        _.Sprite_Timer_initialize.apply(this, arguments);
        this.createBackground();
        this.createLabel();
        this.addChildren();
        this.redraw();
};
 
Sprite_Timer.prototype.initMembers = function() {
        this._lowestType = _.getLowestType();
        this._count = 0;
        this._paused = false;
        this._label = $gameTimer.getLabel();
};
 
Sprite_Timer.prototype.createBackground = function() {
        const width = this.numBitmap.width * (1.5);
        let height = this.numBitmap.height;
        if(this._label) height += _.labelSize + 16;
        this.background = new Sprite(new Bitmap(width, height));
        if(_.back) {
                if(_.horz) {
                        this.background.bitmap.gradientFillRect(0, 0, width, height, 'rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 1)', false);
                        this.background.scale.x = _.horz;
                } else {
                        this.background.bitmap = new Bitmap(width * 2, height);
                        this.background.bitmap.gradientFillRect(0, 0, width, height, 'rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 1)', false);
                        this.background.bitmap.gradientFillRect(width, 0, width, height, 'rgba(0, 0, 0, 1)', 'rgba(0, 0, 0, 0)', false);
                        this.background.anchor.x = 0.5;
                }
        }
};
 
Sprite_Timer.prototype.createLabel = function() {
        this.label = new Sprite(new Bitmap(this.numBitmap.width, _.labelSize + 16));
        this.label.bitmap.fontFace = _.font;
        this.label.bitmap.fontSize = _.labelSize;
        this.label.bitmap.fontItalic = _.italic;
        this.label.bitmap.textColor = _.color;
        this.label.bitmap.outlineColor = _.outline;
        this.refreshLabel();
};
 
Sprite_Timer.prototype.refreshLabel = function() {
        const bit = this.label.bitmap;
        bit.clear();
        if(this._label) {
                bit.drawText(this._label, 0, 0, bit.width, bit.height, 'center');
        }
};
 
Sprite_Timer.prototype.removeChildren = function() {
        this.removeChild(this.background);
        this.removeChild(this.numbers);
        this.removeChild(this.label);
};
 
Sprite_Timer.prototype.addChildren = function() {
        this.addChild(this.background);
        this.addChild(this.numbers);
        this.addChild(this.label);
};
 
Sprite_Timer.prototype.createBitmap = function() {
        const fontSize = _.size;
        const bitmap = new Bitmap(1, 1);
        bitmap.fontFace = _.font;
        bitmap.fontSize = fontSize;
        bitmap.fontItalic = _.italic;
        const newWidth = bitmap.measureTextWidth(this.timerText()) + 16;
        const newHeight = fontSize + 16;
 
        this.numbers = new Sprite(new Bitmap(newWidth, newHeight));
        this.numBitmap = this.numbers.bitmap;
        this.numBitmap.fontFace = _.font;
        this.numBitmap.fontSize = fontSize;
        this.numBitmap.fontItalic = _.italic;
        this.numBitmap.textColor = _.color;
        this.numBitmap.outlineColor = _.outline;
};
 
_.Sprite_Timer_update = Sprite_Timer.prototype.update;
Sprite_Timer.prototype.update = function() {
        _.Sprite_Timer_update.apply(this, arguments);
        this.updatePause();
        this.updateLabel();
};
 
Sprite_Timer.prototype.updateBitmap = function() {
        if(this._count !== $gameTimer.getCount(this._lowestType)) {
                this._count = $gameTimer.getCount(this._lowestType);
                this.redraw();
        }
};
 
Sprite_Timer.prototype.updatePause = function() {
        if(this._paused !== $gameTimer.isPaused()) {
                this._paused = $gameTimer.isPaused();
                if(this._paused) this.redrawForPause();
                else this.redraw();
        }
};
 
Sprite_Timer.prototype.updateLabel = function() {
        if(this._label !== $gameTimer.getLabel()) {
                const refreshChildren = (!!this._label !== !!$gameTimer.getLabel());
                this._label = $gameTimer.getLabel();
                this.refreshLabel();
                if(refreshChildren) {
                        this.removeChildren();
                        this.createBackground();
                        this.addChildren();
                }
        }
};
 
Sprite_Timer.prototype.redraw = function() {
        if(this._paused) return;
        const text = this.timerText();
        const width = this.numBitmap.width;
        const height = this.numBitmap.height;
        this.numBitmap.clear();
        this.numBitmap.drawText(text, 0, 0, width, height, 'center');
};
 
Sprite_Timer.prototype.redrawForPause = function() {
        const text = this.timerText();
        const width = this.numBitmap.width;
        const height = this.numBitmap.height;
        const color = this.numBitmap.textColor;
        this.numBitmap.clear();
        this.numBitmap.textColor = _.pauseColor;
        this.numBitmap.drawText(text, 0, 0, width, height, 'center');
        this.numBitmap.textColor = color;
};
 
Sprite_Timer.prototype.timerText = function() {
        let result = _.format;
        const frames = $gameTimer.getFrames();
        const seconds = Math.floor(frames / 60);
        const minutes = Math.floor(frames / (60 * 60));
        const frm = frames % 60;
        const sec = seconds % 60;
        const min = minutes % 60;
        const hur = Math.floor(minutes / 60) % 60;
        if(_.usesFrames) result = result.replace(/%4/, frm.padZero(2));
        if(_.usesSeconds) result = result.replace(/%3/, sec.padZero(2));
        if(_.usesMinutes) result = result.replace(/%2/, min.padZero(2));
        if(_.usesHours) result = result.replace(/%1/, hur.padZero(2));
        return result;
};
 
Sprite_Timer.prototype.updateVisibility = function() {
        if($gameTimer.isWorking()) {
                this.opacity = ($gameTimer.isAutoPaused()) ? _.autoOpacity : 255;
        } else {
                this.opacity = 0;
        }
};
 
Sprite_Timer.prototype.updatePosition = function() {
        if(!this.background) return;
        this.updateVertical();
        this.updateCountPosition();
        this.updateHorizontal();
};
 
Sprite_Timer.prototype.updateVertical = function() {
        if(_.vert === 1) {
                this.y = Graphics.boxHeight - this.background.height;
        } else {
                this.y = 0;
        }
};
 
Sprite_Timer.prototype.updateCountPosition = function() {
        if(this._label) {
                this.numbers.y = _.labelSize + 16;
        } else {
                this.numbers.y = 0;
        }
};
 
Sprite_Timer.prototype.updateHorizontal = function() {
        if(_.horz === 1) {
                this.x = Graphics.boxWidth - this.numBitmap.width;
                this.background.x = this.numBitmap.width - this.background.bitmap.width;
        } else if(_.horz === -1) {
                this.x = 0;
                this.background.x = this.background.bitmap.width;
        } else {
                this.x = (Graphics.boxWidth - this.numBitmap.width) / 2;
                this.background.x = this.numBitmap.width / 2;
        }
};
 
})(SRD.TimerUpgrade, SRD.PluginCommands);




Si quelqu'un a une solution pour moi, ce serait très sympa ! J'vous donne un câlin si vous voulez en récompense. :3

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - L'hôpital des morts

Voximilien - posté le 29/11/2016 à 15:50:30. (128 messages postés)

Nemau a dit:


Gros GG Verehn, c'est impressionnant. Et bravo à toi Voximilien !



Merci ! :)

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - L'hôpital des morts

Voximilien - posté le 29/11/2016 à 12:58:27. (128 messages postés)

Verehn a dit:


Et n'oublions pas de rendre à César ce qui est à César, les autres screens réinterprétés ont pour auteurs:

-Nemau pour le screen de RitoJS en mode Zelda et le screen de Nanaky en mode Final Fantasy.

-Immudelki pour le dessin numérique à partir du screen de Terzarok.

Des staffeux qui ont assuré. :lei



Payons un coup à boire à ces braves gens ! image

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - L'hôpital des morts

Voximilien - posté le 29/11/2016 à 04:52:03. (128 messages postés)

Tout à la main ! :o
Un gros GG à toi pour avoir eu le courage de tout déformer à la main ! Le rendu pète la classe ! :D

Haha, merci ! :)
Je me doute bien que maintenant le screen n'a plus aucun secret pour toi, haha ! x)

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - L'hôpital des morts

Voximilien - posté le 29/11/2016 à 04:22:44. (128 messages postés)

Waouw ! Je m'attendais pas à ce que ce soit modifié de la sorte !
Ça rend plutôt bien, je trouve ! :D

Qu'est ce que vous avez utilisé pour faire ce rendu ? Je suis curieux de savoir. :)

Félicitations aux autres participants également ! Tout le monde a eu son petit sabota... enfin je veux dire, sa retouche ! Et je trouve ça sympa. ^w^

» Liste de scripts | » XP - Options

Posté dans Galerie - Un couloir peu accueillant

Voximilien - posté le 12/10/2016 à 02:12:44. (128 messages postés)

Oui, oui c'était le but ! C'était ma principale inspiration. :D

En fait, c'est plutôt difficile de faire ce genre de map "détaillée" sans qu'on se dise que c'est du Corpse Party ... x)

Il n'y a pas assez de tilesets horreur pour bien diversifier la chose, et encore moins dans le milieu scolaire. :c

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Une école terrifiante

Voximilien - posté le 12/10/2016 à 02:08:35. (128 messages postés)

C'était le but que ça fasse "Corpse Party". C'était la principale inspiration.
En revanche, j'ai pioché dans plusieurs ressources qu'on trouve par ci, par là, sur le net et j'ai fait énormément de modification pour que toutes les ressources aillent bien ensemble.

Par contre, je ne vois pas en quoi les personnages ont du mal à s'intégrer, je suis curieux d'en savoir plus ... :susp

Les salles 301 et 302 ? C'est pas possible, c'est pas ce qui est écrit. x)
101 et 102, c'est mieux. Pourquoi ces chiffres ? En fait, je vois souvent dans les écoles que le premier chiffre désigne l'étage, et les deux derniers désigne le numéro de la salle.

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Une école terrifiante

Voximilien - posté le 10/10/2016 à 21:39:46. (128 messages postés)

Yeaaah ! La première place ! Merci beaucoup ! :D
Félicitations aux autres participants également ! :)

» Liste de scripts | » XP - Options

Posté dans Galerie - RPG Horreur - Menu

Voximilien - posté le 22/09/2016 à 10:48:34. (128 messages postés)

Merci. :)

» Liste de scripts | » XP - Options

Posté dans Screen de la semaine - Enquête dans l'hôpital

Voximilien - posté le 15/08/2016 à 12:57:46. (128 messages postés)

Je ne m'attendais pas à être premier ...
J'ai essayé quelque chose que je ne fais pas d'habitude, et que je maîtrise moins.

Je vais essayer de m'améliorer pour les prochaines fois. ;)

Félicitations aux autres participants également ! :)

» Liste de scripts | » XP - Options

Posté dans Galerie - Balade en forêt

Voximilien - posté le 11/08/2016 à 17:25:58. (128 messages postés)

Je me lasse très facilement du même décor, c'est pourquoi j'essaye de le renouveler un peu en modifiant légèrement quelques décors.

Je ne pense pas que ça se voit au premier coup d’œil quand on ne sait pas si les couleurs diffèrent ou non.

» Liste de scripts | » XP - Options

Posté dans Galerie - Balade en forêt

Voximilien - posté le 11/08/2016 à 14:20:30. (128 messages postés)

@KillianGames : J'ai changé un peu la couleur des arbres avec Photoshop pour diversifier. J'ai ensuite utilisé un calque spécial avec un ton plus orangé sur l'ensemble du tileset.

@Kaniglouton : Merci ! Ouais, j'aime beaucoup la verdure. x)

» Liste de scripts | » XP - Options

Posté dans Galerie - RPG Horreur - Menu

Voximilien - posté le 11/08/2016 à 13:13:50. (128 messages postés)

Merci. :D
J'ai fait ça sur Photoshop ! J'ai récupéré le fond en papier sur Internet, ainsi que les 2 différents WindowSkins, de même pour l’icône d'horloge.

Le Faceset, je l'ai trouvé sur Deviant Art : http://unknown-designer.deviantart.com/art/Faceset-no-21-185012142

J'ai ensuite tout retravailler à l'aide de Photoshop.

» Liste de scripts | » XP - Options

Aller à la page: 1 2 3 4

Haut de page

Merci de ne pas reproduire le contenu de ce site sans autorisation.
Contacter l'équipe - Mentions légales

Plan du site

Communauté: Accueil | Forum | Chat | Commentaires | News | Flash-news | Screen de la semaine | Sorties | Tests | Gaming-Live | Interviews | Galerie | OST | Blogs | Recherche
Apprendre: Visite guidée | RPG Maker 95 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker MV | Tutoriels | Guides | Making-of
Télécharger: Programmes | Scripts/Plugins | Ressources graphiques / sonores | Packs de ressources | Midis | Eléments séparés | Sprites
Jeux: Au hasard | Notre sélection | Sélection des membres | Tous les jeux | Jeux complets | Le cimetière | RPG Maker 95 | RPG Maker 2000 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker VX Ace | RPG Maker MV | Autres | Proposer
Ressources RPG Maker 2000/2003: Chipsets | Charsets | Panoramas | Backdrops | Facesets | Battle anims | Battle charsets | Monstres | Systems | Templates
Ressources RPG Maker XP: Tilesets | Autotiles | Characters | Battlers | Window skins | Icônes | Transitions | Fogs | Templates
Ressources RPG Maker VX: Tilesets | Charsets | Facesets | Systèmes
Ressources RPG Maker MV: Tilesets | Characters | Faces | Systèmes | Title | Battlebacks | Animations | SV/Ennemis
Archives: Palmarès | L'Annuaire | Livre d'or | Le Wiki | Divers