Jump to content

Orb of thralni


Thralni

Recommended Posts

Code:
// townscript for town 11: Senarti fort.begintownscript;variables;int choice;body;beginstate INIT_STATE;	if (get_flag(11,3) == 1)			set_flag(11,3,0);		break;beginstate EXIT_STATE;break;beginstate START_STATE;break;beginstate 10;if (get_flag(11,0) == 1)		end();	if (get_flag(1,6) == 1)	{		add_dialog_str(0,"message",0);		add_dialog_choice(0,"don't touch it.");		add_dialog_choice(1,"Take it.");		choice = run_dialog(1);		if (choice == 2) {				set_flag(11,0,1);								set_flag(11,1,1);				change_spec_item(2,1);				set_terrain(36,19,218);				activate_hidden_group(1);				}		}break;beginstate 11;if (get_flag(11,1) == 1)		end();	message_dialog("message","");	set_flag(11,1,1);break;beginstate 12;if (get_flag(11,3) == 0) {	if (species_in_party(2) == 1) {		reset_dialog();		add_dialog_str(0,"message",0);		add_dialog_str(1,"message",0);		add_dialog_choice(0,"Okay");		choice = run_dialog(1);		set_terrain(14,13,0);		set_terrain(13,13,0);		}	}break;beginstate 13;	reset_dialog();	add_dialog_str(0,"message",0);	add_dialog_str(1,"message",0);	add_dialog_choice(0,"Enter it");	add_dialog_choice(1,"Leave it");	choice = run_dialog(0);	if (choice == 1) {		message_dialog("message","");		change_outdoor_location(4,1,6,40);		move_to_new_town(19,3,19);		}break;	
This is the entire town script. the node removing the walls is 12. And I did put the walls there in the first place.

The script has no errors for as far I know. The game doesn't complain. Only the walls are missing in the town.
Link to comment
Share on other sites

  • Replies 320
  • Created
  • Last Reply

Top Posters In This Topic

No. The first time you enter the town, the walls already are gone. I can only think about something that removes the walls when you enter, but I didn't put something like that in the script.

 

The set_flag call in the INIT_STATE is also there to make sure that you can remove the wall when entering the town a second time. maybe I should just put an other lever somewhere in town, instead of this special node.

Link to comment
Share on other sites

Instead of that flag, you could just use: if (get_terrain(13,13) == 3)) or whatever the wall is supposed to be.

 

I must admit, I'm stumped. I see no reason based on the scripts here that a wall that you've placed in the editor would disappear before you run state 12, and I can't see why state 12 would run any earlier than you want it.

Link to comment
Share on other sites

i tried the scenario again. It worked all fine.

 

What i did? enetered the scenario with a different, new party!

 

i remembered having very strange problems with this scenario everytime i pt in something drastic and very new and different. Entering the scenario again, with a new party and not a saved game solved the problems I had, and this newer problem.

 

Anyway, Thuryl, thanks very much for the help you offered.

Link to comment
Share on other sites

I've encountered problems with the call what_day_of_scenario. I anybody could give a look at this script and tell me why it doesn't work?

 

Code:
 //Outdoor Script for x = 2  y = 1beginoutdoorscript;variables;int choice;body;beginstate INIT_STATE;	if (what_day_of_scenario() > 20)			set_flag(100,2,1);break;beginstate START_STATE;break;beginstate 10;if (get_flag(100,2) == 1) {		set_town_visibility(18,1);		set_flag(18,0,0);		end();		}break;beginstate 11;	reset_dialog();		add_dialog_str(0,"message",0);		add_dialog_choice(0,"Not yet.");		add_dialog_choice(1,"I'd like to leave now.");		choice = run_dialog(1);			if (choice == 1) {					message_dialog("That is good news for Riverrod. Many people will thank you for this stay.","");					block_entry(1);					}				if (choice == 2) {						message_dialog("I guess there are people who are braver then you are...","");						end_scenario(1);					}break;beginstate 12;if (get_flag(100,2) == 1) {		set_town_visibility(18,1);		set_flag(18,0,1);		end();		} 
