Scripts and how they work

Discuss IB/IBx engine ideas, bugs, etc.
Post Reply
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Scripts and how they work

Post by cartons »

Hey, I've been trying to work backwards to figure out how custom scripts work (with no prior scripting knowledge). In this regard, going through the old forums for examples is kind of funny/fruitless given how scripts were seemingly the only thing that weren't preserved.

Say I wanted to create a passive Trait so that any adjacent allies of the PC with that Trait gains +1 AC, where would I begin?

It seems like a similar enough effect to something like Cleave or Sweep, and I see a "sweepEffect" in the Effect Editor, but nothing that seems to elaborate on its actual effect, nor that ties it to the Trait. How do I get under the hood here?
User avatar
slowdive
Site Admin
Posts: 509
Joined: Wed Jan 15, 2020 4:37 am

Re: Scripts and how they work

Post by slowdive »

I don't think there is a way to have an effect applied to PCs based on their position to each other via a passive trait that builders can script. You could have a trait that summons an effect upon use that causes a "bless" type spell or trait effect that grants a +1 to AC to all friends in the area of effect. You could have the effect duration be very long so that it seems somewhat passive and use a small or no SP so you can just call upon it again when it expires. What you would do is create the effect first and then create a trait (active, not passive) that calls that effect upon use. A passive trait like you are suggesting could be hard coded into the engine for use in traits similar to how cleave is coded, but that would need to be coded into the engine and not through a script. There probably could be a way to use IBscripts to do this, but it would be cumbersome and not really advisable.
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Scripts and how they work

Post by cartons »

Oh, I see. So traits like Cleave and Sweep are hardcoded, a feature of the system, and not like, just another thing I can easily produce.

I'll look into seeing how far I can get with just the Effects editor, I'm sure it's plenty flexible as it is.

Thanks!
Post Reply