Page 1 of 1

Scripting language questions

Posted: Sat Aug 08, 2009 4:14 pm
by MikeV
I've looked at the various event files, and consulted the online information at http://www.ageod.net/aacwwiki/Modding_events, but I'm still puzzled by a few things:
  1. What are the valid syntax/semantics of these commands:

    Code: Select all

    EvalRgnOwned = $Ft Jefferson, FL
    SelectRegion = $Ft Jefferson, FL
      EvalControl = >=;75

    SelectRegInArea  ;;;CondSkip
  2. Is there any way to refer to "current national capital", rather than using a hard-coded region ID?
  3. Are there any conditions to detect whether the player has selected Draft, Volunteers, Taxes, etc. rather than hard-coding fixed dates?

Thanks for your help.

Posted: Wed Aug 12, 2009 6:39 am
by Gray_Lensman
deleted

Posted: Wed Aug 12, 2009 10:08 am
by Pocus
ActorEnabled = GameActorUID [;SubType]
ActorDisabled = GameActorUID [;SubType]

Allow you to test if some options can be used or not by the player.

ActorUnderUse = GameActorUID [;NOT]
Indicates if an option is currently being used by the player (AACW only)

CheckOption = GameActorUID ; OptionUID ; Operator (=, >=, <=) ; Value
Indicates if an option has been requested by the player (All games but AACW)

Now my memory is fuzzy on the details, I don't think it has been ever used :)

Selecting a region with a criteria 'Is the Capital' is a cool idea. No promise though!

Posted: Wed Aug 12, 2009 11:28 am
by Gray_Lensman
deleted

Working from the source M$ Excel spreadsheets

Posted: Thu Aug 13, 2009 1:51 am
by MikeV
Gray_Lensman wrote:You need to study the layout of the various .xls files and then utilize the informational content of the wiki link to "lay" the suggested syntax into the .xls database files themselves. Studying the game's "official" database files is a damn good way to understand the game's event syntax statements in their various usages.

OK, thanks for pointing me towards that. I can work with Excel spreadsheets (brain-dead VBA scripting language, though), and even grab a Java library to manipulate them.

I downloaded the batch at http://ageoddl.telechargement.fr/latest/AACW_DB.zip.

Is the source code for the [font="Courier New"]CSVSplitter.exe[/font] available anywhere (cvs or svn server URL, perhaps)? Might want something that emits wiki table syntax, to help update the wiki.

Scripting language semantics

Posted: Thu Aug 13, 2009 1:58 am
by MikeV
Pocus wrote:Selecting a region with a criteria 'Is the Capital' is a cool idea. No promise though!

Well, generally speaking, the GUI and the CLI are just two ways of getting at the same underlying engine. So, for consistency, it would be reasonable to offer the same objects and operations through both -- anything a user can manipulate via the GUI should be accessible (and current state queryable) via the CLI.

Otherwise, we end up with hard-to-explain inconsistencies ... :bonk:

Posted: Thu Aug 13, 2009 7:29 am
by Gray_Lensman
deleted

Posted: Thu Aug 13, 2009 2:34 pm
by Pocus
This is a sound remark Gray_Lensman, but alas I don't have much time to prepare, format and then put on the AGE wiki documentations. I would be willing to produce doc in word to be put in the Wiki though, but the Wiki has its own format and a copy-paste don't work. (I'm not asking you to do that, you are already busy enough).

Posted: Thu Aug 13, 2009 2:37 pm
by Pocus
MikeV wrote:Well, generally speaking, the GUI and the CLI are just two ways of getting at the same underlying engine. So, for consistency, it would be reasonable to offer the same objects and operations through both -- anything a user can manipulate via the GUI should be accessible (and current state queryable) via the CLI.

Otherwise, we end up with hard-to-explain inconsistencies ... :bonk:


Civilization IV does a good job on that, with a lot of code doable with Python. Still, their team size and budget is light years from us, and this was simply not possible for us to goes this way and develop games in reasonable time.

Now if you are interested in scripting more low level stuff, like guiding the AI with additional commands, then I would be more than willing to ease your life here.

Posted: Sat Aug 15, 2009 1:50 pm
by MikeV
Pocus wrote:Now if you are interested in scripting more low level stuff, like guiding the AI with additional commands, then I would be more than willing to ease your life here.

Can do, depending on time available. If you can't release the source code, can you make the Javadoc/Doxygen API details available somewhere online?

Posted: Sat Aug 15, 2009 6:59 pm
by Gray_Lensman
deleted

Posted: Mon Aug 31, 2009 2:37 pm
by Pocus
I'm back!

Gray_Lensman is mostly right indeed. For now I would like first to see someone use the available scripting commands in AACW as it was done in WIA, and then, if needed, on a per request basis, create new commands that you would manipulate.

Posted: Sun Sep 13, 2009 4:53 pm
by MikeV
Pocus wrote:This is a sound remark Gray_Lensman, but alas I don't have much time to prepare, format and then put on the AGE wiki documentations. I would be willing to produce doc in word to be put in the Wiki though, but the Wiki has its own format and a copy-paste don't work. (I'm not asking you to do that, you are already busy enough).


If you make the .doc file available, anyone who groks wiki syntax can update the wiki(s) -- especially since we have a nice template for the commands.

Posted: Mon Sep 14, 2009 3:31 pm
by Generalisimo
MikeV wrote:If you make the .doc file available, anyone who groks wiki syntax can update the wiki(s) -- especially since we have a nice template for the commands.

Am I reading this the right away? are you volunteering yourself to update the Wiki if Pocus sends his docs to you? :sourcil: