Profile for Lancer

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
How do you script in events occurring on specific days? in Blades of Avernum
Warrior
Member # 6682
Profile #14
So, the question that remains is the following: Is there any way to print the string "Month:Nuwmont" only on the first tick of the day called rather than after every tick?

[ Sunday, June 11, 2006 12:23: Message edited by: Lancer ]

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
Can you explain what the difference between LOAD_SCEN and START_SCEN states? in Blades of Avernum Editor
Warrior
Member # 6682
Profile #0
I am somewhat confused about these two states in the scenario script. They are apparently both called once, at the very beginning ,although I am not too sure what the conceptual difference is between the two?

And apparently, unless you want to print a string right at the very beginning of the scenario you wouldn't use these states to put in calls that are executed at some time greater than zero.

[ Sunday, June 11, 2006 12:17: Message edited by: Lancer ]

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
Can you explain what the difference between LOAD_SCEN and START_SCEN states? in Blades of Avernum
Warrior
Member # 6682
Profile #0
I am somewhat confused about these two states in the scenario script. They are apparently both called once, at the very beginning ,although I am not too sure what the conceptual difference is between the two?

And apparently, unless you want to print a string right at the very beginning of the scenario you wouldn't use these states to put in calls that are executed at some time greater than zero.

[ Sunday, June 11, 2006 12:17: Message edited by: Lancer ]

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
How do you script in events occurring on specific days? in Blades of Avernum Editor
Warrior
Member # 6682
Profile #12
Thanks Lazarus, I just figured it out right before you posted!

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
How do you script in events occurring on specific days? in Blades of Avernum
Warrior
Member # 6682
Profile #12
Thanks Lazarus, I just figured it out right before you posted!

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
How do you script in events occurring on specific days? in Blades of Avernum Editor
Warrior
Member # 6682
Profile #11
Thanks Kelandon!!!!

Along with the print_num(short num) debugging trick I learned (as you had said) that force_start_day keeps num at 0 if used along with the what_day_of_year_call...

So, instead, I used the what_day_of_scenario call instead and it works!

Thanks again. I am definitely going to make a note of that!

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
How do you script in events occurring on specific days? in Blades of Avernum
Warrior
Member # 6682
Profile #11
Thanks Kelandon!!!!

Along with the print_num(short num) debugging trick I learned (as you had said) that force_start_day keeps num at 0 if used along with the what_day_of_year_call...

So, instead, I used the what_day_of_scenario call instead and it works!

Thanks again. I am definitely going to make a note of that!

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
How do you script in events occurring on specific days? in Blades of Avernum Editor
Warrior
Member # 6682
Profile #8
quote:
Originally written by Kelandon:

Yes, but does it work if you eliminate the force_start_day? It's possible that using force_start_day(-1) screws up the call what_day_of_year and makes it always 0 or something.
It just doesn't like me for some reason..lol. I did try eliminating the force_start_day call but it didn't seem to have any bearing on the what_day_of_year call. I still get the same problem.

Is it possible that the "Passage of Time" calls just don't like if/while type statements for some reason? Or is there something syntactically fundamental that I've missed?

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
How do you script in events occurring on specific days? in Blades of Avernum
Warrior
Member # 6682
Profile #8
quote:
Originally written by Kelandon:

Yes, but does it work if you eliminate the force_start_day? It's possible that using force_start_day(-1) screws up the call what_day_of_year and makes it always 0 or something.
It just doesn't like me for some reason..lol. I did try eliminating the force_start_day call but it didn't seem to have any bearing on the what_day_of_year call. I still get the same problem.

Is it possible that the "Passage of Time" calls just don't like if/while type statements for some reason? Or is there something syntactically fundamental that I've missed?

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
How do you script in events occurring on specific days? in Blades of Avernum Editor
Warrior
Member # 6682
Profile #6
Eliminating the force_start_day(-1) call just brings back the standard calendar...

The strange thing, Kelandon, is that if I were to use the following code, the print_str works just like I expect it to...

beginstate START_STATE;
print_str("Month:Nuwmont");
break;

In this case, of course, the text string "Month:Nuwmont" is displayed every tick onto infinity...

However, as soon as I put in that "if" statement, it stops doing what I want it to do. It doesn't like something about that if statement... It doesn't understand it or I don't know what..

beginstate START_STATE;
if (what_day_of_year() == 2)
print_str("Month:Nuwmont");
break;

[ Sunday, June 11, 2006 11:15: Message edited by: Lancer ]

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
How do you script in events occurring on specific days? in Blades of Avernum
Warrior
Member # 6682
Profile #6
Eliminating the force_start_day(-1) call just brings back the standard calendar...

