Day.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

Sorties: Star Trek: Glorious Wolf - (...) / Sorties: Dread Mac Farlane - episode 3 / News: Plein d'images cools créées par (...) / Sorties: Star Trek: Glorious Wolf - (...) / Jeux: Final Fantasy 2.0 / Chat

Bienvenue
visiteur !




publicité RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions légales

340 connectés actuellement

29189806 visiteurs
depuis l'ouverture

4857 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

RPG Maker Détente

ConsoleFun

Tashiroworld

Le Comptoir Du clickeur

Lunae - le bazar d'Emz0

Tous nos partenaires

Devenir
partenaire



forums

Index du forum > Entraide > [RPG Maker MZ] Je cherche désespérément un plugin pour la stamina


Hannaele - posté le 27/07/2021 à 17:46:29 (1 messages postés)

❤ 0

Domaine concerné: Plugin
Logiciel utilisé: RPG Maker MZ

Bonjour tout le monde !


Excusez moi de vous déranger, mais je suis à la recherche d'un plugin pour avoir une barre de stamina. Je viens de commencer un petit jeu d'horreur et j'aurai vraiment besoin d'un plugin...Je ne sais pas du tout comment faire de script alors un plugin serait vraiment appréciable ! Après si vous savez comment faire un script je ne dis pas non à de l'aide....

Bonne journée à vous !


Hannaële




esziaprez game - posté le 27/07/2021 à 20:55:14 (441 messages postés)

❤ 0

Je suis dans le game !

Une barre de stamina comment ? Basé sur la jauge de hp ? Une variable ?
Est-ce qu'elle doit empêcher de courir ou le déplacement tout cours ?

Projet en cours: INRAL / En pause :NEOTORI /// Pause : L'ANKH DE KINBRA /// Pause : GRASS SHOPPER  /// GALERIE


Saka - posté le 27/07/2021 à 21:22:07 (17831 messages postés) - modero -

❤ 0

Réalisateur de chez Lidl

Citation:

Excusez moi de vous déranger

Tu es sur un forum d'entraide, ce serait quand-même bizarre que poser une question dérange qui que ce soit :tirlalangue2

Réalisateur ça veut dire que je fais des films. Viens les voir si tu l'oses. | ༼ つ ◕_◕ ༽つ | Saka ressuscite les angles morts. | Gloria Papoum 1, 2, 3 | ( ͡° ͜ʖ ͡°) | L'avenir se demande ce que Saka lui réserve. | Père Clochard | Saka a dépucelé la forêt vierge. | Viens découvrir les coutumes Oniromanciennes. | (ง ͠° ͟ل͜ ͡°)ง | Coucou, tu veux voir mon site ? | ꀎ 囧


esziaprez game - posté le 27/07/2021 à 23:27:58 (441 messages postés)

❤ 0

Je suis dans le game !

Non je demande juste pour savoir comment mieux te repondre. N'y vois aucune critique.
Je viens de poster un projet de script dans la partie script (logique) et une partie correspond justement à ça donc je me disait que ca pouvais peut être faire l'affaire.
C'est tout

C'est ma faute mon message manquait de toute forme de politesse. Bonsoir ;-)

