Page 1 of 1
Barbarians in TSK?
PostPosted: 11 Jan 2018, 18:43
by Vatrix
As we are fixing original campaigns, we've come to a dilemma, should it be possible in mission 8 in The Shattered Kingdom for AIs to train barbarians?
Please cast your vote on strawpoll:
http://www.strawpoll.me/14813128
Thanks!
The Poll will be closed 12 January at 15:00 CET
Poll closed with following results:
Re: Barbarians in TSK?
PostPosted: 11 Jan 2018, 19:10
by Ben
Hm. It’s not very important to me, but I say “no.” If just because that’s the way the authors of the map wanted it to be, then I’ll say it’s because these are actual barbarian tribes. They wouldn’t be hiring barbarian mercs, they would be training them from the start
Re: Barbarians in TSK?
PostPosted: 11 Jan 2018, 19:24
by The Dark Lord
Vatrix, Strangelove and me have been discussing this on Discord. At first I thought we should just leave it as it is; but Strangelove came up with two good points:
1. The people who made TSK might actually have intended to have the AI train barbarians
2. The AI can actually train knights in this mission
Now I do realize that these two points, together, are quite contradictory. If they wanted the AI to train barbarians, why make them able to train knights? Maybe because they are both extremely powerful units, and knights kind of replace barbarians here.
The story indeed mentions barbarian tribes, and as such it is weird for the AI to have knights (which look very sophisticated) in this mission. In that sense, perhaps they shouldn't have any iron units at all. But this would change the mission quite a bit, and personally I would like it to stay as close as the original as possible.
All in all I'm quite unsure about this, and I could live with either option, although removing all iron production buildings seems like a too-large change to me.
Re: Barbarians in TSK?
PostPosted: 11 Jan 2018, 19:39
by sado1
I don't care about SP at all, but if I might help you by voicing my opinion... This inconsistency should be treated as a bug. I'd replace knights with barbarians and rebalance the mission, then. If the story says about barbarians that you fight against, and the initial army that attacks you is barbarians, then it seems pretty obvious to me what should be done - make the AI train barbs now that we can do it.
Re: Barbarians in TSK?
PostPosted: 11 Jan 2018, 20:05
by thunder
1. The people who made TSK might actually have intended to have the AI train barbarians
I don't know. Is here anybody from that developer team? maybe can answer it.
2. The AI can actually train knights in this mission
It's fine in my opinion. Is that problem?
I think there are enough barbs on TSK8. That map is all about the first wave of barb attack and the two bases if I remember well. One of the funniest missions.
Re: Barbarians in TSK?
PostPosted: 11 Jan 2018, 20:13
by Vatrix
I think there are enough barbs on TSK8. That map is all about the first wave of barb attack and the two bases if I remember well. One of the funniest missions.
Could be much more fun with enough barbs!
Re: Barbarians in TSK?
PostPosted: 12 Jan 2018, 08:14
by thunder
TSK8 is a mission where the players still in the phase 'learning the KaM'. It should not be harder.
Re: Barbarians in TSK?
PostPosted: 12 Jan 2018, 09:28
by The Dark Lord
If you replace knights by barbarians, it wouldn't really get harder.
However, this
I think there are enough barbs on TSK8. That map is all about the first wave of barb attack and the two bases if I remember well. One of the funniest missions.
is a valid point as well.
Besides, it looks kinda ugly to see an axe fighter 'disappear' and 'change' into a barbarian when it comes out of the barracks (since there is no 'barbarian walking out of the barracks' animation). It might also mean that the AI villagers must be altered, since they have iron production.
Re: Barbarians in TSK?
PostPosted: 12 Jan 2018, 12:50
by Esthlos
Besides, it looks kinda ugly to see an axe fighter 'disappear' and 'change' into a barbarian when it comes out of the barracks (since there is no 'barbarian walking out of the barracks' animation).
Some time ago I had asked for a UnitTypeChange function (to use on the Bonus map) that would seamlessly allow this transformation the moment before he walked out of the Barracks, but Lewin and Krom declined the idea... here's a portion of that PM with my suggestion (from 3 years ago), just in case the new team is interested in adding it:
KM_ScriptingESA
- Code:
procedure TKMScriptActions.UnitTypeSet(aUnitID, aNewType: Integer);
var
U: TKMUnit;
G: TKMUnitGroup;
begin
try
if (aUnitID > 0)
and (aNewType in [UnitTypeToIndex[WARRIOR_MIN]..UnitTypeToIndex[WARRIOR_MAX]]) then
begin
U := fIDCache.GetUnit(aUnitID);
if U = Nil then Exit;
if not (U.UnitType in [WARRIOR_MIN .. WARRIOR_MAX]) then
begin
LogParamWarning('Actions.UnitTypeSet is not supported for civilians', [aUnitID, aNewType]);
Exit;
end;
if U.SetUnitType(UnitIndexToType[aNewType]) then //Returns True if the group type changed
begin
//Split the unit if its group type changed
G := gHands[U.Owner].UnitGroups.GetGroupByMember(TKMUnitWarrior(U));
if G <> Nil then
G.UpdateGroupType(TKMUnitWarrior(U));
end;
end
else
LogParamWarning('Actions.UnitTypeSet', [aUnitID, aNewType]);
except
gScriptEvents.ExceptionOutsideScript := True; //Don't blame script for this exception
raise;
end;
end;
KM_Units
- Code:
function TKMUnit.SetUnitType(NewType: TUnitType): Boolean;
begin
Result := False;
if fUnitType = NewType then Exit;
//Abort the storming if the new type shouldn't be able to
if (GetUnitAction is TUnitActionStormAttack)
and (NewType in [low(UnitGroups) .. high(UnitGroups)])
and (UnitGroups[NewType] <> gt_Melee) then
TUnitActionStormAttack(GetUnitAction).DepleteStamina;
//Update player stats
gHands[fOwner].Stats.UnitLost(fUnitType);
gHands[fOwner].Stats.UnitCreated(NewType, False);
//Check if the group type changed
if (fUnitType in [low(UnitGroups) .. high(UnitGroups)])
and (NewType in [low(UnitGroups) .. high(UnitGroups)])
and (UnitGroups[fUnitType] <> UnitGroups[NewType]) then
Result := True;
//Update hit points
fHitPoints := Min(fHitPoints, gRes.UnitDat[NewType].HitPoints);
//Actually change the unit type
fUnitType := NewType;
end;
KM_UnitGroups
- Code:
procedure TKMUnitGroup.UpdateGroupType(aUnit: TKMUnitWarrior);
var
G: TKMUnitGroup;
begin
if Count > 1 then
begin
G := OrderSplitUnit(aUnit, True);
G.UpdateGroupType(aUnit);
Exit;
end;
if gHands[fOwner].AI.General.DefencePositions.FindPositionOf(Self) = nil then
begin
fGroupType := UnitGroups[aUnit.UnitType];
gHands[fOwner].AI.General.WarriorEquipped(Self); //Update AI logic
end else begin
//Workaround to release this group from AI defence positions if Count = 1
aUnit.ReleaseUnitPointer;
G := gHands[fOwner].UnitGroups.AddGroup(aUnit);
G.OnGroupDied := OnGroupDied;
G.fTimeSinceHungryReminder := fTimeSinceHungryReminder;
G.fOrderLoc := KMPointDir(aUnit.GetPosition, fOrderLoc.Dir);
G.OrderHalt(False);
if MySpectator.Selected = Self then begin
MySpectator.Selected := G;
G.fSelected := fSelected;
end;
fMembers.Delete(0);
end;
end;
KM_UnitActionStormAttack
- Code:
procedure TUnitActionStormAttack.DepleteStamina;
begin
if fTileSteps < (fStamina-1) then fTileSteps := fStamina-1;
end;
Re: Barbarians in TSK?
PostPosted: 12 Jan 2018, 14:18
by Vatrix
Thanks Esthlos, maybe we could put it in good use! Also are you on discord?
Poll closed, see first post.
Re: Barbarians in TSK?
PostPosted: 13 Jan 2018, 09:01
by Esthlos
Thanks Esthlos, maybe we could put it in good use!
No.