TA: Kingdoms Community Forum
 
HomePortalCalendarGalleryFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 HOW TO CREATE REAL SINGLE PLAYER CAMPAIGNS & MISSIONS

View previous topic View next topic Go down 
AuthorMessage
$_ARTHAN

avatar

Posts : 765
Reputation : 2
Join date : 2011-03-01
Age : 27
Location : Greece

PostSubject: HOW TO CREATE REAL SINGLE PLAYER CAMPAIGNS & MISSIONS   Fri Sep 06, 2013 8:12 pm

HOW TO CREATE REAL SINGLE PLAYER CAMPAIGNS & MISSIONS


Since the last guide was from 2001 (made by WhiteHammer and thank him for that) and has either been lost or was left incomplete, I decided it is about time to have a new guide about creating TAK single player campaigns.

Things we need to create our own campaigns:

1) Cartographer (sometimes optional) to create the map along with its basic features.
2) HPI view to extract the map we have created with the cartographer.
3) Notepad to open the OTA, TDF and text document files.
4) HPI Pack to package our stuff as an HPI file.
5) TAKSwitcer to run our campaign.


TUTORIAL OF CREATING A SINGLE CAMPAIGN MISSION:

* Select an existing map you like (eg. in our case, I select Valysia City, it is a map you surely have) from your maps folder.

* Open the map via the Cartographer, go to "Scenario", then to "Use only...".



* Remove the "Use all units" option and remove any units you you don't want or need in your mission (in our case we will remove Trebuchets).



* Place any units you want pre-placed to your campaign. In our case, go to "Aramon" folder, then to "Units" folder and select Elsin.



* Place Elsin by clicking somewhere near player 1 starting position.



* Right click Elsin and select "Unit Properties...".



* Write down on a paper the X Pos, Y Pos and Z Pos of Elsin (you are going to need them later).



* On the topleft of the Cartographer select "Player 2" instead of "Player 1", go to "Taros" folder, then to "Units" folder, select Lokken (either one) and place him by clicking somewhere near player 2 starting position.

* Right click Lokken, select "Unit Properties..." and write down on a paper the X Pos, Y Pos and Z Pos of Lokken (you are going to need them later).

* Save the map as "Mission1" (or whatever) and close the Cartographer.

* Open the HPI View.

* In the HPI View, go to "File" and select "Open HPI File". Select the "Mission1" map and press ok.



* After opening the map file, go to "File" and select "Extract All". Select the directory you wish to extract the kmap folder.



* Close HPI View and open the extracted kmap folder. It includes a security certificate, an OTA, TNT, TDF and a text file.

* Delete the Security Certificate (it is just not needed anymore) and open the OTA file via Notepad. It will look something like this:

Spoiler:
 


