|
Author
|
|
Topic: XML macro language? |  |
|
mca Chieftain Odense, Denmark b.02-15-99
|
 |
posted September 02, 1999 13:31
 |
 |
 |  |
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
  |
 |
 |  |
ROTFLMAOBoy, 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
 |
 |
 |  |
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
  |
 |
 |  |
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
 |
 |
 |  |
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
 |
 |
 |  |
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 | |