질문과 답변

Extra Form
종류 플러그인 사용

 

 https://avangs.info/kin/1819133

에서 이어지는 질문입니다(아직도 답이 안나와서...)


일단 플러그인 전문 올려둡니다


 /*:
 *
 * @plugindesc Shows Multiple Messages Simultaneously
 * @author Jake Jilg "mogwai"
 *
 *
 *  When any of these tags are used, the tag will override default Top/Middle/Bottom
 *
 *  Use tags \[top] \[middle] \[bottom] on the same line to show text at the same time.
 * \[bottom]Hello, how are you doing?\[top]¿Hola cómo estás?
 * 
 * Optional tag parameters (only needed on first line) (must be in this order)
 * 
 * \[pos hue:R,G,B] \[top face:FaceName,Index,HueRotate] face hueRotate is optional
 *
 * example \[middle hue:155,0,250 face:People4,2,150]
 *
 * version 0.3
 */

// ------- globals -------

var subWindowLayer;

var messageWindowBottom = {};
var messageWindowMiddle = {};
var messageWindowTop = {};

var simultaneousAquisition = [];

var okGetNum = {
 "bottom": 2,
 "middle": 1,
 "top"   : 0
};

var okGetFace = {
 2 : [],
 1 : [],
 0 : []
};

var okGetTone = {
 2 : [0,0,0],
 1 : [0,0,0],
 0 : [0,0,0]
};

// ------ aliases ----

// create three window children
(function(alias){
 Scene_Base.prototype.createWindowLayer = function() {
  alias.apply(this, arguments);
  var width = Graphics.boxWidth;
  var height = Graphics.boxHeight;
  var x = (Graphics.width - width) / 2;
  var y = (Graphics.height - height) / 2;
  
  subWindowLayer = this._windowLayer;
 };
})(Scene_Base.prototype.createWindowLayer);

// add our two new message window siblings
(function(alias){
 Scene_Map.prototype.createMessageWindow = function() {
  alias.apply(this, arguments);
  
  messageWindowBottom = this._messageWindow;
  messageWindowMiddle = new Window_Message();
  messageWindowTop    = new Window_Message();
  
  // the mainChild is the reactor
  messageWindowBottom._isMainChild = true;
  messageWindowMiddle._isMainChild = false;
  messageWindowTop._isMainChild    = false;
  
  subWindowLayer.addChild(messageWindowTop);
  subWindowLayer.addChild(messageWindowMiddle);
  
  messageWindowBottom._positionType = 2;
  messageWindowMiddle._positionType = 1;
  messageWindowTop._positionType    = 0;
  };  
})(Scene_Map.prototype.createMessageWindow);

// when they clear, we clear too $gameMessage.clear
(function(alias){
 Game_Message.prototype.clear = function() {
  
  alias.apply(this, arguments);
  if(this.positionType() !== undefined)
   simultaneousAquisition = [this.positionType()];
  else
   simultaneousAquisition = [];
  okGetFace = {
   2 : [],
   1 : [],
   0 : []
  };
  okGetTone = {
   2 : [0,0,0],
   1 : [0,0,0],
   0 : [0,0,0]
  };
 };
})(Game_Message.prototype.clear);

// look for sign to simul-text $gameMessage.add
(function(alias){
 Game_Message.prototype.add = function() {
  
  var pe = simultaneousAquisition;
  if(pe.indexOf($gameMessage.positionType()) === -1)
   pe.push($gameMessage.positionType());
  
  arguments[0] = arguments[0].replace(
  /\\\[(top|middle|bottom)( hue:([\d,]+))?( face:([^\]]+))?]/g,
  function(m, tag, m2, hue, m3, face){
   
   $gameMap._interpreter._waitCount += 5;
   
   if(m2 !== undefined){
    var hues = hue.split(",");
    for(var i = 0; i < hues.length; i++){
     hues[i] = parseInt(hues[i]);
    }
    okGetTone[okGetNum[tag]] = hues;
   }
   
   if(m3 !== undefined){
    okGetFace[okGetNum[tag]] = face.split(",");
   }
   
   if(pe.indexOf(okGetNum[tag]) === -1)
    pe.push(okGetNum[tag]);

   // lets hope this string doesn't come up in-game (it's used to parse)
   return "xThIsTx4G03sOn(" + okGetNum[tag] + "):";
   //      ^ sloppy yet functional
  });
  alias.apply(this, arguments);
    };
})(Game_Message.prototype.add);

// when I close, you close... just like that..
(function(alias){
 Window_Message.prototype.close = function() {
  $gameMap._interpreter._waitCount += 5;
  if(this._isMainChild){
   messageWindowMiddle.close();
   messageWindowTop.close();
  }
  alias.apply(this, arguments);
  
  this.isMakeMessage = false;
 };
})(Window_Message.prototype.close);

