Scripter

Acid Bubbles

Invaluable member
Developer
Featured Contributor
Messages
1,395
Reactions
5,707
Points
173
Website
github.com
Twitter
acidbubblesanon
Patreon
acidbubbles
Acid Bubbles submitted a new resource:

Scripter - Write scripts to invoke triggers, keybindings, move atoms and much more

Scripter

? Do you like Timeline? Support me on Patreon and get early access to new features: https://www.patreon.com/posts/39197180

? Need help creating animations or want to share your works of art? Join us on Discord! https://discord.gg/VtUpPkb

WARNING: This project is in progress, and everything may not work, some pieces might be missing, etc...

Read more about this resource...
 
Is it possible to for example, script loading of different outfit for different persons in a scene? Creating a scene where I need clothes to change during different states and using triggers is getting really really tiresome :/
 
@Mutatta yes, well as long as it's a trigger. The current version doesn't support "url triggers", but I'll make sure to add it in the next build.

As for the state engine, you could do that. Scripter doesn't support classes, but you can use duck typing, so something like let state1 = { next() => { state = state2; } } for example could work. I'm open to other ideas too :)

Here's the docs if you're curious to see what you can do. Oh, and ping me on Discord if you want a build, as I said on the page it's not for sale, I'll send a build to you if you want to try it :)
 
@Acid Bubbles Hi and thanks for the reply!

Looking forward to next build then with url triggers !

" Here's the docs if you're curious to see what you can do." Where? :)
" and ping me on Discord if you want a build" yes will do! Thanks.
 
Could I use this to write a simple game-like thing? I mean:
  • have variables
  • let variables be changed when buttons are clicked
  • depending on the state/value of the variables, trigger other stuff/script code
Stuff like that? Can you write multiple methods with arguments, etc. and call them?
 
@BigBoobCoomBlast69 maybe, maybe not. I'll make a few step by step guides to help non-programmers get started.

@pinosante yes, that's exactly what it was designed for. You could use it for things like arousal meters, triggering events when it moves past a certain point, keep track of state, respond to collisions with conditions, to distance... you can go pretty crazy, I mean it's a full scripting language. You can create functions, modules, create storables and read them. When you install the plugin it shows you example but I'll make guides. If you have suggestions, tell me it'll help shape those.
 
This looks pretty awesome and very powerful.
Do you think I could use this to compare the y-rotation of 2 person atoms? Either with simple math or a transform DOT operation?
 
@bill_prime to quote myself on Discord:

> I implemented some very basic Unity wrappers like transform and distance, but I didn't implement Vector3 yet because making them objects would be expensive because of the .NET GC, and I used a struct implementation to get (relatively) high performance, which is limited to 32 bits currently for any types... I'll need to implement tuples before I can start implementing all vector and quaternion functions (and there are a lot!) but yes, eventually this can be done. I'm not sure yet how to draw the line and say "at this point, write a C# plugin".

