Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

3 Pages V  < 1 2 3 >  
Reply to this topicStart new topic
> [Scripting]Advanced Windows, A tutorial from the Script Builders
BigEd781
post Nov 17 2009, 11:58 PM
Post #21


No method: 'stupid_title' found for `nil:NilClass'
Group Icon

Group: Revolutionary
Posts: 1,829
Type: Scripter
RM Skill: Undisclosed




QUOTE (MetalnosX @ Nov 17 2009, 10:19 PM) *
Well im using VX and the problem is in VX not XP so yeah.


This tutorial is for XP, so using $game_actors[id] will solve your current problem, but in general XP scripts are not compatible with VX.


__________________________
`
Give me teh codez!!!


I am the master debator!
Go to the top of the page
 
+Quote Post
   
MentalSickness
post Nov 18 2009, 04:51 AM
Post #22


Level 2
Group Icon

Group: Member
Posts: 20
Type: Scripter
RM Skill: Beginner




QUOTE (The Law G14 @ Nov 17 2009, 02:28 PM) *
@MentalSickness: Hm...I have the same version as you so it couldn't be that, but I don't know if it has to do with you being from Isreal. Try replacing your script with this:


CODE
#==============================================================================
# ** Window_Advanced
#------------------------------------------------------------------------------
# This class uses the draw methods.  
#==============================================================================

class Window_Advanced < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 200, 150)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    actor = $game_party.actors[000]
    draw_actor_name(actor, 0, 0)
    draw_actor_hp(actor, 0, 30)
    draw_actor_sp(actor, 0, 60)
    draw_actor_exp(actor, 0, 90)
  end
end



EDIT: Also, what does your Window_Base script look like and do you have any other custom scripts?


Umm.. I found the problem with my script, I wrote "intialize" instead of "initialize".. "^^
So.. thank you very much biggrin.gif
It works now ^^
Go to the top of the page
 
+Quote Post
   
The Law G14
post Nov 18 2009, 01:20 PM
Post #23


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,346
Type: Scripter
RM Skill: Skilled
Rev Points: 5




@MetalnosX: Did you look at my last post because I think that just might be the solution to your problem.

@MentalSickness: Oh, wow, lol, that's one of those things that would be almost impossible to find. But I'm glad you found out what the error was. For future references, when you are debugging window scripts, check out this tutorial by another member of the Script Builders, NightShade, on how to find errors in your window scripts: http://www.rpgrevolution.com/forums/index....showtopic=36295

This post has been edited by The Law G14: Nov 18 2009, 01:20 PM


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
MetalnosX
post Nov 18 2009, 10:13 PM
Post #24


Level 2
Group Icon

Group: Member
Posts: 27
Type: Developer
RM Skill: Intermediate




QUOTE (BigEd781 @ Nov 18 2009, 06:58 PM) *
QUOTE (MetalnosX @ Nov 17 2009, 10:19 PM) *
Well im using VX and the problem is in VX not XP so yeah.


This tutorial is for XP, so using $game_actors[id] will solve your current problem, but in general XP scripts are not compatible with VX.

Yeah i think your right. I have alot of problems right now with this XP script. So should i wait until there is a RGSS2 Script tutorial like this or should i try to change to my script to be able to work on VX?


__________________________
[/size][/color]Ahhhhhh!...AHH!....AHHHH! Madman hitting me with oranges!! ....... Oh?... Is that my brother?[size="6"][color="#FF0000"] Man i cant do this lol
Go to the top of the page
 
+Quote Post
   
MentalSickness
post Nov 19 2009, 04:13 AM
Post #25


Level 2
Group Icon

Group: Member
Posts: 20
Type: Scripter
RM Skill: Beginner




QUOTE (The Law G14 @ Nov 18 2009, 01:20 PM) *
@MentalSickness: Oh, wow, lol, that's one of those things that would be almost impossible to find. But I'm glad you found out what the error was. For future references, when you are debugging window scripts, check out this tutorial by another member of the Script Builders, NightShade, on how to find errors in your window scripts: http://www.rpgrevolution.com/forums/index....showtopic=36295


Yeah I've already read it ^^
I've read all your tuts tongue.gif
Go to the top of the page
 
+Quote Post
   
