General RGSS/RGSS2/RGSS3 Help

Started by G_G, March 04, 2009, 12:14:28 am

Previous topic - Next topic

G_G

I already have the terrain thing but i dont want to put a message and branch in a page on every troop I have. So I wanted to call the message easier so I could place it in the beginning of Scene_Battle.

matte012

July 02, 2009, 11:43:26 am #141 Last Edit: July 02, 2009, 11:47:08 am by matte012
Common Events are a mans best thing y'know. Of course, I am not that advanced I know that common events can be used for such things, as long as the area provides the variables *is somewhat new to RPGXP*

(and now that I realized..are you using the default battle system (or at least not ABS). Because you can arrange the events to play when the battle starts using the nifty little thing on the troops section)

G_G

Yea but then at teh beginning of every battle I'd still have to place the common event on the first page of every troop. Where I just want to call the message or common event in the battle so its easier.

matte012

As I spoke before, I do think you should either call the common event in the troop section (possibly with condition branches if X is in the party) or you can call through eventing. Either way is possible.

G_G

Look all I need is a message to display at the beginning of every battle. I dont want to place a text on one page in every single troop that would take to long. So heres what I have right now
module GameGuy
  def self.terrain_message
    case $game_player.terrain_tag
    when 1 then return "Battle Effects:\nIce power is increased.\nEarth power is weakened."
    when 2 then return "Battle Effects:\nFire power is increased.\nWater power is weakened."
    when 3 then return "Battle Effects:\nWater power is increased.\nThunder power is increased.\nFire power is weakened."
    end
    return "Battle Effects:\nNormal"
  end
end


All I want now is to call a message using GameGuy.terrain_message at the beginning of a battle in the actualy Scene_Battle so I can type it one time and not paste it in all my troops.

Blizzard

Just make a common event and call it on the beginning of battles. :P

EDIT: matte beat me to it. xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

;__; how would I call it at the beginning of the battle without putting it in every troop.......nvm I'll figure it out myself.

Blizzard

July 02, 2009, 12:01:54 pm #147 Last Edit: July 02, 2009, 12:03:16 pm by Blizzard
Call the common event at beginning of the battle scene (after the troop has being set up). Just use my common-event-by-script code.

EDIT: Even better. Find $game_troop.setup_battle_event. Do it there. In fact, you could code it right into Game_Troop#setup_battle_event. Screw events. xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

matte012

July 03, 2009, 02:15:14 am #148 Last Edit: July 03, 2009, 02:16:58 am by matte012
As much as I cannot script, Blizz makes a point. There might be some kind of terrain tags somewhere that displays message but most likely not. Of course, calling a common even and copy and pasting on every troop wouldn't be too time consuming. Even Blizzards demo has around 40 troops (I hacked it, not for cheating, for reference O-O), setting the common even to a copy and paste would make adding it as easy as click on eventing troops add-on and hiting the nifty Ctrl+V button and moving on. Takes about 5 seconds on each troop..

But, possibly go for Blizz's technique. And maybe if you ask nicely, make a shrine of him in Toronto, pray to him and give him bribes he might script it for you. Okay, maybe if you ask nicely. It seems like a small script, still to big for my understanding. Makes me wish there was a 'RGSS For Dummies' eh?

Aqua

If you edit the Game_Troops scripts, you wouldn't need to copy paste events :P
^That's what Blizz means.

matte012

July 03, 2009, 02:21:56 am #150 Last Edit: July 03, 2009, 02:23:17 am by matte012
Still of course looking from a 'if you cannot script' point of view, like me ^_^

(Edit: That is relating to the 'why copy and paste' not the comment about Game_Troop.)

G_G

Yea but who knows how many troops I'm going to have? I'd rather just get it out of the way. Anyways I already have the terrain tags store a message into a variable. I have a common event that displays that variable in a text. And I followed blizz's way and now I have it all setup.

In my above config it checks the id of the player's terrain tag then returns a message instead.

matte012

...I see. Not much else I could provide on the topic. Good luck man on your game. Lucky you have an idea how to script, right now I am a leecher. And, if you wouldn't mind. I am available for criticism on everything, if I could come up with 5 wrong things with the beta of Chaos Project, I think all gamers should fear my review.

(Edit: I somewhat had an idea of what it does. I'm just using the 'I cannot script' route)

Aqua

Off-topic
@Matte:
The version of CP demo you downloaded is veeeerrrrry old; lots of things have changed since its release.
If you want the newer version, then ask Blizz to sign up to be a Beta Tester here
It's even unencrypted, so you can use it to learn

Blizzard

Yeah, I was just going to say that. ^_^ In the beta there are over 260 troops.
I was suggesting the copy-paste idea because it's probably not necessary to script it if you can't script. I would use a script because making one would take me a few minutes and it would be automatic while somebody else would spend way less time copy-pasting each event. Sure, my method would be more error proof, but it also requires to know scripting.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

anyways I got the common event thign by script to work and its all setup in Game_Troops so now its over and done with. Any troop I make just has to have enemies dealt in it (putting aside cutscenes and whatnot) :) *thnx blizzy* 

So heres how it works. In my module GameGuy I have two methods. One that has the battle effects message and then the other who actually changes the skills power.


G_G

Another Question *sighs*

Is there a way to dispose a blt in a window?

If not is it possible to draw a bitmap in a window a different way then dispose of it later?

Blizzard

blt draws one bitmap on another, self.contents IS a bitmap. You can use .clear to clear the entire bitmap or ".fill_rect(x, y, width, height, Color.new(0, 0, 0, 0))" to clear just a specific area.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

Yet another question. Is it possible to create a folder using rgss?

Ryex

have you tried to write to a path that dose not exist yet? because it might create them automatically
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />