A. Micael : I must be stupid!

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: A. Micael : I must be stupid!
...b10010b...
Member # 869
Profile Homepage #25
Hmm. To minimise the chance that the party will lose items, make sure there are no other items (or at least, as few as possible) in the same town as the party when they die.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Post Navel Trauma ^_^
Member # 67
Profile Homepage #26
Incidentally, there's really no need to delete the question once you have an answer.

--------------------
Barcoorah: I even did it to a big dorset ram.

New Mac BoE
Posts: 1798 | Registered: Thursday, October 4 2001 07:00
Agent
Member # 4506
Profile Homepage #27
quote:
Originally written by Khoth:

Incidentally, there's really no need to delete the question once you have an answer.
Yeah, but it was showing part of my code...

And Thuryl, thanks for your help - I've got it working perfectly now. (Apart from the screams - is there any way I can muffle those?)

- Archmagus Micael

[ Saturday, October 08, 2005 03:48: Message edited by: Archmagus Micael ]

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
...b10010b...
Member # 869
Profile Homepage #28
quote:
Originally written by Archmagus Micael:

quote:
Originally written by Khoth:

Incidentally, there's really no need to delete the question once you have an answer.
Yeah, but it was showing part of my code...

It'd be nice if you left enough context to make it clear what the question was about. Someone else might come along with the same problem as you had, and read this topic to try and find a solution.

quote:
And Thuryl, thanks for your help - I've got it working perfectly now. (Apart from the screams - is there any way I can muffle those?)

- Archmagus Micael
Hmm... not as far as I know. Turning the party to stone and back instead of killing them worked in BoE, but I think that in BoA that still produces a sound effect.

