various miscellaneous questions on syntax

For builders to discuss and ask building questions.
Post Reply
User avatar
Kelemvor
Sword Grand Master
Sword Grand Master
Posts: 2295
Joined: Mon Apr 11, 2005 6:14 pm
Location: The Fugue Plain within the Crystal Spire

various miscellaneous questions on syntax

Post by Kelemvor » Fri Dec 29, 2006 1:35 pm

I'm currently writing out an area by hand, but in the proper coded format as a text file. Having diligently gone through all the lessons, I have a few general questions about what I've put together so far.

1)
#JUSTICE
CourtRoom QQ75
Dungeon QQ76
Judge QQ42
Guard QQ00
In the Justice section, can I have more than one mobile allocated as a Guard. Is it just a case of adding another line?
For example wrote:#JUSTICE
CourtRoom QQ75
Dungeon QQ76
Judge QQ42
Guard QQ00
Guard QQ01
2)
How should a Geography Mob be added?

3)
If a mobile has no real armour type/material type can this section be left blank or is there a default I should select. Would I be best to just create a Simple mob rather than a Unique mob?

4)
Do animals need to have the lines for language added, or can it be left blank?
for example wrote:#QQ11
Roe Deer~
{10}a Roe Deer~
{10}A deer with mottled red fur browses here.~
{10}This short, slender, deer has a chestnut coat and a narrow rack of antlers.
~
U 10 CLASS_MONSTER RACE_HORSE SEX_MALE POS_STANDING DEITY_NONE
ACT_PET|ACT_WIMPY|ACT_NOWANDER
AFF_INFRARED
ARMOR_TYPE_HIDE MATERIAL_FLESH
d6 0
10 2 10 12 15 10 13
0 0 0 0 0
LANG_ANIMAL
LANG_ANIMAL
Do animals need to have lang added here?
RIS_NONE RIS_NONE RIS_NONE
5)
What determines whether the feathers of a bird are pluckable?

6)
On mobs intended to be bought as pets. are the spec functions still the appropriate way to adjust behaviour - eg Spec_Pet_Gen and Spec_Pet_Dog

7)
Can trees and bushes from forage.are be placed within my area?



That's everything that needs tidying before I can move on from rooms and mobiles, so any help and advice will be gratefully received
...never send to know for whom the bell tolls,
it tolls for thee.
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Fri Dec 29, 2006 3:06 pm

1) I think you can have only one.

2) It depends on when you want the character to gain the geographical knowledge. All it really takes is a program that increases the skill and sets up a quest bit (so that the increase in skill is not repeated). The most basic form of this program would be something like this:

Code: Select all

if quest(something,1,$n) == 0
  mpechoat $n As you move about the AreaThatIBuilt you feel your geographical knowledge of the region has improved.
  mppractice $n 25 knowledge-geography
  mplog KNOWLEDGE: $n has gained 1 point in knowledge geography for traversing the AreaThatIBuilt.
  mpmset $n quest something 1 1
endif
where "mppractice $n 25 knowledge-geography" means "increase $n's knowledge-geography skill once, as long as that increase does not bring it over 25".

If you want $n to gain this knowledge as soon as they enter a room, you can put this as a greet_prog 100 program in the room. If you want it to be triggered at a "random" location, you would then have to put it on an invisible mob who wanders the area. If you want the knowledge to be gained only after completing a quest, you would add this code at the correct point in the quest.

3) For unique mobs, you have to specify some sort of armour. If you do not want to equip your mobs with armour objects, you can set armour type and material to correspond to what the mob would be ICly wearing (e.g., a guard might have scale mail made of metal). Even if you do equip your mobs with armour objects, it's still better to also set their natural armour to what they would ICly wear (in case the armour stops repopping because too many copies are already in the game). If they don't wear armour, you can give them a "cloth" armour (type) made of "cloth" (material).

If the mob has no real "armour", then you can use armour type/material to describe the "natural armour" of the mob. For example, a dragon would perhaps have a full plate made of hide; a lich would have a full plate made of bone; a boar would have a hide armour made of hide; and so on. The armour type here is an indication of how strong the armour is (that's why both dragons and liches would have full plate, even though their natural armour does not look like full plates in any way).

4) Yes, if you describe them as U(nique) mobs, all information must be given; you cannot omit some parts of the description even if they are obvious to the human mind.

But when you actually create "normal" mobiles that have the standard alignment, language, stats, no special spells affecting them, and so on, you can describe them as S(imple) mobs. For simple mobs, you only have to give their levels, class, race, sex, position, deity, and act flags. All the other characteristics are directly taken from the race file (that includes the animal language for race_horse).

So... either you describe them as Simple mobs and you give only basic information; or you describe them as Unique mobs and you have to give out all the information.

5) Whether the bird has a program or not :) Birds are not automatically pluck-able. You can consider a program like this on your birds.

Code: Select all

>intercept_prog pluck~
if quest(0,3,self) < 5
  mpechoat $n You pluck...
  mpechoaround $n $N plucks ...
  mpoload 63
  mposet i63 short {D0}a pink feather {90}with red {A0}and green dots
  mposet i63 long {D0}A pink feather {90}with red {A0}and green dots lies here.
  mposet i63 name pink feather red green dots i63
  mpgive i63 $n
  mpmadd self quest 0 3 1
else
  mpechoat $n You try but... no feather left/$I flies away
  mpechoaround $n $N tries but... no feather left/$I flies away
endif
~
>time_prog 0~
mpmset self quest 0 3 0
~
The quest bit check is used to limit how many feathers you can get from the bird each game day (since it's set back to 0 at midnight).

Something a little bit tricky: all the mobs with the same vnum share the same quest bits, so, if you pluck dry one of your bird, all the other birds (of the same vnum) will stop giving out feathers. There's no good work-around; the best thing is still to reset the quest bits at midnight for example.

6) I guess so. To be honest, I do not really know what each spec_ functions does. Pets with no spec_ functions are fine too.

7) Yes
Image
User avatar
Kelemvor
Sword Grand Master
Sword Grand Master
Posts: 2295
Joined: Mon Apr 11, 2005 6:14 pm
Location: The Fugue Plain within the Crystal Spire

Post by Kelemvor » Fri Dec 29, 2006 4:01 pm

Thanks Dalvyn, that's cleared them all up in double-quick time. Seems most of them, I can inflict on whoever ends up being the hard builder on this :)

I'll likely opt for an actual wandering Mobile for the Geography point, is there a Simple mob for that?

thanks again
...never send to know for whom the bell tolls,
it tolls for thee.
Post Reply