Post yer monster scripts here

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).

Pages

AuthorTopic: Post yer monster scripts here
Warrior
Member # 1505
Profile #25
When is Jeff going to add these to the script DB?

--------------------
-Newtfeet
Posts: 151 | Registered: Saturday, July 13 2002 07:00
Apprentice
Member # 4127
Profile #26
quote:
Originally written by Boots:


Am I right that, were it possible to call deduct_ap from scripts other than creature scripts, the absence of AP cost for ability 219 wouldn't be as serious? Not that I'd know whether such a change would be less invasive for JV to make than adding a fixed AP cost to the ability, but presumably certain designers might prefer to have the freedom to vary the cost.

That is correct. I cannot imagine that is too difficult to add to the language, but he would have to call deduct_ap() something else. He does not want to erase the old call (for compatibility), and he needs a way for his interpreter to recognize the right calls as they will have a different number of arguments.

However, this all depends on how difficult it is to add functions to AvernumScript in general. If he has a proper symbol look-up table, it shouldn't be too hard, but then I don't know how he chose to design this.

There are other modifications I would like made to AvernumScript like unary minus and the not operator (!) that are much harder and I doubt those will be added.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Apprentice
Member # 4127
Profile #27
quote:
Originally written by Drakefyre:

I was planning on doing some of this (like the bodyguards and an adapted magekiller script), but you've beaten me to it. Now I'll have to work on something that you won't get to for a while. I'm thinking of working on a creature script that binds a monster to a certain type of terrain (ie fish in the water, birds in the sky, etc.).
Then I will lay off that idea (but to be honest, I had not thought of it). My plans for the next few scripts after familiars are:

A spawning pool that uses very complex messaging to control all its creatures as slaves (it does coordinated target acquisition and sends the creatures there). This will use a combination of tricks from my target acquisition and familiar examples.A bunch of interesting mirror terrains like a mirror of life trapping, and a mirror of opposition (if Jeff fixes give_char_item() so I can duplicate party items).You should be safe for a while. ;)
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Triad Mage
Member # 7
Profile Homepage #28
Well, it's not hard to fake the not operator with excessive use of DeMorgan's laws.

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
Apprentice
Member # 4127
Profile #29
quote:
Originally written by Drakefyre:

Well, it's not hard to fake the not operator with excessive use of DeMorgan's laws.
True. I was thinking that you cannot do it in unary instances such as !char_ok(x), but I guess in all those cases you just do (char_ok(x) == FALSE). So maybe that's not too bad.

It would be nice, however, to have !x available for making x = 1 if 0 and 0 if anything else. Right now that requires an if-branch.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Infiltrator
Member # 3040
Profile #30
quote:
Walker White:
It would be nice, however, to have !x available for making x = 1 if 0 and 0 if anything else. Right now that requires an if-branch.
Or you could do:
x = 1 - x

--------------------
5.0.1.0.0.0.0.1.0...
Posts: 508 | Registered: Thursday, May 29 2003 07:00
Apprentice
Member # 4127
Profile #31
quote:
Originally written by wizardr6:

quote:
Walker White:
It would be nice, however, to have !x available for making x = 1 if 0 and 0 if anything else. Right now that requires an if-branch.
Or you could do:
x = 1 - x

Shorts can be negative. So if x = 2, x = 1 - x makes -1, not 0.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Infiltrator
Member # 154
Profile #32
Since the BoA community lacks an up-to-date Script Archive right now, I've put the scripts linked to in this topic up at TBS. AIM me on UWHugo or something if you want it taken down.

--------------------
Apparently still annoying.
Posts: 612 | Registered: Saturday, October 13 2001 07:00
Warrior
Member # 4202
Profile Homepage #33
quote:
Originally written by Walker White:

True. I was thinking that you cannot do it in unary instances such as !char_ok(x), but I guess in all those cases you just do (char_ok(x) == FALSE). So maybe that's not too bad.

It would be nice, however, to have !x available for making x = 1 if 0 and 0 if anything else. Right now that requires an if-branch.

No, just do what you said: (x == FALSE)
You don't need to put that in an if-branch. It's equivalent to (!x), if that did what you want it to.

--------------------
Creator of the 3D Blades of Avernum Editor for Mac. Get it at Ingenious Isaac's Illusion, my web page. Better yet, get Battle for Wesnoth, a wonderful free TBS game.
Posts: 192 | Registered: Sunday, April 4 2004 08:00
Law Bringer
Member # 2984
Profile Homepage #34
quote:
Originally written by Walker White:

quote:
Originally written by wizardr6:

quote:
Walker White:
It would be nice, however, to have !x available for making x = 1 if 0 and 0 if anything else. Right now that requires an if-branch.
Or you could do:
x = 1 - x

Shorts can be negative. So if x = 2, x = 1 - x makes -1, not 0.

x = x ^ x, maybe? It would make it 1 if x was 0... and for any value larger than 1, it would be larger (unless I'm dumb and tired as hell, shorts are integers only, right?). For any value below 0, it would be positive but smaller than 1.

Then, for any value x != 1,

x = x * 0 ^ (x - 1) would make it 0. (if shorts can be non-whole numbers, the exponent of 0 should be in absolute value signs of course, to avoid giving a divide-by-0 if x<1.)

So after these two operations,

x = x ^ x
x = x * 0 ^ ( x - 1 )
, x should be 1 if it was 1 or 0 before, and 0 if it was any other number before. I'm too tired to think of how to get rid of the 1...

Can you use min to get the smaller of two values? If so,

x = min .5,x *paranthesis omitted due to strange html error*

before the two others should leave it as x if it was smaller than .5, or changing it to .5 if it was anything larger, such as 1.

Probably bugridden, but if it works, you should have changed the x successfully in just three mathematical operations without any if-clause. :)

--------------------
EncyclopaediaArchivesMembersRSS [Topic / Forum] • BlogPolarisNaNoWriMo
Look on my works, ye mighty, and despair.
I have a love of woodwind instruments.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Infiltrator
Member # 3040
Profile #35
No exponents allowed, or even min() and max(). :(
If max() was allowed, then max(0,1-x*x) would work. Too bad there is no such command.

--------------------
5.0.1.0.0.0.0.1.0...
Posts: 508 | Registered: Thursday, May 29 2003 07:00
Law Bringer
Member # 2984
Profile Homepage #36
No exponential operations at all? That sucks... :(

--------------------
EncyclopaediaArchivesMembersRSS [Topic / Forum] • BlogPolarisNaNoWriMo
Look on my works, ye mighty, and despair.
I have a love of woodwind instruments.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
BANNED
Member # 4
Profile Homepage #37
You could simulate exponential operations by assigning variables and multiplying themselves by themselves, ie:
x = x * x

--------------------
*
Posts: 6936 | Registered: Tuesday, September 18 2001 07:00
Infiltrator
Member # 3040
Profile #38
Not when you want the exponent to be a variable. If exponents were allowed, a simple "not" command would be
x = 3 ^ -(x ^ 2)
assuming nonintegral numbers are rounded to the nearest integer.

--------------------
5.0.1.0.0.0.0.1.0...
Posts: 508 | Registered: Thursday, May 29 2003 07:00
Shake Before Using
Member # 75
Profile #39
You can use for loops to do it in that case, can't you?
Posts: 3234 | Registered: Thursday, October 4 2001 07:00
Infiltrator
Member # 3040
Profile #40
Well sure, but if the purpose is merely to make an efficient "not" command, "if" would be the obvious choice when compared to a loop.

--------------------
5.0.1.0.0.0.0.1.0...
Posts: 508 | Registered: Thursday, May 29 2003 07:00

Pages