Jump to content

Please Help Me Experienced Editors...


SmirfOfDoom

Recommended Posts

Ok. Major problem. I am trying to make a new summoning list and discluding most of what the original avernum has in it. I am making a Slith campaign, and was going to make summoning with completely different monsters. Ran into major problems. First tried changing the original creatures, couldn't, then I read why. Then I thought about making the actual list of creatures continue on, don't have enough space, will some experienced editor please help me with this. Without the revised summoning list almost the entire magic portion of this scenario is rendered moot. Damn scripting...

Link to comment
Share on other sites

Look at the "advanced" trick for changing the default creatures. If you want to fix vampires so they don't summon themselves in your scenario, for instance, you can use this code (assuming that you place it earlier in the data script than when you define creature 239 for your scen, if you use this creature):

 

Code:
begindefinecreature 239;     import = 87;begindefinecreature 87; // Vampire     cr_summon_class = -1; 
This changes vampires so that they cannot be summoned. Same concept applies to changing any of the other default creatures.
Link to comment
Share on other sites

Or you just simply could get rid of ALL of the standard monsters, and create totally new ones, though that would intail massive amount of scripting, even though to start with all you have to do is copy corescendata2 into SLITHSCENARIOdata. Then you would have to painstakingly edit EVERY single monster. It would be hard, but it would also be worph it, especially because even experienced players wouldn't know how to defeat the separate monsters, so they'd have a challenge also. *thinks* That's actually a good idea. Maybe for my next scenario, I could make it withing the Nephil cities, in a war...

 

ANyway, to be back on topic - READ ABOVE.

 

- Archmagi Micael laugh

Link to comment
Share on other sites

One of the probelms is the whole "import" feature. If I know the data is not going to be imported, I just use 'begindefineXXXX XXX; clear;' I'm in the process of making EVERY item, terrain, floor, and monster begin with clear and be totally seperate. It is taking a while, but if you give me your e-mail I'll send it as soon as I'm done. That or I post it on the board.

 

EDIT: So, with the improved and stable list, you could easily edit out any monster by placing begindefineXXXX XXX; clear; in your data script.

Link to comment
Share on other sites

Uh, Thuryl, that's not possible. One can reuse the creature numbers (like, say, 239 in the example above). It would look like this.

 

Code:
 begindefinecreature 239;     import = 47;begindefinecreature 47; // Wight     cr_level = 52;	cr_hp_bonus = 100;	cr_summon_class = 8;begindefinecreature 239;	import = 48;begindefinecreature 48; // Ghost	cr_level = 58;	cr_hp_bonus = 100;	cr_natural_armor = 40;begindefinecreature 239;	import = 49;begindefinecreature 49; // Lich	cr_level = 60;	cr_amount_stat_adjust 0 = 20; // Magery	cr_amount_stat_adjust 1 = 30; // Mage Spells 
Link to comment
Share on other sites

Anyone know the sytem used to determine summoning class? For example what skills/level would a summon class of 9 be?

 

Also, does anyone know if it is possible to make a creature immune to one spell? (Not the entire magic category?) For example I have a creature that I want to be immune to Capture Mind, but no others, Is this possible?

Link to comment
Share on other sites

Um, cr_summon_level should do the trick. It must be manually set.

 

There is always something you can do to make a monster immune to certain types of attacks, but they will always affect more things that 1 and will have side effects. Giving him cr_immunities 4 = 100; should make him resist Control Mind, and similar confusion spells.

 

To make him un-Simulacram-able, make him species = 12; for special type.

Link to comment
Share on other sites

OK, got a problem once again, I'm trying to get my town/town dialogue script down and everytime I test it it says invalid symbol on line 1. The only thing on line one is begintownscript; and begintalkscript; is there some line that starts these scripts that i'm missing? Anyone know whats going on?

Link to comment
Share on other sites

Does your dlg script look anything like this?

Code:
 begintalkscript;variables;body;begintalknode 1;state = -1;nextstate = 2;question = "Rolar-Tel";text1 = "You're standing in front of an impressive looking Vahnatai. Judging from the training equiptment";text2 = "he has in his room, he probably does a lot of physical excersice, as well as the Vahnatai mental excercises.";begintalknode 2;state = 2;nextstate = -1;question = "_Why is there fighting going on in this tower?_";text1 = "_My... MOTHER... left some troops loyal to her behind. They did not surrender, so we have no choice but to";text2 = "eliminate them ourselves, and take back this tower. Be warned, while my men will not harm you, the undead";text3 = "that my mother left behind will. I hope that you do not die._ Rolar-Tel smiles warmly."; 
