Difference between revisions of "Extensions:Character Foregrounds"

From Lorekeeper Wiki
Jump to navigation Jump to search
(Created page with "{{Extensioninfobox|title=Character Foregrounds|desc=Adds layered foregrounds.|auth=Camyza, Frank (adjustments on original code), Preimpression |status=Testing|github={{Github|...")
Tag: 2017 source edit
 
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
See the original character backgrounds extension:
 
See the original character backgrounds extension:
 
[[Extensions:Character Backgrounds]]
 
[[Extensions:Character Backgrounds]]
 
{{Extensioninfobox|title=the extension's name|desc=A short description|auth=Author(s)|status=status (such as WIP, testing, stable)|github={{Github|user=username|branch=branch}}|LKVer=What Lorekeeper version the ext is built on|migration=yes/no|package=yes/no}}
 
<!-- Put a short summary of your extension here! -->
 
== Installation ==
 
<!-- Describe installation. Include any requirements (such as packages), necessary commands, etc. -->
 
== Configuration ==
 
<!-- Is any configuration necessary? Describe it here! -->
 
== Usage ==
 
<!-- Is there anything users should know about using your extension? -->
 
== Troubleshooting ==
 
<!-- Are there known issues or errors that require user action? Who should they contact, and where, for support? -->
 
== Images ==
 
<!-- Do you have any images to show what it looks like in action? -->
 
== See Also ==
 
<!-- Any relevant other pages. You may consider linking to related extensions, for instance. -->
 
 
  
 
== Installation ==
 
== Installation ==
Line 37: 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