Save-Point

Full Version: Save-Point
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Board Message
Sorry, you do not have permission to access this resource.
Save-Point - [Resolved] Need a hopefully small edit, To Near Fantastica's NPC Interactions

Save-Point

Full Version: [Resolved] Need a hopefully small edit, To Near Fantastica's NPC Interactions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Script Request
Hello all, I am requesting what I hope is a small edit of Near Fantastica's NPC Interactions script. All I want it to do is while I am in the scroll window, If I press a certain button (doesn't matter, I should be able to change it throught the input line) it will pop up a picture with the same file name as the information being displayed.

Script Title:
Here is the script
The code tag is not working

EDIT: (Added Spoiler/Code combo for ya.)
The Script


I'll just post a link in a minute

EDIT:
http://punk.ohsk.net/forums/index.php?show...ction"


RMXP or RMVX:

XP
Screenshots: The picture should be in the middle of the screen and if possible in a different window that adapts to the size of the picture (if possible or easy)
Other Scripts I am using (in order):
Would adding a picture to this script really conflict with anything else if it working fine already? If it would, I will post my scripts.rxdata.
For those of you familiar with the 'Elder Scroll' games (Daggerfell, Morrowwind, Oblivion), this script 'kind of' creates a very similar dialog system.

For those of you not familiar, the dialog can show 'highlighted' texts or words which allows you to continue discussion. Like... If someone mentions "I found the cave and it had a silver cup." ... You could select the word 'silver cup.' in the same window and the dialog with that character could keep going, but based on the silver cup.

* * *

So, what I gather is that you would want a system that gives you a picture of the highlighted/linked/key words in the system?

Not saying I would have the time, but let me suggest that the system perform 'automatic checks' so it only brings up a image for the key word if the image exists.

Prevent errors or crashes if there is no image file for the key word.
You mean if statements? But how will I get the file name and extension?
I would just base the filename on the name of the key word. Either that, or just have some array that holds the filenames based on the key words:

Code:
# Array         Key Word           Filename
NFKeywords = { "Silver Chalice => "cup01",
                "The Chalice"   => "cup01",
                "Gold Chalice   => "cup02"  }

...Something to replace the 'word' with a filename. And I made that example just at the spur of the moment.

As far as the extensions? Don't worry about it... leave the extension off. RMXP automatically imports stuff as .png and considers every graphic file as a .png file when you run a Cache command.
Ok,:lol: I have no idea where you were going with that. I do want it to use the name of the keyword as the file name. But when I tried to point it to that, it gave me an error saying that it should be an rxdata file. or something like that. And for the cache, I use the RPG Picture::Cache or something like that right? Or is it backwards?
Actually, you're on the right track... though I dunno how you got the .rxdata error. :o

You would use RPG::Cache.picture(filename) for the command to load the picture. Mainly to load it as a bitmap (see Bitmap.new), and possibly load it into a sprite (Sprite.new = nf_bitmap) ;) .

While the 'sprite' class may be optional, it is useful for controlling features such as the .z value (or depth) of the image so it shows over the text. Plenty of features available if you set it up to work as a sprite.
I get an argment error when I try to call my window. :(
Ok, I got it stop the error. It seems I didn't set the size of the window. But now it won't display the picture.

EDIT: I failed miserably.
While I may work on it... i have like two other requests first. That and ... ugh... work. Mebby (sorry) a couple days?
Sure, I can wait, just keep me updated. I don't want to be waiting for nothing, you know? Thank a lot!
This is what I have so far, it's probably messy and not the most optimal way to go, but.... Just so you don't think I was BSing you when I was trying. I'm still kind of messing with it too.

So far I only got it to open the new window. I just don't know how to display the picture!

EDIT: Spoiler added to reduce size
Hidden again

OK, this probably doesn't work because I messed with it, and I don't know what I did. So I don't know how to change it back.
Got you a nice little addon to paste under NPC Interactions.

It has a configurable section called NF_NPC. You can control placement of the image window, its size and the button you wanna press to bring the image (stored in Graphics/Pictures).

The graphic files you use ARE based on the name of the NPC Interaction file, and are case sensitive. If you're reading a file called 'START', then you will only be looking for START.png. Start.png would most likely not work.

Here it is

BTW: You got me looking at NPC Interactions. I may continue development... maybe even see about 'cache'-ing the text so it can be compressed in an encrypted game too.
Pages: 1 2