Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Scene_Battle >Change<, I want rebuild this scene and I need some help
Znikomek
post Apr 13 2009, 11:19 AM
Post #1


Level 3
Group Icon

Group: Member
Posts: 36
Type: None
RM Skill: Undisclosed




Hi,
I think I write topic in right place biggrin.gif

so I have some problem:
I want to rebuild this code in Scene_Battle :
CODE
  #--------------------------------------------------------------------------
  # * Display Gained Experience and Gold
  #--------------------------------------------------------------------------
  def display_exp_and_gold
    exp = $game_troop.exp_total
    gold = $game_troop.gold_total
    $game_party.gain_gold(gold)
    text = sprintf(Vocab::Victory, $game_party.name)
    $game_message.texts.push('\|' + text)
    if exp > 0
      text = sprintf(Vocab::ObtainExp, exp)
      $game_message.texts.push('\.' + text)
    end
    if gold > 0
      text = sprintf(Vocab::ObtainGold, gold, Vocab::gold)
      $game_message.texts.push('\.' + text)
    end
    wait_for_message
  end

i think this is right code fragment tongue.gif


I want to change:
for every 10000 gold for killing monster(s), game will give me afer win 1 item on 1st posiion in items
for every 100 gold for killing monster(s), game will give me afer win 1 item on 2nd posiion in items
for every 1 gold for killing monster(s), game will give me afer win 1 item on 3rd posiion in items
and give a message afret win:
You get exp xxx. (standard vocab)
You get n1 (item(s) name).
You get n2 (item(s) name).
You get n3 (item(s) name).
...(drop)

thx for any help.

This post has been edited by Znikomek: Apr 13 2009, 11:21 AM
Go to the top of the page
 
+Quote Post
   
SojaBird
post Apr 13 2009, 02:45 PM
Post #2


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




The display of the item's is in a other part of the code.
Also, you might wan't to make it a bit more clear what you meen with 1000g, 1st item, 100g 2nd item and all...I don't realy get it with the money :S Where does it come from?


Greatzz,
SojaBird.


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   
Znikomek
post Apr 14 2009, 01:00 AM
Post #3


Level 3
Group Icon

Group: Member
Posts: 36
Type: None
RM Skill: Undisclosed




So I need script to changeing every 10000 gold from monster gold revard to item id:1 multipled by number of 10000 gold.
every 10000 gold give 1 item id:1
every 100 gold below this 10000 hive 1 item id:2
every 1 gold below this 100 hive 1 item id:3




This post has been edited by Znikomek: Apr 14 2009, 01:00 AM
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd May 2013 - 12:46 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker