Profile for Pyrulen

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

Recent posts

Pages

AuthorRecent posts
Clock Design in Blades of Avernum
Warrior
Member # 6846
Profile #7
It works, give or take a missed bracket. Nicely done.

Not that this problem can really be helped, but the hours of darkness seem too short (since when has the sun risen at 1:00 AM outside of the arctic circle?).

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Clock Design in Blades of Avernum Editor
Warrior
Member # 6846
Profile #2
I must confess I didn't know about the % function, and now that I do it makes things simpler.

However, your code in the form that it is does not work. All values are bizzarely set to 0, and I think 'totalminutes = daytick * 36 / 125;' may be the problem. While mathematically correct, avernumscript doesn't seem to cope with it.

Neither does it help in any way to simply take an approximate value of 3.472 and multiply both sides by 1000 to give whole numbers - we then get negative numbers appearing for no apparent reason.

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Clock Design in Blades of Avernum
Warrior
Member # 6846
Profile #2
I must confess I didn't know about the % function, and now that I do it makes things simpler.

However, your code in the form that it is does not work. All values are bizzarely set to 0, and I think 'totalminutes = daytick * 36 / 125;' may be the problem. While mathematically correct, avernumscript doesn't seem to cope with it.

Neither does it help in any way to simply take an approximate value of 3.472 and multiply both sides by 1000 to give whole numbers - we then get negative numbers appearing for no apparent reason.

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Clock Design in Blades of Avernum Editor
Warrior
Member # 6846
Profile #0
Recently I thought about creating a clock by calculating the time in hours and minutes with a number from 0 to 5000 (dayticks). Eventually, I intend to create an item (e.g. a watch or magic item) with a custom ability which displays the time. From there, I can create quests with time limits.

Here is my attempt so far in the scenario script:

beginstate START_STATE;

dayticks = get_current_tick() - (what_day_of_scenario() * 5000);

//Total minutes elapsed today
mins1 = (dayticks * 1000) / 3472;

//Minutes to be displayed
mins2 = mins1 - (hours * 60);

//Hours to be displayed
hours = mins1 / 60;

//These are just here to help me test the thing.
print_big_str("dayticks = ",dayticks,"");
print_big_str("mins1 = ",mins1,"");
print_big_str("mins2 = ",mins2,"");
print_big_str("hours = ",hours,"");

break;
We know that there are 1440 minutes in a day (24*60).

3.472 (recurring) comes from 5000/1440.

However, avernumscript doesn't like the decimal point sign and seems to want to round down variables which are not whole numbers. This means that there are about 27 hours in the day!

'(dayticks * 1000) / 3472' shows my attempt to get around the decimal problem, which failed (setting all values to 0).

Is there any way around this problem? Have others before me tried to do this?

EDIT: I've reached the meaning of life!

[ Thursday, June 01, 2006 12:17: Message edited by: Pyrulen ]

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Clock Design in Blades of Avernum
Warrior
Member # 6846
Profile #0
Recently I thought about creating a clock by calculating the time in hours and minutes with a number from 0 to 5000 (dayticks). Eventually, I intend to create an item (e.g. a watch or magic item) with a custom ability which displays the time. From there, I can create quests with time limits.

Here is my attempt so far in the scenario script:

beginstate START_STATE;

dayticks = get_current_tick() - (what_day_of_scenario() * 5000);

//Total minutes elapsed today
mins1 = (dayticks * 1000) / 3472;

//Minutes to be displayed
mins2 = mins1 - (hours * 60);

//Hours to be displayed
hours = mins1 / 60;

//These are just here to help me test the thing.
print_big_str("dayticks = ",dayticks,"");
print_big_str("mins1 = ",mins1,"");
print_big_str("mins2 = ",mins2,"");
print_big_str("hours = ",hours,"");

break;
We know that there are 1440 minutes in a day (24*60).

3.472 (recurring) comes from 5000/1440.

However, avernumscript doesn't like the decimal point sign and seems to want to round down variables which are not whole numbers. This means that there are about 27 hours in the day!