The Law G14
post Nov 19 2009, 01:38 PM
Post #26


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,346
Type: Scripter
RM Skill: Skilled
Rev Points: 5




@MetalnosX: I'll say it again since you keep looking over my posts lol:


After the line of your script that says this:

CODE
class Window_Advanced < Window_Base


Put in these two lines of code:

CODE
attr_reader   :actors
@actors = []



@MentalSickness: Oh, lol, that's cool and can you show me a screenshot of your script?


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
MentalSickness
post Nov 20 2009, 06:56 AM
Post #27


Level 2
Group Icon

Group: Member
Posts: 20
Type: Scripter
RM Skill: Beginner




QUOTE (The Law G14 @ Nov 19 2009, 02:38 PM) *
@MentalSickness: Oh, lol, that's cool and can you show me a screenshot of your script?


Umm.. sure yeah :]
I didn't add much, just gold and class..
Just wanted to check if I can add more commands and a picture :]

Go to the top of the page
 
+Quote Post
   
The Law G14
post Nov 20 2009, 01:55 PM
Post #28


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,346
Type: Scripter
RM Skill: Skilled
Rev Points: 5




Well you did great biggrin.gif

I love the fact that you put a picture next to the class and added the gold, looks great, and I don't see any problems smile.gif


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
MetalnosX
post Nov 20 2009, 08:05 PM
Post #29


Level 2
Group Icon

Group: Member
Posts: 27
Type: Developer
RM Skill: Intermediate




QUOTE (The Law G14 @ Nov 20 2009, 08:38 AM) *
@MetalnosX: I'll say it again since you keep looking over my posts lol:


After the line of your script that says this:

CODE
class Window_Advanced < Window_Base


Put in these two lines of code:

CODE
attr_reader   :actors
@actors = []



@MentalSickness: Oh, lol, that's cool and can you show me a screenshot of your script?

Srry i did what you said before and it didnt work. But that was my old script now i put it into a new fresh script and now its workin. The other script i made had tooo mant problems. Thanx for help me and thanx BigEd


__________________________
[/size][/color]Ahhhhhh!...AHH!....AHHHH! Madman hitting me with oranges!! ....... Oh?... Is that my brother?[size="6"][color="#FF0000"] Man i cant do this lol
Go to the top of the page
 
+Quote Post
   
MentalSickness
post Nov 21 2009, 08:26 AM
Post #30


Level 2
Group Icon

Group: Member
Posts: 20
Type: Scripter
RM Skill: Beginner




QUOTE (The Law G14 @ Nov 20 2009, 01:55 PM) *
Well you did great biggrin.gif

I love the fact that you put a picture next to the class and added the gold, looks great, and I don't see any problems smile.gif


Thanks, :]
But I have question, is there a way to make the sword picture come along with the class command everytime I use the class command instead of just adding the sword pic in a drawing command?
Go to the top of the page
 
+Quote Post
   
The Law G14
post Nov 21 2009, 08:38 AM
Post #31


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,346
Type: Scripter
RM Skill: Skilled
Rev Points: 5




Yeah, you would have to edit the preexisting code for the draw_actor_class method. So, go to line 131 to 134 of the Window_Base script and add the picture code you used there so that everytime you call the draw_actor_class method, the sword picture would appear smile.gif

This post has been edited by The Law G14: Nov 21 2009, 08:42 AM


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
MentalSickness
post Nov 21 2009, 09:29 AM
Post #32


Level 2
Group Icon

Group: Member
Posts: 20
Type: Scripter
RM Skill: Beginner




Ooo, that's nice biggrin.gif
Thanks ^^

EDIT:
Umm.. I guess I still don't really know how to do that yet "^^
When I change it, it doesn't show anything, not the pic and the not the class name :|

[Show/Hide] How I changed the script
CODE
#--------------------------------------------------------------------------
# * Draw Class
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def draw_actor_class(actor, x, y)
def draw_picture(x, y)
bitmap = RPG::Cache.icon("001-Weapon01")
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(55, y, bitmap, src_rect)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 236, 32, actor.class_name)
end
end


This post has been edited by MentalSickness: Nov 21 2009, 09:39 AM
Go to the top of the page
 
+Quote Post
   
