[ACE] DISABLING CERTAIN DEFAULT FUNCTIONS

Posts

Pages: 1
Hey there, space cats!

So here's the thing: I'm trying to get rid of a couple of things that come in default with Ace's scripts. I'm not picky about how these get solved -- I've just been trying to find where they are in the default scripts so I can comment them out, myself. If you don't want to write something to fix it, just show me roughly where it is so I can get rid of it.


both of the things I want to get rid of are included in this screenshot! tiles c/o the wonderful DE.

First off! SOLVED! TDS and Trihan are bros. MakoInfused too!

In the default scripts, the key item selection menu displays the quantity of key items next to their name; in the above screenshot, it's that little flixel-looking thing because the font I was using. I've fixed that bit, don't worry about it. I don't know who this made sense to, but I don't need my player to know how many of a single key item they have -- after all, no two items are really alike! So I'd like to know how I can stop the game from writing an item's quantity next to its name in the key item selection dialogue. I've already tried tooling around in Window_ItemList a bit, and commented out this section that looked particularly promising:

  def draw_item_number(rect, item)
draw_text(rect, sprintf(":%2d", $game_party.item_number(item)), 2)
end

... But it didn't seem to work. Obviously the key item choice menu does things a little differently, but damned if I can find the specifics. Any clues are very much appreciated!

Aaand second! This too!

You know how the selection cursor fades in and out in menus? Yeah, that's crap. I'm making something that pretends it's a game boy game, so I can't have things fading in and out as if they have an alpha channel. So I'd like to know how I can make the selection cursor simply solid. Full opacity. Etc. I've done some poking around in places like Window_Selectable, but so far I can't find anything that even looks like it involves opacity. This is far from necessary, but I'd also like to know where little "waiting for player input" arrow on dialogue windows is handled -- that fades in too rather than just appearing, and it bugs me a little. That's more of a bonus, though.

I'm being really vague here and I apologize, but I'm not a programmer by any stretch -- I can make a Haxe script that prints the words "im dr butt", but that's literally it. If there's anything I can add to make this clearer for anyone who's interested, just lemme know.

Thanks for your time! Kiss kiss.
You have to comment out the line, not the whole segment to remove the drawing of the item number.

#==============================================================================
# ** Window_ItemList
#------------------------------------------------------------------------------
#  This window displays a list of party items on the item screen.
#==============================================================================

class Window_ItemList < Window_Selectable
  #--------------------------------------------------------------------------
  # * Draw Number of Items
  #--------------------------------------------------------------------------
  def draw_item_number(rect, item)
#    draw_text(rect, sprintf(":%2d", $game_party.item_number(item)), 2)
  end
end


As for the fading of the window parts, sadly I think those are part of the hidden class. The best solution in that case would be to create sprites you can manipulate to replace them in the window class.
Oh, duh. My mistake! Thank you.

As for the second part, I'd been intending to do that using Yanfly's cursor script, but it doesn't seem to want to show up in places like the key item menu or dialogue choice boxes. Are there any alternatives you might recommend?
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
For your first quandary, all we have to do is overload the draw_item method of Window_KeyItem. Add the following somewhere below the default scripts but above main:

class Window_KeyItem < Window_ItemList
def draw_item(index)
item = @data[index]
if item
rect = item_rect(index)
rect.width -= 4
draw_item_name(item, rect.x, rect.y, enable?(item))
end
end

Your issue with the cursor and player input arrow is going to be slightly more complex since the basic processing of these things is done in the base class Window, the code of which isn't actually contained in Ace's script editor. However, if you remove the calls to the update method for the cursor and arrow you can code in your own static ones instead. Although I pretty much know how I'd do that it's too late at night for me to explain it so hopefully someone else will take that one on, but if not I'll take a stab at it tomorrow. :P

Edit: Curse you TDS, beating me to the punch! I would point out though that your solution will prevent item quantities in EVERY item list window, whereas mine will do it only in key items. ;)
Your first solution to your first problem is actually correct. However, you most likely have custom scripts which will still overwrite the changes you make in the default scripts. As such you would have to make a copy of the changes you make and move it over to the bottom of your custom scripts.

However, making that change in Window_ItemList would not be wise, as it will affect the regular item window as well. Instead, you can just use this little thing I've whipped up:

#==============================================================================
# ** Window_KeyItem
#------------------------------------------------------------------------------
#  This window is used for the event command [Select Item].
#==============================================================================

class Window_KeyItem < Window_ItemList

  #--------------------------------------------------------------------------
  # * Draw Number of Items
  #--------------------------------------------------------------------------
  def draw_item_number(rect, item)
    # Don't draw an amount for this window
  end
  
end

Your second and bonus problem is not nearly as easy to solve as you might think. Those fade in/out features are built into the hidden Window class. Altering them would require a great deal more effort. I would recommend just looking for a cursor script, I know that Victor Sant has made one, you might want to look that up. However, you'll definitely be needed a custom script to handle that issue.

Edit: WOW, you guys are fast-- you can ignore what I said, basically. LOL.
Hahaha, thank you all! MakoInfused, you're actually right -- I was ignoring that I had Yanfly's core engine installed, which has its own little blurb for writing an item's quantity. This game doesn't have a regular item menu, so I don't mind losing that functionality.

I'll give Victor's script a look, thanks! It's kind of ridiculous to me that there are hidden classes at all, but I suppose there are some things they don't want people messing with... I'll report back if it solves things, but until then, Trihan, I'll be looking forward to hearing from you! Thanks for going to the trouble.
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
Just a bit of bonus info before I go to bed: I found the code for the Window class online, but it doesn't seem to be possible to overload it in the script editor. I tried messing around with the cursor and draw methods but there was no change in the actual game.

Oh well, the way I was originally thinking of to achieve what you're looking for should still work.
Aaand it looks like Victor's script works for my purposes! Thanks again for your help, everyone -- this was way more painless than I had been thinking.
Cool, glad it worked out for you. I'm also happy I was at least some help, lol.
Pages: 1