Jump to content

I have played blades of avernum and I am now new to editor. Can anyone help in the new beginning?


Recommended Posts

There are a bunch of resources for getting started, including the old BoA Cookbook, the Scenario Workshop, various articles I wrote, and probably other things I'm forgetting. You'll want the most recent 3D editor, which I think is in the forum header. If you have questions, ask away.

 

Also, welcome the boards, and leave your sanity at the door! I almost never get to do the traditional greeting.

Link to comment
Share on other sites

Kelandon, First of all thank you for your reply. I have downloaded the scenario workshop you mentioned and also read the cookbook PDF. The cookbook is a better resource of all and it was meaningful, but I find it difficult at some places with a lot of confusion especially at those scripting examples which was not proper with why a code is being used, in what txt name and where we have to save it and use of those parantheses and numbers seems to be undefined at some places. I hope you and the community would help in me in clearing my daily queries.

Please try to clear the queries I already mentioned above in this post as I am very willing to edit a scenario.

Link to comment
Share on other sites

6 hours ago, Warrior Mage said:

I find it difficult at some places with a lot of confusion especially at those scripting examples which was not proper with why a code is being used, in what txt name and where we have to save it and use of those parantheses and numbers seems to be undefined at some places.

I have to admit, I'm not sure what you're asking. Could you clarify? Maybe references to specific pages would help.

 

You may also want to look at some specific scenarios to see what they did. For example, my High Level Party Maker was commented out pretty carefully so that people could read it and understand what I was doing.

Link to comment
Share on other sites

Hello Warrior Mage,

 

I’d like to build a little on Kelandon’s advice, if I may. When first starting work on a new program, engine, or something I have no prior experience with, there are always two things I feel are of particular importance: studying examples and experimentation.

 

The resources you’ve been looking through are extremely useful, and include some excellent introductions. They contain some great reference material, and you’ll want to keep them to hand! Do check out Kelandon’s introductory article if you haven’t already, which is one of the articles linked above.

 

However, reference material can be confusing when just taken on its own. Think of it this way. Imagine you’re trying to learn a new spoken language. Would you try learning the language solely from dictionaries and simple introductory texts for tourists? Wouldn’t you also like to see examples of real sentences, to hear people speak it in real-world contexts, and to experiment with saying simple things yourself? The reference guides are useful, but are made far more so when combined with hearing examples and trying things out yourself!

 

The same is true here. If you want to get to grips with Blades, examples and experimentation are two key tools in your arsenal!

 

Kelandon suggested looking at his scenarios, and I second that. However, it’s also worth remembering that the four scenarios bundled with the game (Valley of Dying Things, etc.) were in part written to demonstrate the engine. They’re full of examples of how to do certain things.

 

So, first off, if you’ve not played the scenarios – play them! One you’ve done that, you can use the information they contain to help you in your designing. If you want to do something specific, think back to those scenarios and consider if any of them do what you’re trying to do. If so, great! You can look at that scenario in the editor, or in its scripts, and see precisely how it was done.

 

I’m saying all of this because I hope it will be helpful. We are of course more than happy to answer questions on here. We enjoy doing so! But remember that it always takes a little time for us to reply. So, if you ask us about everything, you might find that waiting time adding up quite quickly! Generally speaking, it might be quicker to discover certain things from poking around in the engine yourself.

 

Let’s take your question. You want to find out how to have a message appear when your scenario is first opened, right? Let’s try putting my suggestion into practice. Think back to Valley of Dying Things. You’ll remember that, when you open the scenario, a few screens appear telling you the story of what’s going on.

 

So, let’s load the scenario and try to find out how that’s done. In the 3D editor, there’s lots of information that comes up at once. One of the possible menu choices is ‘Scenario’. That sounds like a good place to start looking! If you click on that menu, you’ll see various items, three of which are ‘Set Intro Text 1’, ‘Set Intro Text 2’ and ‘Set Intro Text 3’. If you open the first, you’ll see some text. It’s the introductory text for the scenario – exactly what you’ve been looking for!

 

Now that you’ve found out how Valley of Dying things does this, you can do it in your scenario too! Load your scenario, navigate to ‘Set Intro Text 1’ and type in what you want to say – try a ‘Hello World!’.

 