[ Saturday, October 08, 2005 04:51: Message edited by: Thuryl ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Agent
Member # 4506
Profile Homepage #29
Another silly question: (i'm full of them today)

Is there a call to make the game check what graphic picture a character is.

eg (something like this).

if (get_graph_picure(char) == number) {
SOME SCRIPT
}
- Archmagus Micael

[ Saturday, October 08, 2005 04:57: Message edited by: Archmagus Micael ]

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
...b10010b...
Member # 869
Profile Homepage #30
I am almost certain that no such call exists. Why would you want to know this, anyway? Trying to create a duplicate of a party member or something?

(Of course, one way around it is to provide a premade party for your scenario, in which case you know what graphics they have.)

[ Saturday, October 08, 2005 05:03: Message edited by: Thuryl ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Master
Member # 5977
Profile Homepage #31
quote:
Originally written by Thuryl:

(Of course, one way around it is to provide a premade party for your scenario, in which case you know what graphics they have.)
But then the player can always change the character graphics, or not?

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
...b10010b...
Member # 869
Profile Homepage #32
If you provide a premade party, the player shouldn't change anything about it. They can, but they're not supposed to, and if they don't honour your polite request that they refrain from doing so, well, that's not your fault. :P

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Master
Member # 5977
Profile Homepage #33
I'm still wondering about the premade party. You define the items a premade party has, don't you? Well, if so, then you can always take their items and put in the town where it all happens some boxes where you yourself store the same items. This could work, couldn't it?

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Triad Mage
Member # 7
Profile Homepage #34
Unless they pick up more items in the meantime. Or drop some.

--------------------
"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
Agent
Member # 4506
Profile Homepage #35
quote:
Originally written by Thuryl:

I am almost certain that no such call exists. Why would you want to know this, anyway? Trying to create a duplicate of a party member or something?

(Of course, one way around it is to provide a premade party for your scenario, in which case you know what graphics they have.)

I just wanted it for a very simple "he/she" text in the append_string thing.

I don't want to have a pre-made party, cause that eliminates my monster changes level along with party script.

Anyway, thanks for all of your help. If there isn't a call I'll have to go without.

I've nearly finished the scripting for town 10 (Baron Effek's dungeon).

But it's slow going, and I haven't started on the dialogue yet.

- Archmagus Micael

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
Law Bringer
Member # 4153
Profile Homepage #36
EDIT: Groan... sorry, I hadn't noticed the second page, and I was responding to post #24, not realizing the discussion had moved on.

In short, I'm an idiot. Ignore this post.

[ Saturday, October 08, 2005 09:54: Message edited by: Ephesos ]

--------------------
Gamble with Gaea, and she eats your dice.

I hate undead. I really, really, really, really hate undead. With a passion.
Posts: 4130 | Registered: Friday, March 26 2004 08:00
Agent
Member # 4506
Profile Homepage #37
Guys,

Is there a way (hopefully not too complicated) to make the random_party_member() call NOT select a character already taken by one of these calls.

Example:

a = random_party_member();
b = random_party_member();
c = random_party_member();
d = random_party_member();

Elizabeth is A. I don't want Elizabeth to be B,C or D. Those I want for say. Rachel, Rupert and Furball.

So each of these random_party_member() calls can select 1 character, but they can't select a character alredy selected.

Does this make any sense? :(

Also,

Kel, I'll probably be using your "Shaking Screeen" script for in this cutscene.

- Archmagus Micael

[ Sunday, October 09, 2005 03:39: Message edited by: Archmagus Micael ]

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
...b10010b...
Member # 869
Profile Homepage #38
begintownscript;

variables;
short a, b, c, d;

body;

beginstate 10;
a = -1;
b = -1;
c = -1;
d = -1;

a = random_party_member();
if (party_size() == 1)
set_state_continue(11);

b = a;
while (a == b)
{b = random_party_member();}
if (party_size() == 2)
set_state_continue(11);

c = b;
while ((a == c) || (b == c))
{c = random_party_member();}
if (party_size() == 3)
set_state_continue(11);

d = c;
while ((a == d) || (b == d) || (c == d))
{d = random_party_member();}
set_state_continue(11);
break;

beginstate 11;
//do whatever you need to do with the party members here
break;
Note that the above script accounts for the possibility that the party has fewer than 4 members; if the script runs out of new party members to select, all variables after that point are set to -1.

If there are NPCs in the party, the script may randomly select NPCs. You can avoid this by making sure the number of the party member selected is less than 4.

I think I'll submit a slightly prettified version of this script to the Codex, if you don't mind. It seems like the sort of thing that could be useful to other people.

[ Sunday, October 09, 2005 13:26: Message edited by: Thuryl ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Agent
Member # 4506
Profile Homepage #39
Ah - Thuryl,

The game's now whining about a while loop not having a bracket.

Also, should there be a break or not before "beginstate 11 (in my caase 29)?

Thanks!

- Archmagus Micael

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
Master
Member # 5977
Profile Homepage #40
Yes. After every ending of a state, no matter if there's a set_state_continue call, there should always be a break.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Agent
Member # 4506
Profile Homepage #41
quote:
Originally written by Thralni, emperor of Riverrod:

Yes. After every ending of a state, no matter if there's a set_state_continue call, there should always be a break.
That's what I normally do, but Thuryl's code seems to do it differently, so I thought that I might as well do it as Thuryl's example shows.

As it is, I think I'll just have to wait for Thuryl to post a reply anyway.

- Archmagus Micael

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
...b10010b...
Member # 869
Profile Homepage #42
Added brackets to all of the while loops. You probably could have done that yourself, but oh well.

You emphatically do not need a break statement at the end of state 10. It's supposed to continue on to the next state. This works fine as long as the next state in the script is the state you want to run next.

But just to appease you, I've added a completely pointless set_state_continue and break statement.

[ Sunday, October 09, 2005 13:27: Message edited by: Thuryl ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Master
Member # 5977
Profile Homepage #43
I myself would always add them, although it maybe isn't necessary, just for the sake of my own understanding of it all. If I wouldn't do it, I would probably get confused to no end.

However, now that I looked in the docs, I understand why it isn't necessary. I'll still put those breaks in, though.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Agent
Member # 4506
Profile Homepage #44
quote:
Originally written by Thuryl:

Added brackets to all of the while loops. You probably could have done that yourself, but oh well.

You emphatically do not need a break statement at the end of state 10. It's supposed to continue on to the next state. This works fine as long as the next state in the script is the state you want to run next.

But just to appease you, I've added a completely pointless set_state_continue and break statement.

Thanks!

I was wondering whether it needed a few of these: { or not, but I always thought the game refered to those as parenthesis, not brackets.

Anyhow, I think I'll leave it without the break in, just cause it looks nicer like that.

Thanks! (until my next evil problem).

- Archmagus Micael

[ Monday, October 10, 2005 05:58: Message edited by: Archmagus Micael ]

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
...b10010b...
Member # 869
Profile Homepage #45
quote:
Originally written by Archmagus Micael:

I was wondering whether it needed a few of these: { or not, but I always thought the game refered to those as parenthesis, not brackets.
Parentheses are these: ()

Technically, [] are brackets and {} are braces, but Avernumscript doesn't use [] for anything.

[ Monday, October 10, 2005 12:09: Message edited by: Thuryl ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00

Pages