Galv has a 'Superman' script you may want to check out if you want the player to fly.
Ruby/RGSSx questions that don't deserve their own thread
RGSSx Script SupportWow what? really? This is really amusing because everything I ask since to have a script and I feel sorry at the same time because I'm always asking something that has an obvious answer. Sorry 😮
Can you put symbols into note tags, or do you have to use text? Is there any benefit to using symbols instead of a string in this case?
Text in note tags is just a string, unless you are placing the symbol there at run-time, I believe. Strings are easier to alter, whereas symbols are ... pretty difficult to change (.to_s, .string_function_here, .to_sym, etc).
that's what I needed to know. Thanks 🙂
Note-tags are (mainly) used for data input. It is more important to consider whether strings or symbols are more appropriate for whatever you're parsing the note-tags for (eg: using them as hash keys)
it's more to give a meaningful way to enter data - like putting in down, left, right, up instead of 2, 4, 6, 8 - but with values and meanings that are not so well known as those.
quick question, which part and stat does drop rate for items in? I want to upgrade my script about Luxury items and I was thinking how would it affect drop rates. It only has gold double ATM.
Only the "double drop rate" feature affects it.
Nothing else matters in this case.
Nothing else matters in this case.
Is there a way to maximize or change that drop rate? I mean for example we have a mob:
Giant Troll
Drops:
Orpheus no Udewa (1 / 999)
So if the character equips a Luxury Item and kills the Giant Troll, in what way should I make the script change that drop rate 999 to something like 1 / 20? Its like gaining more chance for the player to get that rare item.
Hello, i have a question about array. If test is an array:
How can i sort the array "test", by power variable (the second one)? Thanks
Code:
test= [] for i in 0..$items.size-1 id = $items[i].id power= $items[i].power test.push([id,power]) end
How can i sort the array "test", by power variable (the second one)? Thanks
The approach I used in my DropItem Sets is to assign a droprate to each "set" of items using conditions to determine which set is used (as opposed to each specific item). So basically I add an extra layer of abstraction to handle drops. To illustrate, it looks like this, where you have "Item" which is an enemy's drop, and a "Box" which is the custom object I defined
Item ---> [Box containing Item] <--- probability of obtaining BoxIf you want to change the droprate for a specific item through other means, you can look at the relevant Game_Enemy methods and look at where the droprate is used and think of a way to change the droprate.
test.sort_by {|elmt| elmt[1]}
So I found this:
All I have to do is to let it detect that if I have those items in hand, I will change the rate of the drop, right?
What does the $game_party.drop_item_double? ? 2 : 1 exactly mean? I can't understand it just yet. It works for all monsters, am I right?
#-------------------------------------------------------------------------- # ● ドロップアイテムの配列作成 #-------------------------------------------------------------------------- def make_drop_items enemy.drop_items.inject([]) do |r, di| if di.kind > 0 && rand * di.denominator < drop_item_rate r.push(item_object(di.kind, di.data_id)) else r end end end #-------------------------------------------------------------------------- # ● ドロップアイテム取得率の倍率を取得 #-------------------------------------------------------------------------- def drop_item_rate $game_party.drop_item_double? ? 2 : 1 end
What does the $game_party.drop_item_double? ? 2 : 1 exactly mean? I can't understand it just yet. It works for all monsters, am I right?
If just means if there's double drop rate then it returns 2, otherwise it returns 1.
That applies to all drops, not just a particular drop.
That applies to all drops, not just a particular drop.
Is there a script call for Ace to open the menu on a specified option, rather than using 'Open Menu Screen' and having it open on the first thing on the list?
If you add this little snippet:
class Window_MenuCommand < Window_Command #-------------------------------------------------------------------------- # * Set Command Selection Position (Class Method) #-------------------------------------------------------------------------- def self.set_command_position(symbol) @@last_command_symbol = symbol endendyou can put this into a Call Script command:
and it'll set the cursor over the Equip command. You can then do the same for any other command symbol.And of course, you can change set_command_position in both the script and the call to something much shorter if you'd rather it all fit on a single line 🙂
class Window_MenuCommand < Window_Command #-------------------------------------------------------------------------- # * Set Command Selection Position (Class Method) #-------------------------------------------------------------------------- def self.set_command_position(symbol) @@last_command_symbol = symbol endendyou can put this into a Call Script command:
Code:
SceneManager.call(Scene_Menu)Window_MenuCommand::set_command_position(:equip)
You're a pro Shaz! Works great.
Sorry to bother yourselves... I want to remove the party command,but i dont know how.
Tsukihime made this snippet,it works but if you cancel the actor command window,that annoying party command appears.
For some information,party command is the window that show "fight" and "escape" options in battle,thanks you very much and excuse me for my bad English. Here is the tsukihime snippet:
Tsukihime made this snippet,it works but if you cancel the actor command window,that annoying party command appears.
For some information,party command is the window that show "fight" and "escape" options in battle,thanks you very much and excuse me for my bad English. Here is the tsukihime snippet:
Code:
class Scene_Battle < Scene_Base alias :party_window_skip_battle_start :battle_start def battle_start party_window_skip_battle_start @party_command_window.deactivate if BattleManager.input_start command_fight else turn_start end endend
In the create_actor_command_window method, you can comment out the line that sets the :cancel handler (for me it's line 229 in the default scripts)
It worked! Thanks you very much,Shaz. 🙂
Original thread: https://forums.rpgmakerweb.com/threads/ruby-rgssx-questions-that-dont-deserve-their-own-thread.150/