// when I open, you close... just like that..
(function(alias){
 Window_Message.prototype.open = function(textState) {
  var pe = simultaneousAquisition;
  if(pe.indexOf(this._positionType) !== -1)
   alias.apply(this, arguments);
 };
})(Window_Message.prototype.open);

// I want to look pretty for my window message
(function(alias){
 Window_Message.prototype.updateTone = function() {
  var tone = okGetTone[this._positionType] || [];
  if(tone.length > 0){
   this.setTone(tone[0]||0, tone[1]||0, tone[2]||0);
  }else{
   alias.apply(this, arguments);
  }
 };
})(Window_Message.prototype.updateTone);

// a unique face for a unique monicker
(function(alias){
 Window_Message.prototype.drawFace =function(faceName, faceIndex, x, y, width, height){
  var face = okGetFace[this._positionType];
  
  if(face.length === 0)
   return alias.apply(this, arguments);
  
  var punim = face[0] !== undefined ?
   face[0] : $gameMessage.faceName();
  var faceIndex = face[1] !== undefined ?
   parseInt(face[1]) - 1 : $gameMessage.faceIndex();
  var hue =   face[2] !== undefined ?
   parseInt(face[2]) : 0;
  
  width = width || Window_Base._faceWidth;
  height = height || Window_Base._faceHeight;
  var bitmap = ImageManager.loadFace(punim, hue);
  var pw = Window_Base._faceWidth;
  var ph = Window_Base._faceHeight;
  var sw = Math.min(width, pw);
  var sh = Math.min(height, ph);
  var dx = Math.floor(x + Math.max(width - pw, 0) / 2);
  var dy = Math.floor(y + Math.max(height - ph, 0) / 2);
  var sx = faceIndex % 4 * pw + (pw - sw) / 2;
  var sy = Math.floor(faceIndex / 4) * ph + (ph - sh) / 2;
  
  var contents = this.contents;
  bitmap.addLoadListener(function(){
   contents.blt(bitmap, sx, sy, sw, sh, dx, dy);
  });
 };
})(Window_Message.prototype.drawFace);


// ------ overwrites -------

// 3 endings for 1

Window_Message.prototype.updateMessage = function() {

 var top = messageWindowTop._textState || this._textState;
 var mid = messageWindowMiddle._textState || this._textState;;
 var bot = messageWindowBottom._textState || this._textState;;
 
 var pe = simultaneousAquisition;
 if(pe.indexOf(0) === -1)
  mid = this._textState;
 if(pe.indexOf(1) === -1)
  top = this._textState;
 
    if (this._textState) {
        while (!this.isEndOfText(this._textState)) {
            if (this.needsNewPage(this._textState)) {
                this.newPage(this._textState);
            }
            this.updateShowFast();
            this.processCharacter(this._textState);
            if (!this._showFast && !this._lineShowFast) {
                break;
            }
            if (this.pause || this._waitCount > 0) {
                break;
            }
        }
        if (this.isEndOfText(bot) && this.isEndOfText(mid) && this.isEndOfText(top)) {
            this.onEndOfText();
        }
        return true;
    } else {
        return false;
    }
};

// 3 message starts for 1
Window_Message.prototype.startMessage = function() {
 
 var text = $gameMessage.allText();
 if(text.match(/xThIsTx4G03sOn\(\d\):/) !== null){
  var txt = text.split(/xThIsTx4G03sOn/g);
  var text = "";
  for(var i = 0; i < txt.length; i++){
   if(txt[i].charAt(1) === (this._positionType+""))
    text += txt[i].substr(4) + "\n";
  }
  text = text.replace(/\n{2}/g,"\n");
 }
 this.isMakeMessage = true;
 
 if(this._isMainChild){
  if(!messageWindowMiddle.isMakeMessage){
   messageWindowMiddle.pause = false;
   messageWindowMiddle.startMessage();
  }
  if(!messageWindowTop.isMakeMessage){
   messageWindowTop.pause = false;
   messageWindowTop.startMessage();
  }
 }
   
    this._textState = {};
    this._textState.index = 0;
    this._textState.text = this.convertEscapeCharacters(text);
    this.newPage(this._textState);
    this.updatePlacement();
    this.updateBackground();
  this.open();
};

// each window has it's own position type
Window_Message.prototype.updatePlacement = function() {
    //this._positionType = $gameMessage.positionType();
    messageWindowBottom._positionType = 2;
 messageWindowMiddle._positionType = 1;
 messageWindowTop._positionType    = 0;
 
    this.y = this._positionType * (Graphics.boxHeight - this.height) / 2;
    this._goldWindow.y = this.y > 0 ? 0 : Graphics.boxHeight - this._goldWindow.height;
};

// if we move the windows to $gameMessage.positionType(), they overlap
Window_Message.prototype.areSettingsChanged = function() {
    return (this._background !== $gameMessage.background());
            //this._positionType !== $gameMessage.positionType()
};


 

 설명: 메시지 창에 \[top], \[middle],\[bottom]이란 단어를 달면 메시지가 해당 지역으로 이동되어 출력됨(자세한 사항은 링크 참조)


