You could probably do this if your macro emits the entire category/sublist
hierarchy for each item that you add (closing everything off with the
appropriate ends), and then emit the whole option hierarchy surrounding the
one option you want to add.
You wouldn't be able to edit such a file as a macro data sheet because the
items couldn't be define inside a category. You would have to edit the file
as text all the time.
I think it would be better to just list all your options explicitly.
----- Original Message -----
Sent: Thursday, June 26, 2003 6:33 PM
Subject: [cw] Macro Question
> Is there a command in a macro to write to the general options in a MDS
while creating an item?
> The situation is that in Mutants and Masterminds EVERY power can ALSO be
an extra to any other power (GM/common sense permitting, but as a game
mechanic that's how it works). What I would LIKE to do is when executing
the Macro that sets up the item also have that macro write a line for each
item into the options as adders.
> So in other words, take the name of the power and the cost of the power
minus one and create an optional adder. The adder would look simply like:
> begin add name_of_power +3 noedit end
> where the base power has an original cost of 4.
> My current item add macro for powers looks like below - is there a macro
command to write to the basic options while doing the work below or a way to
call a macro that somehow does that?
> $$macro power(name, cost, action, range, duration, cat, varname)
> $$macrodesc("Power Macro")
> $$argdesc(name, "Power Name")
> $$argdesc(cost, "Cost per Level")
> $$argdesc(action, "Speed of acting on poewr")
> $$argdesc(range, "Range of power")
> $$argdesc(duration, "Duration of power once activated")
> $$argdesc(cat, "Category of power (determines adjustments)")
> $$argdesc(varname, "Variable name (optional, default is power)")
> varname "$(varname)"
> varname "$(name)"
> level 1
> cost "$(cost)"
> checkexp "x>0 and x<=max_power_rank"
> checkmsg "$concat('Power rank may not be ',x)"
> totalcostformula ((max(c+@a@,1)*@v@)+aux)
> cat "$(cat)"
> begin text Source
> text Action "$(action)"
> $$if((Range) = "Normal")
> begin exp Range "$(range)" dispexp "format(\"l %d foot increments, %d foot
range\", 10*x, 100*x)" end
> begin text Range "$(range)" end
> text Duration "$(duration)"
> Find out more about Creation Workshop by visiting the Hero Games Web Site
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/