Difference between revisions of "Extensions:Character Foregrounds"

From Lorekeeper Wiki
Jump to navigation Jump to search
Tag: 2017 source edit
 
(One intermediate revision by the same user not shown)
Line 21: Line 21:
 
It is *required* to create an Item Category that is specific for foregrounds. This category should be set to allow characters to hold them.  
 
It is *required* to create an Item Category that is specific for foregrounds. This category should be set to allow characters to hold them.  
  
The foreground image needs to be transparent to show up.  It does not actually edit any images.  It uses the z-index property with Laravel's built in feature, $loop->index, to go through them. It will layer the background first (if you have any) and then the character image itself.  So with that, it will be 0, and 1, and start with 2 and etc for the foregrounds.  If you have none set for any foreground, it will not display anything on a character's page.
+
The foreground image needs to be transparent to show up.  It does not actually edit any images.  It uses the z-index property with Laravel's built in feature, $loop->index, to go through them. If you have none set for any foreground, it will not display anything on a character's page.
  
**I wasn't able to make these position-able**, so you will have to make sure the foreground images are the same size as the backgrounds + transparent.  IF anyone is able to do this, please do make a PR as it would be a lovely addition for even more customization.
+
I wasn't able to make these position-able, so you will have to make sure the foreground images are the same size as the backgrounds + transparent.  IF anyone is able to do this, please do make a PR as it would be a lovely addition for even more customization.
  
 
== Troubleshooting ==
 
== Troubleshooting ==

Latest revision as of 17:04, 23 November 2025

Character Foregrounds
Description Adds layered foregrounds.
Author(s) Camyza, Frank (adjustments on original code), Preimpression
Status Testing
Github extension/character-foregrounds-v3
LK Version 3.0.0






Character Foregrounds With Backgrounds
Description Adds layered foregrounds with character backgrounds.
Author(s) Camyza, Frank (adjustments on original code), Preimpression
Status Testing
Github extension/character-backgrounds-foregrounds-v3
LK Version 3.0.0






This extension adds cosmetic foregrounds in the form of item tags. Thanks to Uri for the base code and Frank for adjustments! I made two versions: one with only Foregrounds and one with Foregrounds and Backgrounds installed to make it painless to install [hoping!].

See the original character backgrounds extension: Extensions:Character Backgrounds

Installation

After pulling the branch and merging it in, run

php artisan optimize

and

php artisan update-extension-tracker

.

Configuration

All items with this tag will need an image to be uploaded. This image needs to be transparent. It does not validate on file size, so you may wish to add that in yourself.

As each site's usage of this may differ, you may need to go into

views/character/character.blade.php

and

views/character/_profile.blade.php

to adjust anything necessary as far as html or css goes.

Usage

It is *required* to create an Item Category that is specific for foregrounds. This category should be set to allow characters to hold them.

The foreground image needs to be transparent to show up. It does not actually edit any images. It uses the z-index property with Laravel's built in feature, $loop->index, to go through them. If you have none set for any foreground, it will not display anything on a character's page.

I wasn't able to make these position-able, so you will have to make sure the foreground images are the same size as the backgrounds + transparent. IF anyone is able to do this, please do make a PR as it would be a lovely addition for even more customization.

Troubleshooting

If you need any help, ping me on Discord, Camyza. It's best to make a general-help channel in the LK Discord so that it won't get lost in my DMs.

Images

See Also

Support Uri! https://ko-fi.com/preimpression