VAM ARCHIVE: Aeternum Tools v5 & Bonus scene (Patreon)
Downloads
Missing 2 full-res photos, 1 file, as this post has not yet been imported.
Content
I made a very quick update to AETools based on a request and posted it on the hub.
CHANGES
Dynamic Numbers
- added loop next & previous operations, same as ++ and -- but the value jumps back to min/max to create a loop
Dynamic Text
- added plugin variables for time:
$today$ - day (Thursday)
$todayd$ - day of the month (28)
$todaym$ - month (7)
$todayy$ - year (2022)
$time$ - current time (69:00 PM)
$timep$ - time period morning (6-12), afternoon (12-17), evening (17-22), night
$timeh$ - time hour 24h
$timem$ - time minutes
$times$ - time seconds
$timet$ - time AM/PM
BONUS
Demo scene with the changes in action & a very quick way to do complex stuff in vam and avoid repetitive work. There's multiple stuff in it, here's what's going on in the scene from left to right:
day slider - how to make loops
when the "Next day" button gets pressed, the variableWeek text atom next to it gets increased by one and loops back to 1 after 7 creating a days loop. This uses the Dynamic Numbers plugin with min set to 1 and max set to 7. The button has a trigger that calls an action OperationNextLoop. The plugin does the rest
dialogue box - how to do variable variable names & use time variables
the purple text atom has a Dynamic Text plugin.
"Game day is [[day{{daynumber}}]]" - here {{daynumber}} is set to be replaced with @variableWeek (the text of the atom with the id variableWeek) so that part becomes [[day1]] or [[day2]] .. [day7]], and each of those have replacements set too like [[day1]] is set to be replaced with Sunday. This was to showcase variable variable names & loops
"Real day is $today$ ($todayy$/$todaym$/$todayd$), time is $time$ ($timep$)" - this makes use of the new feature, plugin variables that get replaced every time the Dynamic Text plugin refreshes, some basic system date & time
lamp - how to do state actions based on variables
there are two helper buttons with OhMyButtons on them so that they can be called through triggers. Button lightAction-default123 turns off the light, lightAction-night turns it on.
the green text atom (variableTimeoftheday) has
- a Dynamic Text plugin with a plugin variable that sets it to be morning/afternoon/evening/night based on the real time
- a Dynamic Trigger plugin with a trigger to the lightAction-default123 button and with the wildcard set to "default123". So when the Dynamic Trigger gets triggered, it will replace default123 with whatever is in the text atom (night/morning/etc). If it's afternoon it will try to trigger an atom with the id lightAction-afternoon if it exists.
the update light button then does 3 things:
1. refreshes variableTimeoftheday , it gets updated with the current time of the day
2. triggers the default action, turns the lamp off
3. tries to trigger a specific action for that time of the day if it exists
Took me longer to write all of this than making it lol but I'm sure some of you might find it useful. It's a very quick way of doing states in vam without having to do lots of repetitive stuff and keeps your scene a bit cleaner and easier to manage
Demo scene goes in /Saves/scene/* and needs:
- AeternumTools v5 from the hub - https://hub.virtamate.com/resources/aeternum-tools-pack.15127/
- OhMyButtons - https://hub.virtamate.com/threads/oh-my-buttons.23522
Files
Previews only