TRIHAN'S PROFILE

Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
Sidhe Quest
When everything goes wrong, it's up to our heroes to go and do a bunch of other stuff!

Search

[VXA] Script help: Message boxes in scenes other than map

Okay, this is driving me absolutely nuts so hopefully someone will know the answer.

I'm currently working on a script request for a friend where he needs shops to track what items are sold, and unlock new items depending on what you've sold to the shop. That part works perfectly, yay!

However, I also added a message box that tells you which items were unlocked (so that you know what shiny new toys you just got, obviously). The problem is that although the message box appears, the shop is still active and pressing enter doesn't get rid of the message. I need input for the shop to wait until the message box is done with, but no matter what I try I can't seem to figure out how.

Here's the code I have so far:

$imported = {} if $imported.nil?
$imported['cshop'] = true

puts 'Load: Shop script by Clyve'

module CSHOP
  
  module REGEXP
    ITEM_REQ = /<require ([IWA])(\d+), (\d+)>/i
  end
  
end

class RPG::ShopSales
  #------------------------
  attr_accessor :item_sales
  attr_accessor :weapon_sales
  attr_accessor :armor_sales
  #------------------------
  def initialize
    # arrys that track how many each item has been sold. index = item id
    @item_sales   = []
    @weapon_sales = []
    @armor_sales  = []
  end
end
    
class Scene_Shop < Scene_MenuBase
    
  alias :shopsales_prepare :prepare
  def prepare(goods, purchase_only)
    shopsales_prepare(goods, purchase_only)
    add_available_goods
  end
  
  alias :shopsales_start :start
  def start
    shopsales_start
    @message_window = Window_Message.new
  end
    
  def add_available_goods
    # CHECK NOTETAGS AND WHETHER $data_shopsales's DATA IS ENOUGH
    # FOR THE ITEMS TO BE AVAILABLE OR NOT, THEN ADD THE ITEM TO @goods
    # IF ITS AVAILABLE.
    # @goods is an array with three values
    # @goods[0] is either 0, 1, or 2.
    #    0 is Items ($data_items)
    #    1 is Weapons ($data_weapons)
    #    2 is Armors ($data_armors)
    # @goods[1] is the index of the item.
    # @goods[2] is a different price than the one in the database, it needs to
    # be set to 0 for it to use the price in the database
    for i in 1...$data_items.size
      if !$data_items[i].sell_req.empty?
        include = true
        for req in $data_items[i].sell_req
          if req[0] == 0
            if $data_shopsales.item_sales[req[1]] < req[2]
              include = false
            end
          elsif req[0] == 1
            if $data_shopsales.weapon_sales[req[1]] < req[2]
              include = false
            end
          elsif req[0] == 2
            if $data_shopsales.armor_sales[req[1]] < req[2]
              include = false
            end
          end
        end
        @goods.push([0, i, 0]) if include == true
      end
      # This is where you'll use @goods[0]
    end
    for i in 1...$data_weapons.size
      if !$data_weapons[i].sell_req.empty?
        include = true
        for req in $data_weapons[i].sell_req
          if req[0] == 0
            if $data_shopsales.item_sales[req[1]] < req[2]
              include = false
            end
          elsif req[0] == 1
            if $data_shopsales.weapon_sales[req[1]] < req[2]
              include = false
            end
          elsif req[0] == 2
            if $data_shopsales.armor_sales[req[1]] < req[2]
              include = false
            end
          end
        end
        @goods.push([1, i, 0]) if include == true
      end
      # This is where you'll use @goods[1]
    end
    for i in 1...$data_armors.size
      if !$data_armors[i].sell_req.empty?
        include = true
        for req in $data_armors[i].sell_req
          if req[0] == 0
            if $data_shopsales.item_sales[req[1]] < req[2]
              include = false
            end
          elsif req[0] == 1
            if $data_shopsales.weapon_sales[req[1]] < req[2]
              include = false
            end
          elsif req[0] == 2
            if $data_shopsales.armor_sales[req[1]] < req[2]
              include = false
            end
          end
        end
        @goods.push([2, i, 0]) if include == true
      end
      # This is where you'll use @goods[2]
    end
  end
    
  # Increase Items of Type Sold
  alias :shopsales_do_sell :do_sell
  def do_sell(number)
    shopsales_do_sell(number)
    added_items = []
    case item_type
    when 0
      $data_shopsales.item_sales[@item.id] += number
      # This is where you'll use @goods[0]
    when 1
      $data_shopsales.weapon_sales[@item.id] += number
      # This is where you'll use @goods[1]
    when 2
      $data_shopsales.armor_sales[@item.id] += number
      # This is where you'll use @goods[2]
    end
    for i in 1...$data_items.size
      if !$data_items[i].sell_req.empty?
        include = true
        for req in $data_items[i].sell_req
          if req[0] == 0
            if $data_shopsales.item_sales[req[1]] < req[2]
              include = false
            end
          elsif req[0] == 1
            if $data_shopsales.weapon_sales[req[1]] < req[2]
              include = false
            end
          elsif req[0] == 2
            if $data_shopsales.armor_sales[req[1]] < req[2]
              include = false
            end
          end
        end
        if include == true && !@goods.include?([0, i, 0])
          @goods.push([0, i, 0])
          added_items.push($data_items[i].name)
        end
      end
    end
    for i in 1...$data_weapons.size
      if !$data_weapons[i].sell_req.empty?
        include = true
        for req in $data_weapons[i].sell_req
          if req[0] == 0
            if $data_shopsales.item_sales[req[1]] < req[2]
              include = false
            end
          elsif req[0] == 1
            if $data_shopsales.weapon_sales[req[1]] < req[2]
              include = false
            end
          elsif req[0] == 2
            if $data_shopsales.armor_sales[req[1]] < req[2]
              include = false
            end
          end
        end
        if include == true && !@goods.include?([1, i, 0])
          @goods.push([1, i, 0])
          added_items.push($data_weapons[i].name)
        end
      end
    end
    for i in 1...$data_armors.size
      if !$data_armors[i].sell_req.empty?
        include = true
        for req in $data_armors[i].sell_req
          if req[0] == 0
            if $data_shopsales.item_sales[req[1]] < req[2]
              include = false
            end
          elsif req[0] == 1
            if $data_shopsales.weapon_sales[req[1]] < req[2]
              include = false
            end
          elsif req[0] == 2
            if $data_shopsales.armor_sales[req[1]] < req[2]
              include = false
            end
          end
        end
        if include == true && !@goods.include?([2, i, 0])
          @goods.push([2, i, 0])
          added_items.push($data_armors[i].name)
        end
      end
    end
    if !added_items.empty?
      $game_message.add("Thanks! I can now sell you the following items:")
      added_items.each_with_index do |item, i|
        if i < added_items.size - 1
          $game_message.add("#{item}, ")
        else
          $game_message.add("#{item}")
        end
      end
      @message_window.update
    end
  end
    
  # Checks Item Type of @item
  def item_type
    if @item.is_a?(RPG::Item)
      return 0
    elsif @item.is_a?(RPG::Weapon)
      return 1
    elsif @item.is_a?(RPG::Armor)
      return 2
    end
  end