It should look something like that, except with different words. Also, I made a mistake, monster files are corescendata.txt rather than corescendata2.txt

 

Anyway. Hope I've been of help.

 

- Archmagi Micael

Link to comment
Share on other sites

OK I figured out the problem, Apparently it wasn't in the right format, I entered word and changed it from rich to text only, and it seems to have cleared up the problem, how it got to rich format in the first place I have no idea considering I saved it as a text only. Oh well, thanks anyays guys.

Link to comment
Share on other sites

What program are you using to compile your scripts. Multi-format programs normally save it in their natural form, and only save it in another form if specified. For example; Crimson Editor normall saves in it's own format, however, for scripting, I always have to add a .txt to the end. See what I mean ? confused

 

- Archmagi Micael

Link to comment
Share on other sites

Depends on several factors, however I'm making more of a game then scenario. It will probably end up being 7x6 outdoor and about 60 more or less towns.

 

New Problem:

When I assign a text bubble to char 16 thats the ID that is in the editor correct? or no? I assigned one of my sliths to have F*&^%ing Scripting above him just as a test run but it puts it on a guard instead of my test creature, anyone got the solution to this?

Link to comment
Share on other sites

Quote:
Originally written by SmirfOfDoom:
Depends on several factors, however I'm making more of a game then scenario. It will probably end up being 7x6 outdoor and about 60 more or less towns.

New Problem:
When I assign a text bubble to char 16 thats the ID that is in the editor correct? or no? I assigned one of my sliths to have F*&^%ing Scripting above him just as a test run but it puts it on a guard instead of my test creature, anyone got the solution to this?
In the editor, what's the character number for the slith who you want to spout gibberish?
Link to comment
Share on other sites

Does your script look anything like this one (taken fropm VoDT)?

Code:
 // TOWN SCRIPT

// Town 0: Fort Talrus

 

// This is the special encounter script for this town.

// The states INIT_STATE, EXIT_STATE, and START_STATE have

// meanings that are described in the documenation. States you write

// yourself should be numbered from 10-100.

 

begintownscript;

 

 

variables;

 

 

int i,j,k,r1,choice;

 

 

body;

 

 

beginstate INIT_STATE;

 

// This state called whenever this town is

 

entered.

//Names

set_name(13,"Commander Terrance");

set_char_dialogue_pic(13,1907,0);

set_name(14,"Maria");

set_name(15,"Penelope");

set_name(16,"Avizo");

 

set_crime_tolerance(5);

 

enable_add_chars(1);

 

if (get_flag(1,9) > 0) {

message_dialog("You have finally returned, victorious, to where you started. If you are ready to leave this scenario, leave this fort to the south.","");

}

break;

 

beginstate EXIT_STATE;

// Always called when the town is left.

break;

 

beginstate START_STATE;

if (get_crime_level() >= 5)

set_flag(0,11,1);

 

if (get_ran(1,0,100) < 6)

text_bubble_on_char(16,"Cough.");

if (get_ran(1,0,100) < 6)

text_bubble_on_char(16,"I feel awful.");

if (get_ran(1,0,100) < 6)

text_bubble_on_char(25,"Squeak.");

if (get_ran(1,0,100) < 6)

text_bubble_on_char(13,"So much to do.");

if (get_ran(1,0,100) < 6)

text_bubble_on_char(13,"Why is it happening?");

 

if ((get_ran(1,0,100) < 5) && (group_dist_to_loc(0,42,27) > 10))

spawn_creature(25);

 

 

break;

Or what about this one, here's one I did byself, for my scenario!
Code:
 begintownscript;

 

variables;

 

int i,b,c,d,j,k,r1,choice;

 

body;

 

beginstate INIT_STATE;

 

enable_add_chars(1);

 

//Names must appear first.

set_name(11,"Gomlaka");

set_char_dialogue_pic(11,1946,0);

 

break;

 

beginstate EXIT_STATE;

 

break;

 

beginstate START_STATE;

 

if (get_ran(1,0,100) < 7)

text_bubble_on_char(11,"Must get out.");

if (get_ran(1,0,100) < 7)

text_bubble_on_char(11,"Must Escape!");

if (get_ran(1,0,100) < 7)

text_bubble_on_char(11,"Must Warn!");

if (get_ran(1,0,100) < 7)

text_bubble_on_char(11,"Need to warn.");

