Missions and Campaigns : Working prototype

Missions and Campaigns : Working prototype

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Missions and Campaigns : Working prototype

Post by Satirik »

Edit 2: This is outdated. The final campaign and mission system is almost ready and working with TASClient. If you want more information, go on #sp in the lobby. Quantum is working on a mission editor, if you want to help him or anything ... ask him.

A mission file is a 7zip file (sd7 for spring), it must contains a 'descriptor.tdf' like this one :

[MISSION]
{
Name=Mission3;
Description=Just a test description;
Briefing=You have to to stuff to win other stuff and then stuff appeared.<br>Don't forget to make stuff and protect stuff.;
HtmlBriefing=briefing.html;
IncludeHtml=1;
MapFile=Cooper_Hill_TNM02-V1.smf;
MapHash=E29A584A;
ModFile=BA621.sd7;
ModHash=2056951972;
}

The description will be displayed in the mission list (and can also be displayed in the briefing).You have two different way to display the mission briefing, the default integrated briefing theme, in this case remove the 'HtmlBriefing' and 'IncludeHtml' keys from the descriptor. The second way is the Htmlbriefing, you can add an html page to your mission that will be displayed as the briefing. And the third way is between the two others, you add an html page that will be included in the default theme using a special html file in the skin (IncludeHtml=1;). To start the mission, the lobby will check if you have the exact same mod and map than the ones required by the mission. So you have to provide the map and mod file and hash.

Then if everything is good, it will launch the mission using the script.txt provided in the mission file (so your can control everythings). What is a mission, a mission is not a startscript, but as suggested trepan it's a mutator and everything is done using LuaRules and LuaUI.


There is also a campaign part. A campaign file is a 7zip file (sd7 for spring), and it must contains a 'descriptor.tdf' like this one :

[CAMPAIGN]
{
Name=Campaign1;
Description=OMG THE FIRST CAMPAIGN;
IncludeHtml=1;
Step1=step1.html;
}