Of course, if you were looking into this yourself, you might not stumble onto the right menu response right away. It might take you a few minutes. But I hope this illustrates my point – a few minutes looking at an example and trying things out yourself can save you hours of waiting for replies on this forum, and then trying to interpret them!

 

To summarise, we’re more than happy to help you figure things out! But don’t forget that you can also learn a lot yourself by poking around in pre-existing scenarios, and trying things out for yourself. By combining this with questions about some of the more tricky points, you might be surprised to find out how quickly you’ll learn how everything works – you’ll be designing scenarios before you know it!

Link to comment
Share on other sites

8 hours ago, Warrior Mage said:

But, unfortunately it's my nature to ask a bunch of questions.

 

Don’t think that’s a bad thing, Warrior Mage! I just wanted to give you a little heads-up that people on these boards can’t always reply quickly, and that sometimes it might be easier and faster to check out things yourself.

 

If you want to ask, then by all means ask! :)

Edited by Ess-Eschas
Adding some slight clarification.
Link to comment
Share on other sites

49 minutes ago, Warrior Mage said:

begintownscript;
body;
beginstate INIT_STATE
    set_name(20, "Chief Guard");// ID 114
break;
message_dialog("Welcome to my town!", "");
beginstate EXIT_STATE;
break;
 

What mistake is in this for this is not working at all!

The mistake is that the message_dialog() call is not in any state. If it's not in a state, it never happens (and possibly breaks the script). Here's what you want:

begintownscript;
body;
beginstate INIT_STATE
    set_name(20, "Chief Guard");// ID 114
message_dialog("Welcome to my town!", "");
break;
beginstate EXIT_STATE;
break;

Note that this will show the message "Welcome to my town!" every time you enter the town. You need SDFs to make it happen only the first time.

Link to comment
Share on other sites

Hi everyone. I have attempted what you told into my script, Kelandon. But it had a 0% of working. I don't know why. I have saved my script for that particular town named "Town" as t1town.txt (as t0 is warrior's grove) in ....../Blades of Avernum/Blades of Avernum Scenarios/Game (my scenario folder name) and also in data folder. But whatever I do is not working. Please give me an idea.

Link to comment
Share on other sites

Voila! I am now successful in setting the name and displaying the message. It did not work as I had done a simple fault. Forgot to set the script name in the town details which I found after referring to a site.

 

But, there are still problems. I receive errors as state -2 not found and also as creature script bad header as soon as I entered the town. And also, I found an error trying to talk to CHIEF GUARD (which I mentioned above) instead of Talking: It doesn't respond.

 

Please try to solve my problems, partners.

Link to comment
Share on other sites

You can't use the same script as both a creature script and a town script. Change the guard's script back to the default and that should fix the error message.

 

To make the guard respond to talking, you'll need town dialogue script (which is different from the town script and has a different format).

Link to comment
Share on other sites

Hey! Thank you, Celtic Minstrel. That was successful and no error was appearing. But I found another error in the game with the following script:

 

begintownscript;
variables;
body;
beginstate INIT_STATE;
set_crime_tolerance(2);
set_name(20, "Chief Guard"); // ID 114
set_level(18, 40);
message_dialog("Welcome to my town!" , "");
beginstate EXIT_STATE;
message_dialog("There is nothing useful in there.","");
break;

 

