Hey fellas.
since i've felt like such a piece of turd for always having to depend on you all for coding help. i have spent nearly every hour of my week vacation studying (i know its not a lot of time but it has truly helped) coding in RGSS.
i have discovered that the language is not so different than things i remember in other languages such as VB, Action script, and some C. but ...more simple.
but the real trouble i have in this language is finding what is threaded through other classes or modules and borrowed into the new one.
so in the end someing like...
actor or game_actor and Game_Actors can be really confusing. the dot commands "self.content.font.size" can also be confusing... what is part of ruby or what is part of rmxp.
anyway thanks for listening to that rant. next is the question.
So im trying to make basic windows for a start. i've managed more or less. sizing, positioning, fonts, font size, ect... i managed to get icons aswell but i think i need to use another method if i want only icons and no text.. but for now the text way is what im looking for.
so what i want to add is attributes of the item. such as atk, str, pdef, ect.. to the text box
looking in the scripts i see alot of actor.str but thats not the item its self its the actors. looking at the code i would expect to see something like
ATKbonus = actorATK - EquipdWEP + NEWwep.
NewATK = actorATK + NEWwep.
or something.
but i find no such thing. only things like:
draw_actor_parameter(@actor, 4, 32, 0)
or
if @new_atk != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 32, 40, 32, "->", 1)
self.contents.font.color = color_choose(@actor.atk, @new_atk)
self.contents.draw_text(200, 32, 36, 32, @new_atk.to_s, 2)
so how could i display lets say atk or str from the wep onto the display box?
here is what i have. please critique.
class Item_Window < Window_Base
def initialize
super(0,0,300,100) # taken from Window_Base: super( x, y, width, height)
actor = $game_actors[$activecharid]
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = "Arial"
self.contents.font.size = 24
#self.contents.draw_text( 0, 0, 200, 32, "It's a trap")
self.draw_item_name($data_weapons[1], 0, -5)
end
end