Bug Fix: Fully working entitiesAt and allEntities functions.

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Diarmuid
Posts: 807
Joined: Thu Nov 22, 2012 6:59 am
Location: Montreal, Canada
Contact:

Re: Bug Fix: Fully working entitiesAt and allEntities functi

Post by Diarmuid » Sun Oct 06, 2013 6:25 am

Eleven Warrior wrote:Hi

At the risk of sounding Stupid (lol) does this mean that if a player puts a maker on the map the game wont crash??

EDIT: If I add this Code to my mod now would it affect it Eg: Crash it?
Due to a bug in the game, if players put map markers on the map, it messes up with entitiesAt/allEntitiesAt functions that most scripts use. So no crashes, but scripts stop working correctly because they think objects that are in the dungeon aren't there.

This fixes the problem, but you have to replace every call to the default functions by a call to those functions in every script entity, every .lua file, everywhere. The only clean way to do that is to do a find/replace in all files in your entire mod directory (backup first!!!!!) using something like notepad++. Even then, you must be careful to make the search to match case, and whole words only.

User avatar
Komag
Posts: 3629
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Bug Fix: Fully working entitiesAt and allEntities functi

Post by Komag » Sun Oct 06, 2013 7:09 am

I suppose you should check everywhere to be sure, but I didn't have any outside my dungeon.lua
Finished Dungeons - complete mods to play

User avatar
Eleven Warrior
Posts: 726
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Bug Fix: Fully working entitiesAt and allEntities functi

Post by Eleven Warrior » Sun Oct 06, 2013 8:38 am

Hi guys..

Whooooaaaa This is HEAVEY STUFF.. I think ill use the Code in my next Mod. ATM it probably take me ages to readjust my (lua Files and Scripts) LOL..

Thxs for the reply guys GJ..

Note To Self: Remind players not to put makers on the Maps ATM..

User avatar
JohnWordsworth
Posts: 1387
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: Bug Fix: Fully working entitiesAt and allEntities functi

Post by JohnWordsworth » Thu Feb 13, 2014 12:49 pm

Just wanted to say that I've updated the main post of the thread with Diarmuid's improved newAllEntities method so that anyone just popping in and copying the script without reading the thread gets the best version of the script.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.

User avatar
Diarmuid
Posts: 807
Joined: Thu Nov 22, 2012 6:59 am
Location: Montreal, Canada
Contact:

Re: Bug Fix: Fully working entitiesAt and allEntities functi

Post by Diarmuid » Thu Feb 13, 2014 4:20 pm

Great,

BTW, the entitesAt fixes have been implemented mod-wide in the latest beta3 tests of the ORRR2, without any noticeable drop in performance, and that's saying something with the amount of stuff going on in that mod.

User avatar
germanny
Posts: 530
Joined: Sat Apr 07, 2012 10:52 pm
Location: Kiel, Germany

Re: Bug Fix: Fully working entitiesAt and allEntities functi

Post by germanny » Thu Feb 13, 2014 6:56 pm

Nice work from you two!
Lots of competent fans around, this is so nice and inpiring ;)
Dungeon Master Resource Pack worker and passionated Beer drinker

Post Reply