the problem is mainly with state 10. (Note though, that first (beore I changed it) the call what_day_of_scenario, was in state 10, and not in the INITstate.
Link to comment
Share on other sites

A cursory look reveals no problems (apart from the lack of a break; at the end of state 12). It'd help if you told us what problems you're experiencing. I assume you're not getting any actual error messages, but the call just isn't behaving the way you expect it to? Have you tried including a bunch of print_str calls for debugging purposes so that you can see which lines of script are being called under which circumstances?

 

Also, I wouldn't recommend placing calls in the INIT_STATE of an outdoor section. As far as I can tell, the behaviour of outdoor section INIT_STATEs isn't documented -- it's possible they're only called once in a scenario or something wacky like that.

Link to comment
Share on other sites

The exact problem is, that when the number of days is higher then twelf, town 18 should appear, but it doesn't. Moreoverm its alway there, even if the day is maybe 5. i don't get error messages.

 

This roblem is irritating, but it can wait a while. This is a more urgent problem.

 

i made an other custom graphic. it all works fine, it looks nice in the game. BUT: its like apillar, and has two eicons on top of each other. the game diplays it as two icons that simply are on the same place, if you understand me. they arent forming a pillar, s it should be.

 

in the data file i did put the te_second_icon thing, but it doesn't seem to put it on top of the other icon. so how do I do this? this question is rather urgent, so I'd rather see this question answered first and then the original i had before this second one.

 

thanks in advance.

Link to comment
Share on other sites

Quote:
Originally written by Thralni, emperor of Riverrod:
The exact problem is, that when the number of days is higher then twelf, town 18 should appear, but it doesn't.
Er, if you want the town to appear on day 12, then you should probably have your conditional statements use the number 12 instead of 20.

Quote:
Moreoverm its alway there, even if the day is maybe 5.
Have you actually made the town hidden in the first place?

Quote:
i made an other custom graphic. it all works fine, it looks nice in the game. BUT: its like apillar, and has two eicons on top of each other. the game diplays it as two icons that simply are on the same place, if you understand me. they arent forming a pillar, s it should be.

in the data file i did put the te_second_icon thing, but it doesn't seem to put it on top of the other icon. so how do I do this? this question is rather urgent, so I'd rather see this question answered first and then the original i had before this second one.
Look up the te_second_icon_offset_y property in the docs. That's what you need to set. Note that since you want the second icon shifted upwards, you need a negative number.

If the terrain graphic is an edit of an existing terrain graphic, you can probably just borrow the numbers from the existing terrain you based it on. If not, fiddle with the exact number until it looks right. -55 seems to be fairly standard.
Link to comment
Share on other sites

there were some things i probably didn't write well, causing some confusion on the way.

 

The day is 20, not twelve. i don't know why i wrote twelf. probbaly because the words are similair.

 

i made the town hidden by putting number 1 in the plcae where you can choose if the town is hidden or not, in the town details screen.

 

EDIT:

Now I looked at the script myself for a while, i see a big problem i don't understand.

 

if the day is over 20, it sets flag 100,2,1, right?

 

for the town to appear, flag 100,2 should be 1. if the day is below 20, it shouldn't set the flag, but it still ets the flag, enabling the town to be seen. that's i think the problem here. maybe you know what's wrong here?

Link to comment
Share on other sites

i think its best if I explain why there are two almost the same special nodes here: 10 and 12.

 

They are for different directions of enetering town. When you enetr from one side, flag 18,0 is kept 0, if on the other side entered, its 18,0 to 1.

 

This way the cutscene doesn't move eventually to a place where your party doesn't stand (unfortunately, it doesn't work. there's an error, but that doesn't matter, since the cutscene itself works fine.

 

Anyway, (an additional question) is it possible to amke a sort of interactive sort of control panel, like in Avernum 3 in the alien slime cave?

Link to comment
Share on other sites

Quote:
Originally written by Thralni, emperor of Riverrod:
No. This is the only place i use this flag. It doesn't matter if I go to that place in the outdoors (this script is an outdoor script!) in the very beginning or the very end of the game, I'll always end up in the town, even when its not over day 20.
As usual, the debugging calls print_str() and print_num() are your friends. Pepper your code with them at appropriate places. Print the numbers of relevant flags at points when you suspect they might change. Print different strings in different parts of conditional statements to see what code is being run.

The first thing to do is confirm whether or not flag 100,2 is actually set to 1 before day 20, or whether there's something else going on. And for heaven's sake, make sure you're using a fresh party for these tests -- I don't want to be sent on another wild goose chase because you changed the scenario without starting your party over.
Link to comment
Share on other sites

i changed the party over the past week(s) about five times, and still it was the same, but I'll change the flag to 100,10, to be just on the safe side. i'll also use the print_string calls.

 

But is it possible to have an interactive control panel as in avernum 3, the slime pit where the alien slime sits? You have this panel in the middle of the cave. if you come near it, you get this screen with five buttons which you can press. Can I do this also? or is it far out of my reach (if that is the reason, tell me anyway, cause if i can make, i will. No matter what.)

Link to comment
Share on other sites

I'm sorry to say I still have that problem I posted earlier, with the town that appears far to soon. i think there's probably some trouble with the if sentences. It doesn't solve itself with a new party entering the scenario, as it did with other things. i entered the scenario about five times now and the problem still is there. The game doesn't give an error, so I'll have to look deeper into what's happening here.

Link to comment
Share on other sites

Quote:
Originally written by Thuryl:
Quote:
Originally written by Thralni, emperor of Riverrod:
No. This is the only place i use this flag. It doesn't matter if I go to that place in the outdoors (this script is an outdoor script!) in the very beginning or the very end of the game, I'll always end up in the town, even when its not over day 20.
As usual, the debugging calls print_str() and print_num() are your friends. Pepper your code with them at appropriate places. Print the numbers of relevant flags at points when you suspect they might change. Print different strings in different parts of conditional statements to see what code is being run.

The first thing to do is confirm whether or not flag 100,2 is actually set to 1 before day 20, or whether there's something else going on. And for heaven's sake, make sure you're using a fresh party for these tests -- I don't want to be sent on another wild goose chase because you changed the scenario without starting your party over.
Link to comment
Share on other sites

It had to do with the call set_town_visibility and the town hidden field in the town details window. After multiple checking in the editor docs, i finally day the culprit. It appeared I forgot that to hide the toen you set 1 in the town hidden field, and not 0 or -1 or whatever, and while using the call set_town_visibility its exactly the other way around: you use 1 to make it visible and 0 to make it unvisible. Its a very stupid mistake to make, and i made it once before. That's why I don't understand that i made it a second time.

Link to comment
Share on other sites

Know I have a more urgent question.

 

I made a script (it works fine, no problem with that), and I want to link it with a terrainscript. To do that, I use the specobj.txt terrainscript that was premade and came with the editor. Now where do I put the script itself? Do I put it in the scenario file or something, or in the town script the terrainscript sits in?

Link to comment
Share on other sites

I assume A1-3 work based on something like nodes, like BoE — except that we don't have a scenario editor for them. But if you don't use BoE, that probably means little to you.

 

Generally, the AT games work like any other application — there's some code that gets compiled and assembled into a bunch of machine language (1's and 0's) that the computer reads and executes when you open the program.

 

As for your other question: put specobj in your scenario's folder. Place the terrain script with the special tool for placing terrain scripts in the editor. Edit the memory cells as desired.

Link to comment
Share on other sites

But where exactly do I put the scripts to which the specobj terrainscript reffers to? In the scenario .txt file, or the town .txt file, where the particular specobj.txt terainscript sits (so do I put it in the town .txt file, coresponding to the town in which I placed the specobj terrain script?)

Link to comment
Share on other sites

OK, thanks thuryl. I didn't test it yet, as I'm working really hard on the scenario, and I'm almost constantly changing things. It goes quite fast at the moment. Its also nice that my scripts (in my opinion) are groing better all the time, and they tend to work in the way I want it, in most cases already the first time I test them.

 

However, There is something I can't find in the docs (or i didn't search to well) and i wanted to ask if one of you guys can help me. I'm looking for a complete character staus list. I couldn't find.

Link to comment
Share on other sites

From the Appendices:

 

Status Types

 

A status is any temporary condition a character can have. Examples are

blessing, invulnerability, poison, and forcecage. Each status is

represented by a number. Most of the time, each status will be at 0, which

means the character doesn't have it (a non-poisoned character has a poison

status of 0). Statuses are changed by spells, enemy attacks, special