지금껏 발견한 오류(빨간색이 가장 중요, 나머진 중요도 낮음):

1. 창의 위치가 아래가 아니라면 아래윈도우도 같이 나옴(텍스트 입력시 아래도 같은 텍스트)

2. 창의 위치가 같다면 다음 메세지가 바로 나오나 이 플러그인을 켜두면 닫히고 다시 열려 출력됨

3. 모든 커멘드는 창의 위치가 아래에 위치해 있을 때만 제대로 출력됨 창의

만일 창의 위치가 중간이나 위 일때 커멘드를 입력, 예를 들어 "아...\[bottom]아..."(위치는 중간) 이렇게 입력했을 경우

중간 위치의 나와야 될 '아'는 나오지도 않고 아래에서만 '아'가 나옴


제발 이것좀 해결해 주세요 지금 번역기로 겨우 쳐서 포럼에 질문까지 달아봤는데 아무도 관심이 없어요!!!



 

 

 

■ 질문전 필독!
  • 질문할 내용이 이 게시판이나 강좌에 이미 있는지 확인합니다.
  • 하나의 게시물에는 하나의 질문만 합니다.
  • 제목은 질문의 핵심 내용으로 작성합니다.
  • 질문 내용은 답변자가 쉽게 이해할 수 있도록 최대한 상세하게 작성합니다.
  • 스크립트의 전문이 필요할 경우 txt 파일 등으로 첨부해 주시기 바랍니다.
  • 답변받은 게시물은 삭제하지 않습니다.
  • 답변이 완료된 경우 해당 답변해주신 분들께 감사의 댓글을 달아줍니다.
    • 처음 오신 분들은 공지 게시물을 반드시 읽어주세요!

※ 미준수시 사전경고 없이 게시물을 삭제합니다.

Comment '1'
  • ?
    무명시절 2020.07.31 00:36

    2번은 해결 했습니다
    모든 $gameMap._interpreter._waitCount += 5;를 $gameMap._interpreter._waitCount += 0;으로바꿨더니 해결 되더군요
    3번은 안해주셔도 상관 없으니 1번만 어떻게 해주세요!!!


List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12391
게임 배포 RMMV 배포용 패키지 생성 실패 file Bakana 2021.08.31 141
게임 배포 RMVXA 일본어로 만들어진 게임을 깨지지 않게 배포하려면 어떻게 하나요? 2 퐁이 2022.01.02 275
게임 배포 게임찾기 용의모험 이라는 게임을 찾습니다 심떡 2023.07.10 36
게임 배포 RMMV mv 체험판 배포 되나요 4 나이아드 2022.07.24 145
게임 배포 RMXP 게임 파일 깔끔하게 만드는 법 1 file 세계제일미소년 2022.07.24 132
게임 배포 RMMV 사용한 소재만 배포시 문제점 무명시절 2023.02.04 48
게임 배포 RMMZ 여러분들 게임 파일 단일화 어떤 프로그램으로 하시나요? 하라아아암 2023.11.22 22
게임 배포 RMMZ 구글 드라이브에 올리면 게임이 작동하지 않는 문제. 하라아아암 2023.12.10 30
게임 번역 기타 만약에 게임 한글판/영문판을 동시에 제작한다고 하면, 어떻게하는게 제일 효율적일까요? 2 티안타 2021.03.30 119
게임 번역 기타 최근에 나오는 울프툴 게임은 한글화가 불가능한가요? file 아모건 2020.05.30 256
게임 번역 RMVXA 쯔꾸르 게임 번역 중 질문이 있어서 글 올립니다. 1 file note노트 2019.02.26 515
게임 번역 RMMV Mv번역관련 질문입니다 2 언암티드 2019.06.19 333
게임 번역 RMVXA 번역을 옮기고 싶습니다 ㅠㅠㅠㅠㅠ 숭구리 2019.10.10 159
게임 번역 RMVX 일본어 암호창을 한글로 어떻게 바꾸나요? 1 file 아모건 2020.05.16 156
게임 번역 RMVXA 아랄트랜스로 vx ace 쯔꾸르 게임 하는데 글자크기가 왜이리 큰거죠? 실브더 2020.11.05 268
게임 번역 RM2k3 혹시 쯔꾸르 2003 AT코드가 따로 있나요 Y4D 2020.09.12 110
게임 번역 RMMV MV 게임내 기본 메뉴 언어 변경 문의 2 file 엘드로드 2021.03.17 187
게임 번역 RMVXA 게임을 한글화 해보고 싶은데 RGSS301 같은 경우에는 어떻게 복호화해야하나요? file 갓첨 2021.03.28 128
게임 번역 RM2k rpg maker 2000으로 만든 게임을 번역하고 싶습니다 3 번역하고싶 2021.06.13 364
게임 번역 RMMV 타이틀 메뉴 공백 제발 해결좀ㅠ file 나메크성인 2022.12.13 143
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 82 Next
/ 82