×
Create a new article
Write your page title here:
We currently have 13 articles on Fleshcult Wiki. Type your article name above or create one of the articles listed here!



    Fleshcult Wiki

    Jinja is a template language that lets you plug variables and such into an HTML page.

    What it looks like

    {# I'm a comment #}
    {% for nipple in nipples %}
    	{% if nipple.damageLevel > 3 %}
        		<li>NIPPLE CRISIS: {{ nipple.damageLevel }}</li>
    	{% endif %}
    {% endfor %}
    
    

    Not to be confused with Python format strings, which only use one set of curly braces around a variable: { turgidosity_limit }

    Adding to a page with blocks

    This is the preferred way to edit Fleshcult's HTML because different mods can add stuff to the same pages without replacing each other's work.

    Every page in Fleshcult is split into a series of named blocks:

    {% block heading %}
    	...
    {% endblock %}
    
    

    These provide landmarks which let you specify where in the page your mod content should go. An easy way to find out what you should name your block filename is to open the page in developer tools and look for comments near where you want to add that say something like:

    <!-- Add content here by writing a template_blocks/lair_status_content_before.html file into your mod folder -->
    
    


    Displaying variables

    As in Python you can use dots to access the variables inside objects.

    Here's a horribly incomplete list of variables you can use:

    • player - The current game state.
      • player.doms[0] - The player character
    • encounter - The current sex scene. Not available at the lair.
      • encounter.dom - The player character, again.
      • encounter.sub - The mortal character in a sex scene.
      • Note: Each character has a bunch of Character Variables inside it.
    • messages - When something happens in a sex scene, it's described in the messages list. This is a list of paragraphs which each have a list of sentences.
    • strx.format() - The string translator. This is the thing that fills in variables for dialogue editor content, so you can use those same variables (e.g. {obj.name}) from inside a Jinja template.
    • flashmessages - The error messages that appear in the bright orange box


    Find out more

    Making Mods
    How To

    Getting StartedDeveloper ModePython Tutorials

    Parts of a mod

    File HierarchyDialogue Editor

    Tech

    JinjaCSSPython

    Distribution

    Steam WorkshopWorkshop Content Policy

    Cookies help us deliver our services. By using our services, you agree to our use of cookies.

    Recent changes

  • Jackoekaki • 8 days ago
  • Jackoekaki • 1 month ago
  • Jackoekaki • 3 months ago
  • Jackoekaki • 4 months ago
  • Cookies help us deliver our services. By using our services, you agree to our use of cookies.