It says that the state is not completed right in line 17,(I also started wonder there is no line 17 in it). I also did not get the message below exit state. Please consider these problems and help me. I am showing good progress(or that's what I think). 

Link to comment
Share on other sites

Hello everyone! Today I am very happy with my proceedings. I have removed all the errors from my scenario and also successfully made a character to talk with a reasonable amounts of dialog.

 

But, still I face a problem. I cannot place outdoor wandering encounters. I can designate but cannot choose exact location of those monsters. Please try to help me as the 1st spawn point option is not clearer to me. Monsters appear suddendly if I go near the point that too only sometimes. Clearly explain please about placing outdoor wandering monsters.

Link to comment
Share on other sites

Have you read the documentation that comes with the editor? A lot of your questions are answered there. Here's the section from Chapter 1.6 on Editing the Outdoors:

Quote

There are three different sorts of encounters: Wandering Encounters, which are occasionally randomly placed on the wandering monster spawn points and hunt down the party. Special Encounters, which are spawned into existence by commands on the outdoor section script. And Preset Encounters, which are set to always be there when the party enters the given outdoor section, until you do something to make them disappear.

You probably want to use a Preset Encounter and specify the Move Type (probably Move Type 1, which is "Doesn't move").

Link to comment
Share on other sites

Hello everyone. Today I got negative results. I tried to place a terrain script on a box at the same way in docs and the script was mainly to trigger a message_dialog() call under SEARCH_STATE(). I placed the following code that included INIT_STATE() [but the game told that there was no state 0] and also confirmed that I placed semicolons (as I received messages that semicolons were missing).

 

beginterrainscript;

variables;

body;

beginstate INIT_STATE();

break;

beginstate START_STATE();

break;

beginstate SEARCH_STATE();

 message_dialog("This box contains the donated coins.","");

break;

 

I also tried to use EXIT_STATE() call but it was unsuccessful.

Edited by Warrior Mage
Link to comment
Share on other sites

Thank you for the tutorial, Dintiradan. I tried to go into that through your post in another forum and showed some errors. I will work on my small scenario based on your concepts and then reply. This was what I mainly insisted in this forum (learning with examples is easier). If this post was not here, it would have a lot sucked for me to proceed further. I am now slightly more confident about my first tiny successful scenario. 

Link to comment
Share on other sites

  • 2 weeks later...

HELLO EVERYONE AGAIN!!! I was in war with the rebels of the empire, as empire is friend of Avernum. So, I couldn't reach this forum. Now, however I have good amount of doubts to be cleared. I have learned about custom objects, creatures and it's much easier than before. Thank you for Dintiradan. Questions:

 

1) How to place an anti-magic field or a quickfire or something related to that in an area?

2) How to change a character's attitude (Friendly/Neutral) if a particular action is done?

3) I have seen secret passages telling that "You could not have seen this secret passage from the other side." How to make passages like that? 

 

I will be thankful if you reply.

Edited by Warrior Mage
Link to comment
Share on other sites

1) How to place an anti-magic field or a quickfire or something related to that in an area?

Use the put_field_on_space() call.

2) How to change a character's attitude (Friendly/Neutral) if a particular action is done?

Use the set_attitude() call.

3) I have seen secret passages telling that "You could not have seen this secret passage from the other side." How to make passages like that? 

Use some combination of the block_entry() call and a flag. It depends on exactly how you want to do it, but the easiest way is to have something like the following on the space, where (1,1) is the flag that you set if you've found the passage:

if (get_flag(1,1) == 0)
	block_entry(1);

And then set flag (1,1) on, say, the space before that if you're coming from the direction where you can find the secret passage, probably with a pop-up message saying that you found the passage.

 

A slightly more complex way—which I usually use—is to have a block_entry() call dependent on both a flag and the location of the lead character. It would look something like this, where the passage is at the x-coordinate 15, you can enter from the west, and the flag is (1,1):

if (get_flag(1,1) == 0) {
	if (char_loc_x(first_group_member(0)) < 15) {
		message_dialog("You find a secret passage!","");
		set_flag(1,1,1);
	}
	else
		block_entry(1);
}

I did something resembling this (though not exactly the same) in Bahssikava, town 19, state 12.

Link to comment
Share on other sites

I came out again with some thing.

 

1) I want to set up an inn that sells wine which should change party state as drunk, two rooms to rest: one fully revive hp and energy and second upto a particular point. I also want the party to move to the room after conversation.

 

2) Maybe simple: As a reward, I want my party to get an item. Exactly what call should be used?

Edited by Warrior Mage
Link to comment
Share on other sites

To change party state to drunk based on dialogue, include the "code" characteristic within the dialogue node, and use set_char_status() or set_party_status() as applicable.

 

To fully revive hp and energy and move the party, use the "inn" characteristic.

 

To partially revive hp and energy, you'll have to use "code" plus a variety of related calls, including change_char_energy() and heal_char(), as well as (probably better) march_party() or (probably worse) relocate_character(). This is sort of complicated, and I'm not sure I'd bother.

 

To give an item as a reward, use reward_give().

 

For further information on dialogue, look at docs section 2.14.

Link to comment
Share on other sites