end
    
module DataManager
    
  # Initialize Shop Sales data
  class <<self; alias shopsales_load_database load_database; end
  def self.load_database
    shopsales_load_database
    $data_shopsales = RPG::ShopSales.new
    load_item_notetags
    init_shopsales_data
  end
  
  def self.load_item_notetags
		groups = [$data_items, $data_weapons, $data_armors]
		for group in groups
			for obj in group
				next if obj.nil?
				obj.load_item_notetags
			end
		end
		puts "Read: Item Requirements Notetags"
	end
    
  def self.init_shopsales_data
    for index in 0..$data_items.size
      $data_shopsales.item_sales[index] = 0
    end
    for index in 0..$data_weapons.size
      $data_shopsales.weapon_sales[index] = 0
    end
    for index in 0..$data_armors.size
      $data_shopsales.armor_sales[index] = 0
    end
  end
    
  # Dump Shop Sales data into save file
  class <<self; alias shopsales_make_save_contents make_save_contents; end
  def self.make_save_contents
    shopsales_make_save_contents
    contents[:shopsales] = $data_shopsales
    contents
  end
    
  # Load Shop Sales data from save file
  class <<self; alias shopsales_extract_save_contents extract_save_contents; end
  def self.extract_save_contents(contents)
    shopsales_extract_save_contents(contents)
    if contents[:shopsales]
      $data_shopsales = contents[:shopsales]
    else
      $data_shopsales = RPG::ShopSales.new
      init_shopsales_data
    end
  end
end

class RPG::BaseItem
  attr_reader :sell_req
  def load_item_notetags
    @sell_req = []
		@note.split(/[\r\n]+/).each do |line|
			case line
			when CSHOP::REGEXP::ITEM_REQ
        case $1
        when "I"
          @sell_req.push([0, $2.to_i, $3.to_i])
        when "W"
          @sell_req.push([1, $2.to_i, $3.to_i])
        when "A"
          @sell_req.push([2, $2.to_i, $3.to_i])
        end
      end
		end
	end
end

If anyone can offer any insight on how to suppress input for a scene while a message is showing (and for that matter how to get the message box to recognise input) I would be really appreciative.

