Functionality Suggestions

For builders to discuss and ask building questions.
Post Reply
Xryon
Sword Master
Sword Master
Posts: 233
Joined: Thu Aug 25, 2005 5:24 am
Location: Waterdeep

Functionality Suggestions

Post by Xryon » Thu Feb 05, 2015 7:15 pm

Good afternoon everyone,

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
Because of the lack of a timer function, or one like suggested above, I'm essentially having to simulate duration using 'pause'. With the suggestion, however, you could apply your duration from the onset. This would also alleviate the need to manually remove the affect, as when its timer reached zero, $n would revert to base values.

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
  ...
That's all I've got for now. I'll be making various notes/additions as I continue working, and would enjoy opinions/feedback/other suggestions.

EDIT: Changed some things both for clarity and because loud people in the library distracted me to the point I misrepresented my own suggestion.
Xryon
Sword Master
Sword Master
Posts: 233
Joined: Thu Aug 25, 2005 5:24 am
Location: Waterdeep

Re: Functionality Suggestions

Post by Xryon » Thu Feb 05, 2015 11:42 pm

Another couple that I meant to put in the first post. Think it would be awesome to be able to perform arithmetic operations. Coupled with the ability to use currentStat or permStat, could do some pretty cool things with it. With my Rage prog, I had to simplify the duration to a flat value as opposed to SRD's '3 + newly modified con modifier,' but with that functionality it would be possible.

Tacking on the above and my previous post, being able to designate durations by day/hour/minute would be pretty awesome.

Didn't really think about it before I started making suggestions, but I seem to be going down the 'using progs for skills universally' route. Not necessarily my intention, but with the right functionality in progs, we could take a lot of the workload off of the code-side. Area review process would still keep things under control, and with my suggestion in the previous post (affect creation/loading) once someone made one it could be loaded throughout the game.
Post Reply