Bloodlines Mod Resource - Scripted Timer

⭐ — (1 endorsements) 📥 27 downloads 📌 v1.0 📅 2/22/2025
🟠 Updated over a year ago

By Rendara · Modders Resources and Tutorials

⬇ Download Mod Source: Nexus Mods ↗ 📅 Updated: 3/3/2025 📅 Created: 2/22/2025

🔍 Analysis

  • 🏆 #5 of 7 Modders Resources and Tutorials mods in this game by downloads

📋 About This Mod

This is an efficient Python timer that can fire off functions at set intervals. No need to restrict yourself to maps with logic_timer entities - this implementation works in any map, out of the box.An example map and accompanying script is

While I was scripting a diablerie function for someone on PV, I was frustrated that timer functionality was locked behind the logic_timer entity, which isn't embedded into many maps. For a new global function, this would require recompiling every map that didn't have the entity, which I wasn't prepared to do. So I wrote this as a completely independent scripted timer instead.

I don't think I'm the first person to do this because it's such a simple block of code, however I've not seen any documentation for this specific solution in any major modification. There is a "time"  module that can be imported into any level script but I found it to be highly inefficient and overkill for a timer, so you should experiment with that too and consider your own use case accordingly.

Instructions

To test, open the console on the title screen and submit "map re_timer". Once you load into the map, open the console again and submit "unpause". You'll see an update message being printed to the console every second, for twenty seconds. This may look like a logic_timer output, but it isn't. You can decompile the map and see for yourself, it has no entity except for info_player_start.

Once you have a grasp of what's happening in-game, navigate to the timer.py script and tweak the loop range parameter and seconds variable. These change how many threads will be fired in total, and how long the intervals between firing are, respectively.

Please note that any threaded function parameters will always be taken from the end of the currently executed block/loop BEFORE their

time of execution.

For example, if the timer.py loop was specifying "myFunc(seconds)", then the passed parameter value would be "20" for ALL

of the threaded functions, even if the thread was scheduled while the value was different.

Thankfully this limitation has an easy workaround - global variables. See the "number" variable in the timer.py script as a simple example of how global vars can be applied in lieu of threaded parameter passing.

If you plan on using this and expanding it for your own project, I strongly recommend that you insert this functionality into your vamputil.py script so that it can be called from anywhere.

📊 Mod Details

Game
Vampirebloodlines Mods
Author
Rendara
Version
1.0
Downloads
27
Endorsements
1
Category
Modders Resources and Tutorials
Created
2/22/2025
Updated
3/3/2025

🔧 How to Install Vampire: The Masquerade - Bloodlines Mods

Install via a mod manager (Vortex or Mod Organizer 2). Most mods drop into the game folder.

📖 Full step-by-step install guide for Vampire: The Masquerade - Bloodlines →

Visit the official mod page for specific installation instructions for this mod.

🎮 Need cheat codes or console commands? Check ur gaming wiki for Vampire: The Masquerade - Bloodlines commands, item IDs, and more.

Keep browsing — more Vampire: The Masquerade - Bloodlines mods await

📋 All Vampire: The Masquerade - Bloodlines Mods 🏆 Top 25 📂 More Modders Resources and Tutorials 👤 More by Rendara 🔎 Similar Mods 🌐 Best Modders Resources and Tutorials (All Games) 🔀 Check Compatibility ⚖️ Compare Mods 🆕 New Mods