encounters, and similar circumstances.

 

Below is a list of all the possible statuses. Unless said otherwise, they

can not be negative, and they go down by one per turn. The different

statuses a character can have (and their numbers) are

 

The complete status list:

 

0 - Poison. Each turn, game divides the amount of poison the character has by four (rounded up), does 1-2 points of damage that many times, and reduces the poison level by that amount.

1 - Bless/Curse. If positive, character is blessed. If negative, cursed.

2 - Shield/Weaken. If positive, character is shielded. If negative, weakened.

3 - Haste/Slow. If positive, character is hasted. If negative, slowed.

4 - Invulnerable.

5 - Magic Resistant.

6 - Webbed.

7 - Diseased. Goes down slower than 1 per turn.

8 - Charmed.

9 - Berserk.

10 - Asleep.

11 - Paralysis.

12 - Acid. Each turn, game divides the amount of acid the character has by two (rounded up), does 1-2 points of damage that many times, and reduces the acid level by that amount.

13 - Dumbfounded.

14 - Sanctuary.

15 - Martyr's Shield.

16 - Divinely Touched

17 - Resistant

18 - Confused

19 – Enlightened. This unusual status is only used for special encounters. You can have one special encounter that makes the party enlightened, and another encounter that checks to see if they still have this status to, say, open a door or use some other effect.

