Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Super Simple Journal

Drey

Member

thanks so much dude :D
I'd started getting drawn into working on a totally different menu, lol xD

I think ideally, it'd have the option to show one image per entry, on TOP of the window graphic, and the journal text (or between them). It wouldn't be affected by the size or length of either, however. That leaves it up to the graphic designer.

What do you think? :wink:
 
Ok, this goes back to my earlier suggestion. to show an image with a detailed description, You just put an image
named "quest_overlay_#.png" where # is the index # of each quest. i.e. for quest 1, "quest_overlay_1.png", in the Pictures folder.
No data arrays necessary. If the image is there, it shows.
The image overlays on the bitmap for the window. Since the window is 460x330, the image should be 428x298
You'll just have to pad your text & adjust the position of your image to make sure they don't interfere.

Paste this section of code right after the "self.contents.draw_paragraph" line in Window_journal_detail

Code:
   # draw an image over the window if it exists

   filename = "quest_overlay_#{index + 1}"

   if FileTest.exist?("Graphics\\Pictures\\#{filename}.png")

     overlay = RPG::Cache.picture(filename)

     self.contents.blt(0, 0, overlay, overlay.rect)

   end

 
 

Drey

Member

sweetly done :biggrin:
exactly what I had in mind, thanks buddy ^_^

What do you think about making it appear just under the text? might look nice :wink:
 
You would have to calculate the text height, which is variable based on the draw_paragraph method.
(or you could return a line_num variable from the draw_paragraph method & use that.

However, once the game is published the text height will not change, so it's just as easy to tweak your image to fit the text.
A little extra work if you change the text & the number of lines changes, but not so much as to be a hassle.
 

Drey

Member

That's alright, I messed with enough cool stuff to be bothered by one tiny detail ^.^

Besides, if I REALLY wanted, at this point the whole description could be an image, with completely different text! Ooooooh, idea :D

anyways thanks a million buddy have a good one :smoke:
 

Drey

Member

aw poo xD

found an issue with the image script, Brew... if you don't mind? :3

it seems to actually only be calculating the "index" of the active entries, so if I have quests 15 and 41 activated, an image won't show up with quest_overlay_41.png, only with quest_overlay_2.png.

let me know if you can help :wink: thanks bud


NOTE: look at it though! purrty as hell! :D
journalEntryGraphic.jpg
Also, an afterthought: like the use of displaying in-game variables, is there a simple 'if' statement I could build, to show one image instead of another, if 'variable 60' was 250 instead of 750? (In case of a negotiable reward)
 
This should fix the first problem

Code:
   # draw an image over the window if it exists

   filename = "quest_overlay_#{item}"

   if FileTest.exist?("Graphics\\Pictures\\#{filename}.png")

     overlay = RPG::Cache.picture(filename)

     self.contents.blt(0, 0, overlay, overlay.rect)

   end

 

On the second question (variable images): the simple answer is, Yes.

if $game_variables[60] == 250
## do something different here
end

How you code it would depend on how you want it to work. Is it just a 'one-time' thing? i.e. only one of the quests has a variable image. Is there the possibility of a single alternate image for every quest? Is it possible to have 'many' (more than 2) images for a single quest? What if variable 60 = 500? What do you mean by 'negotiable reward'?
 

Drey

Member

nope, sorry... the new formula didn't work! (no image in any entry, anymore) Is there anywhere else we should change 'index' to 'item', or something like that?

And for the second thing, yeah, it would just be once in a while, but not a 'one-time' thing, possible for particular quests, where (based on in-game variables and the player's choices) the reward offered is more, or less.

it would always be an 'if' and 'else if' statement with each coded possibilities for the reward (ex: 250, 500 and 750), the only problem i have is the idea of how it could affect that formula on an individual basis.


ex:
if $game_variables[60] == 250
#display quest_overlay_41a.png
else if $game_variables[60] == 500
#display quest_overlay_41b.png
else if $game_variables[60] == 750
#display quest_overlay_41c.png
end
end
end
 

Drey

Member

YESS! heheh :biggrin:
thanks bud :P

Pretty much an indestructible journal script, awesome job... can you help me with affecting the formula for alternate quest descriptions though? plzzz :angel:

(If you can't do it quick, it's no problem... I'm actually going on a long trip and getting cut off from my precious internets for like 2 weeks, leaving tomorrow night :P)

Anyways, thanks for the sh*t-tons of help man, seriously :smile:
Let me know if you have any ideas before I go, on how I might do it ^.-
 

Drey

Member

back from vacation! ^.^ Hope you had a great new year's, Brew.

Any thoughts on how it would be possible to modify the additional script, to allow each quest image to have possible alternates?


In any case, wanted to send ya my thanks again for all the hard work ^.-
Have a good one!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top