Le deal à ne pas rater :
Jeux, jouets et Lego : le deuxième à -50% (large sélection)
Voir le deal

Aller en bas
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Soucis avec un plugin "More self switches" Empty Soucis avec un plugin "More self switches"

Dim 1 Mai 2016 - 11:29
Alors voila j'aimerais utiliser ce script qui existait sur Ace et qui fonctionnait parfaitement.

Ce plugin permet d'avoir un nombre infini de self switch dans un event à la place de ceux connus (A,B,C et D).

Voici le plugin en question :

Spoiler:

Le problème avec celui-ci c'est que si je créé deux pages la commande de module " SelfSwitch page2 true" active bien la page 2  mais si je désactive cette page sur la page 2 (SelfSwitch page2 false) il ne revient pas à la page 1.

Voici deux screens pour que se soit plus clair :

Soucis avec un plugin "More self switches" 113

Soucis avec un plugin "More self switches" 213


...


Dernière édition par Spy le Jeu 19 Mai 2016 - 22:14, édité 2 fois
tonyryu
tonyryu
Membre

Nombre de messages : 902
Age : 43
Localisation : Près de Nantes
Distinction : aucune
Date d'inscription : 27/05/2010
http://www.tonyryudev.com

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Dim 1 Mai 2016 - 13:36
je regarde ça dès que je peux
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Dim 1 Mai 2016 - 21:40
Merci Tony Smile
Insalestic
Insalestic
Membre

Nombre de messages : 146
Age : 26
Localisation : France Toulon (83)
Distinction : aucune
Date d'inscription : 05/12/2015

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Dim 1 Mai 2016 - 22:36
pourquoi ton RPG MAKER est noir ? :O
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Dim 1 Mai 2016 - 22:39
Je l'ai peint Smile

Soucis avec un plugin "More self switches" Captur12
Insalestic
Insalestic
Membre

Nombre de messages : 146
Age : 26
Localisation : France Toulon (83)
Distinction : aucune
Date d'inscription : 05/12/2015

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Dim 1 Mai 2016 - 23:04
ohoh !! pas mal ! ça fait genre RM MV 2.0  !! Wink je pensais a une mise a jour ! :p

ps : tu sais que je ne trouve pas le menu option ? c'est un trooll ?? xD
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Dim 1 Mai 2016 - 23:07
C'est dans outils.
Insalestic
Insalestic
Membre

Nombre de messages : 146
Age : 26
Localisation : France Toulon (83)
Distinction : aucune
Date d'inscription : 05/12/2015

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Dim 1 Mai 2016 - 23:11
je dois avoir un rpg maker du bled ..... j'ai pas d'option x)

https://gyazo.com/9a25241d908e20d7763dd6f425ab6784
tonyryu
tonyryu
Membre

Nombre de messages : 902
Age : 43
Localisation : Près de Nantes
Distinction : aucune
Date d'inscription : 27/05/2010
http://www.tonyryudev.com

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Lun 2 Mai 2016 - 9:17
faut avoir la version officielle à jour.

Stop HS
tonyryu
tonyryu
Membre

Nombre de messages : 902
Age : 43
Localisation : Près de Nantes
Distinction : aucune
Date d'inscription : 27/05/2010
http://www.tonyryudev.com

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Lun 2 Mai 2016 - 10:00
J'suis pas sur de mon coup, car j'ai pas testé, mais je vois qu'il n'y a pas de transtypage sur l'ajout du selfswitch custom dans la liste de controle :

Essaie de remplacer la dernière fonction par cela, j'ai juste ajouté Boolean devant args[1]

Code:
  Game_Event.prototype.checkCustomSwitch = function(page, code) {
    var args = code.split(":");
    if (args[0] !== null && args[0].toLowerCase() === "switch" && args[1] !== null) {
      page.conditions.selfSwitchCh = Boolean(args[1]);
      page.conditions.selfSwitchValid = true;
    }
  };
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Lun 2 Mai 2016 - 10:35
Merci d'avoir regardé mais maintenant mon event ne passe plus du tout à la page 2 du coup.
tonyryu
tonyryu
Membre

Nombre de messages : 902
Age : 43
Localisation : Près de Nantes
Distinction : aucune
Date d'inscription : 27/05/2010
http://www.tonyryudev.com

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Lun 2 Mai 2016 - 10:50
a putain, mais non, je suis complètement bourré ce matin, j'ai transtypé le nom du switch, remet comme c'était avant. ^_^.

Je vais reproduire le cas de test est passer en débug

Script corrigé, testé, validé :