The Law G14
post Nov 21 2009, 11:26 AM
Post #33


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,346
Type: Scripter
RM Skill: Skilled
Rev Points: 5




lol, try this:

CODE
def draw_actor_class(actor, x, y)
    bitmap = RPG::Cache.picture("picture")
    src_rect = Rect.new(-50, 0, bitmap.width * 10, bitmap.height)
    self.contents.blt(x, y, bitmap, src_rect)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 236, 32, actor.class_name)
  end


This post has been edited by The Law G14: Nov 21 2009, 11:30 AM


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
Rukiri
post Nov 27 2009, 03:19 PM
Post #34


emerge -avt awesome! Wait... it brings me.... HERE?!
Group Icon

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




I thought about switching back to XP for my RPG(since it'd take forever to get everything scripted) and this a very nice tutorial.
I'll post in a few hrs with what I've learned!


__________________________
Xeilsoft
- Follow your dreams to the very end..

Kits that I'm working on.
[Unity3D 4.0] LTTP/Minish Cap - I don't have time for custom gfx like what the pze folks are doing but I will try and work on some enhanced LTTP graphics.

Main PC
Core i7 3820 overclocked @ 4.8GHZ
Galaxy: Nvidia Geforce GTX 680 GDDR5 2GB
Asrock X79 Extreme9 w' creative sound
64GB corsair platinum @ 1600MHZ
Muchkin 128GB SSD(boot), OZKIN 2TB SSD, Western Digital GREEN 1TB HDD.
Rosewill Lightning 1000W PSU
OS: Funtoo Linux, Windows 8 (Virtual Machine)

iMac (March 2013)
3.4GHz Quad-core Intel Core i7, Turbo Boost up to 3.9GHz
16GB 1600MHz DDR3 SDRAM - 2X8GB
1TB Serial ATA Drive @ 7200 rpm
NVIDIA GeForce GTX 680MX 2GB GDDR5
Go to the top of the page
 
+Quote Post
   
Bio Wolfz
post Nov 28 2009, 05:43 AM
Post #35


Blinded Assassin
Group Icon

Group: Revolutionary
Posts: 164
Type: Mapper
RM Skill: Intermediate




Going to try out this tutorial tomorrow it looks interesting.
Go to the top of the page
 
+Quote Post
   
Red Knight
post Dec 5 2009, 07:55 PM
Post #36


Level 1
Group Icon

Group: Member
Posts: 12
Type: Scripter
RM Skill: Beginner





... Finished.. I was one slow guy with this one...


__________________________
...Rain...Washes...Away...All...The...Blood...
Go to the top of the page
 
+Quote Post
   
The Law G14
post Dec 7 2009, 01:57 PM
Post #37


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,346
Type: Scripter
RM Skill: Skilled
Rev Points: 5




@Rukiri and BioWolfz: Thanks guys, I'm glad you guys like the tutorial. Hope you learn something from it smile.gif

@Red Knight: Wow, this looks great Red Kinght, and I see that you've played around with the window opacity, great job smile.gif Also, as a little critique, it's good to stay consistent when scripting things so you should try to make "State:" and "Class:" in blue text as "HP", "SP", and "E" are all blue as well. All in all, great job man smile.gif


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
Red Knight
post Dec 8 2009, 07:01 PM
Post #38


Level 1
Group Icon

Group: Member
Posts: 12
Type: Scripter
RM Skill: Beginner





Thanks for the suggestion, I forgot all about the text colors.

This post has been edited by Red Knight: Dec 8 2009, 07:02 PM


__________________________
...Rain...Washes...Away...All...The...Blood...
Go to the top of the page
 
+Quote Post
   
The Law G14
post Dec 9 2009, 02:46 PM
Post #39


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,346
Type: Scripter
RM Skill: Skilled
Rev Points: 5




Much better, looks great Red Knight smile.gif


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
Runefreak
post Dec 9 2009, 07:36 PM
Post #40


Comic Saaaaaaaans!
Group Icon

Group: Revolutionary
Posts: 140
Type: Developer
RM Skill: Advanced




This is really nice, I'll try it out now. wink.gif
Thanks for sharing. happy.gif


__________________________
</div>
Go to the top of the page
 
+Quote Post
   

3 Pages V  < 1 2 3 >
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: 20th May 2013 - 06:32 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker