TRIHAN'S "MAKE ME A SCRIPT" TOPIC!

Posts

Adon237
if i had an allowance, i would give it to rmn
1743
i am currently making an adventure info window, don't need help with the actual script at the moment, but since you seem to have ruby knowledge, super runs a method of the same name in the nearest higher class, correct?

so something like:

class papabear
def eat_honey
print "is eating honey"
end
end

class babybear < papabear
def eat_honey
super
print "yawns"
end
end

the super in the class babybear would run the eat_honey thing from the class papabear as well as whatever is after the super?

super appears to be very useful, and in the small scripts i have written i have only guessed it's use and tend to avoid it

Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
super calls the method of the same name from the parent class, yes.
Adon237
if i had an allowance, i would give it to rmn
1743
okay, could it call a method of the same name in a 'grandparent' class?
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
If the parent class doesn't have that method, it'll use the one from the grandparent since the parent inherited it. If the parent class does have it, it'll call the parent's one. I don't think there's a way to "skip" a generation.
author=Trihan
Still working on it! I've had some frustrating issues I'm trying to work around, mainly that I'd rather show the image inside the existing map name window than suppress the default. If need be I'll just replace the whole thing, but I'm trying to do it as unobtrusively as possible.


OK. :D I just wanted to make sure you didn't forget about it. XD I'm not going to rush you. :)
Despite
When the going gets tough, go fuck yourself.
1340
how about a script that through a switch call can turn all window transparencies off and on.

I'm not talking about just message windows, I'm talking about all windows, in menu, or in combat.

I'd appreciate it greatly.

(for rpgmaker vx)
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
Shouldn't actually be too hard if I'm thinking about this right. Two seconds and I'll see if I can whip something up.

Edit: Do you mean just the back transparent or removing the border as well?
Adon237
if i had an allowance, i would give it to rmn
1743
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
# Toggleable Adventure Info Window
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
# Description:
# The purpose of this script is to create a window showing information in a
# window like Gold, their current location, playtime, custom variables, etc.
# This window would be toggleable, meaning that if you press a button it shows
# up and if you press the same button it disappears.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#

class Window_AdventureInfo < Window_Base
def initalize(x, y, width, height)
# okay
self.opacity = 150
self.z = 350 # need to keep window above parallaxes
@text = "" # inserting crap into this
super(x, y, width, height) # maybe this should be first
refresh #actually puts stuff in da window
end # initalize

def refresh
contents.clear # this should remove what was in the former window for updates
@text += "\n[0]'s Party
" # how do you make a line break?
gold = $game_party.gold
@text += gold # yeah screw me
draw_text_ex(0, 5, @text) # draws text with control codes enabled
end # refresh
end # Window_AdventureInfo

class Scene_Map < Scene_Base
@moonshiner = false
# how to get it to dispose properly without undisposed windows error
def adventure_show
@adv_window = Window_AdventureInfo.new(0, 360, 123, 46)
end

def dispose_adventure_window
@adv_window.dispose
end #dipose_adventure_window
def dispose
contents.dispose unless disposed?
end
def update
super
$game_map.update(true)
$game_player.update
$game_timer.update
@spriteset.update
update_scene if scene_change_ok?
if Input.trigger?(:Y)
if @moonshiner == true
dispose_adventure_window
@moonshiner = false
else
adventure_show
@moonshiner = true
end
end
end
end #Scene_Map
Sorry to bother you again, but I have p. much finished the Window Script to my ability. I don't really care about the window size and the actual text at this moment, but I do have a problem. Whenever the window disposes, it gives me an error on line 83 of Window_Base, where it says 'super'. (this is ACE)

I obviously did something wrong, can you point out to me what it was?
Despite
When the going gets tough, go fuck yourself.
1340
author=Trihan
Shouldn't actually be too hard if I'm thinking about this right. Two seconds and I'll see if I can whip something up.

Edit: Do you mean just the back transparent or removing the border as well?


Removing it all. Border, everything. The entire Window.png should just turn to 0% opacity. In battle, in the menu, everywhere. But it can be toggled back on with turning the switch the script is assigned to back on.
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
Adon: Rather than the way you're doing it now, create the window in Scene_Map by default (rather than only doing it if a flag is false) and set its visible property to false. When closing the display, set the window's visible property to false instead (and conversely, when opening it, set visible to true). Only dispose it in the dispose method. That way you'll never end up trying to do anything to a non-existent window and you will only need one instance of the window.
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
Don't say I never give you anything Despite.

module TRI_WT_CONFIG