20 - Terrified

21 - Enfeebled

22 - Regenerating

23 - Nimble Fingers

24 - Featherfall

25 - Flying

26 - Safe Travel

27 - Hovering Feet

28 - Drunk.

29 - Force Cage. Each turn, goes down by the character’s strength, plus 1.

30 - Fleeing. Each turn, goes down by the character’s intelligence, plus 1.

 

Status Ranges

 

The legal range for most statuses if 0 to 250 (so it can have any value from 0, for no status, to 250, the maximum). There are some exceptions. Bless, Shield, and Haste can have a negative value, and can range from –250 to 250. Sleep, Charm, and Paralyze can be at most 10 (so a character can’t magically sleep for over 10 turns).

Link to comment
Share on other sites

I'm trying to put in a custom wall set, but i don't quit understand how to do that. Do have to define every icon, or do I have to just put it in some cmg file? Its a comnpleted wall set I got from a website called The Blazing blade. There you can find Wall sets. So what do I have to do with it exactly? Do I put it in the BoA terraingraphics .cmg file, in the BoA files folder? Or do i put it somewhere else?

Link to comment
Share on other sites

can anybody explain me this? The game says it can't icon 4 in sheet 514, but its there all right. Can there be a problem with it having an animation? This is the code:

 

Code:
 begindefineterrain 474;	clear;	te_name = "Waterfall";	te_which_sheet = 514;	te_which_icon = 0;	te_second_icon = 4;	te_second_icon_offset_y = -55;	te_ed_which_sheet = 504;	te_ed_which_icon = 40;	te_move_block_n = 1;	te_move_block_w = 1;	te_move_block_s = 1;	te_move_block_e = 1;	te_light_radius = 2;	te_anim_steps = 4; 
i don't know why the game says it can't find it, because its really there. maybe one of you guys knows what the problem is?
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...