Announcement

Collapse
No announcement yet.

Wardrobe

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wardrobe

    I was making a wardrobe script for my small side project with Neo and her cosplays, when I realised this script might be useful to other modders, so did some tweaks on the script to make it more user friendly and be as dynamic as I could make it for yet another framework mod (Mostly because Sgt Hebert said he might use it)

    Click image for larger version  Name:	unknown.png Views:	0 Size:	43.4 KB ID:	260

    ***For Players***

    If you are just here to get the script for a mod that uses it, simply download Wardrobe v1.zip

    Compatible Mods
    none so far

    Install instructions:
    1. Unzip this file into your /HaremCollector_vxxx folder
    2. Play the game and enjoy the mod

    ***For Modders***

    Due to nature of what this script does I will have to ask for more than usual with my framework mods. One is I need you to create a folder at "Mods/Graphics/System/Wardrobe/YOUR FOLDER" and put the icons for your wardrobe there. Similar to the folder you'd find "Graphics/System/Wardrobe/Girls" you'd find for base game. The extra folder option is chosen to avoid stuff like toestepping with names

    Click image for larger version  Name:	unknown.png Views:	0 Size:	19.0 KB ID:	261

    Secondly like the girls folder from base game I'll need you to add icons in that folder you just created. These icons should be a single sprite only. And the script can support up to a height of 40 pixels, this is to allow for stuff like hats or long ears or whatever, any higher will still be added, you'll probably just see clipping. The width is still the usual 32 pixels

    Click image for larger version  Name:	unknown.png Views:	0 Size:	15.3 KB ID:	262
    Lastly I will need you to create a hash with some information on your character and an entry for each outfit you'd like added to the wardrobe. Example

    Code:
    Here's the format:
    
    alias ALIAS make_wardrobe
    def make_wardrobe
      ALIAS
      $wardrobe[:KEY] = {
        :actor_id => ACTOR ID,
        :adjust_var => ADJUST SPRITE VARIABLE ID,
        ADJUST_VALUE => {
          :name => ["SPRITESHEET", INDEX],
          :help => ["HELP TEXT"],
          :icon => ["FOLDER", "ICON NAME"],
          :unlocked/switch/varibles => WILL EXPLAIN IN A SEC
        },
      }
    end
    
    Explaining the keys:
    ALIAS = Must be unique it's to allow for multiple people to use the same method
    
    KEY = A unique key to reference the specific characters wardrobe
    
    ACTOR ID = is the ID of the actor to which the wardrobe belongs to. This key
    should only be used if it is for an actor
    
    ADJUST SPRITE VARIABLE ID = Is the ID of the variable you use for
    the adjust_sprite method
    
    ADJUST_VALUE = Is the value adjust variable should be set to
    when choosing this outfit
    
    SPRITESHEET = Is the spritesheet the outfit belongs to
    INDEX = Is the Index on the spritesheet. Use index 0 for spritesheet with "$"
    
    HELP TEXT = Is the text that shows up in the top window when
    hovering over that outfit. It can support two lines of text.
    1 line is ["TEXT"]. 2 lines is ["LINE 1", "LINE 2"]
    Do not use /n to make a line break, it will not auto-center
    
    FOLDER = Is the folder in which you put the icons for your outfit.
    It should be a folder somewhere inside "Mods/Graphics/System/Wardrobe".
    This is done to avoid toestepping
    
    ICON NAME = Is the name of the icon file for this outfit you put
    into the folder from "FOLDERNAME. This can support icons up to a
    height of 40 pixels. This is to allow for stuff like hats
    
    ADJUST VARIABLE VALUE = Is the value adjust variable should be set to
    when choosing this outfit
    
    The last argument is the unlock conditions. There are three:
    
    :unlocked => true
    Will have the outfit unlocked by default
    
    :switch => [switch id, true/false]
    Will have the outfit unlocked when that switch it set to true or false
    
    :variable => [variable id, value]
    Will have the outfit unlocked when that switch is equal to or higher than the value
    
    Example:
    
    alias neo_make_wardrobe make_wardrobe
    def make_wardrobe
      neo_make_wardrobe
      $wardrobe[:neo] = {
        :actor_id => 60,
        :adjust_var => 1107,
        0 => {
          :name => ["$Neopolitan", 0],
          :help => ["This is her base outfit"],
          :icon => ["Neopolitan", "NeoBase"],
          :unlocked => true
        },
        1 => {
          :name => ["$NeopolitanAlt", 0],
          :help => ["This is her alternative outfit", "from finishing her armour"],
          :icon => ["Neopolitan", "NeoAlt"],
          :variable => [1106, 7]
        },
      }
    end
    
    In this example I'm adding Neo's base and alternative outfit to the wardrobe
    To open the Wardrobe use this in a script call

    Code:
    open_wardrobe(:KEY)
    
    :KEY = Is the key you chose in your wardrobe hash creation
    
    For example if you go back to my Neo example you'll see I gave her entry the key :neo ($wardrobe[:neo] = {)
    So I'd have to do
    
    open_wardrobe(:neo)
    You are free to include this script in your mod, I however suggest not doing so. Because I might update or bugfix the original code, so if you included it in your, you would have to update aswell or your mod would revert it back. Instead I'd suggest just referring people to this page instead.
    Last edited by RomeoPapa; 06-05-2022, 01:43 AM.
Working...
X