Didn't see anything dedicated to this, so I thought I'd make some suggestions as to potentially useful commands for building. Goal is for this to serve as an ongoing 'improvement' thread, so if you think of something, please join in.
First one came from some experimenting I was doing with my current work-in-progress. Think it could be pretty beneficial in a variety of situations.
mpmadd $n tempval(attribute #, duration)
This could be used to simulate spell affects, either as a positive or negative modifier, without requiring the spell to be hard-coded into the game, and would behave the same as spell-buffs do; adding to your modified stat while leaving base stats alone. For instance, I've been fooling around with the possibility of simulating the Barbarian's 'Rage' ability. My MacGuyver'd attempt currently looks like this:
Code: Select all
>intercept rage~
if objisworn($o) == 1
if otypewear(1)
or otypewear(12)
or otypewear(4)
or otypewear(5)
mpechoat $n Your armor is too stifling to embrace your rage.
else
if objval5($o) == 0
mpechoat $n You have used your daily rage.
else
if objisworn($o) == 1
if level($n) >= 1
and level($n) < 26
mpechoat $n You give into your rage.
mpmadd $n str 4
mpmadd $n con 4
mpmadd $n ac 2
mpoadd $o value5 -1
pause 720
mpechoat $n Your rage fades, leaving you fatigued.
mpmadd $n str -6
mpmadd $n con -6
mpmadd $n ac -2
pause 180
mpechoat $n You recover from your fatigue.
mpmadd $n str 2
mpmadd $n con 2
Related to the above would be another series of suggestions, though I suspect it might be harder to implement: buildaffect, affectset, loadaffect. In my mind, I see this working best via OLC, in that issuing the command would open up a buffer (similar to descriptions) but as long as it could be designated manually in the .are, offline makes sense too.. Something like (using previous suggestion inside):
Syntax something like buildaffect <name>
<buildaffect AreaName_Rage1>
Code: Select all
Enter your affect values
mpmadd $n str 4
mpmadd $n con 4
...
Then with affectset, you would alter particulars:
affectset <name> <delete|rename|duration|wearoff_msg|etc.>
So for the above, I would set something like:
affectset AreaName_Rage1 duration 720
affectset AreaName_Rage1 wearoff <Message to be displayed when duration reaches 0>
This could save to your area file to be pulled up as needed, similar to how in-file programs work but allowing for individualized naming/structuring. My personal vision for such a function would be to allow for in-program functionality.
For example, in my prototype programs I differentiate affects by level. So I would build my affects (Rage1, Rage2, Rage3, Fatigue) and then go into my programs and load them:
Code: Select all
>intercept_prog rage
if level($n) >= 1
and level($n) <= 27
loadaffect AreaName_Rage1
else
if level($n) >=28
and level($n) <= 43
loadaffect AreaName_Rage2
...
EDIT: Changed some things both for clarity and because loud people in the library distracted me to the point I misrepresented my own suggestion.