Code:
//=============================================================================
// More Self Switches
// Author gameus corrigé par Tonyryu
// Version 1.0
//-----------------------------------------------------------------------------
// Intro:
// Allows you to use infinite self switches in any event.
//
// Instructions:
// Place in your plugins folder and save as 'MoreSelfSwitches.js'
//
// To create a custom self switch, you must first check the self switch box
// on any page. Then add a comment at the top of the page and follow the format
//
//    switch:custom_switch_name
//
// After that, use the Plugin Command and call
//
//    SelfSwitch custom_switch_name true/false
//
// Thus allowing as many self switches as you want, with whatever name!
//
// Credits:
// gameus ~ For creating it.
//=============================================================================

/*:
 * @plugindesc Allows for infinite self switches in events.
 * @author gameus
 *
 * @help
 * Instructions:
 * Place in your plugins folder and save as 'MoreSelfSwitches.js'
 *
 * To create a custom self switch, you must first check the self switch box
 * on any page. Then add a comment at the top of the page and follow the format
 *
 *    switch:custom_switch_name
 *
 * After that, use the Plugin Command and call
 *
 *    SelfSwitch custom_switch_name true/false
 *
 * Thus allowing as many self switches as you want, with whatever name!
 */

var GameusScripts = GameusScripts || {};
GameusScripts['MoreSelfSwitches'] = 1.0; 
 
(function() {
  var gameus_SelfSwitch_plugin_command = Game_Interpreter.prototype.pluginCommand;
  Game_Interpreter.prototype.pluginCommand = function(command, args) {
    gameus_SelfSwitch_plugin_command.call(this, command, args);
    if (command.toLowerCase() === "selfswitch") {
      var _switch = args[0];
      var _state  = (args[1].toLowerCase() === "true");
      var _key    = [this._mapId, this._eventId, _switch];
      $gameSelfSwitches.setValue(_key, _state);
    }
  };
 
  var gameus_SelfSwitch_initialize    = Game_Event.prototype.initialize;
  Game_Event.prototype.initialize = function(mapId, eventId) {
    var pages = $dataMap.events[eventId].pages;
    for (i = 0; i < pages.length; i += 1) {
      var page = pages[i];
      for (j = 0; j < page.list.length; j += 1) {
        var command = page.list[j];
        if (command.code === 408 || command.code === 108)
          this.checkCustomSwitch(page, command.parameters[0]);
      }
    }
    gameus_SelfSwitch_initialize.call(this, mapId, eventId);
  };
 
  Game_Event.prototype.checkCustomSwitch = function(page, code) {
    var args = code.split(":");
    if (args[0] !== null && args[0].toLowerCase() === "switch" && args[1] !== null) {
      page.conditions.selfSwitchCh = args[1];
      page.conditions.selfSwitchValid = true;
    }
  };
 })();
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Lun 2 Mai 2016 - 12:26
Super cool je test ca ce soir suis partis au boulot.

Juste une petite question encore est il possible d activer une page d un autre évent sur une autre map ?

Merci.
tonyryu
tonyryu
Membre

Nombre de messages : 902
Age : 43
Localisation : Près de Nantes
Distinction : aucune
Date d'inscription : 27/05/2010
http://www.tonyryudev.com

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Lun 2 Mai 2016 - 13:25
il faudrait faire des ajouts dans le script, mais c'est pas bien méchant.
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Lun 2 Mai 2016 - 13:47
Ca serait super Smile

La version sur Ace faisait cella et c'était bien pratique pour pas mal de choses.
tonyryu
tonyryu
Membre

Nombre de messages : 902
Age : 43
Localisation : Près de Nantes
Distinction : aucune
Date d'inscription : 27/05/2010
http://www.tonyryudev.com

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Lun 2 Mai 2016 - 15:27
en soit, suffit d'ajouter une commande script, dans un event, sous ce format :
Code:
$gameSelfSwitches.setValue([mapID, eventID, nomDuSwitch], etat);

exemple pour activer l'interrupteur local 'page3' de l'eventID 1, sur la map ID 12 :
Code:
$gameSelfSwitches.setValue([12, 1, "page3"], true);

