Ruby/RGSSx questions that don't deserve their own thread

ok thanks
The Ruby Object Model by Dave Thomas is worth a look. Revisiting that talk is useful as well.
this is for you Mr. Bubble,  i found the Guest Core script that works with yours and the Tsukihime Effect Manager, and gives

an effetc in battle, i want to ad this in my game but really dont understand how to do it.  

I want to make the guest make a normal attack or  skill at end of party turn. i was hoping you could give me a simple code example

of how this script works for undertand how to add an effect on my guest and give a little spice for battles. Thanks for you time 😀

Spoiler
 ** Effect: Guest Core Version: 1.1 Author: Estriole Date: 26 Nov 2012  This is add on for Tsukihime Effect Manager and Mr Bubble Guest Script  now we can tag effect to the guest. for those suikoden IV guest system. just tag the guest actor notetags  [new in v 1.1] now we can tag guest class notetags too. now we can give skills/auto_skill to the guest and have the effect occur  guest effect will inherited by EVERY battle members so if you tag the guest to have effect heal self 100 hp everytime attack. then when battle member A attack it will gain 100 hp. when battle member B attack it will gain 100 hp.  special note: (READ THIS CAREFULLY BEFORE COMPLAINING) if you want effect that damage 100 hp for enemies at battle start. remember guest effect will inherited by ALL battle member. so if you have 5 battle members. it will executed 5 times. means 500 damage...  how to prevent this? simple... just add at start of your effect method:  return if self != $game_party.battle_members[0]  this way the effect only will executed once. and the enemies will only get damaged by 100 hp damage at battle start.  =end  $imported = {} if $imported.nil? if $imported["BubsPartyGuests"] == true  class Game_Actor < Game_Battler alias est_effect_guest_effect_objects effect_objects def effect_objects est_effect_guest_effect_objects + $game_party.guests_effect_object end end #end class game_actor  class Game_Party < Game_Unit def guests_actor @guest_ids.collect {|id| $data_actors[id] } end #i use guests_actor since mr bubble already use guests method  def guests_class class_list = [] for member in guests class_list.push(member.class) end class_list.compact! return class_list end  def guests_skills skill_list = [] for member in guests for skill in member.skills skill_list.push(skill) end end skill_list.compact! return skill_list end   def guests_effect_object guests_actor + guests_class + guests_skills end  end #end game_party   end #end if imported
sorry my fault...
Again, please start a NEW thread for your script support issues, or post in the existing thread for the particular script. "I don't know how to implement this script" is not a "question that does not deserve its own thread.
Is there a way or script out there that is basically just a hack and slash combat battle system say the monster is at x,y your character is right next to it can i make it so i dont have to enter a separate battle page or screen like ive seen through others games?

For example

There's a skeleton x amount of tiles away and im walking towards it and instead of entering a different screen to battle the skeleton i would like for me and others to see what im fighting instead of having a pokemon type battlescreen is this possible?
Is there a way or script out there that is basically just a hack and slash combat battle system say the monster is at x,y your character is right next to it can i make it so i dont have to enter a separate battle page or screen like ive seen through others games?

For example

There's a skeleton x amount of tiles away and im walking towards it and instead of entering a different screen to battle the skeleton i would like for me and others to see what im fighting instead of having a pokemon type battlescreen is this possible?
I'm sure this could be scripted.  I think you would basically need to re-create the entire battle system though.  And, from what I've heard, that is, to say the very least, challenging.  You would also need a lot of animated sprites to represent different special moves such as casting a fireball/slashing an opponent/etc, because the current animations are keyed to running in a front-facing battle screen.

Essentially, your custom script would need to track all of the attributes of the skeleton --- HP, MP, etc, and would need to allow the party to perform combat actions on the map screen.  Then, those actions and the enemy actions results would need to be calculated and handled.  

So you would also be making changes to the basic controls to handle the combat.  

So, I think, yes you could do it.  But it would be a fairly big undertaking, since you'd be changing some core game mechanics.

It's a lot less effort to, say, use a side-view battler which is more the FFIV style, but it wouldn't do exactly what you've asked.
This is not a question that doesn't deserve its own thread. We have a forum for requesting scripts. It's called Script Requests. Please be more careful about where you're posting. Thank you.


And as I said in your other thread, RPG Maker is not a multiplayer engine. Unless you HAVE a multiplayer script it's not even do-able.
Hi I have: Script "Window_Base' line 151: RGSSError occurred. 

                           disposed bitmap

This pops up when I enter a new map and it keeps me from moving on. Now if I make that map the starting position then it works....so how do I fix this problem ? Thank You.

-I have not installed any new scripts before the map.

- My images are all named differently

-idk if p point will work because idk how to pull it up.
I need to know a script command (or series of commands) that will let me know if an arbitrary item is equippable or not. I can't simply check for the equip slot, or even a_type or w_type as the compiler throws a fit if they don't exist on the item.

The alternative is to have shops that strictly sell only weapons or only armor or only consumables - traditional, I know, but I'd rather not have that as a hard limitation (or have to deal with the hashmaps that would require).

Edit: Reflective metaprogramming FTW:

methods=item.methods

if methods.include? :etype_id
    <do stuff>

end
Hi I have: Script "Window_Base' line 151: RGSSError occurred. 


                           disposed bitmap