'(dayticks * 1000) / 3472' shows my attempt to get around the decimal problem, which failed (setting all values to 0).

Is there any way around this problem? Have others before me tried to do this?

EDIT: I've reached the meaning of life!

[ Thursday, June 01, 2006 12:17: Message edited by: Pyrulen ]

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
I need to improve my plot... in Blades of Avernum
Warrior
Member # 6846
Profile #18
All the more reason to let this topic Rest In Peace.

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
United 93 in General
Warrior
Member # 6846
Profile #48
quote:
9/11 was a terrible tragedy, much the same as any incident in history that caused several thousand deaths. America tends to hold 9/11 in a special light, and sees it as more of a tragedy than what we have inflicted on others. I feel that to be just as absurd as saying 9/11 was inconsequential due to greater numbers having died before them.
"One death is a tragedy; a million is a statistic."
Joseph Stalin

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
I need to improve my plot... in Blades of Avernum
Warrior
Member # 6846
Profile #14
Good ideas there, but now I've thought of something a little better... ;) I'll keep it a secret until the release. Then again, there is a good chance that some of them could be incorporated - I liked the town square idea for the climactic battle, although I prefer the villagers to be deceived rather than mind controlled, so that saving the villagers would be a goal.

[ Sunday, May 14, 2006 11:06: Message edited by: Pyrulen ]

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
I need to improve my plot... in Blades of Avernum
Warrior
Member # 6846
Profile #7
That's an interesting thought, though not one that I hadn't considered, although as yet I haven't thought of a reason for this. The demon is hardly going to use some backwater village as a base to raise an army of conquering undead is it?

Then there is the question of why the party is there in the first place; if there is seemingly no problem at the beginning, what are they there for? Is the 'just passing through' argument good enough?

Without giving away the entire plot, one question remains: Where does the essential demonic boss lair fit in to all of this?

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
I need to improve my plot... in Blades of Avernum
Warrior
Member # 6846
Profile #4
Here's how it stands:

The reason I was a bit secretive with the current plot was that I wasn't sure if it would be worth scrapping the idea.

Being someone who has lurked around for a while now, I know that most people on the boards can be critical of any plot involving the usual cliches (i.e. demons). For this reason I ask you, 'Would you want another demon hack/slash story, or do you want a plot with humour, twists, betrayals etc?'. Basically, I'm seeing if you'll confirm the latter (sorry if there was any confusion).

