A few questions:

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).
AuthorTopic: A few questions:
Agent
Member # 4506
Profile Homepage #0
Guys,

I've decided to revive ETS, but I'll need some help with it.

1)
Is there a moster script which checks what the party's level is, and sets that as X, and then sets it's own level as X+1, for example?

That way my monsters can be modified to make them slightly higher, or lower than the party, giving them a fair fight the whole way through.

2)
I know it is possible, but I don't quite know how to set it so that at night time I enter cave A, and at daytime I enter cave B. I know it's to do with timers, but my only experiments into timers ended in unmitigated disaster. :(

3)
Kel, is it okay if I use that cutscene speed ability of your from Bahs? I should be able to take it from there, if that's okay with you.

4)
Cutscene spellfighting. I've noticed that putting effects on characters don't seem to work right. I just get a white square appearing on them. It hppens on both my computer and Mum's XP. IS that a bug or something?

Thanks! I think that's all the help I need for now (but I can be a bit stupid sometimes ;) )

- Archmagus Micael

[ Monday, September 05, 2005 08:49: Message edited by: Archmagus Micael ]

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
...b10010b...
Member # 869
Profile Homepage #1
1) No such script exists at the moment. There does exist a script for checking the party's level (it's in the HLPM, and I'm pretty sure it's archived at the Codex too). It wouldn't be hard to make a script such as you describe by modifying that.

2) The easiest way is probably to set an SDF to one value during the day, another value at night, and use a Variable Town Entry linked to that SDF. To do that you'll have to familiarise yourself with how to make a timer, though.

3) TM's used the Set Cutscene Speed ability in his scenarios too, and it was based on my suggestion in the first place, so I think I'm on pretty solid ground in saying that you can use it. :P

4) Are you sure you're using valid effect numbers for the calls you're using? Are you using run_animation() calls at the correct times? If you confirm that neither of these is the problem and it still doesn't work right, show us your script.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Triad Mage
Member # 7
Profile Homepage #2
2) Night and day coding is not too hard, but it does involve a lot of long if statements. When I was writing my scenario, I used it to only have wandering monsters at night.

You should be able to modify this outdoor script without too much trouble:
//Outdoor section script
// Section (1,0)

beginoutdoorscript;

variables;

body;

beginstate INIT_STATE;
//if you come to the section in night, it places the encounters,
//except if it already has
if (((get_current_tick() < 625) ||
(get_current_tick() > 4375 && get_current_tick < 5625) ||
(get_current_tick() > 9375 && get_current_tick < 10625) || (get_current_tick() > 14375 &&
get_current_tick < 15625) || (get_current_tick() > 19375 && get_current_tick < 20625) ||
(get_current_tick() > 24375 && get_current_tick < 25625) || (get_current_tick() > 29375)) &&
(get_flag(210,1) < 1))
{
place_out_spec_enc(0,25,30);
place_out_spec_enc(1,20,25);
place_out_spec_enc(2,18,33);
set_flag(210,1,1);
}
break;

beginstate START_STATE;
//if it's night and you've killed them off, they come back
if (((get_current_tick() < 625) ||
(get_current_tick() > 4375 && get_current_tick < 5625) || (get_current_tick() > 9375 &&
get_current_tick < 10625) || (get_current_tick() > 14375 && get_current_tick < 15625) ||
(get_current_tick() > 19375 && get_current_tick < 20625) || (get_current_tick() > 24375 &&
get_current_tick < 25625) || (get_current_tick() > 29375)) && (get_flag(210,1) < 1))
{
set_flag(210,0,0);
place_out_spec_enc(0,25,30);
place_out_spec_enc(1,20,25);
place_out_spec_enc(2,18,33);
set_flag(210,1,1);
}
//if night ends in the section, the monsters all disappear
if ((get_current_tick() > 624 &&
get_current_tick() < 635) || (get_current_tick() > 5624 && get_current_tick() < 5635) ||
(get_current_tick() > 10624 && get_current_tick() < 10635) || (get_current_tick() > 15624 &&
get_current_tick() < 15635) || (get_current_tick() > 20624 && get_current_tick() < 20635) ||
(get_current_tick() > 25624 && get_current_tick() < 25635))
eliminate_outdoor_enc(210,0);
break;

beginstate 10;
//finds out if the encounters have been encountered or not
//also facilitates re-appearance of monsters
if (get_flag(210,2) < 2)
inc_flag(210,2,1);
else
{
set_flag(210,1,0);
set_flag(210,2,0);
}
break;