* Change the OTA file like the spoiler below and save any changes (stuff after the // symbols are just comments to help you out).

Spoiler:
 

* Open the text file, erase anything it has written and write your mission objectives (in our case, just write "* Destroy Taros.")

* Rename the "kmap" folder to "missions" and create a new empty folder. Name that folder "camps".

* Copy/paste the TDF file to "camps" folder and rename its copy to "Campaign1" (be sure to keep the original TDF file as it is!).

* Open "Campaign1" TDF, it will look like this:

Spoiler:
 


* Delete ANY text "Campaign1" TDF has within and edit it as it follows:

Spoiler:
 


* Create a "Campaign1" folder and move the "missions" and "camps" folder in it

* Open the HPI Pack.



* Choose "TAK" as the Program and "none" as the Compression Method.

* Browse the "Campaign1" folder as the Directory to pack and "Campaign1.hpi" as the Destination file.

* Press "Pack"!

* Copy/Paste the Campaign1.hpi to "Addons" folder of your TA:Kingdoms directory.

* Open TA:K Switcher, go to addons, double-click Campaign1 addon and press the "---> Launch TA:Kingdoms <---" description at the topright corner of Switcher.

* Here is an example pic of TA:K Switcher

Spoiler:
 

* Select "Play The Adventure" and select to play Campaign1.tdf and press OK. Razz



* Press Start Game... Have Fun! Very Happy



QUESTIONS:

Q:
Why did we had to write down the X Pos, Y Pos and Z Pos of Elsin & Lokken in the Cartographer?
A:
Because we needed those variables for the OTA file. Otherwise, we would be unable to give the coordinates of unit0 (ARAKING, a.k.a.Elsin) and unit1 (TARNECRO, a.k.a.Lokken). While the tilesets and features of the map are used in the TNT file, any player units & buildings like Elsin and Lokken will NOT appear in-game even if placed upon the map. The only way to make them appear is by including them as units (in our case as unit0 and unit1) within the OTA file and giving their coordinates (X,Y,Z) and the rest of their variables as shown above. On the other hand, if a unit is not pre-placed on the Cartographer's map but it is included as a unit in the OTA file, it will appear in-game.

Q:
How do I place, let's say, 2 Swordsmen near Elsin and 3 Executioners near Lokken?
A:
With the same way you had placed Elsin and Lokken; place them upon the Cartographer's map, write down their X Pos, Y Pos and Z Pos and add the following units under unit1 in the OTA file.
Example is in spoiler:

Spoiler:
 

Q:
I've seen in some missions that enemy units are partolling and others where you win if you defend for x minutes. How can I do these stuff?
A:
In order to learn these special functions just read the "More Info For More Complicated Missions" section below.





MORE INFO FOR MORE COMPLICATED MISSIONS:


Winning & Losing conditions

Winning and losing conditions are placed after hasscenario=0; commands and before [Map Data].
In our Tutorial, we used the DestroyAllUnits=1; command, which indicated we win by destroying every hostile unit & building, and the AllUnitsKilled=1; command, which indicated we lose by having all of our units & buildings destroyed. However, there are many more winning and losing conditions available.
The winning conditions I have found they exist are the following:

Spoiler:
 

The losing conditions I have found they exist are the following:

Spoiler:
 


Player Settings & Starting Positions

First of all, unlike skirmish & multiplayer maps, there is no need to put any starting positions for any player other than player 1. That's because AIs don't have a screen view, so they don't need a starting point for their screen view.
About players, you can (but don't have to) include the following things in their description:

* logo 0,1,2,3,4,5,6,7,8 or 9 : This is nothing more than the color each player is going to have. Unlike skirmishes and multiplayer games, the same logo (color) can be used by more than one players.

* aramon, taros, veruna, zhon, creon : This shows the side a player represents and goes after a logo (eg. logo 4 aramon). This is very important for player 1, since it determines the intro video of the mission as well as the playing interface.

* strategic ally, passive ally, strategic opponent, passive opponent, passive neutral : This shows whenever a player is an ally or opponent of Player 1 and whenever is strategic (like skirmish AI) or passive (not taking any offensive actions). Passive neutral is usually Player 10 and is used to place creatures which are peaceful with both players, like peasants, deers, cows etc. Also, Player 9 is usually a passive opponent used to represent monsters and wild aggressive animals, like ghouls, wolves etc.

* The common format is the following: strategic or passive ally or neutral or opponent logo 0,1,2,3,4,5,6,7,8 or 9 aramon or taros or veruna or zhon or creon

* If an AI player has not the above info included, that AI player is automatically considered a strategical oppnent with logo color equal to its player number (logo 5 for player 5, logo 8 for player 8 etc.)

* Mass Attack Player Command (Side Massattack Time):
Mass Attack is a quite powerful command which causes a certain AI to attack you with whatever it gots when the time runs out. It must include the AI's side (aramon, taros, veruna, zhon or creon) before the massattack word and the time in seconds (eg. 2700) after the massattack word.
Code example:

Spoiler:
 





Initial Mission Unit Command Line

This is by far the most important command line. Its existence makes things possible at campaign missions which are impossible at multiplayer scripts. They can overide the usual AI behaviour and make a unit to move, patrol, attack and many more. They can also determine whenever a unit is cloaked or not and if it is veteran or not. So here we go...

* Move (m Xposition Zposition):

Makes the unit to move towards the directed area. It overwrites any other commands, however the unit will engage in combat according to its attack type (Ranged or Melee) and its battle stance (Aggressive, Defensive, Passive). After it finishes its move, it executes the next initial mission command or returns to normal.
If a unit of yours executes this command, you will be unable to give it orders until it finishes its move.

Code example:

Spoiler:
 

* Patrol (p Xposition Zposition):

Makes the unit to patrol towards the directed area. It overwrites any other commands, however the unit will engage in combat even more succesfully than just moving according to its attack type (Ranged or Melee) and its battle stance (Aggressive, Defensive, Passive). Also, it will repair and aid whenever it can, if it can. This move never finishes because it is a loop, except if the Stop (s) initial mission command is given after it.
If a unit of yours executes this command, you will be unable to give it orders till it finishes its move, which will be never since it is a loop order. However, if the Stop (s) initial mission command is given after it, you will be able to order it after reaching its patrol's end.

Code example:

Spoiler:
 


* Unload (u Xposition Zposition):

Makes the unit to move towards and unload †any units it carries to the directed area. It overwrites any other commands it may has. After it finishes its move, it executes the next initial mission command or returns to normal. This command is just ignored for a non-transport unit or an empty transport.
If a unit of yours executes this command, you will be unable to give it orders until it finishes its move.

Code example:

Spoiler:
 


* Attack (a Unit):

Makes the unit to move towards the named unit and attack it. It overwrites any other commands it may has and it is like to ignore any damage it takes as well as enemies other than its target. After its target is killed, it executes the next initial mission command or returns to normal.
If a unit of yours executes this command, you will be unable to give it orders until its target is dead.

Code example:

Spoiler:
 


* Guard (g Unit):

Makes the unit to move towards the named unit and guard, repair, aid it etc. It overwrites any other commands it may has. This move never finishes because it is a loop, except if the stop (s) initial mission command is given after it.
If a unit of yours executes this command, you will be unable to give it orders till it finishes its move, which will be never since it is a loop order. However, if the Stop (s) initial mission command is given after it, you will be able to order it after reaching its guarded unit.

Code example:

Spoiler:
 


* Wait (w Seconds):

A powerful command, it makes the unit to practically freeze for a respective amount of time measured in seconds. It overwrites any other commands it may has. After the set time has passed, it executes the next initial mission command or returns to normal.
If a unit of yours executes this command, you will be unable to give it orders until its set time has passed.

Code example:

Spoiler:
 


* Stance (o 0 for Passive, o 1 for Defensive, o 2 for Aggressive):

This interesting command changes a unit's stance to either Passive, Defensive or Aggressive. The command "o 0" makes a unit Passive, the command "o 1" makes a unit Defensive and the command "o 2" makes a unit Aggressive.

Code example:

Spoiler:
 


* Cloak (c):

This command is used in cloakable units only (Lokken, Assassin etc.) and toggles cloaking on/off. It usually used only once to cloak the unit, but the unit must has the needed personal mana supply for this command to take real effect.

Code example:

Spoiler:
 


* Stop (s):

A powerful command, especially when combined with Patrol (p). Stop returns a unit's order to "Standby". Very useful for breaking loop commands, like Guard, which would otherwise never stop. However, Stop doesn't offer anything at all in case of being the only initial mission command for the respective unit, because there is no any commands to stop them.

Code example:

Spoiler:
 

* Build (b Unit 0 Xposition Zposition):

The most vital command in my opinion. Build orders a builder to construct a building (or unit) to the given coordinates. There is always a "0" number following the unit's name and before the coordinates, probably in order not to be mistaken with the Train command below. Keep in mind the builder must be capable for constructing the given structure, otherwise this command fails.
After the builder finishes the structure, it executes the next initial mission command or returns to normal.
If a unit of yours executes this command, you will be unable to give it orders until it finishes its structure.

Code example:

Spoiler:
 


* Train (b Unit Repeat):

This command it actually the same with the above one, with a big difference; it is used to order factories to train units. After the unit's name, a "Repeat" number is placed to determine the amount of units to be created before the command stops.

Code example:

Spoiler:
 


* Veterancy (v 1.0 or greater):

This command makes a unit fully veteran, if given v 1.0, or uber veteran for every integer higher than 1.0. If, for example, give a Goblin a Vetrancy of v 50.0, that Goblin will destroy whole bases just for fun!

Code example:

Spoiler:
 

* Inside (i Unit):

A unit using this command starts the game inside a transport (Roc, Ark, Rolling Tower etc.) and its coordinates doesn't matter in this case (they are practically the same with its transport). Very useful when combined with Unload (u) command. The name of the transport must be mentioned after the i and it must be able to transport units in order for this command to take effect.

Code example:

Spoiler:
 


* Waiting for Attack (wa Unit):

A strange command which can be quite useful in the right ocasion. The unit waits until the targeted unit is being attacked. It overwrites any other commands it may has. After the target is under attack, it executes the next initial mission command or returns to normal.
If a unit of yours executes this command, you will be unable to give it orders until its target is attacked.

Code example:

Spoiler:
 


Identity (Ident)

Identity is extremely useful if you need to pick a very certain unit when many units of this type are present in the map. For example, if you wish a Swordsman to guard a Mage Builder, you will simply include initial mission= g ARABUILD; in his code. However, what happens if there are 10 Mage Builders on the map? Which one of those is the Swordsman going to guard?
Well, we can give a identity to that Mage Builder to set him aside from the rest of his kin by including Ident=Name; in his code. Then, the Swordsman just has to replace initial mission= g ARABUILD; with initial mission= g Name; and everything is fine. Ident is also vital for the Inside (i) command, because there are often more than one Transport Ships on map.

Code example:

Spoiler:
 



(....more coming soon....)


Last edited by $_ARTHAN on Thu May 22, 2014 6:13 am; edited 10 times in total
Back to top Go down
View user profile
$ MalinOMW

avatar

Posts : 576
Reputation : 10
Join date : 2011-07-22
Age : 24
Location : Poland

PostSubject: Re: HOW TO CREATE REAL SINGLE PLAYER CAMPAIGNS & MISSIONS   Sat Sep 07, 2013 10:20 am

very nice, probably all info that is ?requireable? to make missions
GJ


also there is a lot of things to know about .cob scripts, but this is very hard stuff Very Happy , and there are probably some guides about scripts etc

btw found in Manolo all tak downloads 2 things about scripts
https://www.dropbox.com/s/y9cmajehcf6d1kj/BOS%20Functions.docx
https://www.dropbox.com/s/iyuejfd2j75lfi8/BOS%20Script%20Components%20Tutorial.docx

_________________
https://www.youtube.com/user/OfficialAkcent
Back to top Go down
View user profile
$_ARTHAN

avatar

Posts : 765
Reputation : 2
Join date : 2011-03-01
Age : 27
Location : Greece

PostSubject: Re: HOW TO CREATE REAL SINGLE PLAYER CAMPAIGNS & MISSIONS   Sat Sep 07, 2013 10:48 am

$ MalinOMW wrote:
very nice, probably all info that is ?requireable? to make missions
GJ


also there is a lot of things to know about .cob scripts, but this is very hard stuff Very Happy, and there are probably some guides about scripts etc

btw found in Manolo all tak downloads 2 things about scripts
https://www.dropbox.com/s/y9cmajehcf6d1kj/BOS%20Functions.docx
https://www.dropbox.com/s/iyuejfd2j75lfi8/BOS%20Script%20Components%20Tutorial.docx
Thanks for the feedback, though the links provided no real help at all. Anyway, I am checking mission COB files via the Scriptor.
However, we can create "clever" single-player campaigns witout using COB files at all. For example, with the patrol (p) and build/train (b) commands we can make a Barracks to train Swordsmen one after the other who automatically patrol towards an area, much like the way we play in the beginning of online games. Also, with the inside (i) and unload (u) commands, we can have some cute pre-set Shipdrops and Rocdrops. Of course, it won't be as good as an average player, but it still can offer a great & unique (in terms of AI) challenge. Besides, I couldn't stop laughing if I see an AI opponent dropping fully charged Liches and Weather Witches in my base. Razz
But I have still work and playtesting to do, cya.
Back to top Go down
View user profile
$ MalinOMW

avatar

Posts : 576
Reputation : 10
Join date : 2011-07-22
Age : 24
Location : Poland

PostSubject: Re: HOW TO CREATE REAL SINGLE PLAYER CAMPAIGNS & MISSIONS   Sat Sep 07, 2013 4:45 pm

ye campaign without any .cob can be still very very interesting

ye that things about .cob not help much, better is look on available examples in maps,units etc

Edit
I too always image campaign where enemy had do roc drops with liches,fire mages, monarchs etc that would be awesome
Back to top Go down
View user profile
rammstein

avatar

Posts : 73
Reputation : 4
Join date : 2010-04-16
Age : 24
Location : Sweden

PostSubject: Re: HOW TO CREATE REAL SINGLE PLAYER CAMPAIGNS & MISSIONS   Sun Sep 08, 2013 4:17 pm

Good work, nice and well written!
Back to top Go down
View user profile
Lord chris

avatar

Posts : 218
Reputation : 0
Join date : 2013-02-24
Age : 22

PostSubject: Re: HOW TO CREATE REAL SINGLE PLAYER CAMPAIGNS & MISSIONS   Sun Sep 08, 2013 6:39 pm

wow

_________________
The Lich King is here bow down mortals and make way for the undead sorreror
Back to top Go down
View user profile
Sokka

avatar

Posts : 375
Reputation : 0
Join date : 2012-03-13
Age : 19
Location : Latvia

PostSubject: Re: HOW TO CREATE REAL SINGLE PLAYER CAMPAIGNS & MISSIONS   Mon Sep 09, 2013 6:38 am

OMFG ARTHAN!!! Shocked† what are u doing at home..... writing a TA:K book?
anyway good work i needed this info wanted to ask u a while ago. study

_________________

The more a man knows, the more he forgives.
A loving heart is the truest wisdom.
Some men see things as they are, and say, "Why?" Still others dream of things that never were and say, "Why not?
When you lose, don't lose the lesson.
Learn the rules so you know how to break them properly.
Don't let a little dispute injure a great friendship.
When you realize you've made a mistake, take immediate steps to correct it.
Open your arms to change, but don't let go of your values.
Remember that silence is sometimes the best answer.
Share your knowledge. It's a way to achieve immortality.
Trust because you are willing to accept the risk, not because itís safe or certain.
The fool who knows he is a fool is for that very reason wise. The fool who thinks himself wise is the greatest fool of all.
We can try many ways to get rid of darkness, but none is as effective as simply increasing the light.
Life gives us time only love gives us meaning.
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: HOW TO CREATE REAL SINGLE PLAYER CAMPAIGNS & MISSIONS   

Back to top Go down
 
HOW TO CREATE REAL SINGLE PLAYER CAMPAIGNS & MISSIONS
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Single player vs. Realm?
» Halo 5 single player playthrough
» Need Cascade COTW - single player
» Attention Single Players
» RTCW Maps

Permissions in this forum:You cannot reply to topics in this forum
TA: Kingdoms Community Forum :: GENERAL :: Tutorials :: Programs-
Jump to: