Map Database  •  FAQ  •  RSS  •  Login

Spawning troops (Campaings)

<<

Papundekl

Woodcutter

Posts: 19

Joined: 17 Jul 2012, 13:14

KaM Skill Level: Skilled

Post 02 Jan 2015, 23:45

Spawning troops (Campaings)

Hi,
I would like to start discusion about spawning troops (in campaigns). Especially after campaign misson - An Empire Destroyed [9].
This message is not just for Campaing designers ;]

I understand, spawning troops is easy way for creating scenarios etc. and its harder for players. But there should be some "standard" or some realistic rule for spawning troops in campaings.
Its really stupid when the enemies troops are generated near to your city. Its acceptable in special missions or when you have chance to see they are coming, but this...

I dont like it. Why?
There were balistas and catapults in KaM TPR and they were removed in Remake because:
Cite FAQ: “magically” drives with nobody pushing or pulling. it In KaM every tiny detail is visible .... "
So why is acceptable to spawn troops with no obvious reason few tiles from my city? Just build some small enemy base or "bridge from map edge" and spawn troops on this location, not randomly near to my location.

I like harder missons, but be more "realistic" in this way...
Sh*t happens
<<

dicsoupcan

Moorbach's Guard

Posts: 1314

Joined: 12 Feb 2012, 21:36

KaM Skill Level: Fair

Post 03 Jan 2015, 06:57

Re: Spawning troops (Campaings)

i never bought the realistic argument for anything in videogames. the mission is set up to have economical goals and to challenge you a bit more small raid armies come. you can easily spot them and prepare a defense against them. at best they should just be a minor hinderance.

if you do not like the mission you are entitled to voice it, but i'm not falling for the not realistic argument. the only thing that will change is the bugfix of the win condition, and that's ti.
You have enemies? Good. That means you've stood up for something, sometime in your life. ~ Winston Churchill
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 03 Jan 2015, 07:20

Re: Spawning troops (Campaings)

I think it's a lot better if enemies spawn at the edge of the map like Papundekl suggested. Ideally they should spawn out of the sight of the player (somewhere the player is unlikely to have explored). Even if you don't think realism matters, enemies spawning away from the edges of the map is unexpected and unpredictable. It's hard for the player to set up defenses when they are know that enemy soldiers can spawn anywhere. In most other RTS games reinforcements come from the edges of the map, so players will probably already be expecting to see that.

Also, realism does matter, at least to a certain extent. The game is based off a real world situation which makes it more interesting for the player (they can relate to it), and they can predict how the game will work based on their knowledge of the real world and medieval times (e.g. flour is made into bread at the bakery). If we completely throw away realism we might as well have pink elephants firing missiles appear in the campaign, and have the baker catch fish that grow in trees while the fisherman cooks stone into loaves of bread.

But obsessing over realism is also unproductive (e.g. soldiers should be drunk after drinking wine). It's fine to bend realism in a game while still having it heavily based off the real world.
<<

sado1

User avatar

Council Member

Posts: 1430

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 03 Jan 2015, 08:06

Re: Spawning troops (Campaings)

(...)we might as well have pink elephants firing missiles appear in the campaign, and have the baker catch fish that grow in trees while the fisherman cooks stone into loaves of bread.

But obsessing over realism is also unproductive (e.g. soldiers should be drunk after drinking wine). It's fine to bend realism in a game while still having it heavily based off the real world.
Congratulations, you did the impossible and convinced me, a single player mode hater, to make a campaign. Do you want to know what kind of elephants will be included in it? :P
<<

zombie01

User avatar

Pikeman

Posts: 152

Joined: 21 Jul 2014, 13:04

KaM Skill Level: Fair

Post 03 Jan 2015, 10:40

Re: Spawning troops (Campaings)

Would it be possible to add 2 functions?
1. makes troops/minions walk in from outside the map
2. makes troops/minions walk out of a building

That way it solves the spawning troops problem
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 03 Jan 2015, 11:34

Re: Spawning troops (Campaings)

How about enclosed area on the map, where player can not enter and which is covered with fog of war, from where AI troops can spawn?
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

T*AnTi-V!RuZz

User avatar

Former Site Admin

Posts: 1826

Joined: 03 Jan 2007, 23:00

KaM Skill Level: Fair