[ Sunday, September 04, 2005 02:02: Message edited by: Drakefyre ]

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
Apprentice
Member # 5294
Profile Homepage #3
For (1) - I've used this (CV has something like it also - this is from what I've currently been working on):
beginstate 13;
// balance the monsters on this level to party (max) level
// x = dungeon level
// do this one time only (first time entering a level/regenerating a level)...
set_flag(x, 27, 1);
// get max party level
i = 0;
lvl = 0;
while (i < 4) {
if (char_ok(i) == TRUE) {
e = get_level(i);
if (e > lvl) {
lvl = e;
}
}
i = i + 1;
}
// check max level monster levels in dungeon...
i = bg;
while (i < en) {
if (char_ok(i) == TRUE) {
e = get_level(i);
if (lvl > e) {
tt = lvl - e;
// monster level = cur lvl + 0..delta + [1-9]
mlvl = e + get_ran(1, 0, tt) + x;
if (mlvl <= 100)
set_level(i, mlvl);
else
set_level(i, 100);
}
}
i = i + 1;
}
break;
In the above, bg and en are the monster number ranges set elsewhere prior to state 13 being called. The code above tries to set all monsters to parties level + some. I've been thinking of a different formula for this because the current one really makes the monsters extemely tough (almost unbeatable). Of course the above doesn't change the monster level if the level is greater than the parties level.
Posts: 30 | Registered: Wednesday, December 15 2004 08:00
Triad Mage
Member # 7
Profile Homepage #4
Increasing a monster's level does more for it in terms of difficulty than a PC gaining a level.

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
Agent
Member # 4506
Profile Homepage #5
Also,

What's the best way to split up the party, and them reunite them later (as in A3 when you were put in hte Vahnatai dungeons, and a portal appeared that only 1 of you could go through)

- Archmagus Micael

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
...b10010b...
Member # 869
Profile Homepage #6
Look up the try_to_split_party() call in the docs. Be sure to read the warnings.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Shock Trooper
Member # 3368
Profile #7
quote:
Originally written by Archmagus Michael:
What's the best way to split up the party, and them reunite them later (as in A3 when you were put in hte Vahnatai dungeons, and a portal appeared that only 1 of you could go through)

Actually that was in A2.

--------------------
"Like most of life's problems, this one can be solved with bending"
Posts: 287 | Registered: Tuesday, August 19 2003 07:00
Agent
Member # 4506
Profile Homepage #8
I know this must seem stupid, but I've edited Drakefyre's script, and I think it should work. But it's not. I know I'm missing something, but as I said earlier, I'm hopeless at this type of scripting.

Here's the script:
beginstate INIT_STATE;

// CAVE ENTRY SCRIPT:


if (((get_current_tick() < 625) ||
(get_current_tick() > 4375 && get_current_tick < 5625) ||
(get_current_tick() > 9375 && get_current_tick < 10625) ||
(get_current_tick() > 14375 && get_current_tick < 15625) ||
(get_current_tick() > 19375 && get_current_tick < 20625) ||
(get_current_tick() > 24375 && get_current_tick < 25625) ||
(get_current_tick() > 29375)) && (get_flag(210,1) < 1)) {

//place_out_spec_enc(0,25,30);
//place_out_spec_enc(1,20,25);
//place_out_spec_enc(2,18,33);
set_flag(3,0,1);
set_flag(210,1,1); }
break;

beginstate START_STATE;

//CAVE ENTRY SCRIPT:
if (((get_current_tick() < 625) ||
(get_current_tick() > 4375 && get_current_tick < 5625) ||
(get_current_tick() > 9375 && get_current_tick < 10625) ||
(get_current_tick() > 14375 && get_current_tick < 15625) ||
(get_current_tick() > 19375 && get_current_tick < 20625) ||
(get_current_tick() > 24375 && get_current_tick < 25625) ||
(get_current_tick() > 29375)) && (get_flag(210,1) < 1)) {
set_flag(210,0,0);
set_flag(3,0,1);
//place_out_spec_enc(0,25,30);
//place_out_spec_enc(1,20,25);
//place_out_spec_enc(2,18,33);
set_flag(210,1,1); }

//end night
if ((get_current_tick() > 624 && get_current_tick() < 635) ||
(get_current_tick() > 5624 && get_current_tick() < 5635) ||
(get_current_tick() > 10624 && get_current_tick() < 10635) ||
(get_current_tick() > 15624 && get_current_tick() < 15635) ||
(get_current_tick() > 20624 && get_current_tick() < 20635) ||
(get_current_tick() > 25624 && get_current_tick() < 25635))
eliminate_outdoor_enc(210,0);
set_flag(3,0,0);
break;