Paper Mafia

An air of excitement is permeating through the Mushroom Kingdom as every Goomba, Shy Guy and Lakitu makes their way to an enormous plaza on which a stage has been hastily constructed by Bowser, who had nothing better to do that day.

"Hey, what's going on?" asks a Goomba who isn't up to speed on his current affairs.

A Koopa Troopa stops his carefree amble towards the plaza, looking the Goomba up and down critically. "Dude, haven't you heard? The heroes and villains of the Mushroom Kingdom are putting on a righteous show for us!"


That's right folks. Saddle up your Spineys and get ready for the show of the century! Get ready for...



The heroes and villains of the Mushroom Kingdom line up on stage to the wild applause of the fans. Most, if not all, of the familiar faces are there. Mario gets a microphone and begins to speak.

"Ladies and-a gentlemen and-a Boos of all ages! Thank-a you so much for-a coming to our show!"

At this point someone else gets sick of the way I type Mario's Italian accent and takes the microphone from him.

"Here's the deal. We're gonna have a mock battle, and then you guys can vote on which of us you think gave the worst performance. We're gonna take it in turns, and then-"

Suddenly, a dense fog covers the stage! Everyone is shrouded in impenetrable mist! The villains take this opportunity to whisk all of the audience members onto the stage too and then switch places with some of them! Nobody knows who anybody else is! It's chaos! It's--it's--

Your cue to get discussing and voting.

Hero phase 1 has begun. It will end at 6:00pm GMT on April 30th.

PLAYER LIST (will be updated as players die)

chana (ejected day 5, audience member)
Zeuzio (ejected night 3, audience member)
MirrorMasq
SorceressKyrsty
Marrend
MrChearlie
Shinan (ejected day 2, hero)
Ark (modkilled day 2, audience member)
CAVE_DOG_IS_BACK
Little Wing Guy (ejected day 3, villain)
Gourd_Clae
pyrodoom (ejected day 1, hero)
Dudesoft (ejected night 2, audience member)
ldida1 (ejected day 4, audience member)
Lily (dropped out day 2, villain)
Despite (ejected night 1, villain)
Yellow Magic (ejected night 5, hero)
rabitZ (ejected night 4, hero)
theyellowjester_ (ejected night 1, audience member)

The anagram game!

Here's how it works:

1. Go here http://freespace.virgin.net/martin.mamo/fanagram.html

2. Find an entertaining anagram of your name.

3. Post it, along with a picture if you feel like drawing one.

The best anagram I could find of my name was "I'll coup Jr offhand" and I can't draw that, so this game is off to a flying start!

Mafia round 3 sign-ups!

Trihan presents...



In the interests of keeping metagaming shenanigans to a minimum, all you're getting before the game starts is that it's a ruleset based on Paper Mario. There are some pretty neat mechanics in there that should keep things interesting.

If you want to play, speak now or forever hold your Peach.

SIGNUPS SO FAR:

chana
Zeuzio
MirrorMasq
SorceressKyrsty
Marrend
MrChearlie
Shinan
Ark
CAVE_DOG_IS_BACK
Little Wing Guy
Gourd_Clae
pyrodoom
Dudesoft
ldida1
Lily
Despite
Yellow Magic
rabitZ
theyellowjester

An open letter to jomarcenter

Since jomarcenter posted Future Helper and the Seven Towers, and I made a Let's Play video of it, I have spent the time since watching his antics on here and on the rmrk forums.

One thing that has become painfully clear is that he is completely immune to criticism and suggestions to improve. He is also oblivious to sarcasm and responds to every sarcastic comment with an invitation to add theories about Future Helper to his wiki.

So I'm taking a stand. This has to stop.

jomarcenter, I will not sugar-coat this. You are a terrible developer. You are not passable, or even just bad, you are terrible.

Note that I do not say this to offend you. In fact, I want you to acknowledge this because it seems to be the only way to convince you that people are honestly trying to help you improve. That and I figured this would be funny.

Even for being a game made in two weeks, Future Helper is awful. You didn't really produce anything of notable substance; in fact, if it weren't for the bad dialogue and Engrish I wouldn't really have had anything to comment on in my videos.

Your insistence that your game would definitely win the Crash Course contest was an insult to everyone else who entered. Your insistence on rmrk that their contest have a full version of VX Ace as a prize was downright rude. You're a selfish, arrogant person, and I'm calling you out for it.

I'm no stranger to making bad things--in fact I've done it myself. The difference is, when people told me it was bad what I did NOT do was post forty blog posts a day detailing features I will never have in my game (i.e. online battles). Nor did I make a Facebook page, a Wiki, a McDonalds Happy Meal toy line, a straight-to-DVD movie, an e-book, and a range of sex toys based on my game.