This being said, once I have Vector3 implemented (if there's enough interest in Scripter) doing all of the Quaternion and Vector3 maths available would be fairly simple. Keep in mind though, you'll never get performance on par with C# with this, so for more complex processing, C# is still the way to go. But to do things like move on an axis or read the position of something, then yes that's absolutely possible. For now the only thing you can do with transforms is get the distance. If you have a specific use case in mind, please share it, adding things (except using tuples/structs like Vector3) is very simple.
 
@bill_prime to quote myself on Discord:

> I implemented some very basic Unity wrappers like transform and distance, but I didn't implement Vector3 yet because making them objects would be expensive because of the .NET GC, and I used a struct implementation to get (relatively) high performance, which is limited to 32 bits currently for any types... I'll need to implement tuples before I can start implementing all vector and quaternion functions (and there are a lot!) but yes, eventually this can be done. I'm not sure yet how to draw the line and say "at this point, write a C# plugin".

This being said, once I have Vector3 implemented (if there's enough interest in Scripter) doing all of the Quaternion and Vector3 maths available would be fairly simple. Keep in mind though, you'll never get performance on par with C# with this, so for more complex processing, C# is still the way to go. But to do things like move on an axis or read the position of something, then yes that's absolutely possible. For now the only thing you can do with transforms is get the distance. If you have a specific use case in mind, please share it, adding things (except using tuples/structs like Vector3) is very simple.

Ah I gotcha, thanks for the explanation of where the plugin is at and your vision for it.
I already have a plugin in C# to do what I need, but its a modified version of another user's plugin that wasn't working properly.
I am building is a Dance/Lapdance scene where the dude is in a chair and his head looks at different parts of the girls body depending on if she is facing him or not (mostly he looks at her boobs). The dude's head also moves around with Gaze.
So I am comparing the y-rotation of the dude and the girl's chest to know when she has turned around, and have the dude look at different parts automatically.
The idea is you can just Embody/Passenger the dude and he will automatically look at at random parts of the girl that make sense at the time.
 
Acid Bubbles updated Scripter with a new update entry:

Scripter v1.0.1

- scripter.onLateUpdate, onEnable, onDisable, onDestroy
- Ability to assign to properties returned by function calls (e.g. storable.getFloatParam("x").val = 1)
- Prevent controllers from being moved (lookAt, moveTowards) when physics is frozen
- Stop the running module when parsing errors are detected (e.g. onUpdate steps if an error is found after change)
- Fix crash when using atom.getStorableIds
- Distance now supports any transforms, not only controllers (e.g. player.head)
- Fix error in...

Read the rest of this update entry...
 
Hello, I want to implement a function where the girl's feet are flat in the timeline animation. I want the girl to rotate the girl's feet 45 degrees in each frame callback in Scripter to fit high heels. Can this function be implemented through Scripter? I have tried and found that every frame's callback cannot overwrite the timeline's animation
 
Hello, I want to implement a function where the girl's feet are flat in the timeline animation. I want the girl to rotate the girl's feet 45 degrees in each frame callback in Scripter to fit high heels. Can this function be implemented through Scripter? I have tried and found that every frame's callback cannot overwrite the timeline's animation

I think you can use the bulk changes in timeline to rotate the feet in all frames: https://github.com/acidbubbles/vam-timeline/wiki/Bulk-screen
 
Acid Bubbles updated Scripter with a new update entry:

Scripter v1.1.0

- Add scripter.containingAtom
- Add position, localPosition, eulerAngles and localEulerAngles on Transform and Controller (you can read and set the x, y and z values and use position.set(0, 0, 0))
- When loading a scene, wait at the end of the frame before running the script
- Fix lookAt and moveTowards not working unless physics is frozen

Read the rest of this update entry...
 
Here are some suggestions for Scripter that you can ignore. If there is any offense, please forgive me

1.I hope to add more APIs that operate on atoms separately and strive for object-oriented programming,such as
const atom=scene.getAtom("Person");
const control=atom.getController("control");
//move atom
control.move(x,y,z);
//rotation atom
control.rotation(degree);
//hide atom
control.hide();
//show atom
control.show();
//load atom preset
atom.loadPreset(type,path)

2.Can you add external trigger options to each JavaScript code segment, so that different triggers can be triggered through different logic in the JavaScript code? For example, when I click on an external button, the button triggers a JavaScript code segment. By judging certain logic in the JavaScript code, I feel like I am doing something and triggering what kind of trigger. I think that's great
 
Hey @9527todo - suggestions are always welcome, though I cannot make them all :D So I think a lot of what you asked is possible now.

Code:
const atom = scene.getAtom("Person");
const control = atom.getController("headControl");
control.position.set(1,2,3);
control.euleurAngles.x += 45;

const presets = atom.getStorable("AppearancePresets");
presets.getStringParam("presetName").val = "MyPresetName";
presets.invokeAction("LoadPreset");

On the on/off is missing, I'll add that in the next build (not sure when)
 
Back
Top Bottom