beginstate 10; //CAVE ENTRY SCRIPT:

if (get_flag(210,2) < 2)
inc_flag(210,2,1); else {
set_flag(210,1,0);
set_flag(210,2,0); }
break;
If I understand it correctly, it should set SDF 3,0 to 1 at night time, and back to 0 in the day.

I've set the Variable Town entry to 3,0, so when 3,0 = 0 it should enter town 3, and when SDF 3,0 = 1 it should enter town 4.

This is right - right?

Please help...

- Archmagus Micael

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
Infiltrator
Member # 5576
Profile Homepage #9
I would recommend using Alint in situations like these; with its help I noted the fact that the second get_current_tick() call in each line of the first two conditionals is missing its (). Put those in, and it should work a bit better.

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Agent
Member # 4506
Profile Homepage #10
quote:
Originally written by Niemand:

I would recommend using Alint in situations like these; with its help I noted the fact that the second get_current_tick() call in each line of the first two conditionals is missing its (). Put those in, and it should work a bit better.
Hmm. Now it's always going to the town which your only meant to enter at night.

Could the fact that I haven't put Town Scripts in yet have messed up the Variable Town Entry?

- Archmagus Micael

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
Triad Mage
Member # 7
Profile Homepage #11
It's because your end night section is screwed up. Use curly braces or eliminate the line "eliminate_outdoor_enc(210,0);"

If that doesn't work, edit the if conditional to be all of daytime, not just those 12 ticks. Since you have a town, if you enter the town at night and come back out in daytime, the town will still be visible.

Also, you don't need state 10 - that was only because I had three outdoor encounters that this controlled. You also don't need the line "set_flag(210,0,0);"

[ Monday, September 05, 2005 02:14: Message edited by: Drakefyre ]

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
Agent
Member # 4506
Profile Homepage #12
Okay. I'll try that!

MikeS, I tried using your script, but I got trounced, so I had given up on it. That was until I had to make a trap for my town, which blasts you at 7 * LEVEL, so I spent about 4 hours getting all of that working really nicely.

The end result was, I managed to make a much simpler script to make the monsters at party_level, or higher.

I thought that you might want to know this, as this one's much easier to edit the levels, so here it is (add this to basicnpc to work):

variables;

short i,target,partylevel,randompartychar,plp1,plq,plmq;

body;

beginstate INIT_STATE;
if (get_memory_cell(0) == 2)
set_mobility(ME,0);

if (town_status(current_town()) == 2)
set_mobility(ME,1);

randompartychar = random_party_member();
partylevel = get_level(randompartychar);
plp1 = (partylevel + 1);
plq = (partylevel / 4);
plmq = (partylevel - plq);
if (partylevel < 15) {
set_level(ME,plp1);
}
if (partylevel > 15){
set_level(ME,plmq);
}

break;
EDIT:

Um...
quote:
If that doesn't work, edit the if conditional to be all of daytime, not just those 12 ticks. Since you have a town, if you enter the town at night and come back out in daytime, the town will still be visible.

:confused: Which one? How? :confused:

- Archmagus Micael

[ Monday, September 05, 2005 03:04: Message edited by: Archmagus Micael ]

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
Infiltrator
Member # 5576
Profile Homepage #13
What Drakefyre means about using all of day time is that your script as it is will only switch from night to day mode if the party is outdoors during the first twelve ticks of the morning. So if the party enters the outdoor section during the night at say 600, the night mode will be activated, but if the party then enters a town during the night, like at 610, and stays in the town until 640, when they exit that town, the town entry script will remain in night mode. What he suggests that you do is changes the time ranges on the end night code to be more like 624 - 4376 , 5624 - 9376 , etc.

Also, you might add a short check to each of the conditionals so that it will not repeat itself if its effect is already in force. The first check in the first conditional would be

(get_flag(3,0) == 0)

since if this is false the flag is already 1 and there is no need to set it again.

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Agent
Member # 5814
Profile #14
Upon deep consideration of myself and the world at large, I've come to the conclusion that my post was extremely similar to Archmagi Micael's and so have selflessly removed the greater part of it.

[ Monday, September 05, 2005 06:26: Message edited by: Not I ]

--------------------
quote:
Originally written by Kelandon
Well, I'm at least pretty