if (get_ran(1,0,100) < 7)

text_bubble_on_char(11,"The Empire. Must Warn.");

 

break;

Link to comment
Share on other sites

Close, but I'm guessing one of my problems is what is the get_ran command, isn't that only for the actual timing of the bubble? This is my test subject:

begintownscript;

variables;

body;

 

beginstate INIT_STATE;

enable_add_chars(1);

set_name (16,"Ssslarkin");

set_crime_tolerance(6);

break;

 

beginstate EXIT_STATE;

break;

 

beginstate START_STATE;

text_bubble_on_char(16,"F#$@ing Scripting.");

break;

Link to comment
Share on other sites

Okay, this is entirely theoretical. I know how to send you from one town to another, since I'm using that entirely (that's the most important code) for my new scenario ( It won't need ANY outdoor sections, it's all towns!). Anyway, here's what i imagine you'll have to do.

 

Code:
 beginstate 12;reset_dialog();add_dialog_str(0,"Do you wish to enter this Portal?",0);add_dialog_choice(0,"No");add_dialog_choice(1,"Yes");choice = run_dialog(1);if (choice == 1)end();if (choice == 2)set_state_continue(13);break;beginstate 13;put_boom_on_char(short which_char,short which_sfx,short random_shift)// - Places explosion which_sfx on character which_char. //If random_shift is 0, effect appears directly on character. //If 1, the explosion is shifted slightly in a random direction.void run_animation()// - Pauses the game and plays all animations you have created. //Note that none of the above calls will draw anything on its own. //You need to use this call to run any animations. [b]// You would have to do that for ALL four characters, in the event that a party has four characters...[/b]  [b]// Then you would add the[/b] move_to_new_town(short town_number,short X_location,short Y_location);  [b]// call[/b]  [b]// Then, in the new town, your party would appear...[/b] 	break; 
Ofcourse, that's all in THEORY. The only way to test it would be to write out the code!

 

Tell me how it goes, or if you don't understand me!

 

- Archmagi Micael

Link to comment
Share on other sites

Can someone PLEASE tell me what is wrong with this script? It is supposed to merely give someone a choice of whether or not to push a button, and then depending on their choice, teleport them...

 

beginstate 99;

reset_dialog();

if (get_flag(0,0) == 0)

add_dialog_str(0,"In this hidden corner you find a box. Inside the box is a big red button. There is nothing else in the box.","What do you do?");

add_dialog_choice(0,"Leave the button alone.");

add_dialog_choice(1,"Push the button.");

choice = run_dialog()

if (choice == 1)

set_flag(0,0,1);

teleport_party(10,38,0);

if (choice == 2)

message_dialog("You decide to play it safe.");

break;

Link to comment
Share on other sites

Quote:
Originally written by SmirfOfDoom:

beginstate 99;
reset_dialog();
if (get_flag(0,0) == 0)
add_dialog_str(0,"In this hidden corner you find a box. Inside the box is a big red button. There is nothing else in the box.","What do you do?");
add_dialog_choice(0,"Leave the button alone.");
add_dialog_choice(1,"Push the button.");
choice = run_dialog()
if (choice == 1)
set_flag(0,0,1);
teleport_party(10,38,0);
if (choice == 2)
message_dialog("You decide to play it safe.");
break;
First of all, you forgot a semicolon after "choice = run_dialog()". Also... you didn't use any {}'s around your if statement code, which you need to do if the statement has more than one line of code run after it. Change it to something like this:

