Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Mathematical operation for variables

11 years ago

This may seem rather insignificant, but isn't it a bit ridiculous to have to option of addition, subtraction, multiplication, division and percentage when you could just use +-*/% to do the same without having to open and close the drop-down list every single time.

I mean, it is inefficient, maybe insignificant but inefficient :)

Mathematical operation for variables

11 years ago

This isn't really a bug and should probably be moved to the Advanced Editor Forum).

While you may be limited with the Graphic Interface, you can do very complex functions through Scripting. For example, you could put something like this on a Link to the next Page (by clicking the := button):

IF %WEAPON = 3 THEN
BEGIN
%XDMG := %XDMG - %SOAK2
IF %XDMG < 1 THEN %XDMG := 1
%DMG := (((1D6 + %ZZMELEE + %DMGEXTRA) * %DMGXX) / 100) + %XDMG + %AP - %PENALTY
IF %DMG < 1 THEN %DMG := (1D4 - 1)
%ROLL1 := 1D100
IF %ROLL1 < 6 THEN %KILL2 := 2
%HITX := 30
IF %SHIELD = 2 THEN
  %DODGE := %DODGE + (20 + %ZZMELEE)
IF %SHIELD = 3 THEN
  %DODGE := %DODGE + (30 + %ZZMELEE)
END

Mathematical operation for variables

11 years ago

Scripting is exactly what you need.

 

Mathematical operation for variables

11 years ago

I've read about scripting, the problem is that for simple things like +-*/% it is way easier use the variable changes menu instead, so if I could use those commands instead I would be able to do the same without all the commands in scripting nor having to open the drop-down list every single time :D

Mathematical operation for variables

11 years ago

It really isn't way easier lol. Changing a variable is as simple as:

%MYVARIABLE = %MYVARIABLE - 5

Mathematical operation for variables

11 years ago

Yeah, for doing anything but a simple 1 or 2 variable changes, Scripting is the way to go; because you can change every single variable multiple times at the click of a link, or the load of a page, or across all the pages at once.

And it's as easy as cutting and pasting   :)

Mathematical operation for variables

11 years ago

I think it's still easier to script for a single variable change, honestly. Typing > clicking.