PS: There WAS a twist in the original story, the benevolent mayor turns out to be the demon in disguise (not too dissimilar to Smoo's ideas). However, I thought this to be a bit obvious and the more experienced players might find the whole thing a bit dull.

As far as a book adaptation might go, I was thinking along the lines of something by Terry Pratchett - what do you think? (too ambitious?) There are two ways in which an adaptation could happen:

1. Retain all settings and characters in their original fictional world

2. Transplant the main elements and characters of the plot to Ermarian

EDIT: Then there's the question of what to do with free will. Should the plot be followed closely or should it have possible versions of events which deviate from the original narrative?

To Thuryl: Are you not happy to design for the sheer sake of designing? Personally, I find it fun to sort out the details of the scenario, possibly at the expense of the bigger picture. For this reason I would be happy to work to pretty much any plot which is good and reasonably short.

[ Saturday, May 13, 2006 05:18: Message edited by: Pyrulen ]

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
I need to improve my plot... in Blades of Avernum
Warrior
Member # 6846
Profile #0
Ok, by now I have learned how to do most things with the BOA scenario editor. However, I lack possibly the most important thing: a good plot. I started a scenario with an idea about a demon controlling a village, but it seemed half-baked and I had no clear idea about how to finish it.

Now I'm thinking of doing a book adaptation (one of course which would fit well into the world of avernum) but then there is the question of plagiarism. Thoughts on this or any ideas for plots of your own would be welcome.

[ Saturday, May 13, 2006 00:44: Message edited by: Pyrulen ]

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Scenario Processing in Blades of Exile
Warrior
Member # 6846
Profile #23
The hardest part for me is spending hours making detailed towns and dungeons, then finding that my plot is abysmal and unoriginal. As far as making up storylines go, I'm terrible.

I suppose at first I wanted a framework around which I could learn how to code. Actually doing the scenario can be boring, but it's certainly easier.

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
BUGS! in Blades of Avernum Editor
Warrior
Member # 6846
Profile #36
quote:
This means that the call te_can_look_at doesn't do a lot.
I noticed this as well.

It means that all of my custom terrains are searchable and I cannot change this by setting te_can_look_at = 0.

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
BUGS! in Blades of Avernum
Warrior
Member # 6846
Profile #36
quote:
This means that the call te_can_look_at doesn't do a lot.
I noticed this as well.

It means that all of my custom terrains are searchable and I cannot change this by setting te_can_look_at = 0.

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Diagonal Movement Blocking in Blades of Avernum Editor
Warrior
Member # 6846
Profile #4
After some tweaking it did work, but not before I had to create another new terrain specifically for terrain 495 to change into.

Hopefully when this comes out it will be one of the most puzzle orientated dungeons around. In fact, I might even do a mine cart ride if that isn't too cliched...

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Diagonal Movement Blocking in Blades of Avernum
Warrior
Member # 6846
Profile #4
After some tweaking it did work, but not before I had to create another new terrain specifically for terrain 495 to change into.

Hopefully when this comes out it will be one of the most puzzle orientated dungeons around. In fact, I might even do a mine cart ride if that isn't too cliched...

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Ability List in Avernum 4
Warrior
Member # 6846
Profile #3
Bartering in Nethergate enabled you to sell items for more than you bought them for, so if you were really bored you could make money that way.

[ Tuesday, April 04, 2006 06:51: Message edited by: Pyrulen ]

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Diagonal Movement Blocking in Blades of Avernum Editor
Warrior
Member # 6846
Profile #2
Sorry, you're right. I do mean NE, SE etc. Thinking about this problem for too long has caused me to lose track of the basics.

Anyway, here is the room in which I need the effect to take place (ignore the character sprite):


IMAGE(http://i46.photobucket.com/albums/f130/Pyrulen/screenshot3.jpg)

So much for the surprise when it's released...

The red blocks and the gravel floor all have the same terrain script, which is:
beginterrainscript;

variables;

int mylocx,mylocy,charlocx,charlocy,diffx,diffy,newlocx,newlocy;

body;

beginstate INIT_STATE;

set_script_mode(2);

break;

beginstate START_STATE;

if(terrain_in_this_spot() == 496){
mylocx = my_loc_x();
mylocy = my_loc_y();
charlocx = char_loc_x(char_who_activated_script());
charlocy = char_loc_y(char_who_activated_script());
diffx = mylocx - charlocx;
diffy = mylocy - charlocy;
newlocx = mylocx + diffx;
newlocy = mylocy + diffy;
}
break;

beginstate BLOCK_MOVE_STATE;

if((terrain_in_this_spot() == 496) && (get_terrain(newlocx,newlocy) == 495) && (char_on_loc(newlocx,newlocy) == -1) && (diffx + diffy != 2) && (diffx + diffy != -2) && (diffx + diffy != 0)){
print_str_color("The block moves!",2);
play_sound(-45);
set_terrain(newlocx,newlocy,496);
set_terrain(mylocx,mylocy,495);
force_instant_terrain_redraw();
}
else{
if(get_terrain(newlocx,newlocy) != 495){
play_sound(41);
print_str_color("The friction is too great.",2);
}
if(char_on_loc(newlocx,newlocy) != -1)
print_str_color("Someone is in the way.",2);
if((diffx + diffy == 2) || (diffx + diffy == -2) || (diffx + diffy == 0))
print_str_color("You can't push it diagonally.",2);
}
break;

beginstate STEP_INTO_SPOT_STATE;

//Possibly something could be done here...

break;
How it works:
Terrain 495 uses the gravel graphic, terrain 496 uses the red blocks.

It first checks whether the terrain_in_this_spot is 496, and if so, looks at my_loc(x and y values) and character location, then finding the diff(erence), 'myloc - charloc'.

The new location of the block is simply the opposite side from which it is pushed,
'myloc + diff'.

Imagine a grid of 3x3 spaces, with the terrain script in the centre. It should check the location of the first character in the party every tick. I thought that it would be possible to check whether a character is crossing from say, the south to the east side of the grid and create your blocked terrain at the destination, then turning it off again at some point, like the beginning of the next tick. Unfortunately, the start state seems to want to run multiple times whenever I use a call in it to check the character location, so when I walked into the space, it went haywire. Since it got just a little complicated, I gave up on that method.

Your idea seems interesting, I'll try it out and hope that the start state runs once each tick...

EDIT: I have found a few flaws, apart from your misinterpretation over direction which is entirely my fault.

It relies on the fact that you will never traverse any terrain other than terrain 0. In response I'm changing it to also accommodate terrain 495.

[ Tuesday, April 04, 2006 11:33: Message edited by: Pyrulen ]

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Diagonal Movement Blocking in Blades of Avernum
Warrior
Member # 6846
Profile #2
Sorry, you're right. I do mean NE, SE etc. Thinking about this problem for too long has caused me to lose track of the basics.

Anyway, here is the room in which I need the effect to take place (ignore the character sprite):


IMAGE(http://i46.photobucket.com/albums/f130/Pyrulen/screenshot3.jpg)

So much for the surprise when it's released...

The red blocks and the gravel floor all have the same terrain script, which is:
beginterrainscript;

variables;

int mylocx,mylocy,charlocx,charlocy,diffx,diffy,newlocx,newlocy;

body;

beginstate INIT_STATE;

set_script_mode(2);

break;

beginstate START_STATE;

if(terrain_in_this_spot() == 496){
mylocx = my_loc_x();
mylocy = my_loc_y();
charlocx = char_loc_x(char_who_activated_script());
charlocy = char_loc_y(char_who_activated_script());
diffx = mylocx - charlocx;
diffy = mylocy - charlocy;
newlocx = mylocx + diffx;
newlocy = mylocy + diffy;
}
break;

beginstate BLOCK_MOVE_STATE;

if((terrain_in_this_spot() == 496) && (get_terrain(newlocx,newlocy) == 495) && (char_on_loc(newlocx,newlocy) == -1) && (diffx + diffy != 2) && (diffx + diffy != -2) && (diffx + diffy != 0)){
print_str_color("The block moves!",2);
play_sound(-45);
set_terrain(newlocx,newlocy,496);
set_terrain(mylocx,mylocy,495);
force_instant_terrain_redraw();
}
else{
if(get_terrain(newlocx,newlocy) != 495){
play_sound(41);
print_str_color("The friction is too great.",2);
}
if(char_on_loc(newlocx,newlocy) != -1)
print_str_color("Someone is in the way.",2);
if((diffx + diffy == 2) || (diffx + diffy == -2) || (diffx + diffy == 0))
print_str_color("You can't push it diagonally.",2);
}
break;

beginstate STEP_INTO_SPOT_STATE;

//Possibly something could be done here...

break;
How it works:
Terrain 495 uses the gravel graphic, terrain 496 uses the red blocks.

It first checks whether the terrain_in_this_spot is 496, and if so, looks at my_loc(x and y values) and character location, then finding the diff(erence), 'myloc - charloc'.

The new location of the block is simply the opposite side from which it is pushed,
'myloc + diff'.

Imagine a grid of 3x3 spaces, with the terrain script in the centre. It should check the location of the first character in the party every tick. I thought that it would be possible to check whether a character is crossing from say, the south to the east side of the grid and create your blocked terrain at the destination, then turning it off again at some point, like the beginning of the next tick. Unfortunately, the start state seems to want to run multiple times whenever I use a call in it to check the character location, so when I walked into the space, it went haywire. Since it got just a little complicated, I gave up on that method.

Your idea seems interesting, I'll try it out and hope that the start state runs once each tick...

EDIT: I have found a few flaws, apart from your misinterpretation over direction which is entirely my fault.

It relies on the fact that you will never traverse any terrain other than terrain 0. In response I'm changing it to also accommodate terrain 495.

[ Tuesday, April 04, 2006 11:33: Message edited by: Pyrulen ]

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Diagonal Movement Blocking in Blades of Avernum Editor
Warrior
Member # 6846
Profile #0
Has anyone come up with a way of blocking only diagonal movement? I'm currently working on a puzzle which would be quite easy to beat if diagonal (i.e. directly northeast, southeast etc.) movement was possible.

Any suggestions would be welcome.

EDIT: Direction confusion sorted out.

[ Tuesday, April 04, 2006 06:58: Message edited by: Pyrulen ]

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Diagonal Movement Blocking in Blades of Avernum
Warrior
Member # 6846
Profile #0
Has anyone come up with a way of blocking only diagonal movement? I'm currently working on a puzzle which would be quite easy to beat if diagonal (i.e. directly northeast, southeast etc.) movement was possible.

Any suggestions would be welcome.

EDIT: Direction confusion sorted out.

[ Tuesday, April 04, 2006 06:58: Message edited by: Pyrulen ]

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Earth Slopes Needed in Blades of Avernum Editor
Warrior
Member # 6846
Profile #21
Since this project won't be particuarly ambitious, I have a realistic chance of getting it finished by November. I've put in a lot of hours already and learnt how to do most things, so I wouldn't want to waste all that effort by failing to release it.

Despite that, I have a tendency to veer off course of the plot and write large amounts of dialogue or put in some custom graphics (I also spent a large amount of time scripting the behaviour of a dog!).

As a result, the files are unsystematic at the moment, e.g. you probably won't find my towns to be in chronological order if you check them on the editor.

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Earth Slopes Needed in Blades of Avernum
Warrior
Member # 6846
Profile #21
Since this project won't be particuarly ambitious, I have a realistic chance of getting it finished by November. I've put in a lot of hours already and learnt how to do most things, so I wouldn't want to waste all that effort by failing to release it.

Despite that, I have a tendency to veer off course of the plot and write large amounts of dialogue or put in some custom graphics (I also spent a large amount of time scripting the behaviour of a dog!).

As a result, the files are unsystematic at the moment, e.g. you probably won't find my towns to be in chronological order if you check them on the editor.

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Earth Slopes Needed in Blades of Avernum Editor
Warrior
Member # 6846
Profile #13
Wow, that's far better than anything I could do. The earth terrain graphics are perfect, and I might even nab a windmill or two. :P

EDIT: Nice roof graphics. I liked them so much that I'm doing a rooftop chase scene above one of my towns. The only problem is retaining the same level of detail of the walls on the ground on what are now cliffs...

By the way, the pictures loaded fine for me, so maybe you should check your internet settings.
Mab, does your site rely on Java or Cookies?

PS. What are 'Scads of Gold'?!

[ Tuesday, March 28, 2006 07:28: Message edited by: Pyrulen ]

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00
Earth Slopes Needed in Blades of Avernum
Warrior
Member # 6846
Profile #13
Wow, that's far better than anything I could do. The earth terrain graphics are perfect, and I might even nab a windmill or two. :P

EDIT: Nice roof graphics. I liked them so much that I'm doing a rooftop chase scene above one of my towns. The only problem is retaining the same level of detail of the walls on the ground on what are now cliffs...

By the way, the pictures loaded fine for me, so maybe you should check your internet settings.
Mab, does your site rely on Java or Cookies?

PS. What are 'Scads of Gold'?!

[ Tuesday, March 28, 2006 07:28: Message edited by: Pyrulen ]

--------------------
"Build a man a fire, and he´ll be warm for a day; set a man on fire, and he´ll be warm for the rest of his life."
Posts: 65 | Registered: Thursday, March 2 2006 08:00

Pages