You must be logged in to post messages.
Please login or register

Scenario Design and Discussion
Moderated by Sebastien, Mr Wednesday

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Upcoming Project: PHP Scenario Utility
posted 03-22-13 12:49 PM CT (US)   
As I mentioned earlier, I intend making a scenario utility. I will use PHP as the processing source code.

Right now, my utility is able to read most of the raw data of scenarios, but I will need much more time and effort to have the entire project completed. The utility is based on classes and functions that decompile a scenario into a single PHP array. Then it writes the array into a scenario... Quite simple! And the package will only include 1 file called "index.php". This file will contain everything that processes the scenarios, including the interface, ect... This will make it more convenient for the non-geeks (we all understand how annoying it is to have heaps of random files in utility packages; and you never know where to start).

Basically, you specify which scenario you want to work on. Meanwhile, it will be converted into an array, then PHP saves the array's data into a .inc file (which you specify). Then, you can do whatever you want to the array (located in the .inc file), and while you work on your scenario, then my PHP functions will do the necessary to process/filter the modified data and write it back into a scenario (obviously, you specify the scenario to be written once ready). (NOTE: most values of the array are filtered to avoid the scenario from crashing). The geeks will most likely be the ones to use the array.

As for the non-geeks, I am currently developing a user-friendly interface. And, you will be able to use cheaky little tools such as:
"Duplicate for Each Player" (you can actually choose exactly which players and you can choose which conditions' source/target players are to be changed.).
Or "Duplicate Unit" or "Duplicate Unit with Axis" (you can specify the location a unit, which will be placed identically for each player across the map)
... and of course, heaps more cheaky little tools and options.

Another of these so-called cheaky tools is to save the scenario data into this utility's own .inc format (as stated above). This will guarantee the data will be stored safely. You can also include variables/settings in the .inc formats for your own use. Of course, once you write the scenario, all your settings and variables will not be included in the .scn/.scx file since there is no where to store extra/unrelevant data within that format.

If you are not familiar with PHP, you can simply use any language (Javascript, Python, ect...) to re-create the PHP functions into strings and activate them using the "evaluation" method.

Using PHP as a data-processor for scenarios is quite exciting especially for those who are familiar with programming. PHP is a relatively easy language to work with, and it can be used on most servers which have PHP enabled. Or, you can download and install PHP on your computer; and simply execute the file that contains the classes/functions for processing the scenario data.

As for corrupted scenarios, I am working on some smart functions which recovers as much readable data such as units, terrain, triggers, ect...

I have contacted DiGiT (creator of AoK Trigger Studio), and he has stated that he no longer is interested in these projects anymore since he has moved on in his life. He (with the help of a few people) discovered the scenario format a few years ago. I have used his format as reference to processing and interpreting raw scenario data.

Scenario data is actually quite easy to retrieve (especially with the source codes from GitHub provided by Trigger Studio, LuaTrig and GenieUtils). Within the scenario, there is a deflated section which you simply unflate to reveal all the glory!

And note that the XML export worked in AoK:TS. However, the XML import was never completed. The XML tags from this utility will be identical to those of AoK:TS. This will give the convenience for directly importing triggers from AoK:TS to this new utility.

I'll keep you guys up-to-date on my progress. I believe I will be finished in about 1 month from now. And then, PHP-Scenario-Utility will be available for everyone to use!!! Exciting; especially since AoE2 HD will soon be released!
Replies:
posted 03-24-13 10:17 AM CT (US)     1 / 4  
so in short you're remaking Trigger Studio but to be hopefully less buggy and more finished and polished off?

Proud Member of Black Forest Studios
Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010
posted 03-24-13 11:13 AM CT (US)     2 / 4  
Yes, it will be similar to Trigger Studio, and even better. I also assure it to be bug-free.

Trigger Studio writes the scenario as you modify it. This is what causes it to have bugs. Instead, this utility uses its own data storage so that once all the storage is gathered, it then writes the scenario... rather than writing the scenario as it reads it (or as you modify it).

That's why TS crashes suddenly, or it can't save smaller maps, or it has extra rubish characters at the end of the trigger names after copying the triggers.

And the SCX format which DiGiT specified is very good, but he forgot a few important parts such as unknown constants which he ignored or forgot in his scripts. Yet they must be included anyway in the scenario for it to not crash.
posted 03-24-13 11:37 AM CT (US)     3 / 4  
So all of the scx reading and writing will be done with PHP? Quite an interesting choice. Well good luck.
posted 03-25-13 08:08 PM CT (US)     4 / 4  
will this be the first utility that interfaces with everything?

there was one that did triggers only (was it ever finished?)
Age of Kings Heaven » Forums » Scenario Design and Discussion » Upcoming Project: PHP Scenario Utility
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Kings Heaven | HeavenGames