gretell.rc


If it doesn't fit anywhere else, it belongs here. Also, come here if you just need to get hammered.

Lair Larrikin

Posts: 15

Joined: Friday, 13th April 2012, 13:20

Location: Belgium

Post Saturday, 26th April 2014, 19:15

gretell.rc

I made a Lua function that looks up monsters nearby you in the Gretell database:

Image

Image

On CSZO, add include += gretell.rc to your rcfile and assign a macro to ===gretell. Or if you want to run it locally, copy all of this (>600kB) into your rc: http://dobrazupa.org/rcfiles/crawl-0.14/gretell.rc

(Sometimes you get weird Lua memory errors. Saving and reloading should get rid of them.)

For this message the author nooodl has received thanks: 24
absolutego, cerebovssquire, chris, Laraso, ontoclasm, Patashu, Rast, rchandra, Sar, zrn and 14 more users

Ziggurat Zagger

Posts: 11111

Joined: Friday, 8th February 2013, 12:00

Post Saturday, 26th April 2014, 19:41

Re: gretell.rc

No need to copy it into your init.txt. I've just checked, you can save it into gretell.txt in the same folder with init.txt and then add include += gretell.txt to init.txt
Thanks a lot!

Edit. Oops, it broke autotravel, maybe it does not work locally.
"ch_force_autopickup failed: not enough memory
Lua error: not enough memory"

zrn

User avatar

Snake Sneak

Posts: 112

Joined: Friday, 25th February 2011, 01:38

Post Saturday, 26th April 2014, 20:41

Re: gretell.rc

Is gretell.rc updated automatically when gretell is updated or does it have to be manually maintained?
This would be the coolest thing ever if not for the memory errors. Saving and reloading did not fix it for me.
User avatar

Dis Charger

Posts: 2057

Joined: Wednesday, 7th August 2013, 08:25

Post Saturday, 26th April 2014, 23:18

Re: gretell.rc

I feel like this should be the normal way it works. Exact info is a lot better than this wall of text:
{Foo} is somewhat resistant to {bar}...
I'm beginning to feel like a Cat God! Felid streaks: {FeVM^Sif Muna, FeWn^Dithmenos, FeAr^Pakellas}, {FeEE^Ashenzari, FeEn^Gozag, FeNe^Sif Muna, FeAE^Vehumet...(ongoing)}

For this message the author bcadren has received thanks: 2
Rast, Sandman25

Lair Larrikin

Posts: 15

Joined: Friday, 13th April 2012, 13:20

Location: Belgium

Post Saturday, 26th April 2014, 23:29

Re: gretell.rc

I maintain it manually; I wrote a bunch of code to generate Gretell queries for all existing monsters and put them into a huge Lua table. I can recompile Crawl, update the monster list, and run it again when necessary; I don't intend to do so very often, since it's quite slow.

I'll look into the Lua memory issues... not sure what's causing them. Maybe I'll just get rid of the colours or something, those take up a ridiculous amount of string memory. (I can probably do some output-only highlighting anyway?)

For this message the author nooodl has received thanks:
zrn
User avatar

Pandemonium Purger

Posts: 1298

Joined: Wednesday, 11th April 2012, 02:42

Location: Sydney, Australia

Post Sunday, 27th April 2014, 00:19

Re: gretell.rc

Will it work with stuff like dancing weapons?

Lair Larrikin

Posts: 15

Joined: Friday, 13th April 2012, 13:20

Location: Belgium

Post Sunday, 27th April 2014, 12:08

Re: gretell.rc

I spent some time monitoring the Lua memory usage with collectgarbage('check') and I guess Crawl is leaking Lua memory in autoexplore or something?! When you walk over a lot of items it quickly skyrockets up to 2MB. I added this bit of code to ready() that just collects garbage when it starts reaching the limit:

  Code:
function ready()
  mem = collectgarbage('count')*1024
  if mem > 1700000 then collectgarbage() end
end


and it seems to have fixed the issue.

Patashu: dancing weapons are really hard to implement, so probably no, but I'm still working on handling some weird edge cases like mimics and hydras correctly.

For this message the author nooodl has received thanks:
Sandman25
User avatar