Hello there and thank you, Kelandon. I'll definitely look into that as I am in the point where I have to use it. Still can't understand everything properly but I'm too glad that I'm far better than before some days. The docs is useful and me, making my progress. You guys know, I had told that I don't have a lot of time, but I'll try to do my best. Yeah! Stick on to that stick word, EXAMPLES help a lot!!! EXAMPLES. And it is working very well. 

Edited by Warrior Mage
Link to comment
Share on other sites

begintalkscript;
variables;

begintalknode 1;
state = -1;
nextstate = 1;
personality = 1;
question = "Fallopibus";
text1 = "You see an archer. He calls, _Oh! Hello there, adventurer hired to clear out our problem._";
text5 = "He asks, _What else do you want?_";
action = INTRO;

begintalknode 2;
state = 1;
nextstate = -1;
personality = 1;
question = "Who are you?";
text1 = "_I am the archer commander of New Cotra._";

begintalknode 3;
state = 1;
nextstate = -1;
personality = 1;
question = "I would like to shop a bit if you have items to sell.";
text1 = "_Thank you for your help._ The archer says.";
code =
begin_shop_mode("Fallopibus' Missiles", "This person has a good variety of items to buy even in this situation.", 3, 2, 0);
break;

begintalknode 4;
state = -1;
nextstate = 10;
personality = 2;
question = "Allen";
text1 = "An apprentice mage is busy with ale here. He introduces himself as Allen. He laughs bitterly.";
text5 = "_Hi again_, Allen barks.";
action = INTRO;

begintalknode 5;
state = 10;
nextstate = -1;
personality = 2;
question = "Why are drinking so much?";
text1 = "_Things are going bad lately. Just to escape from the stresssss._ He laughs bitterly.";

 

This was the code I typed for two characters in a town. But, both are displaying the same nodes of the first personality. I have zero idea as I have looked into other dialogue script that do the same. What should I do now?

Link to comment
Share on other sites

7 hours ago, Warrior Mage said:

Oh, thank you. But I really didn't think I had to do that even though I had other thoughts. Seems like I should think more stranger to design... Then, Hmm... Is mentioning personality useless? I thought it would correct the problem.

Personality has an extremely limited effect, and not related to this. If you talk to someone with a given personality and encounter a node with the INTRO characteristic, you get text1 through text4. If you then encounter a node with the INTRO characteristic from the same personality (whether the same node/character or, I think, a different one), you get text5 through text 8. That's it.

Link to comment
Share on other sites

On 6/2/2020 at 10:45 PM, Kelandon said:

To change party state to drunk based on dialogue, include the "code" characteristic within the dialogue node, and use set_char_status() or set_party_status() as applicable.

Well, I tried

code =

set_party_status(28);

break;

But it did not work and just said that parameter error.. something like that. Please help me.

Link to comment
Share on other sites

You don't have enough numbers in parentheses. Here's the relevant part of the docs:

Quote

void set_party_status(short which_status,short how_much,short give_update) - Changes status which_status for every character in the party by amount how_much. For negative statuses, character resistances apply (to force a change, use the set_char_status call). If give_update is 0, no text message about status change is given. Otherwise, it is.

You need to specify how much of the status and whether to give an update in the text field.

Link to comment
Share on other sites

Well, I have 1*2 outdoor sections with 6 towns (including dungeons and starting from 1) in it. Designing over for 1st town and outdoor section, but still messing up in scripting the first town. That is because of the matter of time. This is why... I understand homeland takes years to complete. But, I am making progress!

Link to comment
Share on other sites

How do you people actually deal with SDFs? I want to set those in my later towns but I have to include their result in dialogue nodes in previous towns! Should I include SDF in the code directly? One more unfortunate thing happened is I forgot to include a dialogue node way back to the first person of the town and should change memory cell values to the NPCs and edit the script from node value 1 the numbers like begintalknode 1 to 2 and so on.

Link to comment
Share on other sites

7 minutes ago, Warrior Mage said:

How do you people actually deal with SDFs? I want to set those in my later towns but I have to include their result in dialogue nodes in previous towns! Should I include SDF in the code directly? One more unfortunate thing happened is I forgot to include a dialogue node way back to the first person of the town and should change memory cell values to the NPCs and edit the script from node value 1 the numbers like begintalknode 1 to 2 and so on.

I'm not sure what you're trying to do, but yes, you'll have to include some sort of code about SDFs. I also don't understand the "unfortunate thing" at all. If you need help, could you explain further?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...