• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Resource icon

Resource Item Maniac Plugin [Essentials v19.1] v1.1.0

eattwo

Rookie
Member
Joined
Nov 9, 2021
Posts
4
eattwo submitted a new resource:

Item Maniac Plugin [Essentials v19.1] - Adds the Item Maniac functionality to PE19.1

This plugin sets up the creation of an Item Maniac easily.

To install the plugin, simply extract the downloaded .zip file into your project root folder.

Plugin details:

View attachment 7455

The items wanted by the Item Maniac are easily set through the event creation (above).
This allows full customizability for any 'rare' items in your game.

Interacting with the item maniac has the defaults set for a Mushroom maniac buying 5x the normal mushroom price, however it...

Read more about this resource...
 

amberstar2604

Rookie
Member
Joined
Dec 17, 2020
Posts
7
Does this work for v18? I haven't tried yet and if not is it possible to make it so? I'm still glad people are adding smallish features to really spice up games.
 

eattwo

Rookie
Member
Joined
Nov 9, 2021
Posts
4
eattwo updated Item Maniac Plugin [Essentials v19.1] with a new update entry:

v1.1.0 Updates

This update increases the ease of customizability of the ItemManiac by having the quote and multiplier changes in the event creation itself rather than changing the script. This also allows multiple ItemManiacs in your game with different quotes and multipliers.

Here is an example of a new ItemManiac. Notice below the item list are three new parameters.
The 6 is the multiplier for this individual maniac
The first quote is the initiation quote by the maniac
The last quote is...

Read the rest of this update entry...
 

eattwo

Rookie
Member
Joined
Nov 9, 2021
Posts
4
Does this work for v18? I haven't tried yet and if not is it possible to make it so? I'm still glad people are adding smallish features to really spice up games.
I don't believe it does - Plugin support started with v19.1 so out of the box this will not be compatible with v18.
However, if you take the script itself it should be able to be modified fairly easily to work with v18... I don't have v18 myself so I'm not entirely sure what exactly needs to be done, but PM me if you have any troubles converting it, if you give me some screenshots of the UI_PokeMart screen I can help walk you through the changes needed.
 

Magic0loc0

Rookie
Member
Joined
Feb 17, 2021
Posts
6
I was able to change this script to a v18 / v18.1 version. I'm no coding expert, so I probably won't be able to help people out if they get stuck, though.

V18 / V18.1 Item Maniac Script:
Expand Collapse Copy
#===============================================================================
#  Sets the ItemManiac prices without a need for another PBS file
#===============================================================================
class ItemManiacAdapter < PokemonMartAdapter 
  def getPrice(item, multiplier, selling = false)
    if $game_temp.mart_prices && $game_temp.mart_prices[item]
      if selling
        return $game_temp.mart_prices[item][1] if $game_temp.mart_prices[item][1] >= 0
      else
        return $game_temp.mart_prices[item][0] if $game_temp.mart_prices[item][0] > 0
      end
    end
    return (pbGetPrice(item)*0.6).round # Set the Item Maniac price increase multiplier in the place of the 0.6. Standard selling price is 0.5.
  end
end