This pops up when I enter a new map and it keeps me from moving on. Now if I make that map the starting position then it works....so how do I fix this problem ? Thank You.


-I have not installed any new scripts before the map.


- My images are all named differently


-idk if p point will work because idk how to pull it up.
This is the THIRD time you have posted this request. Did you even do what I said in my reply to one of the others? Did you even do what it said in the post you originally looked at? THIS QUESTION DOES NOT BELONG HERE. USE THE OTHER THREAD WHERE I ANSWERED YOU.


(Yes, I am grumpy - asking the same question over and over and ignoring the suggestions given will do that.)

I need to know a script command (or series of commands) that will let me know if an arbitrary item is equippable or not. I can't simply check for the equip slot, or even a_type or w_type as the compiler throws a fit if they don't exist on the item.
Check Window_EquipItem's include? method to see the logic it uses.


@actor.equippable?(item) looks to be a good starting point.
Check Window_EquipItem's include? method to see the logic it uses.

@actor.equippable?(item) looks to be a good starting point.
The code I posted at the bottom works.  include? works on any enumerable, so I just threw all the methods "item" has (that's the reflective part) into an Array (maybe it's a hash, either way it's enumerable) and then checked that for the method I needed to be there. One of the nicer features of Ruby, I must say.

That was the last major hurdle - I finished polishing off the rough edges (not showing the stat box on stuff you can't equip, etc...) and I now have working shops in the game. All that's left is to finish up the quest journal and give it one more good playthrough to make sure I didn't miss anything and I'm good to release my demo. I don't know what 'normal' size is for a demo for one of these. If I talk to people I can finish it in a bit over four hours, but I know what to do at this point, so that saves time.

Didn't make the end of the month, but I'm still feeling pretty good about it. Of course, now I'm not sure what I'll do during this next GMD - probably map out the next scene of the story. Start thinking of some subplot and character arc action.
Don't think you need to save the methods for that. Couldn't you just have used

if item.respond_to?🙂etype_id)

  <stuff>

end
Don't think you need to save the methods for that. Couldn't you just have used

if item.respond_to?🙂etype_id)

  <stuff>

end
Probably. I think I tried it, but didn't put it in as a symbol, so naturally it didn't work.

I'll go back and try that, as it should cut down some overhead - not a lot since you're looking at a shop screen, but elegance is always a beautiful thing. At this point, it'll wait till after I finish this playthrough. One more detailed set of notes of little things to tweak and journal entries to add so they look good in the journal while still reading well.

I wasn't thinking of using a journal when I started, so I'm sort of torn on how much info to include. The quest side is taking care of itself fairly well, the 'journal' journal is taking a bit more work.  Soon ... Soon
methods=item.methods

if methods.include? :etype_id

    <do stuff>

end
I think this code looks better in a 'one liner'

item.methods.include? :etype_id ? run_method_to_do_stuff : nilI just like the 'nil' at the end 😀
I think this code looks better in a 'one liner'

item.methods.include? :etype_id ? run_method_to_do_stuff : nilI just like the 'nil' at the end 😀
ternary's are overrated. There's a reason a lot of design documents forbid their usage.

Not to say there isn't a place for them, but I prefer easy readability.
I need to know a script command (or series of commands) that will let me know if an arbitrary item is equippable or not. I can't simply check for the equip slot, or even a_type or w_type as the compiler throws a fit if they don't exist on the item.


The alternative is to have shops that strictly sell only weapons or only armor or only consumables - traditional, I know, but I'd rather not have that as a hard limitation (or have to deal with the hashmaps that would require).


Edit: Reflective metaprogramming FTW:


methods=item.methods


if methods.include? :etype_id


    <do stuff>


end
I think if you want readability I would just treat each case separately.
Hey everyone!

I was just wondering if there's a way to change the audio automaticly when you make a door event. I've looked through the base scripts and saw some things, but I'm not 100% confident I should mess with it. I'm working on a sci-fi project and it would make it easier to change it to a sliding door sound effect from a regular door sound effect.
You're referring to the auto-events?  Nope.  That's set up in the engine, not in the scripts.  By the time the script gets to it, it's just a regular "Play SE" command - so if you wanted to do it via scripts you'd have to insert a heap of logic to see what else is in the event to know if this is one of the doors you want to change.  If you want ALL doors to have the same effect, just rename the files so your sliding door sound effect has the filename that the auto-event uses.  Or even do this if you want MOST doors to have the same SE, and then change them manually for the ones you want to be different.
Ah that makes more sense. It's always the simple things that out think me. Thanks, Shaz!

Edit: It worked perfectly!
Why is it that when I post:
 

class Game_Interpreter def store_tile(tileX, tileY) $game_variables[(41+$game_map.events[@event_id].x-2+tileX)][($game_map.events[@event_id].y-4+tileY)] = 1 end endas a simple script, and call it in an event with:

store_tile(0,0)I get:

Script 'Game_Interpreter' line 1411: NoMethodError occurred.undefined method `[]=` for 0:Fixnum? I'm guessing the answer is super simple but I'm terribly inexperienced so I'm basically just hacking together code for my specific event purposes.

Edit: Is it because the array needs to be initialized? I forgot about that :I

Original thread: https://forums.rpgmakerweb.com/threads/ruby-rgssx-questions-that-dont-deserve-their-own-thread.150/