TRANS_SWITCH = 1;
end

class Window_Base < Window
include TRI_WT_CONFIG
alias tri_wt_initialize initialize
def initialize(x, y, width, height)
tri_wt_initialize(x, y, width, height)
if $game_switches[TRANS_SWITCH] == true
self.back_opacity = 0
self.opacity = 0
end
end
end

class Window_Message < Window_Selectable
include TRI_WT_CONFIG
alias tri_wt_reset_window reset_window
def reset_window
tri_wt_reset_window
if $game_switches[TRANS_SWITCH] == true
self.opacity = 0
self.back_opacity = 0
end
end
end
Despite
When the going gets tough, go fuck yourself.
1340
Hi, could you teach me how to make a custom design menu for RPG Maker VX Ace? I have a design I want to implement, but I'm not sure how to code it or start with it...
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
I wondered when you would show up here. :P

I saw your mockup, but I'll need a bit more info. Can you explain exactly what each part is/does and the functionality you need from it?
author=Trihan
I wondered when you would show up here. :P

I saw your mockup, but I'll need a bit more info. Can you explain exactly what each part is/does and the functionality you need from it?


Sorry bout that. The menu has 2 parts, the items on the left and the party list at the right.

The menu items on the left have their own screens, except 'party' which uses the main screen instead.
The image on top (The one with the word "Menu" and some Japanese characters behind it) changes according to the menu you are in (so if you're accessing the "Items" menu, it will display "Items" instead of "Menu". The whole thing is an image).
As for the "Party" menu item, it allows the user to manage the active party through the party list on the right. The party list on the right has 2 parts, (1)active party list and (2)all party members. The active party list contains the Protagonist (which can never leave the party list and will always be on the first cell), followed by a max of 3 party members. The bottom part is a little bit tricky. There will be a part in game that you can dismiss and employ new party members and list them on the roster. If the party member on that list is put on the active party list, it will display the word "Summoned" instead of displaying the stats.
The "Bunshin" item menu is a bit complicated, which I will show later...
The "Status" item menu is something I haven't designed yet...
"Config" is optional.

The party list on the right is a bit complicated. It will display the name, level, current HP, and current MP of the party member on the list. I noticed that the highlight for the party list is just a simple white rectangle, which, if possible, I want to avoid. Instead, I would prefer to have the selected item to move a little to the left indicating that it is highlighted. The same action can be done on the menu items (but on the other direction).

As for the background, the one that I'm planning to implement is a static background with a moving fog background, but I can work with just a static background and static fog.

I have all the images if you need them, and if you're interested in looking at the Bunshin item menu, let me know. :-)

Thanks sooooooooooo much. :-)
Whaddup doe. Is offer still good? How complicated is it to make a 'Datalog/Codex/Encylopedia' type thing accessible from the menu that offers the player information on the game?

Barring that, how hard is it to improve the enemy AI? In FFVI you have fun stuff like the enemy doing 'X in response to action Y', enemies that act depending on how many other enemies are on the field, enemies that heal their allies, all that good stuff.


RPG Maker VX Ace by the way.
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
shiningriver: Basically I would do that by making sprite objects for all the on-screen elements, placing them where they need to be, and coding custom update methods for when you press arrow keys, esc, enter etc.

I'm not sure whether you're just looking for advice on implementing it yourself or just want someone to write it for you, but for what's essentially a complete menu system rewrite I would have to charge you if you wanted me to just make it for you.

Feldschlacht: Not hard at all. Making custom windows is a piece of cake and you can show pretty much anything you want in them. Slotting new options into the menu takes seconds.

As for enemy AI, depends on how sophisticated you want to make it. If you can figure out the logic behind it, you can probably code it. I could quite easily do enemies that heal the most damaged ally, won't use a spell on a hero if they've used it before and it turned out said hero absorbed the spell's element etc.
How would make a "2-handed" weapon for a class that can dual wield? It seems that Seal Shield tag doesn't work for that, allowing them to equip two "2-handed" weapons at a time.

Also, on the subject, can a dual wielder be restricted in such a way that they can only dual wield weapons of the same type? ie- they can equip 2 guns or 2 swords, but not a sword and a gun at the same time.
Adon237
if i had an allowance, i would give it to rmn
1743
Fomar's Dual Wield - Free Hands script
The following code by Fomar allows for two handed weapons among other things. (Credit him) Hopefully he doesn't have a problem with me posting a link to his site :o
Adon237
if i had an allowance, i would give it to rmn
1743
double post