Website: http://www.knightsandmerchants.net

Location: The Netherlands

Post 03 Jan 2015, 11:40

Re: Spawning troops (Campaings)

How about enclosed area on the map, where player can not enter and which is covered with fog of war, from where AI troops can spawn?
I like zombie's idea better. It adds to the feeling of the game, that (for example) allies arrive from another part to help you out. I always liked that in other games, instead of just 'popping' them into view. Using FoW may be a solution to that, but I still think that's a workaround for a neat solution.
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 03 Jan 2015, 11:56

Re: Spawning troops (Campaings)

1. makes troops/minions walk in from outside the map
Not really "walk in", but this code does something pretty close to that (it spawns groups one row at a time from an edge... not necessarily the map's edge):
  Code:
const aEdgeSpawnRate = 20; //How many ticks need to pass before the next row spawns. var aEdgeSpawnQueue: array of Record aGroupID, aPlayer, aType, aX, aY, aDir, aColumns, aStage: Integer; end; type tEdge = (South, SouthEast, East, NorthEast, North, NorthWest, West, SouthWest); //From where is the troop arriving //To be placed OnTick procedure aManageSpawnFromEdge; var i: Integer; var i2: Integer; var iCount: Integer; var aNewGroup: Integer; begin if Length(aEdgeSpawnQueue) > 0 then begin iCount := 0; for i := 0 to Length(aEdgeSpawnQueue)-1 do begin aEdgeSpawnQueue[i-iCount].aStage := aEdgeSpawnQueue[i-iCount].aStage-1; if aEdgeSpawnQueue[i-iCount].aStage <= 0 then if States.UnitAt(aEdgeSpawnQueue[i-iCount].aX, aEdgeSpawnQueue[i-iCount].aY) > 0 then aEdgeSpawnQueue[i-iCount].aStage := 1; if aEdgeSpawnQueue[i-iCount].aStage <= 0 then begin aNewGroup := Actions.GiveGroup(aEdgeSpawnQueue[i-iCount].aPlayer, aEdgeSpawnQueue[i-iCount].aType, aEdgeSpawnQueue[i-iCount].aX, aEdgeSpawnQueue[i-iCount].aY, aEdgeSpawnQueue[i-iCount].aDir, 1, 1); if States.GroupDead(aEdgeSpawnQueue[i-iCount].aGroupID) = False then Actions.GroupOrderLink(aNewGroup, aEdgeSpawnQueue[i-iCount].aGroupID); if States.GroupDead(aEdgeSpawnQueue[i-iCount].aGroupID) = True then for i2 := i-iCount+1 to Length(aEdgeSpawnQueue)-1 do if aEdgeSpawnQueue[i2].aGroupID = aEdgeSpawnQueue[i-iCount].aGroupID then aEdgeSpawnQueue[i2].aGroupID := aNewGroup; for i2 := i-iCount to Length(aEdgeSpawnQueue)-2 do aEdgeSpawnQueue[i2] := aEdgeSpawnQueue[i2+1]; iCount := iCount+1; end; end; if iCount > 0 then SetLength(aEdgeSpawnQueue, Length(aEdgeSpawnQueue)-iCount); end; end; //To be used instead of Actions.GiveGroup function aSpawnFromEdge(aPlayer, aType, aX, aY, aCount, aColumns: Integer; aEdge: tEdge): Integer; var i: Integer; var iX: Integer; var iY: Integer; var iDir: Integer; var iVar: Integer; var iStage: Integer; var iCount: Integer; begin case aEdge of South: iDir := 0; //SouthEast: iDir := 7; East: iDir := 6; //NorthEast: iDir := 5; North: iDir := 4; //NorthWest: iDir := 3; West: iDir := 2; //SouthWest: iDir := 1; else Exit; //Other directions not supported yet end; i := 1; if iDir mod 2 = 0 then i := aColumns; result := Actions.GiveGroup(aPlayer, aType, aX, aY, iDir, i, aColumns); iCount := aCount-i; if iCount > 0 then begin SetLength(aEdgeSpawnQueue, Length(aEdgeSpawnQueue)+iCount); for i := 0 to iCount-1 do begin iVar := (i mod aColumns)-((aColumns-(aColumns mod 2))/2); case aEdge of South: begin iX := aX+iVar; iY := aY; end; //SouthEast: begin //end; East: begin iX := aX; iY := aY+iVar+((aColumns+1) mod 2); end; //NorthEast: begin //end; North: begin iX := aX+iVar+((aColumns+1) mod 2); iY := aY; end; //NorthWest: begin //end; West: begin iX := aX; iY := aY+iVar; end; //SouthWest: begin //end; end; iStage := (((i-(i mod aColumns))/aColumns)+1)*aEdgeSpawnRate; if iX <= 0 then iX := 1; if iY <= 0 then iY := 1; if iX >= States.MapWidth then iX := States.MapWidth-1; if iY >= States.MapHeight then iY := States.MapHeight-1; aEdgeSpawnQueue[Length(aEdgeSpawnQueue)-i-1].aGroupID := result; aEdgeSpawnQueue[Length(aEdgeSpawnQueue)-i-1].aPlayer := aPlayer; aEdgeSpawnQueue[Length(aEdgeSpawnQueue)-i-1].aType := aType; aEdgeSpawnQueue[Length(aEdgeSpawnQueue)-i-1].aX := iX; aEdgeSpawnQueue[Length(aEdgeSpawnQueue)-i-1].aY := iY; aEdgeSpawnQueue[Length(aEdgeSpawnQueue)-i-1].aDir := iDir; aEdgeSpawnQueue[Length(aEdgeSpawnQueue)-i-1].aColumns := aColumns; aEdgeSpawnQueue[Length(aEdgeSpawnQueue)-i-1].aStage := iStage; end; end; end;
Here's AED09's script with a bugfix and with this code being used:
Script
2. makes troops/minions walk out of a building
Already asked Lewin to add this... I've even already written, tested and PMed him the code needed, it only needs him to come back from vacation and check it up :P
You do not have the required permissions to view the files attached to this post.
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"
<<

dicsoupcan

Moorbach's Guard

Posts: 1314

Joined: 12 Feb 2012, 21:36

KaM Skill Level: Fair

Post 03 Jan 2015, 13:35

Re: Spawning troops (Campaings)

I think it's a lot better if enemies spawn at the edge of the map like Papundekl suggested. Ideally they should spawn out of the sight of the player (somewhere the player is unlikely to have explored). Even if you don't think realism matters, enemies spawning away from the edges of the map is unexpected and unpredictable. It's hard for the player to set up defenses when they are know that enemy soldiers can spawn anywhere. In most other RTS games reinforcements come from the edges of the map, so players will probably already be expecting to see that.

Also, realism does matter, at least to a certain extent. The game is based off a real world situation which makes it more interesting for the player (they can relate to it), and they can predict how the game will work based on their knowledge of the real world and medieval times (e.g. flour is made into bread at the bakery). If we completely throw away realism we might as well have pink elephants firing missiles appear in the campaign, and have the baker catch fish that grow in trees while the fisherman cooks stone into loaves of bread.

But obsessing over realism is also unproductive (e.g. soldiers should be drunk after drinking wine). It's fine to bend realism in a game while still having it heavily based off the real world.
i can imagine that some people do not like it, but it is not really unreal to do it this way. otherwise we could delete furious warriors where warriors randomly spawn and buildings magically build themselves, or the conquest where weapons magically spawn, or AED08 where you teleport stone and your ally teleports random goods into your market.

Well i'll see what Esthlos modified in the script, it needed a bugfix anyway ^^, but i just wanted to make a point about the realism here.

but if you dislike this mechanic rejoice, chapter 2 has no mission that contains this and there is no plan to include such a mission in there :)
You have enemies? Good. That means you've stood up for something, sometime in your life. ~ Winston Churchill
<<

Tiank as guest

Post 05 Jan 2015, 11:07

Re: Spawning troops (Campaings)

i can imagine that some people do not like it, but it is not really unreal to do it this way. otherwise we could delete furious warriors where warriors randomly spawn and buildings magically build themselves, or the conquest where weapons magically spawn
It's different when it comes to unique game modes, where such a script magic is allowed to generate more fun and it's different in campaigns, where there's a story and you get deeper into it and then realistic factor is important :).

Return to “Ideas / Suggestions”

Who is online

Users browsing this forum: No registered users and 9 guests