Apolyton Civilization Site Forums
  Clash of Civilizations
  XML macro language?

Post New Topic  Post A ReplyPost A Reply In A New Window

profile | register | preferences | faq | search next newest topic | next oldest topic bottom of page
Author
Topic:   XML macro language? Format for Better Printing
mca
Chieftain
Odense, Denmark
b.02-15-99
posted September 02, 1999 13:31   Click Here to See the Profile for mcaClick Here to Email mca  send a private message to mca
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
This is in response to F_Smith's suggestion to use XML in the macros.

I haven't followed Clash's development for some time, so this may be completely redundant. Any pointers to previous discussions/definitions of the macro language will be appreciated.

I've been experimenting with an XML-based app for a few weeks, and I've become convinced that XML is quite useful for data.

But I'm not convinced yet that I'd like to use it for a macro language, or rather: I'm not so sure if I'd like to actually write anything in that language.

Anyway, I like the idea from a "cool, let's see if it works"-perspective, and I couldn't stop myself from brewing up a few examples of what I imagine an XML-based macro language to look like

(Sorry, no DTDs or implementation details for these examples)

<!-- 
This event will create the Angry Mothers civ in 20,30 and give the
Nasty Evil Buggers 1000 monetary units and the Evil Empire tech
if the Nasty Evil Buggers conquer the Really Important Province
before 1230 OR if the Annoyingly Good Guys are destroyed before that same year
-->

<event type="one-shot" >

<cause>
<any>
<province-conquered>
<province>Really Important Province</province>
<conqueror>Nasty Evil Buggers</conqueror>
<turn comparator="<" >1230</turn>
</province-conquered>
<civ-destroyed>
<civ>Annoyingly Good Guys</civ>
<turn comparator="<" >1230</turn>
</civ-destroyed>
</any>
</cause>

<effects>
<create-civ>
<name>Angry Mothers</name>
<population>100</population>
<location>20,30</location>
<otherParam>Blah blah</otherParam>
</create-civ>
<give-to-civ>
<civ>Nasty Evil Buggers</civ>
<gift>
<money>1000</money>
<tech>Evil Empire</tech>
</gift>
</give-to-civ>
</effects>

</event>

Is the above example intuitive? ugly?

Procedures with conditionals, loops, and such may be a bit more complicated. I'm not satisfied at all with the below attempt.

<!--
This procedure will show a "You are really poor" message to all players of
civilizations that have less than 100 monetary units or less than 2 cities and
the turn is year 1900.
-->
<procedure name="my-procedure" >
<for>
<range variable="aCiv">
<get>civilizations</get>
</range>
<do>
<if>
<condition>
<all>
<turn>1900</turn>
<any>
<has>
<civ><variable>aCiv</variable></civ>
<money comparator="<">100</money>
</has>
<has>
<civ><variable>aCiv</variable></civ>
<cities comparator="<">2</cities>
</has>
</any>
</all>
</condition>
<then>
<popup-message>
<civ><variable>aCiv</variable></civ>
<text>You are really poor!</text>
</popup-message>
</then>
</if>
</do>
</for>
</procedure>

Martin

[This message has been edited by mca (edited September 02, 1999).]

Mark_Everson
Clash of Civilizations
Project Lead

Canton, MI, USA
b.02-15-99
posted September 02, 1999 14:48   Click Here to See the Profile for Mark_EversonClick Here to Email Mark_Everson  send a private message to Mark_EversonSend a Message to UIN: 30578681 Visit Mark_Everson's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
ROTFLMAO

Boy, is F_Smith gonna love this

I think its both reasonably intuitive And ugly. I think it would be a Real pain to program in, but admire your inquisitive spirit .

For macro discussions try a search with "macro" as a key word, and you should get the whole story. The one I was thinking of specifically is in Macro language description. A search on "scenario" might net you a few more.

Kull
Clash of Civilizations
Diplomacy & Web Editor

El Paso, TX USA
Mar 99
posted September 02, 1999 23:38   Click Here to See the Profile for KullClick Here to Email Kull  send a private message to Kull Visit Kull's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
As an avid CivII player, IMO the reason it's still so popular is largely due to the inventiveness of the many talented scenario creators out there. Microprose hasn't come close to developing scenarios as interesting as those created by Harlan Thompson, Jesus Balsinde, and many others. The Civ2 macro language is pathetically limited, BUT it is easy to use. As I've said before, "I'm no coder", but even I can create a popular and entertaining scenario (Ancient Empires).

I bring this up because if I (and most others in our target market) have to write macros such as the ones mca demonstrates above.....well. Either I'll go to coding school or shoot myself, whichever is easier.

This is NOT a plea to "dumb down" the power of our macro language, but it has to be easy to use. Couldn't we create some type of "Macro Generator" which involves selecting options from a menu, and let THAT create the code? If we make the macro language invisible to the average user, we'll have a gone a long way to ensuring a long and vibrant life for the game of Clash.

Mark_Everson
Clash of Civilizations
Project Lead

Canton, MI, USA
b.02-15-99
posted September 03, 1999 07:51   Click Here to See the Profile for Mark_EversonClick Here to Email Mark_Everson  send a private message to Mark_EversonSend a Message to UIN: 30578681 Visit Mark_Everson's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
Kull:

Good scenario generation is indeed a major selling point for a civ-like game, and we need to do it well IMO. Don't worry. I too think we need a versitile editor program that will allow a scenario designer easy access to all the variables, descriptions, and graphics that they might want to change. I think most people would agree on this. Since most scenarios are still using the main game functionality with a new map layout, civs, new military units and graphics, an editor is more appropriate.

The macro language is Only for the hardcore sorts who want to Really change things like scripting detailed civ behaviors, changing AI, or altering the basic flow of the game.

We are still hashing out exactly what we should be doing in these regards. At least what's above is my take on it, subject to further discussion.

Blade Runner
Warlord
Belgium
b.02-15-99
posted September 03, 1999 17:22   Click Here to See the Profile for Blade RunnerClick Here to Email Blade Runner  send a private message to Blade Runner
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
MCA,

LOL. I try to follow the flow of the rutins. I have a couple of years experiment with different program languages, but this was quite criptic even for me.
IMHO the macro language must be something really popular like C or Pascal. I already sent a few ideas in my post "Macro Language Description". Please read it and comment it.

Blade

mca
Chieftain
Odense, Denmark
b.02-15-99
posted September 04, 1999 09:27   Click Here to See the Profile for mcaClick Here to Email mca  send a private message to mca
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
I'm glad noone took it too seriously

Meanwhile, I've had a look at the Macro Language Description thread, and I'll probably comment there later.

Martin

Apolyton Civilization Site Forums
> > > Clash of Civilizations Forum

next newest topic | next oldest topictop of page

All times are EDT

Administrative Options: Close Topic | Archive/Move | Delete Topic | Top
Post New Topic  Post A ReplyPost A Reply In A New Window
Hop to:

Contact Us
Apolyton Civilization Site

Powered by: Ultimate Bulletin Board, Version 5.44a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.

Front Page | Civilization III | Dinosaurs | Civilization II | Call to Power | Call to Power II | Alpha Centauri | Alternative Civs | Misc | Links | About ACS | GameStats
GameLeague | Scenario League | HAC | Civilization Scenario Collection | Spanish CivII Site | Clash of Civs | CtP Maps | Art of War | WesW's Ctp1/2 Site