#===============================================================================
#  Removes the automatic /2 price shown through the Scene
#===============================================================================
class ItemManiac_Scene < PokemonMart_Scene
  def pbChooseNumber(helptext,item,maximum,multiplier)
    curnumber = 1
    ret = 0
    helpwindow = @sprites["helpwindow"]
    itemprice = @adapter.getPrice(item,multiplier,!@buying)
    pbDisplay(helptext, true)
    using(numwindow = Window_AdvancedTextPokemon.new("")) {   # Showing number of items
      qty = @adapter.getQuantity(item)
      using(inbagwindow = Window_AdvancedTextPokemon.new("")) {   # Showing quantity in bag
        pbPrepareWindow(numwindow)
        pbPrepareWindow(inbagwindow)
        numwindow.viewport = @viewport
        numwindow.width = 224
        numwindow.height = 64
        numwindow.baseColor = Color.new(88, 88, 80)
        numwindow.shadowColor = Color.new(168, 184, 184)
        inbagwindow.visible = @buying
        inbagwindow.viewport = @viewport
        inbagwindow.width = 190
        inbagwindow.height = 64
        inbagwindow.baseColor = Color.new(88, 88, 80)
        inbagwindow.shadowColor = Color.new(168, 184, 184)
        inbagwindow.text = _INTL("In Bag:<r>{1}  ", qty)
        numwindow.text = _INTL("x{1}<r>$ {2}", curnumber, (curnumber * itemprice).to_s_formatted)
        pbBottomRight(numwindow)
        numwindow.y -= helpwindow.height
        pbBottomLeft(inbagwindow)
        inbagwindow.y -= helpwindow.height
        loop do
          Graphics.update
          Input.update
          numwindow.update
          inbagwindow.update
          self.update
          if Input.repeat?(Input::LEFT)
            pbPlayCursorSE
            curnumber -= 10
            curnumber = 1 if curnumber < 1
            numwindow.text = _INTL("x{1}<r>$ {2}", curnumber, (curnumber * itemprice).to_s_formatted)
          elsif Input.repeat?(Input::RIGHT)
            pbPlayCursorSE
            curnumber += 10
            curnumber = maximum if curnumber > maximum
            numwindow.text = _INTL("x{1}<r>$ {2}", curnumber, (curnumber * itemprice).to_s_formatted)
          elsif Input.repeat?(Input::UP)
            pbPlayCursorSE
            curnumber += 1
            curnumber = 1 if curnumber > maximum
            numwindow.text = _INTL("x{1}<r>$ {2}", curnumber, (curnumber * itemprice).to_s_formatted)
          elsif Input.repeat?(Input::DOWN)
            pbPlayCursorSE
            curnumber -= 1
            curnumber = maximum if curnumber < 1
            numwindow.text = _INTL("x{1}<r>$ {2}", curnumber, (curnumber * itemprice).to_s_formatted)
          elsif Input.trigger?(Input::C)
            pbPlayDecisionSE
            ret = curnumber
            break
          elsif Input.trigger?(Input::B)
            pbPlayCancelSE
            ret = 0
            break
          end
        end
      }
    }
    helpwindow.visible = false
    return ret
  end
end

#===============================================================================
#  Screen specific for the ItemManiac
#===============================================================================

class ItemManiacScreen < PokemonMartScreen

  def initialize(scene,stock)
    @scene = scene
      @stock = stock
      @adapter = ItemManiacAdapter.new
  end

  def pbSellScreenManiac(multiplier)
    item=@scene.pbStartBuyOrSellScene(false,@stock,@adapter)
    loop do
      @scene.pbShowMoney
      item=@scene.pbChooseBuyItem
      break if item==0
      itemname=@adapter.getDisplayName(item)
      price=@adapter.getPrice(item,true)
      qty=@adapter.getQuantity(item)
      if qty==0
        pbMessage(_INTL("It looks like you don't have any {1}...",PBItems.getNamePlural(item)))
        next
      end
      @scene.pbShowMoney
      if qty>1
        qty=@scene.pbChooseNumber(
           _INTL("Alright. So how many {1} would you like to sell?",PBItems.getNamePlural(item)),item,qty,multiplier)
      end
      if qty==0
        @scene.pbHideMoney
        next
      end
      price*=qty
      if pbConfirm(_INTL("I can pay you ${1} for that. Sounds good?",price.to_s_formatted))
        @adapter.setMoney(@adapter.getMoney+price)
        qty.times do
          @adapter.removeItem(item)
        end
        pbDisplayPaused(_INTL("You handed over the {1} and received ${2}.",itemname,price.to_s_formatted)) { pbSEPlay("Mart buy item") }
        @scene.pbRefresh
      end
      @scene.pbHideMoney
    end
    @scene.pbEndSellScene
  end
end

#===============================================================================
#  Initializes the ItemManiac conversation
#===============================================================================
def pbItemManiac(stock,multiplier=5,initiate_speech="Fantastic! Don't worry, I will pay extra for any treasures you sell me!",end_speech="No problem! You know where to find me if you want to sell more treasures.")
  # This is the text when you initiate a conversation with the item maniac. Change it however you see fit.
  pbMessage(_INTL(initiate_speech))
  for i in 0...stock.length
    stock[i] = getID(PBItems,stock[i])
    if !stock[i] || stock[i]==0 ||
       (pbIsImportantItem?(stock[i]) && $PokemonBag.pbHasItem?(stock[i]))
      stock[i] = nil
    end
  end
  stock.compact!
  scene = ItemManiac_Scene.new
  screen = ItemManiacScreen.new(scene,stock)
  screen.pbSellScreenManiac(multiplier)
  # This is the text when you stop talking to the item maniac. Change it however you see fit.
  pbMessage(_INTL(end_speech))
  $game_temp.clear_mart_prices
end
 
Back
Top