J'ai extrait les lignes qui concernent cet aspect uniquement mais justement mon script fonctionne peut être de manière un peu compliqué parce qu'il prend en compte les HP et les MP pour établir la capacité limite de dash (c'est lié au gameplay de mon jeu) et l'agilité pour definir la vitesse de remplissage. Il inscrit un gauge en déduction directement sur la jauge de HP qui s'affiche aussi. En plus je l'ai fait pour faire beaucoup d'autres trucs du coup il pourrait être beaucoup plus condensé et avec moins de fonctions.

Si tu me dit exactement le fonctionnement de ta gauge je te fais un script sur mesure ça va m'aider à adapter mon script et a créer les bon script call, plugin command et les paramètres de plugin pour qu'il puisse fonctionner avec n'importe quel type de gameplay.

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
Game_System.prototype.initialize                                        = function() {
        this.GFS_runActivate = false;
        this.gaugesVisible = true;
        _aliasGFS._gamSys_init.call(this);
};
Game_System.prototype.GFS_getHudX                                       = function() {
        return 16;
}
Game_System.prototype.GFS_getHudY                                       = function() {
        return 16;
}
// -> Character
Game_Character.prototype.initialize                                     = function() {
    _aliasGFS._gamChar_init.call(this);
        this.GFS_waitDash = 0;
};
// -> Can move ?
Game_Player.prototype.canMove                                           = function() {
        return _aliasGFS._gamPlay_canMov.call(this);
}
Game_Player.prototype.GFS_isStaminaOk                                           = function() {
        if($gameParty.leader().mp <= Math.floor($gameParty.leader().mmp/5) || $gameParty.leader().mp < $gameParty.leader().hp /5)
                return false;
    return true;
}
//-> Dash Stamina
Game_Player.prototype.GFS_updateStamina                         = function() {
        if(this.GFS_waitDash <= 0){
        
                var _agi = Math.round($gameParty.leader().agi/10);
                
                if($gameParty.leader().mp <= $gameParty.leader().mmp && $gamePlayer.isDashing())
                        $gameParty.leader().gainMp(Math.min(-5, -7 + _agi));
                
                else
                        if(!$gamePlayer.isMoving())
                                $gameParty.leader().gainMp(Math.max(2, Math.round(_agi / 4)));
                        else
                                $gameParty.leader().gainMp(Math.max(1, Math.round(_agi / 4)));
                this.GFS_waitDash = 10;         
        }else
                this.GFS_waitDash--;
};
//-> can Run
Game_Map.prototype.isDashDisabled                                       = function() {
        if(!$gamePlayer.GFS_isStaminaOk() || !$gameSystem.GFS_runActivate)
                return true;
    return _aliasGFS._gamMap_isDashDis.call(this);
};
// -> Hud
Scene_Map.prototype.GFS_getAntilagTime                                  = function(){
        return 600; //lapse de temps entre chaque rafraichisssement du hud pour eviter le lag (en frames)
}
Scene_Map.prototype.start                                                       = function() {
    _aliasGFS._scenMap_star.call(this);
        this.GFS_createHUD();
};
Scene_Map.prototype.GFS_createHUD                                       = function(id) {
        this._Hud1 = new GFS_Hud();
        this._Hud1.opacity = 0;
        this.addChild(this._Hud1);
};
Scene_Map.prototype.GFS_updateHud                                       = function(){
        if(this.GFS_waitHud == this.GFS_getAntilagTime()){
                this.updateHud
                this.GFS_waitHud = 0;
        }else
                this.GFS_waitHud++;
};
// -> draw life + stamina
Window_Base.prototype.hudLifeFillPadding                        = function(x, y) {
        return  0;
}
Window_Base.prototype.GFS_drawGiletFill                         = function(x, y, width) {
        var _giletValue = $gamePlayer.GFS_getPlayerArmorValue();
        var _x = x - _giletValue;
        var _width = width + _giletValue * 2;
        var height = 6 + _giletValue * 2;
        var _y = y - _giletValue;
        this.contents.fillRect(_x, _y, _width, height, this.textColor(9));
};
Window_Base.prototype.GFS_drawLife                                      = function() {
        var _w = this.hudUsableWidth();
        var _x = this.hudBasePadding() + this.hudLifeFillPadding();
        var _y = this.hudBasePadding() + this.getInHudPosX() + this.getInHudPosY();
        if($gamePlayer.GFS_getPlayerArmorValue() > 0)
                this.GFS_drawGiletFill(_x, _y , _w);
    this.GFS_drawLifeFill(_x, _y,  _w);
        this.GFS_drawStaminaFill(_x, _y, _w);
        
}
Window_Base.prototype.GFS_drawLifeFill                          = function(x, y, width) {
    var color1 = this.hpGaugeColor1();
    var color2 = this.hpGaugeColor2();
    this.drawGauge(x, y, width, $gameParty.leader().hpRate(), color1, color2);
};
Window_Base.prototype.GFS_drawStaminaFill                       = function(x, y, width) {
        var _width = $gameParty.leader().hpRate() * width;
        var rate = $gameParty.leader().mpRate();
        var _y = this.lineHeight() - 32 + y;
        var fillW = Math.floor(_width * rate);
        var _x = _width - fillW + 6 + x;
        
    var color1 = this.tpGaugeColor2();
    var color2 = this.tpGaugeColor1();
        this.contents.gradientFillRect(_x, _y, fillW, 6, color1, color2);
};
Window_Base.prototype.GFS_drawHealthFill                        = function(x, y, width, height, value) {
        var _h = height || 6;
        var _rate =  width * (value / 100);
    var color1 = this.GFS_getDynamicColor(_rate + 0.1);
    var color2 = this.GFS_getDynamicColor(_rate);
        var fillW = Math.floor(_rate);
        
    this.contents.fillRect(x, y-4, width, _h, this.gaugeBackColor());
    this.contents.gradientFillRect(x, y-4, fillW, _h, color1, color2);
};
Window_Base.prototype.GFS_getDynamicColor                       = function(rate) {
        if(rate > 0.8)
                n = 11;
        else if(rate > 0.4)
                n = 3;
        else if(rate > 0.2)
                n = 21;
        else
                n = 10;
        return this.textColor(n);
};
 
//GS HUD
function GFS_Hud(){
    this.initialize.apply(this, arguments);
};
GFS_Hud.prototype                                                                       = Object.create(Window_Base.prototype);
GFS_Hud.prototype.initialize                                            = function() {
        this.GFS_x = this.getOutHudPosX();
        this.GFS_y = this.getOutHudPosY();
        this.GFS_xDest = this.getInHudPosX();
        this.GFS_yDest = this.getInHudPosY();
        this.GFS_content = 0;
        this.GFS_totalWidth = 228;
    Window_Base.prototype.initialize.call(this, this.getInHudPosX(), this.getInHudPosY(), 275, 226);
        this._padding = 0;
        this.GFS_refreshCounter = 0;
        this.refresh();
        this.GFS_cursor = 0;
        this.minimapZoom = 7;
        this.expVisu = 0;
        this.loadHudColorBitmap();
};
// -> getter
Window_Base.prototype.getOutHudPosX                             = function() {
        return $gameSystem.GFS_getHudX()-100;
};
Window_Base.prototype.getOutHudPosY                             = function() {
        return $gameSystem.GFS_getHudY();
};
Window_Base.prototype.getInHudPosX                                      = function() {
        return $gameSystem.GFS_getHudX();
};
Window_Base.prototype.getInHudPosY                                      = function() {
        return $gameSystem.GFS_getHudY();
};
 
// GFS HUD
// -> Refresh
GFS_Hud.prototype.GFS_counterAntiLag                            = function() {
        if(this.GFS_refreshCounter < 4){
                this.GFS_refreshCounter++;
                return false;
        };
        this.GFS_refreshCounter = 0;
        return true;
};
GFS_Hud.prototype.refresh                                                       = function() {
        if($gameSystem.GFS_HudNeedRefresh() && this.GFS_counterAntiLag()){
                this.contents.clear();
                if($gameSystem.GFS_hudVisible() > 0)
                        this.visible = true;
                else
                        this.visible = false;
                this.contents.fontSize = 12;
                this.opacity = 0;
                this.padding = 0;
                this.changeTextColor(this.systemColor());
                this.refreshHud();
        };
};
GFS_Hud.prototype.refreshHud                                            = function() {
        this.refreshHudChange();
        this.refreshPosition();
        this.refreshHudType();
};
GFS_Hud.prototype.refreshHudChange                                      = function() {
                if(this.isHudOut()){
                        this.visible = true;
                        this.GFS_cursor = 0;
                        this.setMoveInHud();
                        $gameSystem.GFS_setHudVisible($gameSystem.GFS_getHudForcedContent(), true);
                }else if(this.isHudIn()){
                        this.setMoveOutHud();
                }
};
GFS_Hud.prototype.isHudOut                                                      = function() {
        return this.GFS_x == this.getOutHudPosX() && this.GFS_y == this.getOutHudPosY();
};
GFS_Hud.prototype.isHudIn                                                       = function() {
        return this.GFS_x == this.getInHudPosX() && this.GFS_y == this.getInHudPosY();
};
// -> Position
GFS_Hud.prototype.refreshPosition                                       = function() {
        var _spd = this.getHudMoveSpeed();
 
        if(this.GFS_x < this.GFS_xDest){
                this.GFS_x = Math.min(_spd + this.GFS_x, this.GFS_xDest);
        }
        
        if(this.GFS_y < this.GFS_yDest){
                this.GFS_y = Math.min(_spd + this.GFS_y, this.GFS_yDest);
        }
        
        if(this.GFS_x > this.GFS_xDest){
                this.GFS_x = Math.max(this.GFS_x - _spd, this.GFS_xDest);
        }
        
        if(this.GFS_y > this.GFS_yDest){
                this.GFS_y = Math.max(this.GFS_y - _spd, this.GFS_yDest);
        }
};
GFS_Hud.prototype.getHudMoveSpeed                                       = function() {
        return 50;
};
GFS_Hud.prototype.setMoveOutHud                                         = function() {
        this.GFS_xDest = this.getOutHudPosX();
        this.GFS_yDest = this.getOutHudPosY();
};
GFS_Hud.prototype.setMoveInHud                                          = function() {
        this.GFS_xDest = this.getInHudPosX();
        this.GFS_yDest = this.getInHudPosY();
};
GFS_Hud.prototype.refreshHudType                                        = function() {
        this.GFS_drawLayer();
        this.refreshHpFil();
};
GFS_Hud.prototype.refreshHpFil                                          = function() {
        this.GFS_drawLife();
};



Projet en cours: INRAL / En pause :NEOTORI /// Pause : L'ANKH DE KINBRA /// Pause : GRASS SHOPPER  /// GALERIE

Index du forum > Entraide > [RPG Maker MZ] Je cherche désespérément un plugin pour la stamina

repondre up

Suite à de nombreux abus, le post en invités a été désactivé. Veuillez vous inscrire si vous souhaitez participer à la conversation.

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