A question to the WASes here.

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 question to the WASes here.
Infiltrator
Member # 4637
Profile Homepage #0
I have a question to the WASes here (Wizards of the AvernumScript). ;)

1 - Is it possible to "attach" a specific SDF to every NPC in all towns?

Let's say that if the PC kills a NPC, the NPC's SDF would be triggered. This would be useful because of clone towns (equal towns with the same NPCs, but where the actions in one of them are reflected in the other. Example: I kill John in town 1, he won't be in clone town 2).
I guess I could do a small script veryfing a chacklist of NPCs everytime the PC enters one of the towns... But I would prefer my initial choice, mainly due to undisclosed reasons. ;)

2 - I need some more information about getting the day/night cycle right.

For example, if the PC aproaches town 1 at day, he will be teleported to town 1. If he reaches it at night, he will be teleported to (clone) town 2. I know Erik Westra made something similar in his scenario (we could enter in a certain place only at night), but I would like to know extra commands and tricks related to the day/night cycle, if someone would be kind enough to enlighten me. I guess I could figure it out alone, but right now I'm a newbie in scripting and time is very short.

3 - Is there a way to change a town's script in-game?

I mean, is there a command or any scripting trick, to make town 1 use the t1B.txt script, instead of the default t1.txt?

Thanks for any help you can lend me. :)

[ Friday, June 10, 2005 22:59: Message edited by: Overwhelming ]

--------------------
Visit the Blades of Avernum Center
and the Beta Testing Center

--------------
"Beware lest anyone cheat you through philosophy and empty deceit, according to the tradition of men, according to the basic principles of the world, and not according to Christ." Colossians 2:6-9
Posts: 483 | Registered: Tuesday, June 29 2004 07:00
...b10010b...
Member # 869
Profile Homepage #1
quote:
Originally written by Overwhelming:

1 - Is it possible to "attach" a specific SDF to every NPC in all towns?

Let's say that if the PC kills a NPC, the NPC's SDF would be triggered. This would be useful because of clone towns (equal towns with the same NPCs, but where the actions in one of them are reflected in the other. Example: I kill John in town 1, he won't be in clone town 2).

This should be pretty easy. The best way would be to give all townspeople a custom creature script (via editing the creature data in your scenario's custom objects script). The script should be a modified version of basicnpc, with the main difference being that the DEAD_STATE sets an SDF which depends on two memory cells (one for part x of the SDF, another for part y). Now, just set memory cells to different pairs of values for each person, and remember what they are.

In addition to this, you could have the creature script's INIT_STATE check if it's already been killed and erase itself if it is. (Note that if you do this and the player uses the character editor to reset towns, dead people won't come back.)

quote:
3 - Is there a way to change a town's script in-game?

I mean, is there a command or any scripting trick, to make town 1 use the t1B.txt script, instead of the default t1.txt?
Nope. The best workaround is to create a duplicate of the town and use Variable Town Entry to "redirect" to it from the old one at an appropriate point.

[ Friday, June 10, 2005 23:08: Message edited by: Thuryl ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Off With Their Heads
Member # 4045
Profile Homepage #2
quote:
Originally written by Thuryl:

The best way would be to give all townspeople a custom creature script (via editing the creature data in your scenario's custom objects script). The script should be a modified version of basicnpc, with the main difference being that the DEAD_STATE sets an SDF which depends on two memory cells (one for part x of the SDF, another for part y).
Basicnpc sets flags already using memory cells 1 and 2, but you don't even need it: if you make each character have the same ID as its duplicate, it should erase properly without setting any SDFs.

That is, I think all you have to do is edit the Character IDs to match them, rather than setting any SDFs.

quote:
Originally written by Overwhelming:

2 - I need some more information about getting the day/night cycle right.
Given that you haven't asked a specific question, I can only direct you to the Appendices chapter called "The Passage of Time." Generally, this is all the information you should need:

"There are 5000 ticks in a day. The first eighth and last eighth of every 5000 tick period are nighttime."

"short get_current_tick() - Gets the number of ticks (i.e. turns/combat rounds) that have elapsed since the scenario began. This will be a number from 0 to 29999, and wraps around to 0 when past 29999."

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00