Map Database  •  FAQ  •  RSS  •  Login

Vatrix's Campaign Fixes

<<

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 19 Dec 2014, 09:30

Re: Vatrix's Campaign Fixes

-The builders and servants come out of the storehouse after the enemy forces in town are defeated.
I wonder how this works? Are they just being spawned around the storehouse, or is there actually a script these days to make them walk out of a building?
<<

sado1

User avatar

Council Member

Posts: 1430

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 19 Dec 2014, 10:21

Re: Vatrix's Campaign Fixes

-The builders and servants come out of the storehouse after the enemy forces in town are defeated.
I wonder how this works? Are they just being spawned around the storehouse, or is there actually a script these days to make them walk out of a building?
Seeing how the latter is probably impossible, I bet it was the first option.
<<

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 19 Dec 2014, 11:29

Re: Vatrix's Campaign Fixes

That would be a pity, I think it looks really bad when units or buildings just appear out of nowhere...
<<

Vatrix

User avatar

Council Member

Posts: 410

Joined: 19 Apr 2013, 20:30

KaM Skill Level: Veteran

Location: Czech Republic

Post 19 Dec 2014, 11:51

Re: Vatrix's Campaign Fixes

That would be a pity, I think it looks really bad when units or buildings just appear out of nowhere...
First option is right, they're spawned when player 4 and 5 is defeated, because if player have them from start, they're almost all killed by enemy. I know it looks a bit odd, but this is now the only option how to save them all.
I fixed The Shattered Kingdom and The Peasants Rebellion here!
<<

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 19 Dec 2014, 12:16

Re: Vatrix's Campaign Fixes

I think it was okay in the original version. Why is it any different in the Remake?
<<

Vatrix

User avatar

Council Member

Posts: 410

Joined: 19 Apr 2013, 20:30

KaM Skill Level: Veteran

Location: Czech Republic

Post 19 Dec 2014, 13:00

Re: Vatrix's Campaign Fixes

I think it was okay in the original version. Why is it any different in the Remake?
In the Remake serfs are easier to kill, so player end up with about 5 serfs instead of 10, so that's why I changed it.

Mission 3 and 4 update:

--old version--

Extract in your The Shattered Kingdom folder (C:\KaM Remake\Campaigns\The Shattered Kingdom)

Also here's the lookup on colors:

Image
Last edited by Vatrix on 27 Jan 2015, 12:29, edited 1 time in total.
I fixed The Shattered Kingdom and The Peasants Rebellion here!
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 19 Dec 2014, 21:47

Re: Vatrix's Campaign Fixes

Seeing how the latter is probably impossible
Which is sad... :(
That would be a pity, I think it looks really bad when units or buildings just appear out of nowhere...
First option is right, they're spawned when player 4 and 5 is defeated, because if player have them from start, they're almost all killed by enemy. I know it looks a bit odd, but this is now the only option how to save them all.
This makes serfs and laborers immortal until players 4 and 5 are defeated:
  Code:
var aCivQueue: array of Record aType, aOwner, aX, aY, aHunger, aDir: Integer; end; procedure OnUnitWounded(aUnitID: Integer; AttackerID: Integer); begin if ( (States.PlayerDefeated(3) = False) OR (States.PlayerDefeated(4) = False) ) AND (States.UnitOwner(aUnitID) = 0) AND ( (States.UnitType(aUnitID) = 0) OR (States.UnitType(aUnitID) = 9) ) then begin SetLength(aCivQueue, Length(aCivQueue)+1); aCivQueue[Length(aCivQueue)-1].aType := States.UnitType(aUnitID); aCivQueue[Length(aCivQueue)-1].aOwner := States.UnitOwner(aUnitID); aCivQueue[Length(aCivQueue)-1].aX := States.UnitPositionX(aUnitID); aCivQueue[Length(aCivQueue)-1].aY := States.UnitPositionY(aUnitID); aCivQueue[Length(aCivQueue)-1].aHunger := States.UnitHunger(aUnitID); aCivQueue[Length(aCivQueue)-1].aDir := States.UnitDirection(aUnitID); Actions.UnitKill(aUnitID, True); end; end; procedure OnUnitAfterDied(aType: Integer; aOwner: Integer; aX: Integer; aY: Integer); var i: Integer; var i2: Integer; var iCount: Integer; begin if Length(aCivQueue) > 0 then begin iCount := 0; for i := 0 to Length(aCivQueue)-1 do if (aType = aCivQueue[i-iCount].aType) AND (aOwner = aCivQueue[i-iCount].aOwner) AND (aX = aCivQueue[i-iCount].aX) AND (aY = aCivQueue[i-iCount].aY) then begin Actions.UnitHungerSet(Actions.GiveUnit(aCivQueue[i-iCount].aOwner, aCivQueue[i-iCount].aType, aCivQueue[i-iCount].aX, aCivQueue[i-iCount].aY, aCivQueue[i-iCount].aDir), aCivQueue[i-iCount].aHunger); for i2 := i-iCount to Length(aCivQueue)-2 do aCivQueue[i2] := aCivQueue[i2+1]; iCount := iCount+1; end; if iCount > 0 then SetLength(aCivQueue, Length(aCivQueue)-iCount); end; end;
:P
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"
<<

Vatrix

User avatar

Council Member

Posts: 410

Joined: 19 Apr 2013, 20:30

KaM Skill Level: Veteran

Location: Czech Republic

Post 19 Dec 2014, 21:56

Re: Vatrix's Campaign Fixes

Ouuuuuuu, thank you, I didn't really thought of making them immortal, nice idea!!!
I fixed The Shattered Kingdom and The Peasants Rebellion here!
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 20 Dec 2014, 17:47

Re: Vatrix's Campaign Fixes

Ouuuuuuu, thank you, I didn't really thought of making them immortal, nice idea!!!
:)