The strange thing, Kelandon, is that if I were to use the following code, the print_str works just like I expect it to...

beginstate START_STATE;
print_str("Month:Nuwmont");
break;

In this case, of course, the text string "Month:Nuwmont" is displayed every tick onto infinity...

However, as soon as I put in that "if" statement, it stops doing what I want it to do. It doesn't like something about that if statement... It doesn't understand it or I don't know what..

beginstate START_STATE;
if (what_day_of_year() == 2)
print_str("Month:Nuwmont");
break;

[ Sunday, June 11, 2006 11:15: Message edited by: Lancer ]

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
How do you script in events occurring on specific days? in Blades of Avernum Editor
Warrior
Member # 6682
Profile #4
Ok.. I've made some ammends and it is still not working.. Logically, I don't understand why:

beginstate START_SCEN_STATE;
force_start_day(-1);
break;

beginstate START_STATE;
if (what_day_of_year() == 2)
print_str("Month:Nuwmont");
break;

[quote=Kelandon]
I don't know how you figure. The code says, "if (what_day_of_year() == 2)" — if the day of the year is 2, then it does the print_str. Note that this will print the string all during the second day.[/quote]I just thought that since BoA nearly always starts with "zero" being the first in most circumstances, that what_day_of_year(0) would correspond to Day 1 and what_day_of_year(1) would be Day 2 so on...

[ Sunday, June 11, 2006 10:59: Message edited by: Lancer ]

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
How do you script in events occurring on specific days? in Blades of Avernum
Warrior
Member # 6682
Profile #4
Ok.. I've made some ammends and it is still not working.. Logically, I don't understand why:

beginstate START_SCEN_STATE;
force_start_day(-1);
break;

beginstate START_STATE;
if (what_day_of_year() == 2)
print_str("Month:Nuwmont");
break;

[quote=Kelandon]
I don't know how you figure. The code says, "if (what_day_of_year() == 2)" — if the day of the year is 2, then it does the print_str. Note that this will print the string all during the second day.[/quote]I just thought that since BoA nearly always starts with "zero" being the first in most circumstances, that what_day_of_year(0) would correspond to Day 1 and what_day_of_year(1) would be Day 2 so on...

[ Sunday, June 11, 2006 10:59: Message edited by: Lancer ]

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
How do you script in events occurring on specific days? in Blades of Avernum Editor
Warrior
Member # 6682
Profile #2
Oooh... that documentation on bugs is helpful, Thank you!

By Kelandon's suggestion I put the second half of the code in the START_SCEN_STATE.

The following is exactly what I have:

beginstate LOAD_SCEN_STATE;
force_start_day(-1);
what_day_of_year();
break;

beginstate START_SCEN_STATE;
if (what_day_of_year() == 2)
print_str("Month:Nuwmont");
break;
-----------------------------------------------

So, on "Day 3" there is supposed to be a text string that displays as "Month:Nuwmont.."
Oddly, I am still not getting anything to show up on the text window.

I am assuming that the program knows to display this as soon as it is Day 3, or on the first tick of Day 3?

[ Sunday, June 11, 2006 10:30: Message edited by: Lancer ]

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
How do you script in events occurring on specific days? in Blades of Avernum
Warrior
Member # 6682
Profile #2
Oooh... that documentation on bugs is helpful, Thank you!

By Kelandon's suggestion I put the second half of the code in the START_SCEN_STATE.

The following is exactly what I have:

beginstate LOAD_SCEN_STATE;
force_start_day(-1);
what_day_of_year();
break;

beginstate START_SCEN_STATE;
if (what_day_of_year() == 2)
print_str("Month:Nuwmont");
break;
-----------------------------------------------

So, on "Day 3" there is supposed to be a text string that displays as "Month:Nuwmont.."
Oddly, I am still not getting anything to show up on the text window.

I am assuming that the program knows to display this as soon as it is Day 3, or on the first tick of Day 3?

[ Sunday, June 11, 2006 10:30: Message edited by: Lancer ]

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
How do you script in events occurring on specific days? in Blades of Avernum Editor
Warrior
Member # 6682
Profile #0
Hello everyone. It seems like it would be real easy but I have had no luck in telling BoA to execute events on a given day..

For example, say I want on Day 30 for a message alert to appear saying "Month: Nuwmont." Day 30 would arrive and no message will appear on the text window.

I have been writing statements such as:

