• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

MACRO:New BB Code

Status
Not open for further replies.
Hey for those who read this,especially chief ralle.

I got this new idea BB Code named Macro,which creates or repeats a word.
Here is its types:
-FontMacro
-TextMacro
-ImgMacro
-BoxMacro
-ColorMacro
-SizeMacro
and more.

So how to use it?

Put first this bb code [macro]
then insert its type and the word that will be repeated
Ex.
[macro][textmacro=a][insert=a,b,c,d]
put brackets on the arguments
so how to use this sample macro.
Example.
[macro][textmacro=a][insert=a,b,c,d]
Hello [a] and and [c] and [d]


Then close
[macro][textmacro=a][insert=a,b,c,d]
Hello [a] and and [c] and [d]
[/textmacro][/macro]

So how to use macro the text macro
After creating it?

[runtextmacro=a]"Friend","Family","People","World"[/runtextmacro]

Then the macro will rewrite the sentence then the result will be.
Hello Friend and family and People and World

Other kinds of macro are just like above.
 
Well, let's say that you had a template. You could make the template a macro. This would make the actual text easier to do. However, the " " is a bad idea and the way the textmacro run also isn't very good.

Should probably use something like [,] or something to separate the arguments.

This would just make templates for resource submissions and so on much easier to use as your stuff wouldn't be surrounded by tons and tons of bb code.

Of course, doing a GUI editor instead of the macros would be even better, as you could write in tabs, tables, and etc, making it even easier.
 
In my eyes, this doesn't serve any real practical use around here. You won't repeat the same variable often enough to make this code worthwhile.
Instead of having to spend time on wrapping your head around this tag, you can easily write everything manually. There ain't much time saved.
You'd need an actual script to be able to gain anything from it.
 
Maybe this this would be better:

Macro Creation
[MACRO=MyFont][SIZE=4][COLOR=SeaGreen][MACROTEXT][/COLOR][/SIZE][/MACRO]
To achieve this effect:

Example
Some Header
Body of text

Some Other Header
Another body of text.
With this code:

Macro Use
[USEMACRO=MyFont]Some Header[/USEMACRO]
Body of text.

[USEMACRO=MyFont]Another Header[/USEMACRO]
Another body of text.
The value of this would be much better shown if you used it to shrink down more than just a size/color pair.
 
if you want so badly to add macro then make them work like in vjass or C++.

My example
[textmacro=header1] [indent] [h1] [color=gold] [/textmacro]
[textmacro=header2] [indent] [h1] [color=lime] [/textmacro]
[textmacro=footer] [/color] [/h1] [/indent] [/textmacro]

then in text you just use

[runtextmacro=header1] some text 1 [runtextmacro=footer]
[runtextmacro=header1] some text 2 [runtextmacro=footer]
[runtextmacro=header2] some text 3 [runtextmacro=footer]

and finally you got:

some text 1

some text 2

some text 3


or even better example:

[textmacro=myImage] [table] [img]http://www.hiveworkshop.com/forums/hp_files/12/img_Orb.png[/img] [/table] [/textmacro]

[stable] [runtextmacro=myImage] [c] [runtextmacro=myImage] [c] [runtextmacro=myImage] [/stable]

img_Orb.png
img_Orb.png
img_Orb.png
and there you go...

Also notice that I removed arguments from textmacro, this way is more like takes nothing returns nothing function.
 
Status
Not open for further replies.
Top