Opposite of \lastGet (Plugin Edit)

Status
Not open for further replies.

tale

Volunteer
Veteran
Joined
Dec 16, 2016
Messages
709
Reaction score
1,194
First Language
English
Primarily Uses
N/A
I try editing "Last Get" Text plugin for an opposite counterpart, "Loss Get"

About "Last Get" Text plugin-
When using \lastGet in Text, it'll display icon and item name in message.

Features
- Shows icon and item name in text
- Also include text for gold increase

Example-


For "Loss Get"
On event page, I subtracted a potion by 1
Then Show Text: You lose \lossGet !
Also subtracted gold by this amount -1234
Follow by Show Text: You lost \lossGet !

However \lossGet appears like this in Text Window.
"You lose !"
"You lost !"
On \lossGet, the name and the icon suppose to show.

Note: Quantity of potion is more than 1 from the start. "Last Get" isn't affected.
"Last Get" and "Loss Get" appears to work together, there are no error popups.

\lastGet (original) download:
https://www.dropbox.com/s/oywgu4213fvaucf/Torigoya_TextLastGet.js?dl=1

\lossGet (edited) download:
https://www.dropbox.com/s/8otag963x9pd9bh/Torigoya_TextLossGet.js?dl=1

Edits I done are cheap with changing variable phrases.
Maybe the issue has something to do with this line?
Code:
if (amount < 0) {
 

Magnus0808

Software Developer
Veteran
Joined
Feb 2, 2019
Messages
147
Reaction score
166
First Language
Danish
Primarily Uses
RMMV
Hi, you have a couple of mistakes. The largest one is you accidently called 'Window_Base.prototype.processEscapeCharacter' for Window_Base.prototype.processEscapeCode. Which means that it wouldn't even process '\lossGet'.

The other mistake isn't as obvious. You use 'Game_Party.prototype.loseItem' instead of 'Game_Party.prototype.gainItem'. This may seem weird, but the 'Change Items' event command calls 'Game_Interpreter.prototype.command126' which calls 'Game_Party.prototype.gainItem' here you should actually use 'if (amount < 0) {' as when you lose an item the amount is negative in 'gainItem'. :)
 

tale

Volunteer
Veteran
Joined
Dec 16, 2016
Messages
709
Reaction score
1,194
First Language
English
Primarily Uses
N/A
Shoot, I forgot to update dropbox link with the project js file with "Window_Base.prototype.processEscapeCharacter" change. Thanks for pointing that out.

Ah, it's fine to use 'if (amount < 0) {' when 'Game_Party.prototype.gainItem' is called. Not much to edit other than setting \lossGet, amount > to < 0.

Thank you for the explanation :) Able to get \lossGet showing.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,224
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,015
Members
137,563
Latest member
MinyakaAeon
Top