Skip to main content

Add Quest Images

Add Image to the File System

Quest images are the images you see in the gallery. They're images that are shown in dialogue scenes and then transferred to the gallery once the quest is over.

Quest images can be placed anywhere in your file system, but for best practice you can use the same location as my files, res://assets/images/QuestImages/.

Quest images must be 1920x1080 files. We prefer .png files, as they will be compressed by Godot automatically.

info

Godot, by default, does not compress images. The mod template has compression settings enabled so that you don't have to change the settings yourself.

Go ahead and add your own picture to the res://assets/images/QuestImages/ folder. Try to name your file something unique. For best practice, prefix your image file with the ID of your quest. It's also easier to find your images if you prefix the file name with your quest ID.

I'm going to add a file named myQuestQueenBlowjob.png to the res://assets/images/QuestImages/ folder.

In your res://mods/{MOD_ID}/init.gd file we need to tell Queen's Brothel that we have a new image that needs to be in the gallery. We're going to call the addImage function.

QB.image.addImage("res://assets/images/QuestImages/myQuestQueenBlowjob.png", "myQuestEnd")

The addImage function has two parameters. The first one is the file path, the second one is the quest ID that needs to be completed before this image is shown in the gallery.

Show Image in Dialogue

In your quest dialogue, showing images is as simple as giving the file path. We are going to use the showImage dialogue function to show our image.

# res://dialogue/myQuestEnd.gd
extends Dialogue


func _init().("myQuestEnd"):
showImage("res://assets/images/QuestImages/myQuestQueenBlowjob.png")

showImage is best paired with setBackground.

    showImage("res://assets/images/QuestImages/myQuestQueenBlowjob.png")
setBackground("res://assets/images/QuestImages/myQuestQueenBlowjob.png")

You're done! The image will pop-up during the dialogue, then it will be set as the background. Once your quest is complete, your image will be available to look at in the gallery.