PHPackages                             haistudio/predictable-random - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. haistudio/predictable-random

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

haistudio/predictable-random
============================

Generates a predictable random number based on a starting seed.

1.0.7(7y ago)0242MITPHP

Since Sep 2Pushed 7y ago1 watchersCompare

[ Source](https://github.com/tobiastoft/predictable-random)[ Packagist](https://packagist.org/packages/haistudio/predictable-random)[ RSS](/packages/haistudio-predictable-random/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Predictable Random plugin for Craft CMS 3.x
===========================================

[](#predictable-random-plugin-for-craft-cms-3x)

Generates a predictable random number (or item in an array) based on a starting seed. For when you want things to seem random, but not really be random.

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require haistudio/predictable-random

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Predictable Random.

Configuring Predictable Random
------------------------------

[](#configuring-predictable-random)

Set a seed with:

```
    {% do setPredictableRandomSeed(666) %}

```

Get current seed value with:

```
    {% do getPredictableRandomSeed() %}

```

Get a random number within a range:

```
    {% set number = predictableRandom(min, max) %}

```

Or get a random value from an array of possible values:

```
    {% set number = predictableRandom([0,2,4,8,16,'bad','code']) %}

```

Predictable Random Roadmap
--------------------------

[](#predictable-random-roadmap)

None whatsoever.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2807d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e9d290c8c429ddc6b84085c59e3ef48ea7f7a7e82bfce437876223f9a14761fa?d=identicon)[tobiastoft](/maintainers/tobiastoft)

---

Top Contributors

[![tobiastoft](https://avatars.githubusercontent.com/u/756968?v=4)](https://github.com/tobiastoft "tobiastoft (9 commits)")

---

Tags

cmsCraftcraftcmscraft-pluginpredictable-random

### Embed Badge

![Health badge](/badges/haistudio-predictable-random/health.svg)

```
[![Health](https://phpackages.com/badges/haistudio-predictable-random/health.svg)](https://phpackages.com/packages/haistudio-predictable-random)
```

###  Alternatives

[verbb/navigation

Create navigation menus for your site.

90683.7k17](/packages/verbb-navigation)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.1k](/packages/verbb-comments)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[supercool/tablemaker

Create customizable and user-defined table fields.

40141.7k](/packages/supercool-tablemaker)[pennebaker/craft-architect

CraftCMS plugin to generate content models from JSON/YAML data.

72148.5k5](/packages/pennebaker-craft-architect)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