Dis Charger

Posts: 2057

Joined: Wednesday, 7th August 2013, 08:25

Post Sunday, 27th April 2014, 15:41

Re: gretell.rc

nooodl wrote:Patashu: dancing weapons are really hard to implement, so probably no, but I'm still working on handling some weird edge cases like mimics and hydras correctly.


Pan Lords? since those vary the most?
I'm beginning to feel like a Cat God! Felid streaks: {FeVM^Sif Muna, FeWn^Dithmenos, FeAr^Pakellas}, {FeEE^Ashenzari, FeEn^Gozag, FeNe^Sif Muna, FeAE^Vehumet...(ongoing)}

Cocytus Succeeder

Posts: 2229

Joined: Sunday, 18th December 2011, 13:31

Post Sunday, 27th April 2014, 18:00

Re: gretell.rc

Two questions:
a) Does this thing works with webtitles?
b) Is possible to make it works with other server (such as lantea?) I've obviously tried to add directly the file, or the full path but that doesn't work
screw it I hate this character I'm gonna go melee Gastronok
User avatar

Shoals Surfer

Posts: 301

Joined: Friday, 8th November 2013, 16:19

Location: Tel'aran'rhiod

Post Sunday, 27th April 2014, 18:17

Re: gretell.rc

nago wrote:a) Does this thing works with webtitles?

Yes, I've tried it.
nago wrote:b) Is possible to make it works with other server (such as lantea?) I've obviously tried to add directly the file, or the full path but that doesn't work

Yes, you just have to copy the whole contents of gretell.rc into your own rc file.

nooodl: Thanks for creating this, I love it :)

For this message the author Tedronai has received thanks:
nago

Ziggurat Zagger

Posts: 11111

Joined: Friday, 8th February 2013, 12:00

Post Sunday, 27th April 2014, 20:00

Re: gretell.rc

I still get lua memory error during usual play, I have

  Code:
<
  function ready()
   ParaAlert()
   AirAlert()
   BanishAlert()
    DmgTrack()
     mem = collectgarbage('count')*1024
  if mem > 1700000 then collectgarbage() end
  end
>


Maybe replace 1700000 with a smaller number?

Lair Larrikin

Posts: 15

Joined: Friday, 13th April 2012, 13:20

Location: Belgium

Post Sunday, 27th April 2014, 20:06

Re: gretell.rc

I've changed the threshold to 1.55 MB.
User avatar

Pandemonium Purger

Posts: 1298

Joined: Wednesday, 11th April 2012, 02:42

Location: Sydney, Australia

Post Sunday, 27th April 2014, 22:47

Re: gretell.rc

bcadren wrote:
nooodl wrote:Patashu: dancing weapons are really hard to implement, so probably no, but I'm still working on handling some weird edge cases like mimics and hydras correctly.


Pan Lords? since those vary the most?

Pan Lords are randomly generated, so unless the rc cheats and there's an information leak in the LUA somewhere it can't tell you anything you can't figure out by xving.
User avatar

Pandemonium Purger

Posts: 1298

Joined: Wednesday, 11th April 2012, 02:42

Location: Sydney, Australia

Post Sunday, 11th May 2014, 08:16

Re: gretell.rc

bump cuz I was looking for this thing

dck

Vestibule Violator

Posts: 1653

Joined: Tuesday, 30th July 2013, 11:29

Post Sunday, 11th May 2014, 14:30

Re: gretell.rc

dayum this looks pretty cool alright.
User avatar

Blades Runner

Posts: 624

Joined: Saturday, 18th December 2010, 04:50

Post Monday, 12th May 2014, 19:51

Re: gretell.rc

I don't quite understand, what do you mean "assign a macro to ===gretel"?

EDIT: Nevermind, I figured it out.
User avatar

Blades Runner

Posts: 624

Joined: Saturday, 18th December 2010, 04:50

Post Wednesday, 15th October 2014, 23:11

Re: gretell.rc

Is this no longer being supported? I'm getting errors that the .rc no longer exists.

Return to Crazy Yiuf's Corner

Who is online

Users browsing this forum: No registered users and 25 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.