Page 4 of 4

Re: Winter Tournament - KaM Remake Beta Release

PostPosted: 29 Apr 2014, 14:24
by Tiank
TianK wrote:Also, if there are spectators in game, when you return to lobby, they can select any colour.


I meant that they can't... Sorry, didn't notice mistake earlier :$

Re: Winter Tournament - KaM Remake Beta Release

PostPosted: 29 Apr 2014, 16:36
by pawel95
TianK wrote:
TianK wrote:Also, if there are spectators in game, when you return to lobby, they can select any colour.


I meant that they can't... Sorry, didn't notice mistake earlier :$


I reported that weeks ago. It´s fixed

Re: Winter Tournament - KaM Remake Beta Release

PostPosted: 01 May 2014, 19:46
by Sir Andrzej
You can place rally point in MapEd when moving barracks:

Image

~andreus

Re: Winter Tournament - KaM Remake Beta Release

PostPosted: 01 May 2014, 23:55
by Lewin
Sir Andrzej wrote:You can place rally point in MapEd when moving barracks

Hahah thanks, I fixed it :)

Re: Winter Tournament - KaM Remake Beta Release

PostPosted: 02 May 2014, 09:28
by andreus
np.

sorry I was lazy to log in :D

Re: Winter Tournament - KaM Remake Beta Release

PostPosted: 04 May 2014, 19:07
by andreus
TianK wrote:There's also a bug in SP, in map selection menu, if there are many enemies (more than 7 I think), their flags don't fit:Image


Not only enemies btw. Victory conditions' images too - check To the Capital for example

Image

also maybe allies' and defeat conditions' images/flags don't fit.

Re: Winter Tournament - KaM Remake Beta Release

PostPosted: 06 May 2014, 13:33
by dicsoupcan
Did this beta change any ai behaviour? because AED02 which worked fine in the official release, now is kind of broken in the beta. first of all the rebels attack right from the start, which is not meant to be. But more interesting, the rogues who normally act fine are really acting weird in this release. i noticed the same on range dunits in the maze, but i thought that was a problem in the dynamic script itself.

anyway here is the replay.

Saves.rar

Re: Winter Tournament - KaM Remake Beta Release

PostPosted: 07 May 2014, 00:36
by Lewin
andreus wrote:Not only enemies btw. Victory conditions' images too - check To the Capital for example
also maybe allies' and defeat conditions' images/flags don't fit.

I've added it to the todo list.

dicsoupcan wrote:Did this beta change any ai behaviour? because AED02 which worked fine in the official release, now is kind of broken in the beta. first of all the rebels attack right from the start, which is not meant to be. But more interesting, the rogues who normally act fine are really acting weird in this release. i noticed the same on range dunits in the maze, but i thought that was a problem in the dynamic script itself.

anyway here is the replay.

Saves.rar

Looks like there's a few problems here. First we added a feature from the original game for the AI: "auto attack range". If you walk too close to an AI soldier they will attack you. It makes it much harder to sneak into the AI's village in the campaign, which is probably why the original game had it. I think that explains why they attack right at the start. You can set the AI auto attack range in the map editor, so if you reduce that to 1 it will behave like it did before we added that feature.

Regarding the rogues, I debugged it and your script is calling Actions.GroupOrderAttackUnit every tick, ordering the rogues to attack. That is equivalent to selecting the rogues and right clicking on the enemy 10 times per second :P With melee that wouldn't really cause any problems, it is a problem with ranged units because it causes them to stop what they are doing, turn to face that direction, then choose a target. They never get a chance to do anything because they keep being interrupted. So either don't tell them to attack or tell them to attack once and then stop.

Also a quick hint for your script:
  Code:
procedure FeedEveryone;
   var allunits : Array of Integer;
   var temporaryNumber : Integer;
begin
   for i:= 0 to 5 do
   begin
      temporaryNumber := Length(States.PlayerGetAllUnits(i));
      allunits := States.PlayerGetAllUnits(i);
      if temporaryNumber <> 0 then
      begin
         for j:= 0 to (temporaryNumber-1) do
         begin
            Actions.UnitHungerSet(allunits[j], States.UnitMaxHunger);
         end;
      end;
   end;
end;

Can be reduced to:
  Code:
procedure FeedEveryone;
   var allunits : Array of Integer;
begin
   for i:= 0 to 5 do
   begin
      allunits := States.PlayerGetAllUnits(i);
      for j:= 0 to Length(allunits)-1 do
      begin
         Actions.UnitHungerSet(allunits[j], States.UnitMaxHunger);
      end;
   end;
end;

There's no need to check if the number of units is zero, since if it is you will get "for 0 to -1 do", which will automatically be skipped (since the range is invalid). And it's best to only call PlayerGetAllUnits once for efficiency reasons.

Re: Winter Tournament - KaM Remake Beta Release

PostPosted: 07 May 2014, 04:24
by Krom
I recall this could cause a bug in Delphi if the variable was unsigned, then it would overflow to max and the loop would run. Not sure about PascalScript.

  Code:
var
  temporaryNumber: Byte;
begin
  temporaryNumber := 0;

  for j := 0 to (temporaryNumber - 1) do // temporaryNumber-1 = 255
    ..

Re: Winter Tournament - KaM Remake Beta Release

PostPosted: 07 May 2014, 11:29
by dicsoupcan
okay, thanks for your feedback and help :D