Code:
beginstate 99;reset_dialog();if (get_flag(0,0) == 0){  add_dialog_str(0,"In this hidden corner you find a box. Inside the box is a big red button. There is nothing else in the box.","What do you do?");  add_dialog_choice(0,"Leave the button alone.");  add_dialog_choice(1,"Push the button.");  choice = run_dialog();  if (choice == 1)  {    set_flag(0,0,1);    teleport_party(10,38,0);  }  if (choice == 2) // This if statement doesn't require {}'s because it only has one line of code run.    message_dialog("You decide to play it safe.");}break;
Link to comment
Share on other sites

I've tried everything I can think of, this is what I came up with, can anyone help as to why it is still saying "wrong type/number of parameters on line 48, which appears to be the BEGINSTATE LINE

beginstate 99;

reset_dialog();

if (get_flag(0,0) == 0)

{

add_dialog_str(0,"In this hidden corner you find a box. Inside the box is a big red button. There is nothing else in the box.","What do you do?");

add_dialog_choice(0,"Leave the button alone.");

add_dialog_choice(1,"Push the button.");

choice = run_dialog(1);

}

if (choice == 1)

{

set_flag(0,0,1);

teleport_party(10,38,0);

}

if (choice == 2)

message_dialog("You decide to play it safe.");

break;

 

BTW, I also tried how you put it on the forum (with the "{" going the same way twice, not sure why you put it that way) and it also did not work. Any help will be appreciated on this, it is frustrating the heck out of me. This is a pretty essential part to my scenario beyond the fact that this is one of the most essential parts to a scenario, giving choices... F*(&ing Scripting...

Link to comment
Share on other sites

For some reason the line that it tells me is wrong, never seems to be the line that actually is, so I wouldn't rely too much on it being the beginstate line. Every other script on it is PERFECT. I fine tuned them to the extreme. (beyond that I also tried to take out everything else besides what was necassary, and it still had the same result). If anyone has a portal or button or something that gives me a better example then the tutorial please let me know, I'm thinking of just forcing the players to teleport, but that would not help in future situations like this one. I really hope to get this fixed soon, I didn't do all that terrain and creature and item editing to stop at the scripting part. GRRRR.

Link to comment
Share on other sites

I tried your code out and found the error, it's in the line:

add_dialog_str(0,"In this hidden corner you find a box. Inside the box is a big red button. There is nothing else in the box.","What do you do?");

 

The syntax for that call is:

add_dialog_str(short which_string, char new_text, short indent);

 

So you should change it to something like this:

add_dialog_str(0,"In this hidden corner you find a box. Inside the box is a big red button. There is nothing else in the box. What do you do?", 0);

 

Also, message_dialog("You decide to play it safe."); is incorrect as well, as it takes in 2 strings. Change it to this:

message_dialog("You decide to play it safe.", "");

 

Also, you have your choice numbers switched, swap "choice == 1" and "choice == 2".

Link to comment
Share on other sites

Well, got another problem. Go figure. This one should be simple, but I just cant see it. It tells me that "empty expression on line 46" Well heres line 45-48 (I think) tell me if you see something right off the bat, cause I looked and relooked and I can't seem to see anything wrong. (they should really explain some of these things better) sorry to be wasting your time...

 

add_dialog_str(0,"You find a small crevice in the wall, and it opens into a small room. Inside the first thing to capture your attention is a giant orb made of a strange crystal-like material.",0);

add_dialog_str(0,"When you look around a bit more you notice there is a Slitherazakai corpse sitting before it, as though it died staring into the orb.",0);

Link to comment
Share on other sites

I don't see anything wrong with those 2 lines (well, actually, the second line should be add_dialog_str(1, ...) instead of add_dialog_str(0, ...), but that wouldn't generate an error). Are you sure those are the correct lines? I notice you refer to them as lines 45-48 even though they're only 2 lines total. Even if the line wraps around in the text editor you're using, it'll still only be counted as one line, only actual carriage returns will count as line breaks.

Link to comment
Share on other sites

Quote:
Originally written by SmirfOfDoom:
Well, got another problem. Go figure. This one should be simple, but I just cant see it. It tells me that "empty expression on line 46" Well heres line 45-48 (I think) tell me if you see something right off the bat, cause I looked and relooked and I can't seem to see anything wrong. (they should really explain some of these things better) sorry to be wasting your time...

add_dialog_str(0,"You find a small crevice in the wall, and it opens into a small room. Inside the first thing to capture your attention is a giant orb made of a strange crystal-like material.",0);
add_dialog_str(0,"When you look around a bit more you notice there is a Slitherazakai corpse sitting before it, as though it died staring into the orb.",0);
IF THAT ISN'T YOU WHOLE CODE, I NEED TO SEE ALL OF IT, IF IT IS...THEN YOU'RE MISSING A run_dialog(); call.

- Archmagi Micael

Oh, yeah, did you try out my code...???
Link to comment
Share on other sites

Of course that is not the entire code. The entirety of the code is:

beginstate 14;

reset_dialog();

add_dialog_str(0,"You find a small crevice in the wall, and it opens into a small room. Inside the first thing to capture your attention is a giant orb made of a strange crystal-like material.",0);

add_dialog_str(1,"When you look around a bit more you notice there is a Slitherazakai corpse sitting before it, as though it died staring into the orb.",1);

add_dialog_choice(0,"Leave the crystal alone.");

add_dialog_choice(1,"Try to smash the crystal.");

add_dialog_choice(2,"Stare into the orb.";

choice = run_dialog(1);

if (choice == 1)

{

message_dialog("You back away.");

}

if (choice == 2)

{

message_dialog("You pull out your weapon and beat at it a few times. Nothing happens...");

}

if (choice ==3)

message_dialog("You stare into the orb. You never stop staring into the orb.")

kill_char(0,2,0);

kill_char(1,2,0);

kill_char(2,2,0);

kill_char(3,2,0);

break;

 

Archmagi Micael, no I have not yet tried your line. I plan on using it when I get to that point and fine tuning it, but currently I decided to go with a much simpler version of sending people to their doom...

BTW, what is the command for a state to play it once and never again, I can't seem to find a good example, is it "end()"??

Link to comment
Share on other sites

Alright new question...

In the editor, when you are placing a sign, how do you get it to go down 1 line? The return (enter) button does not work because it thinks that you mean done and it closes the box. Putting a bunch of spaces until it goes down also does not work, because it never goes down. So, anybody got an idea?

Link to comment
Share on other sites

Use a linebreak symbol |. Might I suggest that you try to break your script testing into smaller portions so you can isolate the problems more easily? Oh yeah, and the version of BoA for Windows that you probably have gives line numbers in an awkward format. Divide the number your get from the game by 2 and add 1 to get the correct line number. Of course, this only applies if your scripts are saved in Windows newline format, if they are formatted Mac style, the line numbers will be fine.

Link to comment
Share on other sites

The line break works? ok. The reason I don't break them down is because I am doing a huge scenario. I do a lot of scripting at one time. Normally I can get a full few pages of scripting before running into a problem. The problem is generally not with the scripting itself, but with human errors of not paying attention to every detail, and being new to the entire avernumscript system.

Link to comment
Share on other sites

Smirf of Doom,

 

Here's a exerpt of script from the basic "Warriors Grove", which people use for a basic town (I used it myself for Magical Grove, and just edited a few texts).

 

Code:
 beginstate 10;	if (get_flag(0,0) == 250)		end();	message_dialog("You find a narrow, concealed walkway between two buildings. Webs hang frome ceiling, and the bones of unfortunate rats crunch underfoot.","");	set_flag(0,0,250);break; 
This code shows you how to have a "once-off" encounter. However, since this is more code than the basic way of doing it, I advise only using the above way when having long strings of code that you want "Once-Off".

 

Here's a piece of code which I use a lot in my scenario, "Undead Valley". It's the easiest way of coding "Once-Offs", since it requires less scripting, and takes up less space. Unfortunately, this way of doing it is very patchy with other "If" commands, so use it only for short things, like message_dialog("",""); commands.

 

Code:
 beginstate 61;if (get_flag(6,8) < 1){  message_dialog("At last, after all of the stupid undead and Vahnatai, your end is in sight!","");  set_flag(6,8,1);}break; 
Hope that helps you. And also, I've probably been told the answer already, but anyway, How "HUGE" is your scenario going to be? (You don't have to say if you don't want to.)

 

- Archmagi Micael

Link to comment
Share on other sites

The reason the text bubble is appearing on the wrong character is (probably) because you're using the wrong number. When the creature is selected in the editor, don't look at the character ID. What you should use is where it says (for example) Creature 12: Guard. That is the number to use for the creature in scripts.

Link to comment
Share on other sites

A character's ID is usually only used internally by the game to determine who is traveling with you, and who has died.

 

In every town, monsters that you place in the editor are given numbers to be referred by, ranging from 6 to somewhere around 80. A guard might have an ID of 12, a creature type of 4, but has a town number of 16.

Link to comment
Share on other sites

I figured out the entire bubble crap, which was annoying, but eventually logical. My scenario is currently 7x7 outdoors. So far it seems to be about 2-4 towns per section (including dungeons and the small little villages that take 5 min). In my scenario there will be three different sects (like geneforge). And thats all you get for now.

Link to comment
Share on other sites

I do know how long it takes yes. I think Avernum 2 had about 49 outdoor sections (maybe more or less i dont know) As I said before this is not a scenario. This is a game. The problem with most "scenarios" being this large is that they have a target level. You start a character in my game, and progress from there. I already have 75% of the terrain editing done. The item editing is 90% complete. The creature editing has maybe 3 or 4 left to add. So all thats left is scripting. LOTS of typing. But yea, I think I'm up to it.

Link to comment
Share on other sites

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