beginstate LOAD_SCEN_STATE;
force_start_day(-1);
what_day_of_year();

if (what_day_of_year() == 30)
print_str("Month:Nuwmont");
break;

The above and variations thereof have given me little success.

On another unrelated note.. Is there something wrong with the "print_big_str_color" call? The other versions of print_str seem to work just fine for me, save for that one.

[ Sunday, June 11, 2006 08:56: Message edited by: Lancer ]

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
How do you script in events occurring on specific days? in Blades of Avernum
Warrior
Member # 6682
Profile #0
Hello everyone. It seems like it would be real easy but I have had no luck in telling BoA to execute events on a given day..

For example, say I want on Day 30 for a message alert to appear saying "Month: Nuwmont." Day 30 would arrive and no message will appear on the text window.

I have been writing statements such as:

beginstate LOAD_SCEN_STATE;
force_start_day(-1);
what_day_of_year();

if (what_day_of_year() == 30)
print_str("Month:Nuwmont");
break;

The above and variations thereof have given me little success.

On another unrelated note.. Is there something wrong with the "print_big_str_color" call? The other versions of print_str seem to work just fine for me, save for that one.

[ Sunday, June 11, 2006 08:56: Message edited by: Lancer ]

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
Reputation system in BoA? in Blades of Avernum Editor
Warrior
Member # 6682
Profile #23
Will do. Gracias again.

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
Reputation system in BoA? in Blades of Avernum
Warrior
Member # 6682
Profile #23
Will do. Gracias again.

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
Reputation system in BoA? in Blades of Avernum Editor
Warrior
Member # 6682
Profile #20
I appreciate your help, Lazarus!

So then all I need to do is add the following statement everytime the PCs do something to increase (or decrease) their reputation:

get_flag(x,y) = get_flag(x,y) + z
//where z is the increase (or decrease) in rep due to the deed and x,y are the coordinates of the reputation SDF.

I am just a little confused about the syntax for the change_custom_abil_uses flag.. Why is it used in two circumstances (in beginstate and LOAD_SCEN state)?

Is it because in LOAD_SCEN the change_custom_abil_uses statements there are where the special abilities are actually defined for all PCs... Whereas the actual execution of the ability is in the beginstate?

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
Reputation system in BoA? in Blades of Avernum
Warrior
Member # 6682
Profile #20
I appreciate your help, Lazarus!

So then all I need to do is add the following statement everytime the PCs do something to increase (or decrease) their reputation:

get_flag(x,y) = get_flag(x,y) + z
//where z is the increase (or decrease) in rep due to the deed and x,y are the coordinates of the reputation SDF.

I am just a little confused about the syntax for the change_custom_abil_uses flag.. Why is it used in two circumstances (in beginstate and LOAD_SCEN state)?

Is it because in LOAD_SCEN the change_custom_abil_uses statements there are where the special abilities are actually defined for all PCs... Whereas the actual execution of the ability is in the beginstate?

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
Reputation system in BoA? in Blades of Avernum Editor
Warrior
Member # 6682
Profile #18
Okay.. This is what I have now:

beginscenarioscript;

variables;
short i;
body;

beginstate LOAD_SCEN_STATE;
init_special_abil(1, "Reputation", 10);
break;

....

beginstate 10;
i=4;
change_custom_abil_uses(who_used_custom_abil,1,1);
print_big_str("Your Reputation is", i, "dude");
break;

------------------------------------------------

Unfortunately, I am still not getting a special ability icon to pop up for the PCs to utilize. Where do I go from here? Thanks.

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
Reputation system in BoA? in Blades of Avernum
Warrior
Member # 6682
Profile #18
Okay.. This is what I have now:

beginscenarioscript;

variables;
short i;
body;

beginstate LOAD_SCEN_STATE;
init_special_abil(1, "Reputation", 10);
break;

....

beginstate 10;
i=4;
change_custom_abil_uses(who_used_custom_abil,1,1);
print_big_str("Your Reputation is", i, "dude");
break;

------------------------------------------------

Unfortunately, I am still not getting a special ability icon to pop up for the PCs to utilize. Where do I go from here? Thanks.

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
Reputation system in BoA? in Blades of Avernum Editor
Warrior
Member # 6682
Profile #17
So the "1" in the third argument of the chnage_custom_abil_uses call means to give that special ability unlimited usage?

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
Reputation system in BoA? in Blades of Avernum
Warrior
Member # 6682
Profile #17
So the "1" in the third argument of the chnage_custom_abil_uses call means to give that special ability unlimited usage?

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00

Pages