Jump to content

A. Micael : I must be stupid!


Recommended Posts

Uh... practically speaking, a level 200 door lock will send the message that it's not supposed to be opened. I believe you've gone a bit far with that.

 

As for your teleportation problem, it looks like it should work, as long as there's a town entrance set up for each of the towns you're teleporting to. Otherwise, the game won't notice that the party's outdoor location has changed.

 

So, if you don't have an entrance specified in the outdoors for the target towns, you might need to use change_outdoor_location(short what_section_x, short what_section_y, short loc_in_sector_x, short loc_in_sector_y). It's a weird call, really. But it kind of works.

 

I hope that made sense, and good luck with your scenario. Don't forget to test it...

Link to comment
Share on other sites

Thanks!

 

I'll add the call when I have the time.

 

Also, I don't want Gods to be able to open it. And with the 3D editor, it lets me put doors over 200, unlike the standard one. This makes sure that you won't be able to open it - ever!

 

And for testing purposes, if people really need to access certain doors, I'll just make a custom item which opens all doors in a town.

 

It aught to work.

 

Plus, one more question. In combat mode, my testing party (testing it as it gets made) can skip past certain of my states. I've heard that there is a code to prevent this, but I don't know it - or how well it works...

 

Thanks again!

 

- Archmagus Micael

Link to comment
Share on other sites

Thanks! Will do.

 

Also, one more question: (again)

 

Has anyone made a custom Syntax file for Crimson Editor. I was just downloading the latest version, and I noticed that it allows custom syntax files.

 

So has anoyone here made one for AvernumScript?

 

Here's what it says on the CE website:

Quote:

Syntax Highlighting for HTML, C/C++, Perl, Java, Matlab and LaTeX. Also, it can be extended for other programming languages based on custom syntax files.

Thanks!

 

- Archmagus Micael

Link to comment
Share on other sites

Guys,

 

I want to make a custom monster which only blasts the party with the "Fireblast" Mage spell. How do I do this? I assume it's sometething to do with specifically saying what spells it can cast and how often or something, but I don't quite get how to do that...

 

frown

 

- Archmagus Micael

Link to comment
Share on other sites

Code:
void change_spell_level(short which_char,short mage_or_priest,short which_spell,short amt_to_change)
Changes the skill character which_char knows spell which_spell by amt_to_change (which can be negative). If mage_or_priest is 0, changes mage spell. If 1, changes priest spell. If the character is a party member, he or she can only learn the spell if his or her mage or priest spells skill is high enough. If the skill isn’t high enough, this call has no effect.
Link to comment
Share on other sites

The most sensible place to put that call, by the way, is in the INIT_STATE of the creature script. Then, you can use my_number() for the which_char argument.

 

Also, since spells default to level 2 for monsters, you want to change every spell except Fireblast by -2.

Link to comment
Share on other sites

Guys,

 

I'm pretty sure that Ive asked this question before (and got some helpful answers), but I can't seem to find it anywhere, so I'll ask again:

 

I want a bit where my party is split up (eg. the Vahnatai prisony place in A3), so that only one person can go through this secret passage at a time. What script would be best for me to use? (and why?)

 

AND

 

I want the party's items to be "confiscated" from them when they enter the town, yet they can find them again before they leave. (undamaged etc).

 

How do I do this?

 

- Archmagus Micael

Link to comment
Share on other sites

So, wait, there's a call which exists for the specific purpose of splitting up the party, but you're wondering if there's a better way to split the party than the way specifically designed for the purpose of splitting the party? Well, the answer is no. :p

 

As for taking away the party's items in such a way that they can be given back later, the only way to do it is to kill the party, teleport them to somewhere where they can't reach their items, and resurrect them. The items will be left where the party dropped them.

Link to comment
Share on other sites

Quote:
Originally written by Thuryl:
As for taking away the party's items in such a way that they can be given back later, the only way to do it is to kill the party, teleport them to somewhere where they can't reach their items, and resurrect them. The items will be left where the party dropped them.
Will the party notice this?

- Archmagus Micael
Link to comment
Share on other sites

Quote:
Originally written by Thralni, emperor of Riverrod:
Isn't there a way, to let the game check what the party's items are before taking them away, and then let the game place replica's of those items somewhere in a dungeon where the party is at the moment?
I thought about that, but it wouldn't work with custom items from other scenarios.

- Archmagus Micael
Link to comment
Share on other sites

Quote:
Originally written by Archmagus Micael:
Quote:
Originally written by Thralni, emperor of Riverrod:
Isn't there a way, to let the game check what the party's items are before taking them away, and then let the game place replica's of those items somewhere in a dungeon where the party is at the moment?
I thought about that, but it wouldn't work with custom items from other scenarios.

- Archmagus Micael
I didn't think of that... Hmmm...

Killing and reviving the party seems a bit strange in my opinion. So how did it work in nethergate then? There all your items are taken if you play the celts and are in the basement of the three crones.
Link to comment
Share on other sites

Quote:
Originally written by Thuryl:
Quote:
Originally written by Archmagus Micael:
Will the party notice this?
Yes, the player will most certainly notice if you kill and then revive their party. :p

You'll just have to find some way to make it not stand out too badly.
Hmm. I might make the dialog box say that you were tortured then.

Will this keep ALL of their items? (Because When I sometimes die, not all of my items remain(if three of my chars die on the same spot!).

- Archmagus Micael
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.)

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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? frown

 

Also,

 

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

 

- Archmagus Micael

Link to comment
Share on other sites

Code:
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 herebreak;
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.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...