How does it work ? When you select a campaign, it shows the 'step1' html file (Here you don't have choice, it must be html, but you can choose the includehtml option). In the step1.html file, you can let the user pick the mission he wants, like mission1 will attack by north, mission 2 by east and mission 3 by west. To let the user pick a mission simply add a link like this one :
<a href="lobby:pickmission:Mission.sd7:step2.html:step4.html">mission 1</a><br/>

The first parameter, is the mission file, which will be handled like a normal mission, except when the mission will end, if the user wins it will open the second parameter, here step2.html, and if he looses it will open the thirst parameter (here step4.html). The lost step is optional (if there is no lost step it will simply go back to the mission briefing to try again).

For now the progress done in a campaign is not saved. But im gonna add 2 other parameters like a savesettings, to save something and get it back even if the lobby is closed, and a addtoscript, to let you add anything you want in the script file for missions. So you can add optional stuff in your briefing.

So this is a WIP, and everything can change, so if you have any suggestions ... go ahead (especialy the modders).

If you have any question on the lobby part you can ask me, if you have any question on the mission part ask quantum, or trepan or any good Lua/Mod coder.

http://tasclient.it-l.eu/TASClient.7z (it includes the mission test and the campaign)
http://tasclient.it-l.eu/Mission3.sd7
http://tasclient.it-l.eu/Campaign1.sd7

Quantum did the test mission.

Edit: Don't use that system to make your campaigns nor missions yet, it is not definitive at all and will change in the next weeks/monthes. You can however start to make simple missions mutators. The missions should not evolve a lot, only the campaign system will.
Last edited by Satirik on 14 Nov 2008, 18:33, edited 3 times in total.
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: Missions and Campaigns : Working prototype

Post by koshi »

I've talked with satirik a little and we both agreed that it was a mistake in mixing the release of his prototype implementation and the still work in progress on defining the mission/campaigns. It also wasn't really clear (at least to me) that nothing is written in stone and this should in fact be a continuation of the work started in the other thread.
This created some unnecessary misunderstandings.

I also see nothing wrong with lobbies doing different implementations once a standard has been agreed upon.
I'll look into this proposal in depth tomorrow.

AF: are your plans anywhere to be seen?
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Missions and Campaigns : Working prototype

Post by Satirik »

maybe we could add an html free version of the campaigns, would just be a list of missions and you play them one after one, so you can make a simple campaign
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Missions and Campaigns : Working prototype

Post by AF »

My plans have been disrupted by this, and I disagree, if you had waited even further the negative impact this caused could have been far greater.

Either way my requirement specification is far more extensive than a linear campaign mode and will most likely require scripting of some sort, most likely lua ran inside the lobby client itself.

I am re-evaluating what plans I had regarding GUI and structure in light of satiriks decision to use an embedded Internet explorer to power his front end.

But I agree that we should base individual missions using what satirik has done as a starting point from which to work forward, making no assumptions about where the mission lies within any campaigns itself. Namely a mission name, the starting script and other details such as a brief description and more detailed information, something a very basic GUI can be built out of which lobbies could build on using their various frontend implementations and levels of support.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Missions and Campaigns : Working prototype

Post by BrainDamage »

just popped in to say hi, i'm still alive, i did talk a bit with satirik & koshi i need to straighten and put ideas in a human readable form and mostly find a bit time so i'll add some details of the ideas that came out from the brainstorms in a day or 2

btw AF, until you'll make your ideas public how can they be dicussed? i mean your statements could be applied to your work as well
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Missions and Campaigns : Working prototype

Post by AF »

Because at the moment I haven't attempted to implement my ideas whereas satirik already has. But lets not discuss this here any further
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Missions and Campaigns : Working prototype

Post by FLOZi »

'descriptor.tdf' is a terrible name. Change it.
User avatar
Crayfish
Posts: 481
Joined: 12 Feb 2008, 12:39

Re: Missions and Campaigns : Working prototype

Post by Crayfish »

What's wrong with just 'description.tdf'?

P.S. despite perhaps not being done in consultation with the whole community, this is useful and represents tangible as opposed to theoretical progress. AF et al., if you're developing a similar but better tool to do a similar job, can you not simply keep developing that and release it at your own originally planned pace, letting this act as a placeholder? Competition breeds innovation...
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Missions and Campaigns : Working prototype

Post by FLOZi »

description of *what*?

The name is a nonsense.

campaign.tdf would be better
User avatar
Crayfish
Posts: 481
Joined: 12 Feb 2008, 12:39

Re: Missions and Campaigns : Working prototype

Post by Crayfish »

Well he uses a descriptor.tdf for both mission and campaign, so then you'd have two filenames for a similar job (mission.tdf and campaign.tdf). Descriptor is just a strange word, description seems equally accurate and more commonly used. It's pretty minor though, so long as it is consistent I don't suppose it matters.

Bear in mind it's all inside a 7zip file that you can call what you like.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Missions and Campaigns : Working prototype

Post by Satirik »

i guess we're gonna take .. descriptozor.tdf which is much better
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Missions and Campaigns : Working prototype

Post by FLOZi »

Crayfish wrote:Well he uses a descriptor.tdf for both mission and campaign, so then you'd have two filenames for a similar job (mission.tdf and campaign.tdf). Descriptor is just a strange word, description seems equally accurate and more commonly used. It's pretty minor though, so long as it is consistent I don't suppose it matters.

Bear in mind it's all inside a 7zip file that you can call what you like.

They are under seperate sections, so it would fit perfectly fine to have a mission.tdf and campaign.tdf, it would fit with everything else, they do have different roles, and they are sensible names.
User avatar
Crayfish
Posts: 481
Joined: 12 Feb 2008, 12:39

Re: Missions and Campaigns : Working prototype

Post by Crayfish »

Descriptozor has a ring. Could be better.

~0De@script#ozor0921/2.tdf

Catchy.

I now realise I don't actually give the slightest toss, and also how bored I must have been at work to be arguing this point.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Missions and Campaigns : Working prototype

Post by BrainDamage »

oook, it took me longer than a day or 2 but i have my exams as excuse :P

there are some things that i'd change, to improve flexibility (but will add a bit complexity), if my proposal looks a bit too complicated for "unexpert modders" then both systems could be implemented independently

first of all: the "next mission" won't be a prewritten file, but rather a return file from a previous mission; example

the player is currently playing a mission, once he finishes, a lua file in the mission script will write "missionareturn.lua"

missionareturn.lua will contain the infos that satirik mentioned previously (one or more missions)

the huge difference is that with this system the campaign progress tree is not statically branched (linear progression), but instead can be expanded dyanmically.

example:

player manages to destroy core's evil mind control center -> return file will contain missions B, C , D to chose from
player didn't succeeed -> return file will contain missions E , F ,G

along with lobby infos, the return file could contain a custom table of informations so they can be passed from a mission to the next, example:

player manages to free the sniper from core's prisony camp -> write in the return file
["CustomParams"]
sniperacquired=true

the table will be passed to next mission so in next mission eg sniper will be unlocked in the tech tree.

as i'm writing this i am preparing an example return file and finishing the last implementation details, if anybody has anything to discuss about it, feel free to add your opinions (as mentioned before, nothing is written in stone and subject to change)
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: Missions and Campaigns : Working prototype

Post by hughperkins »

Hey! What's the status of this system? Are there any demos around? (Tried the links at top of the page, but seem to be dead).
User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: Missions and Campaigns : Working prototype

Post by Hoi »

afaik quantum made a mission maker, he said he stopped working on it for some time, I've tried it out, and it's great:) although it doesnt work for 0.77 yet.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Missions and Campaigns : Working prototype

Post by Argh »

Secondly... can the requirement for the map / mod hash be removed? At least the mod one? It'd suck having to redo that part every time we change anything and want to test it out.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Missions and Campaigns : Working prototype

Post by Satirik »

the format has completely changed, the map hash is removed and there is no mod hash since a mission is a mutator
Last edited by Satirik on 03 Nov 2008, 19:12, edited 1 time in total.
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: Missions and Campaigns : Working prototype

Post by hughperkins »

Ok, so I downloaded "CampaignAndSingleMissionDemo.sd7", put it in "mods", for want of somewhere better to put it, but it didn't seem to do anything. What do I need to do to run this campaign, or at least to run any of the missions inside it?
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Missions and Campaigns : Working prototype

Post by Pxtl »

Satirik wrote:the format has completely changed, the map hash were removed and there is no mod hash since a mission is a mutator
Wait... we have mutators? Docs? Info? Lobby support? Anything?
Post Reply

Return to “Engine”