Posts: 1115 | Registered: Sunday, May 15 2005 07:00
Agent
Member # 4506
Profile Homepage #15
Now it's stuck on DAYCAVE! :(

I'm doomed :(

Someone please help (again)...

Here's my code: (What could possible be wrong with it now?)

//Outdoor script for ETS (The Emerald Tortoise Scale)
//By Archmagus Micael]

//Cave Entry Script provided by Drakefyre, with modification
beginoutdoorscript;
variables;

body;

beginstate INIT_STATE;
// CAVE ENTRY SCRIPT:
if (((get_current_tick() < 625) ||
(get_current_tick() > 4375 && get_current_tick() < 5625) ||
(get_current_tick() > 9375 && get_current_tick() < 10625) ||
(get_current_tick() > 14375 && get_current_tick() < 15625) ||
(get_current_tick() > 19375 && get_current_tick() < 20625) ||
(get_current_tick() > 24375 && get_current_tick() < 25625) ||
(get_current_tick() > 29375)) && (get_flag(210,1) < 1))
{
set_flag(3,0,1);
set_flag(210,1,1); }
break;

beginstate START_STATE;
//CAVE ENTRY SCRIPT:
if (((get_current_tick() < 625) ||
(get_current_tick() > 4375 && get_current_tick() < 5625) ||
(get_current_tick() > 9375 && get_current_tick() < 10625) ||
(get_current_tick() > 14375 && get_current_tick() < 15625) ||
(get_current_tick() > 19375 && get_current_tick() < 20625) ||
(get_current_tick() > 24375 && get_current_tick() < 25625) ||
(get_current_tick() > 29375)) && (get_flag(210,1) < 1))
{
set_flag(3,0,1);
set_flag(210,1,1); }

//end night
if ((get_current_tick() > 624 && get_current_tick() < 4376) ||
(get_current_tick() > 5624 && get_current_tick() < 9376) ||
(get_current_tick() > 10624 && get_current_tick() < 14376) ||
(get_current_tick() > 15624 && get_current_tick() < 19376) ||
(get_current_tick() > 20624 && get_current_tick() < 24376) ||
(get_current_tick() > 25624 && get_current_tick() < 29376))

set_flag(3,0,0);
break;
- Archmagus Micael :(

[ Monday, September 05, 2005 08:46: Message edited by: Archmagus Micael ]

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
Triad Mage
Member # 7
Profile Homepage #16
You need to set flag 210,1 to 0 when it turns to daytime (put it right next to set_flag(3,0,0);) and enclose them both in curly braces.

EDIT: Disabled graemlins.

[ Monday, September 05, 2005 09:08: Message edited by: Drakefyre ]

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
Agent
Member # 4506
Profile Homepage #17
It WORKS! (just the wrong way round, but I can fix that!)

THANKS DRAKEFYRE!

EDIT: And now it's stopped working. This is annoying! How in the world does it keep messing up like this?

- Archmagus Micael

[ Monday, September 05, 2005 09:49: Message edited by: Archmagus Micael ]

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
Triad Mage
Member # 7
Profile Homepage #18
No problem. This was one of my favorite things in my scenario, and I'm glad that someone can use it in a scenario that will (hopefully) be released.

EDIT: For efficiency, it would be advisable to put the checks for 210,1 as the first condition in the each if statement rather than the last.

EDIT 2: And for more efficiency, just take out the 210,1 altogether and just replace it with 3,0

[ Monday, September 05, 2005 09:34: Message edited by: Drakefyre ]

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
Agent
Member # 4506
Profile Homepage #19
And it works again. I didn't see your latest post! THANKS AGAIN!

IMAGE(http://micael.tamarvalleyart.com/starwars.gif)

EDIT:
quote:
No problem. This was one of my favorite things in my scenario, and I'm glad that someone can use it in a scenario that will (hopefully) be released.

I plan to release it before October at least. I think I can finish it in a week or two, if I don't run into any major snags. But I'll say a month just to be on the safe side.

- Archmagus Micael

[ Monday, September 05, 2005 10:03: Message edited by: Archmagus Micael ]

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
Triad Mage
Member # 7
Profile Homepage #20
Are you making this scenario for the Pearl contest?

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
Agent
Member # 4506
Profile Homepage #21
quote:
Originally written by Drakefyre:

Are you making this scenario for the Pearl contest?
The What contest?

What's that?

- Archmagus Micael

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
Triad Mage
Member # 7
Profile Homepage #22
http://p080.ezboard.com/fthelyceumfrm2.showMessage?topicID=476.topic

Probably not, then.

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00