Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Alternative Civs > Clash of Civilizations > XML macro language?
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
04.Sep: `FC` 2.0.5 COMPLETED AND RELEASED
27.Jul: `FC` 2.0.4 COMPLETED AND RELEASED
16.Jul: `FC` 2.0.3 COMPLETED AND RELEASED

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
mca is offline mca
Chieftain
Odense, Denmark
Jan 1970
time: 06:13
Post  Old Post 02-09-1999 22:31
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
XML macro language? Support Apolyton, buy Civilization 2

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 is offline Mark_Everson
Clash of Civilizations Project Lead
Canton, MI
Jan 1970
time: 00:13
Talking  Old Post 02-09-1999 23:48 Visit Mark_Everson's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Suffering from ads?

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 is offline Kull

King
El Paso, TX USA
Mar 1999
time: 22:13
Lightbulb  Old Post 03-09-1999 08:38 Visit Kull<br><a href=/members><img src=/forums/images/lifer-icon.gif border=0></a><BR>'s homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Inflate your Upload Space

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 is offline Mark_Everson
Clash of Civilizations Project Lead
Canton, MI
Jan 1970
time: 00:13
Post  Old Post 03-09-1999 16:51 Visit Mark_Everson's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Help yourself to an AD-FREE life

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 is offline Blade Runner
Prince
Belgium
Jan 1970
time: 06:13
Post  Old Post 04-09-1999 02:22
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Lose 30 kilos (of popups)

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 is offline mca
Chieftain
Odense, Denmark
Jan 1970
time: 06:13
Wink  Old Post 04-09-1999 18:27
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

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

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:13.
Apolyton Time is 00:13.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0341 seconds (88.54% PHP - 11.46% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net