PDA

View Full Version : own level always crashes



BaukeS
January 26th, 2016, 18:45
I have made an own map and I have tried to test it loads of times, but always it causes the game to crash at some point.
I have been searching for the problem the whole day, but I can't find it.
This is the only level that causes the game to crash, so it must be in this game.
can somebody help me finding the problem?
here are the level files:
1622

by the way, I know this level is almost impossible, because of the amount of traps in the hero area, but it's still worth playing...

YourMaster
January 27th, 2016, 01:25
Please share the log file after a crash, than it's easier to know what the error is.

BaukeS
January 28th, 2016, 17:19
I already found the problem: tere are too many Add_creature_to_level commands in the level.
that's what the log file says it causes an error

BaukeS
January 28th, 2016, 18:50
I deleted some of the commands, and that works now, but still the game crashes
here are the log file and the updated level:
1623
1624

YourMaster
January 28th, 2016, 18:58
I've looked at the log and it's the pathfinding crash (https://github.com/dkfans/keeperfx/issues/391).

All you can do is simplify the map, make sure there aren't to many routes from point a to point b. Limit the tunnels being dug by the keepers, limit the amount of times a creature would have to go from land to water or vice versa to go somewhere.

BaukeS
January 29th, 2016, 22:51
ok, thanks, but I don't really know how I can limit the anmount of tunnels being dug by the keepers?

YourMaster
January 29th, 2016, 23:39
Well, you're not going to like the solutions:


Limit the amount of space they have. For example by walling them in.
Have fewer keepers on the map.
Use other Computer Players (http://keeper.lubiki.pl/dk1_docs/dk_scripting_ref.htm#scrpt_cmd_computer_player) (CP 4, the one used on level 5, hardly does any digging/building).
Give the keepers access to fewer rooms/creatures so they will build smaller dungeons.
Don't give him many small gold patches to dig towards, but just a single one or gems.
Modify (http://keeper.lubiki.pl/dk1_docs/dk_scripting_ref.htm#scrpt_group_compluter)the computer player processes.


You could even go so far as to prebuild the complete dungeons for the enemy keepers and to not give them any imps nor the create imp spell. Be sure to give them enough gold. You can than script in that as soon as the player breaches the dungeon or kills a creature the keeper will get imps and the create imp spell. The player will never notice the difference and in fact you can make the keepers an even better challenge with a more interesting dungeon than they would build themselves.

BaukeS
January 30th, 2016, 16:20
I have done as you said and builded a dungeon for them, which included nearly the whole area they can reach, so now these are the level files: 1625
But it made it even worse.
Now the game crashes as soon as I try to start the game.
I don't know what's the problem, bu here is the log file, maybe you can give me some advise, how to change the level, so that it will work:
1626

YourMaster
January 30th, 2016, 23:30
I opened the map in the editor, and you did exactly the wrong thing, sorry I wasn't more clear.
You need to have small, simple dungeons. The more you've dug out, the more rooms and corridors you have the more likely you are to run into this bug. You've dug out the entire map with rooms and whatnot, so it will crash right away.
In your original map their dungeons started out small, and when the keepers started building the dungeons they became larger until your game crashed. Now you start out massive so you start out with a crash.

BaukeS
January 30th, 2016, 23:45
ah, oke, then I will make the map a bit smaller, so that there cannot be too much paths.
I hope it will work this time...

YourMaster
January 31st, 2016, 00:21
Try this one: 1627

I modified your original map and you'll have a much better chance of this one not crashing. I did not playtest it beyond opening it up and using frameskip for a while, so you'll have to do that yourself.

BaukeS
January 31st, 2016, 12:43
I have changed my version myself as well, but my version still has some bugs.
There aren't too many paths in the game any more, but now the create imp spell doesn't work.
I have no idea how that could have happened, because In the previous versions it did work.
level: 1628
log file: 1629

BaukeS
January 31st, 2016, 12:55
I don't know wheter your version will work, because in the script you say, that creatures must appear at hero-gates, that aren't in the map.
I haven't tested it ,but think that can cause some bugs as well...

YourMaster
January 31st, 2016, 13:30
If your map works, it works. If not, take some inspiration from the version I made or just fix the missing hero gates/action points. Them not being there won't give any issues beyond the heroes not showing up.

I tested your map and I can create imps no problem. I just have money for one. What could have happened for you is that you try to create imps when there are too many heroes on the map. The game has a creature limit of 255 creatures. If you have that many on the map, no new ones will come from portals, graveyard or create imps spell.

BaukeS
February 1st, 2016, 12:24
it was at the beginning of the game and the log file gives some errors, so I thought there was still a bug, but if it did work, when you played it, I'll test it again