Page 8 of 20

Re: KaM Remake nightly build

PostPosted: 11 Jan 2014, 18:44
by RandomLyrics
Name OnPlanField and OnPlanWinefield need to be swapped, now OnPlanField is for Vinefield xDD

Re: KaM Remake nightly build

PostPosted: 11 Jan 2014, 21:17
by pawel95
The "promoting host" addition, is bugged a bit. My situation:

Pawel (host)

TRB (player 2)
[no chosen map]

I prote him. He promotes me back. I promote him. He promotes me back, I ban him, i reset bans(after he was banned). He joined again and me(the actual host) couldn´t set a map or change any other setting XD it just said "ready" like for normal "non-host" users, but I was the host at that time(with a star) :mrgreen:



One other strange thing. I opened a room, so I was the only players and were the host(star). However I couldn´t set any map,setting and noone could join my lobby XDD

Re: KaM Remake nightly build

PostPosted: 11 Jan 2014, 21:25
by MaxDeus
Now i have more crashes than before when i copy landscape (tooken from the same map) to an other position. i sended the crash-reports, so that you know it more detailed.
GR
MaxDeus

Re: KaM Remake nightly build

PostPosted: 12 Jan 2014, 06:41
by Lewin
@Pawel: Thanks, I will test it again. If I can't reproduce it by myself I'll go on TeamSpeak and ask for your expert advice on how to break it :P

EDIT: I can't reproduce it. I fixed a bug report you sent in (crash when trying to select a save). Did the bug with neither player being host happen soon after this bug? They could be related. If anybody wants to help me test this talk to me on TeamSpeak. The more players I have to test it the better :) (testing by myself running two copies don't work as well as with multiple people).

Name OnPlanField and OnPlanWinefield need to be swapped, now OnPlanField is for Vinefield xDD
Fixed, thank you :)
Now i have more crashes than before when i copy landscape (tooken from the same map) to an other position. i sended the crash-reports, so that you know it more detailed.
While looking at your report I found a few other errors/crashes to do with copying terrain and fixed them. Thanks for sending the report :)
Its a kinda old bug, after this (its in Event OnHouseDestroy):
  Code:
Actions.HouseDestroy(aHouseID, true); Actions.GiveHouse(AI_DUMMY, t, x, y);
the created house lost his "way block", and you can cross house with units easily.
Image
without Actions.HouseDestroy(aHouseID, true); next script GiveHouse doesnt work and ddint give any log ( in HouseDestroy event)
OnHouseDestroyed happens before the house is actually destroyed so you can still access states like HouseType, HouseOwner, etc. (you can't access those things after the house is destroyed). That's why GiveHouse doesn't work, the original house is still in the way (it is silently ignored because at the moment errors are only logged for invalid parameters like house type 999, not for invalid placement like another house being in the way). Putting Actions.HouseDestroy(aHouseID, true); in OnHouseDestroyed should get you into an infinite loop (and eventually stack overflow) because it will keep calling OnHouseDestroyed again and again.... I guess you had some kind of check to prevent that.

Destroying the house in OnHouseDestroyed will cause mistakes (miscounted statistics amongst other things) and could cause crashes. Therefore I'll make it so HouseDestroy is ignored within OnHouseDestroy for the house itself (destroying other houses is fine of course). We are aiming for scripts to fail immediately rather than cause mistakes that might make the game crash later (for example by counting a house destroyed twice in statistics).

OnUnitKilled and OnHouseDestroyed were never designed as "Now this entity is gone and you can replace it with something else". They were designed as "This entity is about to be destroyed, do you want to do anything before I wipe it from the game and the ID becomes invalid?". But I can see the use in replacing something as soon as it is destroyed. Maybe we need two more events OnHouseAfterDestroyed and OnUnitAfterKilled(Type, Owner, X, Y: Integer); which would be called after they have been completely wiped from the game so you could replace them with something, but because of this they could not provide you with an ID to use states like HouseType (although I guess they could still provide the ID so you can compare it with variables you have saved, but states like HouseType wouldn't work). Do you think this would be a good solution?

These kind of issues are one of the reasons why UnitKill doesn't work instantly. Within certain events killing the unit instantly will cause errors in the game (for example killing Attacker in OnHouseDamage would cause a problem since that unit is still processing its house attack task, and adding checks to handle any set of circumstances like these would make our code very messy and impossible to maintain).

Re: KaM Remake nightly build

PostPosted: 12 Jan 2014, 14:18
by Lewin
Ok, all the reported bugs (including pawel's hosts bug) have been fixed and I've made a new nightly :)
http://code.google.com/p/castlesand/downloads/list

Enjoy!

EDIT: I forgot to include our crash reporting tool, so I uploaded a newer nightly (r6108). For the two people who downloaded the old one (r6107), please get the new one instead.

Re: KaM Remake nightly build

PostPosted: 12 Jan 2014, 15:38
by MaxDeus
And again some houses went away ^^
Here the replay. This time it was the stonemason. :)
GR
MaxDeus

Re: KaM Remake nightly build

PostPosted: 12 Jan 2014, 18:21
by RandomLyrics
OnUnitKilled and OnHouseDestroyed were never designed as "Now this entity is gone and you can replace it with something else". They were designed as "This entity is about to be destroyed, do you want to do anything before I wipe it from the game and the ID becomes invalid?". But I can see the use in replacing something as soon as it is destroyed. Maybe we need two more events OnHouseAfterDestroyed and OnUnitAfterKilled(Type, Owner, X, Y: Integer); which would be called after they have been completely wiped from the game so you could replace them with something, but because of this they could not provide you with an ID to use states like HouseType (although I guess they could still provide the ID so you can compare it with variables you have saved, but states like HouseType wouldn't work). Do you think this would be a good solution?
I get it :) that will be great "OnHouseAfterDestroyed(Type, Owner, X, Y: Integer) :) i just need to replace house (change owner) when player destroys own house.

Re: KaM Remake nightly build

PostPosted: 12 Jan 2014, 21:06
by Lewin
Sorry, when I said "all the reported bugs have been fixed" I forgot about the invisible buildings bug. We don't need any more reports of that one, we know how to reproduce it. Same story with trees occasionally looking funny in the fog of war at the top of the map, we don't need more reports for that either.

But thanks for the report. I should have mentioned those known bugs before.

Re: KaM Remake nightly build

PostPosted: 13 Jan 2014, 21:21
by The Dark Lord
Sort of bug: if I am host, and I make someone else host, my status is marked as 'ready' while I never pressed it. I think it should be 'not ready' by default. :)