ça devrait fonctionner
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Lun 2 Mai 2016 - 22:04
Ca fonctionne parfaitement merci Tony Smile
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Jeu 19 Mai 2016 - 22:14
J'ai un petit soucis qui apparaît lorsque j'ouvre un menu (n'importe lequel) les "SelfSwitches" ont l'air de se réinitialiser et saute directement à la dernière page de l'event.
tonyryu
tonyryu
Membre

Nombre de messages : 902
Age : 43
Localisation : Près de Nantes
Distinction : aucune
Date d'inscription : 27/05/2010
http://www.tonyryudev.com

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Jeu 19 Mai 2016 - 23:01
tu peux me décrire la manip simple pour reproduire, je regarderai demain
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Jeu 19 Mai 2016 - 23:21
Non mais je viens de tester sans utiliser mon script d'icône au dessus des event et ça fonctionne, je test encore...

Mon plug eventname :
https://github.com/Trivel/RMMV/blob/master/MrTS_EventNames.js
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Ven 20 Mai 2016 - 12:16
bon je ne trouve pas ou est le soucis...

Voici comment faire apparaître le bug en question :

Faire un event avec 4 page :

Soucis avec un plugin "More self switches" 115

Soucis avec un plugin "More self switches" 215

Soucis avec un plugin "More self switches" 314

Soucis avec un plugin "More self switches" 411

Lorsque j'arrive à la page 2 j'ouvre le menu puis je re-clic sur l'event et la il passe de suite à la page 4 sans prendre la page 3 en compte.

...
tonyryu
tonyryu
Membre

Nombre de messages : 902
Age : 43
Localisation : Près de Nantes
Distinction : aucune
Date d'inscription : 27/05/2010
http://www.tonyryudev.com

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Ven 20 Mai 2016 - 12:35
on est bien d'accord qu'il faut également le plugin de nom et d'icone, pour reproduire l'anomalie?
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Ven 20 Mai 2016 - 12:39
Non pas nécessairement après mes tests même sans, le bug apparaît.
tonyryu
tonyryu
Membre

Nombre de messages : 902
Age : 43
Localisation : Près de Nantes
Distinction : aucune
Date d'inscription : 27/05/2010
http://www.tonyryudev.com

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Ven 20 Mai 2016 - 16:42
Essai avec cette version :

Code:
//=============================================================================
// More Self Switches
// Author gameus corrigé par Tonyryu
// Version 1.01
//-----------------------------------------------------------------------------
// Intro:
// Allows you to use infinite self switches in any event.
//
// Instructions:
// Place in your plugins folder and save as 'MoreSelfSwitches.js'
//
// To create a custom self switch, you must first check the self switch box
// on any page. Then add a comment at the top of the page and follow the format
//
//    switch:custom_switch_name
//
// After that, use the Plugin Command and call
//
//    SelfSwitch custom_switch_name true/false
//
// Thus allowing as many self switches as you want, with whatever name!
//
// Credits:
// gameus ~ For creating it.
//=============================================================================

/*:
 * @plugindesc Allows for infinite self switches in events.
 * @author gameus
 *
 * @help
 * Instructions:
 * Place in your plugins folder and save as 'MoreSelfSwitches.js'
 *
 * To create a custom self switch, you must first check the self switch box
 * on any page. Then add a comment at the top of the page and follow the format
 *
 *    switch:custom_switch_name
 *
 * After that, use the Plugin Command and call
 *
 *    SelfSwitch custom_switch_name true/false
 *
 * Thus allowing as many self switches as you want, with whatever name!
 */

var GameusScripts = GameusScripts || {};
GameusScripts['MoreSelfSwitches'] = 1.01; 
 
(function() {
  var gameus_SelfSwitch_plugin_command = Game_Interpreter.prototype.pluginCommand;
  Game_Interpreter.prototype.pluginCommand = function(command, args) {
    gameus_SelfSwitch_plugin_command.call(this, command, args);
    if (command.toLowerCase() === "selfswitch") {
      var _switch = args[0];
      var _state  = (args[1].toLowerCase() === "true");
      var _key    = [this._mapId, this._eventId, _switch];
      $gameSelfSwitches.setValue(_key, _state);
    }
  };
 
  var gameus_Game_Event_event = Game_Event.prototype.event;
  Game_Event.prototype.event = function() {
    var eventTmp = gameus_Game_Event_event.call(this);
    if(eventTmp){
      var pages = eventTmp.pages;
      for (i = 0; i < pages.length; i += 1) {
        var page = pages[i];
        for (j = 0; j < page.list.length; j += 1) {
          var command = page.list[j];
          if (command.code === 408 || command.code === 108)
            this.checkCustomSwitch(page, command.parameters[0]);
        }
      }
    }
    return eventTmp;
  };

  Game_Event.prototype.checkCustomSwitch = function(page, code) {
    var args = code.split(":");
    if (args[0] !== null && args[0].toLowerCase() === "switch" && args[1] !== null) {
      page.conditions.selfSwitchCh = args[1];
      page.conditions.selfSwitchValid = true;
    }
  };
 })();
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Ven 20 Mai 2016 - 16:45
Magnifique bug corrigé merci Tony Smile
Contenu sponsorisé

Soucis avec un plugin "More self switches" Empty Re: Soucis avec un plugin "More self switches"

Revenir en haut
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum