For those who don't know:
*.sm2 contains the terrain of the map: the texture map, the color map, the water level,..... Like the .tnt in TA.
*.smd contains the tint, light, wind, and other one value things, as well as the starting position, of the map. Like the .ota in TA.
I'd like it if the scripts that you can choose in single player, instead of being hard coded, were defined in the .smd files. So one could easily make single player mission using only notepad to edit a .smd. This way also scripts stays tied to the map they are made for. It should also possible to create a .smd with a different name than the .sm2, but with a tag saying what .sm2 use. So people can make new missions for an already existing map. The new .smd should be able to redefine all .smd tags, so for instance you can have two missions played on the same map, one at dawn the other in the afternoon, but for tags not defined it should use the values in the .smd with the same name as the map.
Also when running spring.exe you should choose first the map, then the script. Since each script will be tied to a specific map. Only a few basic scripts should remain hard coded and available to all maps. Namely only the scripts: Random Enemies, Commanders (rename it as cmds 200K res, cmds 1000 res, Empty, load test (which must be renamed as load last game). Delete all the other hard coded scripts once the .smd are made to support spring. Just distribute a few updated .smd if you want to kepp your "small battle" and "air test" script.
All scripts should be defined inside the .smd of a map, just like in TA mission were defined inside the *.ota. The scripts should be defined by simple text readable and editable in notepad. For start, just allow script to create teams with already placed units. So the player would be [Team0] and every other team would be controlled by the AI. I suppose everything inside [MAP]{} could define what to use for the few hard coded scripts like 'spawn with whatever gamedata.tdf define as the commander', and that every other entry should be missions. Yes mission script should be able to redefine metal value, sky color, maps hardness and everything else, and use what's in [MAP] if nothing defined in the mission. You should be able to define multiple missions in the same .smd. In fact mission should be defined just like [MAP] {...} save that:
- some value can be omitted, and then what's in [MAP]{} is used
- new values, like MissionName= must appear
- value for what's normally settable in the battleroom must appear, like starting ressource, alliances, (I just love single player mission where one AI player is an ally), etc....
- inside each [TEAM0]{} where 0 can be any number from 0 to whatever the max number of people spring support, there would not only be StartPosX=4058; StartPosZ=6736; but also lots of subsection to define where the units are. For exemple, taken from an OTA .ota (just an exemple, maybe zpos won't apply to spring, maybe kills or health just is better left dropped for now, maybe new tags are needed, adapt as fit):
[unit70]
{
Unitname=CORRAID;
XPos=3401;
YPos=85;
ZPos=1311;
Angle=0;
HealthPercentage=100;
Kills=0;
InitialMission=w 300,p 3855 2878;
}
Even the units don't move and don't anything else than shooting at what comes at range, that would allow anyone to create, using only notepad, "attack the fortress" type mission that can already be plenty of fun.
Then the next stage is to support commands like in TA mission, such as InitialMission=p 311 1374; to make a unit patrol between its current position and the point mentionned, or InitialMission=w 500,b CORFAV 3,w 300,b CORGATOR 5; to make a factory wait, build 3 weasels, wait, build 5 instigators, or w 3312,m 2995 456,a ARMSOLAR,a ARMMEX, a ARMCOM; to make a unit wait, move to a certain point, then attack all solars, then attack all mexxes, then attack the commander. I don't care if the AI needs to cheat to find where the commander is, in single player mission it's ok if the AI don't play fair. You don't have to follow exactly TA syntax, as long as it's something as easy to type. You don't have to support all the command TA mission do, just implement whatever you have the time to. Also, if a move order or attack order is given to a factory, then the factory should pass it to the spawned units. But since in Spring mobile units can build mobile units, rolling wargoing factories will sure be used one day or later in some 3rd party mods, so it would be btter to invent a new word to say 'this is an order to pass to the units you'll create from now on' in the InitialMission list of the factory. Also let us give group AI commands to units in the InitialMission list. And an order like "go attack whatever you want like units of the spawn script do". And make it the default when the InitialMission list ends.
I also would like such script to be available in multiplayer. Nothing fancy, just let me have multiplayer game start with pre-placed structures and units as defined in the .fbi. Note: I don't mean you should get rid of the "start multiplayer with comm only" games. First only multiplayer games started via IP should be able to start with custom script (like now, Spring already support starting with pre-placed units, when starting via IP for the few hard coded script). Later, it would be nice if a drop down menu was added to the battlerroom to start with any script. Ideally the multiplayer lobby would read the .smd and list all missions in there. But if that's too hard I'll settle for having a set of determined names for multiplayer compatible script, like [MAP] for the normal game starting with commanders and [BASE] to start with bases.
Note that I see nothing wrong with having exactly the same script useable in both multiplayer and single player. Yes, if a script meant for single player is used in multiplayer, it'll probably be very unbalanced, since AI usually starts with a massive numeric advantage to compensate the lack of actual playing skill, but, the way they are defined should be exactly the same, so no need to create an artificial division. Leave it to mission makers to label their mission properly to indicate if they are meant for solo or multi.
And yes I even want my player-controlled units to perform the initial command list (in TA missions it was possible this way to have units belonging to the player but not controllable by the player until they ran out of commands, and units belonging to the player, controllable by the player, but having a preset list of things to do if left alone, and I liked it. Too bad taeblite.exe always crashed fifty times before I could make any mission). But IMO the engine shouldn't make any difference between multi and solo when it comes to script. Ah yes, maybe one difference: In solo all TEAM save TEAM0 should be played by the computer, in multi teams that have no human player should be left unused ingame. Until someone allows to add human-replacing AI player in multi.
So let's sum up:
- Script letting a single player and an AI start with pre-placed units already exists in Spring. Just they are hard coded.
- Since the "random spawn" script allows AI units to find the human player and attack its units, it shouldn't be so hard for the AI to be able to handle InitialMission lists for its units.
- All is needed now is to change scripts from being hard coded to being read from the .smd
- Then any random guy armed with only Notepad could create missions almost as good as TA mission.
- So Spring will have entertaining single player mode, without the hassle of programming intelligent skirmishes AI.
.smd and mission
Moderator: Moderators
-
- Posts: 704
- Joined: 30 Oct 2004, 14:14
If we do this, there should be a tag saying that it's a custom map that appears in the map selection screen. The number of players, the start locations should be fixed, and the mod used should be fixed. It would mean multiplayer and single player maps could be something like missions.
Also, you should be able to force 'c' on a unit through script, thus you could make a cool multiplayer FPS.
Also, you should be able to force 'c' on a unit through script, thus you could make a cool multiplayer FPS.
Not really. The point is that the same map can have a variety of profile, and that each profile can be used both offline and online. When online, the number of player won't be fixed. Just don't spawn the units of the team that have no players .The mod won't be fixed. Just ignore any units not found. And people won't be forced to use the mission settings. Just re-read what I wrote above.
-
- Posts: 704
- Joined: 30 Oct 2004, 14:14
But a custom map could be really unbalanced when played just as a skirmish.
How about you can have:
Standard (as now, but can have wild units and wreckages beginning in the game)
Mission (You can choose to have players etc. fixed if you want, but the thing about a mission is that you get all those script features you mentioned)
How about you can have:
Standard (as now, but can have wild units and wreckages beginning in the game)
Mission (You can choose to have players etc. fixed if you want, but the thing about a mission is that you get all those script features you mentioned)
I think its a good idea, there are so many possibilities when scripting a mission they cannot be listed. I would like to see more initial mission script options for missions as well, you could script some crazy stuff in a TA mission like sending in air transports carrying roaches and the like and setting interesting traps for the player by giving units a particular identifier and appropriate trigger but that was about it.
GroupAI/GlobalAI+Script engine for each mission + change to engine so the AI can get the MapName + filename of the map in question.
Thus you ahve a GroupAI that will do what the text file says, all thats lef tis to decide how the textfile should be formatted and what it should contain aka the mission objectives.
Thus you ahve a GroupAI that will do what the text file says, all thats lef tis to decide how the textfile should be formatted and what it should contain aka the mission objectives.
Alantai Firestar, if you had read my post you would have seen: Also let us give group AI commands to units in the InitialMission list. So, someone who make a mission could give some units a GroupAI, so they become autonomous, while the other units action stays entirely scripted, or follow other GroupAI.