Skip to content

Various Questions

JediMindTrixJediMindTrix Member Posts: 305
edited July 2016 in General Modding
What triggers an area's script? What triggers baldur.bcs? Both vanilla and EE.
Post edited by JediMindTrix on

Comments

  • AquadrizztAquadrizzt Member Posts: 1,069
    I'm pretty sure that baldur.bcs is evaluated continuously. Area scripts are run continuously in the area they are in.

    A more experienced scripter is welcome to correct me, but this is my understanding of how they work.
  • JediMindTrixJediMindTrix Member Posts: 305
    edited July 2016
    Alright, next question. My experience with BG Scripting being what it is, I'm not sure what it can and can't do, and with G3 down I'm out of places to ask/search.

    So, my question is, can I do things like:

    Wait(60)
    IF
    Global("jmt#slay","GLOBAL") !=2
    THEN
    Kill(Myself)

    Or am I restricted to things like:
    Wait(60)
    IF
    Global("jmt#slay","GLOBAL", 1)
    THEN
    Kill(Myself)


    EDIT: Here's another question that's always circulated in my mind: what is the difference between probability1 and probability2?

    Like this, for example: Here's a question that's always circulated in my mind: what is the difference between probability1 and probability2? Example below:

    Type: Cast spell (146)
    Target: Self (1)
    Power: 0
    Cast at level: 1
    Mode: Cast normally (0)
    Timing mode: Delay/Permanent - 4
    Dispel/Resistance: Not dispel/bypass resistance (2)
    Duration: 36
    Probability 1: 75
    Probability 2: 36
  • AquadrizztAquadrizzt Member Posts: 1,069
    So probabilities are rolled from 1 to 100. Probability 1 is the upper limit for activation and Probability 2 is the lower limit.

    So if Pr1 = 75 and Pr2 = 36, then the effect would activate 39% of the time.
  • JediMindTrixJediMindTrix Member Posts: 305
    Why not just do pr1 = 39 and pr2 =0?
  • AquadrizztAquadrizzt Member Posts: 1,069
    edited July 2016
    If there are multiple probability-based effects, you can distribute up the 0 to 100 to have the effects only activate separately.

    So maybe the first effect (30% chance) and the second effect (39% chance) should only fire separately. Then you could put 0 to 30 for the first and 36 to 75 for the second.
  • JediMindTrixJediMindTrix Member Posts: 305
    Thank you!
  • kjeronkjeron Member Posts: 2,368

    Why not just do pr1 = 39 and pr2 =0?

    All effects within a single spell use the same probability roll, so setting ranges from other than zero enables a spell to have mutually exclusive effects.

    If effect 1 has Prob1:35, Prob2:0, effect 2 has Prob1:75, Prob2:36, and effect 3 has Prob1:100, Prob2:76, only one of the effects will ever trigger at a time, rolled separately for each target.

    Prismatic Spray provides a good example of this behavior, everyone is blinded(0-100), while each of the 7 color-based effects has a 15-18% chance of occurring:
    (0-14)(12-29)(27-44)(42-59)(57-73)(71-87)(85-100),
    and an overall 18% chance of 2 of the effects occurring, as each one overlaps another's range by 3 points.
Sign In or Register to comment.