Re: KaM Remake nightly build

PostPosted: 14 Jan 2014, 07:22
by Lewin
Sort of bug: if I am host, and I make someone else host, my status is marked as 'ready' while I never pressed it. I think it should be 'not ready' by default. :)
Yeah thanks, I fixed it :)

Re: KaM Remake nightly build

PostPosted: 14 Jan 2014, 21:50
by Vas
Found a problem in map editor:
When I load a mission (for example first mission of fed of neryn) and if there is a player without any units, houses and so on, the editor deletes the player while saving the map. In this case there is player 8 who will geht a knight by script later. Doen't work anymore cause player 8 is deleted.

what happens when I press F10 in game or map edit? :)

Re: KaM Remake nightly build

PostPosted: 15 Jan 2014, 08:54
by Lewin
Found a problem in map editor:
When I load a mission (for example first mission of fed of neryn) and if there is a player without any units, houses and so on, the editor deletes the player while saving the map. In this case there is player 8 who will geht a knight by script later. Doen't work anymore cause player 8 is deleted.
It was designed like that so the map author doesn't have to set how many players they want (unused ones would simply be removed when you saved). But as you've found it doesn't really work now that we have dynamic scripts. I guess we need a way to force that player to be active even though they have no units or houses. Any ideas?
what happens when I press F10 in game or map edit? :)
If you have F11 open it selects the menu (just like it does in Firefox or any other application with a main menu). If you don't have F11 open it tries to select the menu anyway even though it's invisible.

Re: KaM Remake nightly build

PostPosted: 15 Jan 2014, 12:15
by Killer!!
Hello i have a problem.
This week i did everything what I must do and I set the nightly on my pc,
Now when I opened the nightly it starts the nightly for 2 sec and then it stops and it gives me a error raport.
I don't know what the problem is so can someone helpme?

Re: KaM Remake nightly build

PostPosted: 15 Jan 2014, 12:28
by MaxDeus
Hmm... Maybe you opened the old KaMRemake.exe?
GR
MaxDeus

Re: KaM Remake nightly build

PostPosted: 15 Jan 2014, 12:36
by pawel95
Hello i have a problem.
This week i did everything what I must do and I set the nightly on my pc,
Now when I opened the nightly it starts the nightly for 2 sec and then it stops and it gives me a error raport.
I don't know what the problem is so can someone helpme?
You have sent the bug report for sure, right? Then zhe remake team can for sure reproduce what is wrong.