P.S. By the way, it should be possible to use a similar code to change each Barbarian's max Life Points value to a lower number, if you need to nerf the initial attack in mission 8 in a not too obvious way. :P
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"
<<

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 22 Dec 2014, 00:44

Re: Vatrix's Campaign Fixes

Ouuuuuuu, thank you, I didn't really thought of making them immortal, nice idea!!!
:)

P.S. By the way, it should be possible to use a similar code to change each Barbarian's max Life Points value to a lower number, if you need to nerf the initial attack in mission 8 in a not too obvious way. :P
I don't like the idea of these magic scripts which change the gameplay/balance in the original campaigns. IMO the original campaigns shouldn't have things like invincible units, magically spawning units, or barbarians with lower life points. Unit statistics should be consistent between missions, you shouldn't make certain units weaker or immortal in some missions just because it suits the balance better. If you want weaker barbarians, just remove some of them or something like that which doesn't change the game rules.

Heavily using scripts also makes it prone to bugs, and probably means the campaigns will need to be checked/updated for every release to make sure all the scripts are still working the way you intended.
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 22 Dec 2014, 10:23

Re: Vatrix's Campaign Fixes

IMO the original campaigns shouldn't have things like invincible units, magically spawning units
The give us Actions.GiveUnitFromHouse(). :(

Pweeeease :(
  Code:
function TKMScriptActions.GiveUnitFromHouse(aPlayer, aType, aHouseID, aDir: Word): Integer; var U: TKMUnit; H: TKMHouse; aX, aY: Word; begin try Result := UID_NONE; //Verify all input parameters if InRange(aPlayer, 0, gHands.Count - 1) and (gHands[aPlayer].Enabled) and (aType in [UnitTypeToIndex[CITIZEN_MIN] .. UnitTypeToIndex[CITIZEN_MAX]]) and (aHouseID > 0) and (TKMDirection(aDir + 1) in [dir_N .. dir_NW]) then begin H := fIDCache.GetHouse(aHouseID); if H = nil then Exit; aX := H.GetEntrance.X; aY := H.GetEntrance.Y; U := gHands[aPlayer].AddUnit(UnitIndexToType[aType], KMPoint(aX,aY)); if U = nil then Exit; Result := U.UID; U.Direction := TKMDirection(aDir + 1); //Make sure the unit is not locked so the script can use commands like UnitOrderWalk. //By default newly created units are given SetActionLockedStay U.SetActionGoIn(ua_Walk,gd_GoOutside,H); end else LogParamWarning('Actions.GiveUnitFromHouse', [aPlayer, aType, aHouseID, aDir]); except gScriptEvents.ExceptionOutsideScript := True; //Don't blame script for this exception raise; end; end;
(Warning: this code is the result of a mash-up between the unit training code for the SchoolHouse and the GiveUnit function, and has not been tested in any way (!) )
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"
<<

Swiss Nisi

Laborer

Posts: 12

Joined: 12 Dec 2014, 17:26

KaM Skill Level: Beginner

Location: Switzerland

Post 22 Dec 2014, 13:27

Re: Vatrix's Campaign Fixes

Ouuuuuuu, thank you, I didn't really thought of making them immortal, nice idea!!!
:)

P.S. By the way, it should be possible to use a similar code to change each Barbarian's max Life Points value to a lower number, if you need to nerf the initial attack in mission 8 in a not too obvious way. :P
I don't like the idea of these magic scripts which change the gameplay/balance in the original campaigns. IMO the original campaigns shouldn't have things like invincible units, magically spawning units, or barbarians with lower life points. Unit statistics should be consistent between missions, you shouldn't make certain units weaker or immortal in some missions just because it suits the balance better. If you want weaker barbarians, just remove some of them or something like that which doesn't change the game rules.

Heavily using scripts also makes it prone to bugs, and probably means the campaigns will need to be checked/updated for every release to make sure all the scripts are still working the way you intended.

Why not fill the school with gold chests from the beginning?
So it wouldn't matter if some Serfs/Builder die...
I think that's way easier than scripting a whole new thing and more realistic/ closer to the original

About Mission 8 and the Barbarians:
I'm still playing with Vatrix variant and there are currently 50 barbarians and 30 militia who attack you in the beginning. Your army consists of 1x12 axefighter/ 1x15 axefighter and 1x15 bowmen and it's pretty easy to survive the first wave.
I dunno if it's the same amount as in the Original (I hated this mission so much that i always skipped it) but it's possible to win/survive the first wave with given army and 4-6 towers.
<<

Ben

User avatar

Former Site Admin

Posts: 3814

Joined: 08 Jan 2009, 23:00

Location: California - Pacific Time (UTC -8/-7 Summer Time)

Post 22 Dec 2014, 14:02

Re: Vatrix's Campaign Fixes

Mission 8 should be challenging. (In the original) Without a clever tower setup, you will be hard pressed to win. That's how it should be in the Remake; though I haven't played TSK campaign since the Remake came out so I don't know what it is like now.

I agree that scripts shouldn't be added to the original campaigns. I think some people are trying to change things simply because they can. If serfs are dying like flies in mission 1 and it is seriously possible to be stuck without serfs, then just fill the school with gold or add a few serfs. Making invincible serfs is a terrible idea in my opinion.
I used to spam this forum so much...
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 22 Dec 2014, 14:50

Re: Vatrix's Campaign Fixes

ok

Image
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"
<<

Vatrix

User avatar

Council Member

Posts: 410

Joined: 19 Apr 2013, 20:30

KaM Skill Level: Veteran

Location: Czech Republic

Post 22 Dec 2014, 15:27

Re: Vatrix's Campaign Fixes

I don't like the idea of these magic scripts which change the gameplay/balance in the original campaigns. IMO the original campaigns shouldn't have things like invincible units, magically spawning units, or barbarians with lower life points. Unit statistics should be consistent between missions, you shouldn't make certain units weaker or immortal in some missions just because it suits the balance better. If you want weaker barbarians, just remove some of them or something like that which doesn't change the game rules.

Heavily using scripts also makes it prone to bugs, and probably means the campaigns will need to be checked/updated for every release to make sure all the scripts are still working the way you intended.
I agree that scripts shouldn't be added to the original campaigns. I think some people are trying to change things simply because they can. If serfs are dying like flies in mission 1 and it is seriously possible to be stuck without serfs, then just fill the school with gold or add a few serfs. Making invincible serfs is a terrible idea in my opinion.
Ok, I changed it back, so player now have all units at the beginning.
IMO the original campaigns shouldn't have things like invincible units, magically spawning units
Then give us Actions.GiveUnitFromHouse(). :(

Pweeeease :(
Yea, that would be useful.
I fixed The Shattered Kingdom and The Peasants Rebellion here!

Return to “Map Design”

Who is online

Users browsing this forum: No registered users and 1 guest