Image modding

From Wapedia
Revision as of 20:40, 5 January 2020 by Wape (talk | contribs) (→‎Tools)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Sample Mod[edit]

<<set setup.db_imagemods.chocolate = {
  name: "Chocolate City",
  author: "Wape",
  link: "http://wapecrime.blogspot.com",
  description: "A test mod. Replaces thief with a new model.",
  swaplist: {
  "an_image" : "mods/chocolate/thief/wife.jpg",
  "images/in/thief/bj.gif" : "mods/chocolate/thief/bj.gif",
  "images/in/thief/brutal-rape.gif" : "mods/chocolate/thief/brutal-rape.gif",
  "images/in/thief/brutal-sex.gif" : "mods/chocolate/thief/brutal-sex.gif",
  "images/in/thief/meet.jpg" : "mods/chocolate/thief/meet.jpg",
  "images/in/thief/preg.jpg" : "mods/chocolate/thief/preg.jpg",
  "images/in/thief/rape.gif" : "mods/chocolate/thief/rape.gif",
  "images/in/thief/seduce 1.gif" : "mods/chocolate/thief/seduce 1.gif",
  "images/in/thief/seduce 2.gif" : "mods/chocolate/thief/seduce 2.gif",
  "images/in/thief/wife.jpg" : "mods/chocolate/thief/wife.jpg",
  "images/in/thief/wife.gif" : "mods/chocolate/thief/wife.gif",
  "images/brand/logo.png" : "mods/chocolate/logo.png"

  }
} >>

Explanation[edit]

<<set setup.db_imagemods.chocolate = {

The above adds a mod to the imagemod database called 'chocolate'. Call yours whatever you want.

name: "Chocolate City",

The human-readable name of the mod that will be presented to the player in the mod list.

author: "Wape",

Your name or moniker, to be listed next to the mod name in the modlist.

link: "http://wapecrime.blogspot.com",

A link to your profile, website, blog, whatever. Not implemented yet but will be.

description: "A test mod. Replaces thief with a new model. ",

A description of the mod. Can be a fair bit longer and more detailed than this one if you like.

swaplist: {

Ok here's where the image swap list starts. From this point onwards are instructions to the game where to insert your images.

"images/in/thief/meet.jpg" : "mods/chocolate/thief/meet.jpg",

On the left of the : is the url of an image you want to replace. On the right is the name of the image that will be replacing it. Replacements do not have to be the same file type as the originals - for example a gif can become a webm file.

For your convenience, I had the game put urls of images under those images while you play the game in debug mode.

I suggest storing replacement images in a folder within the mods folder that bears the id of the mod.

"an_image" : "mods/chocolate/thief/wife.jpg",

On the left of the : is the name of an image anchor. An image anchor appears like this when you are in debug mode (<<imageanchor 'an_image' >>), but is invisible when you aren't. The above line tells the game to place the image specified on the right into the spot occupied by the anchor named.

The image anchors exist so you can put images where I didn't.

"images/brand/logo.png" : "mods/chocolate/logo.png"

You can even swap the logo, as well as item images, in the same manner.

Note that there is no comma after this image swap pair. This is the last image swap pair in the list, so there should be no comma after it. If there is, the whole thing won't work and you'll feel really dumb.

If you break it and can't get it to work in-game no matter how hard you try, don't worry about it. When you send it to me just let me know that you fucked up and I will use my massive unparalleled intellect to fix it for you.

There may be more features to come. Let me know if you have any requests.

Tools[edit]

Twine (http://twinery.org/)
Though it's not required, I recommend installing and using Twine to edit the game's story html file. It's much easier to test this way, in my opinion.
Mod Tester
If in the game you go to About > Modding Page > Modding Tools, you will find a link to the Mod Tester.
Sample Mod File (https://www.mediafire.com/file/e8gcke2lgbmbqyd/SAMPLEMOD.txt/file)
In most versions of the game there is a samplemod.txt file you can use as a starting point. I am currently working on a more comprehensive version of this file, as many images have been added and others have been renamed or removed since the last version of samplemod.txt.
Sample Mod Spreadsheet (https://www.mediafire.com/file/9wle0pmi8j7c5uv/SAMPLEMOD.csv/file)
You might find it easier to work in a spreadsheet file. If you give me a completed spreadsheet I can easily convert this to a functioning mod.