As i play around with the aom files i just noticed that VC files are .xs files. So that means u can make custom VC files, but i'm just wondering. Has anyone made any, if so can u tell me were to dl? If no one has i'll just have to try making 1 of my own. Plus in aomh which section would u submit them in?
A green great dragon.
[This message has been edited by Two_ace_u (edited 02-25-2007 @ 02:55 AM).]
Author
Replies:
Godyssey Mortal
(id: Two_ace_u)
posted 10 March 2007 06:26 AM
EDT (US)
1 / 12
no reply... Is no one interested in Rms/AI scripting anymore?
A green great dragon.
nottud Demigod
posted 10 March 2007 06:28 PM
EDT (US)
2 / 12
I will have a look into it.
The boy with the mad imagination Prepare for the ultimate duel! Learn to use all my triggers and what you can do with them. Visit here. Find out and download the transform trigger here. Play some minigames I have created outside AOM including some 3D games here.
angryzor Mortal
posted 10 March 2007 07:59 PM
EDT (US)
3 / 12
hmmmm...
they don't look very interesting for victory conditions to me... It could be interesting to make for example an escape VC, but i guess the map won't be playable on line then... (still wonders why ES didn't add the possibility of linking files to your scenario for download)
however, I just thought of a potential exploit of these files: maybe it's possible to easily add a lot of custom trigger code to your map when testing it, so you can debug the code easier (don't need to restart the game, the file is loaded at map start) and make a trigger from it when it's completely done? gonna try that tomorrow.
[This message has been edited by angryzor (edited 03-10-2007 @ 08:01 PM).]
// this rule checks if a player's Citadel is gone // run this every ~4 seconds. rule lostCitadel minInterval 4 maxInterval 5 active { int prevPlayer = xsGetContextPlayer();
//Iterate over the players. for (i=1; < cNumberPlayers) { xsSetContextPlayer(i); //Don't check players who have already lost if (kbHasPlayerLost(i) == false) { int count = 0; count = count + kbUnitCount(i, cUnitTypeCitadelCenter, cUnitStateAlive);
//If we don't have any, this player is done. if (count <= 0) { //trEcho("You have lost, Player #"+i+".");
trSetPlayerDefeated(i); // note that this func must be called synchronously on all machines } } }
xsSetContextPlayer(prevPlayer); }
i guess you can put all that into xs user code or a trigger....
A green great dragon.
nottud Demigod
posted 11 March 2007 03:37 AM
EDT (US)
5 / 12
Yes - I will add it.
Dammit, it caused a syntax error!
The boy with the mad imagination Prepare for the ultimate duel! Learn to use all my triggers and what you can do with them. Visit here. Find out and download the transform trigger here. Play some minigames I have created outside AOM including some 3D games here.
[This message has been edited by nottud (edited 03-11-2007 @ 03:54 AM).]
angryzor Mortal
posted 11 March 2007 06:02 AM
EDT (US)
6 / 12
Quote:
however, I just thought of a potential exploit of these files: maybe it's possible to easily add a lot of custom trigger code to your map when testing it, so you can debug the code easier (don't need to restart the game, the file is loaded at map start) and make a trigger from it when it's completely done? gonna try that tomorrow.
Yes, it worked!
Hey, and using that "include" also works in XS User Code! Didn't know that! This has just the same advantages...
[This message has been edited by angryzor (edited 03-11-2007 @ 06:30 AM).]
Godyssey Mortal
(id: Two_ace_u)
posted 11 March 2007 07:51 AM
EDT (US)
7 / 12
include "basicvcnomain.xs"; This?!?!?! that might actually include the file you want to your scenario. But Do they have to have it first?
A green great dragon.
angryzor Mortal
posted 11 March 2007 09:18 AM
EDT (US)
8 / 12
i think so yes, the trigger code is only read when the map starts, so the game doesn't know about that file before...
nottud Demigod
posted 11 March 2007 12:24 PM
EDT (US)
9 / 12
You could put the entire code as a trigger so it will get transfered with the map.
My failed attampt:
<Effect name="Standard victory condition"> <Command> if (trTimeMS() < 10000)</Command> <Command> return;</Command> <Command></Command> <Command> int prevPlayer = xsGetContextPlayer();</Command> <Command></Command> <Command> //Iterate over the players.</Command> <Command> for (i=1; < cNumberPlayers)</Command> <Command> {</Command> <Command> xsSetContextPlayer(i);</Command> <Command> //Don't check players who have already lost</Command> <Command> if (kbHasPlayerLost(i) == false)</Command> <Command> {</Command> <Command> int count = 0;</Command> <Command> count = count + kbUnitCount(i, cUnitTypeLogicalTypeNeededForVictory, cUnitStateAlive);</Command> <Command></Command> <Command> //If we don't have any, this player is done.</Command> <Command> if (count <= 0)</Command> <Command> {</Command> <Command> //trEcho("You have lost, Player #"+i+". You suxor.");</Command> <Command> </Command> <Command> trSetPlayerDefeated(i); // note that this func must be called synchronously on all machines</Command> <Command> }</Command> <Command> }</Command> <Command> }</Command> <Command></Command> <Command> xsSetContextPlayer(prevPlayer);</Command> <Command></Command> <Command></Command> <Command></Command> <Command></Command> <Command></Command> <Command></Command> <Command></Command> <Command></Command> <Command></Command> <Command></Command> <Command> // never fire VCs instantly</Command> <Command> if (trTimeMS() < 10000)</Command> <Command> return;</Command> <Command></Command> <Command> if (kbIsGameOver() == false)</Command> <Command> {</Command> <Command> vcCheckConquestVictory();</Command> <Command> } </Command> <Command></Command> <Command></Command> <Command>void checkSettlementVictory()</Command> <Command></Command> <Command> // never fire VCs instantly</Command> <Command> if (trTimeMS() < 10000)</Command> <Command> return;</Command> <Command></Command> <Command> vcCheckSettlementVictory(120); </Command> <Command></Command> <Command></Command> <Command></Command> <Command>void checkWonderVictory()</Command> <Command></Command> <Command> // never fire VCs instantly</Command> <Command> if (trTimeMS() < 10000)</Command>