Aside from not realising that your game sucks and we've all been mocking you for it, you posted an absolutely godawful April Fools "prank" which fooled absolutely nobody. Rather than accepting your defeat with good grace, you then had the audacity to post a massive jpg telling us to get our facepalm on or whatever because guess what? YOU TOTALLY TROLLED US. And then posted a list of people who "fell for it". I don't believe for a second that anyone genuinely believed you made a game that could "control real life". You can't even make a game that can control Alex's.

I'll be the first to admit that my obsession with you lately has bordered on stalkerish, and it's really starting to annoy me that your ridiculous antics have taken up so many of my brain cycles.

I am really, really frustrated, because if you only stopped to take on board what people were saying you might actually have the beginnings of a decent project on your hands. If you actually thought about what your characters were saying and doing. If you actually put some effort into your plot. If you didn't treat what you have right now like it's worthy of having an "e-book" version (which is basically just the game with no graphics. Don't make me start lecturing you on how a book should be written) or even a Facebook page.

How many popular games from the RM community have a Facebook page? Some have wikis, but that's after they've proven themselves as worthy titles and usually the wikis were made by fans, not the creator.

You need to stop living in a bubble, jomarcenter. You need to realise you're not god's gift to games creation, and unless you do, you'll always wallow in mediocrity. I want you to get better. I honestly want nothing more than to see a version of Future Helper that people actually ENJOY. (changing the title might be a decent start).

And above all, you need to stop having some kind of community superiority complex over the rest of us. It will not make you any friends.

Return of the OneHour

I'll cut right to the chase: I want OneHour back.

For those of you who don't know, OneHour is a contest we used to run on IRC. Someone comes up with a topic for that week (say, that all games have to have Engrish dialogue) and we all then spend one hour creating a game for that topic. At the end of the hour, we upload them for everyone to play, and then we take a vote on which one was best. The winner of a OneHour decides the topic for the next one, and so on.

It was a lot of fun, and I miss something silly to do every week. Would anyone be interested in reviving this?

The grand "Trihan breaks down and asks for help" topic!

Okay, so.

Some of you will know me, some of you will not. For the purposes of this topic, it's probably better if you don't, but I digress.

I've been part of the RM community since 2001, as more or less "Trihan". In 1999 I started developing my game, which was then and is still called Tundra. It's about a world that's turning to ice. I had a demo out in like 2004 which sucked balls.

Anyway, I have always prided myself on my ability to do most of the work myself. I'm a good writer, a passable spriter, and a decent musician.

However, years of apathy, perfectionism, and lack of practice have resulted in my abilities in most areas slipping somewhat, to the point where I'm no longer confident that I can complete this project on my own. It's become bigger than I am, but I still want to get it out there. I firmly believe that a majority of the community will enjoy the story I want to tell in this game.

And that's where you lot come in.

I need...basically whatever I can get. Mappers, artists, musicians, writers, sounding boards, playtesters, you name it. I'm no longer too proud to accept help where help is available, and I've realised that I'm not going to finish this game without it. I really want to finish this game.

So what can I offer as an incentive? Well, not much, really. Having started this thing in goddamn QBasic there have been more versions of Tundra than I've had hot dinners, and the majority of it exists in text files and the depths of my subconscious. I can't really show screenshots, or give you a demo.

However, I do have the bulk of the story done already, and will be more than happy to share the concept and major events with anyone who's interested in helping me out (and I'm always open to suggestions). I'll also be more than happy to give details of system/gameplay ideas I have for the purposes of determining whether you think this sounds worth the effort.

TL;DR: I've got a lot of ideas and not a lot of substance. I want to add the substance so I can focus on new ideas, and I've had enough of doing it by myself.

I hope for the sake of the limited reputation I've built up over the years that I'll get some interest in this, but if not at least I tried.

WIP midis: opinions please!

Hi all, been a while since I last posted here.

I just got back into composing midis after a hiatus of far-too-long, and I'm looking for some critique on the three pieces I'm working on at the moment. Bear in mind these are works in progress (though the relative melodies are pretty much final) so instrument choice and notes here and there can easily be changed if anything sounds off. Here they are:

Chilly Reception
Frost-rimed Blade
Travelling the Frozen Wastes

Please let me know what you think and be honest. I've got a thick skin, I can take it. If these are utterly shit and I should just give up composing and go sweep roads, tell me. :P

Skill cast delay in VX

Does anyone know if there's a script for VX (that's compatible with Yanfly's Engine Melody) that allows you to specify delays for skills? Delays by number of turns would do I guess, but what I really want is specific timed delays for a real-time battle system. If anyone can point me in the right direction, I'd be eternally grateful.