relay override for Gelatinous Noobs - add absorb info to item descriptions

For script writing
Post Reply
Antipasta
AFH
Posts: 251
Joined: Fri Sep 21, 2007 5:24 pm

relay override for Gelatinous Noobs - add absorb info to item descriptions

Post by Antipasta » Sun Feb 19, 2017 5:19 pm

I made a little mafia override script for Gelatinous Noobs - if you click on an item to get the description, it will add info on what absorbing the item will do. Ezandora's page is great, and I used it a whole lot on my 1 run, but sometimes I just wanted to know what stuff in my inventory would do.

Just save it into mafia's relay subdirectory. Should be harmless for non-Gelatinous types.
desc_item.ash
(8.16 KiB) Downloaded 24 times
Last edited by Antipasta on Mon Feb 27, 2017 6:14 am, edited 3 times in total.

boozedup
Just Plain Old Pie
Posts: 7
Joined: Fri Feb 24, 2017 8:23 am

Re: relay override for Gelatinous Noobs - add absorb info to item descriptions

Post by boozedup » Fri Feb 24, 2017 8:37 am

Hey looks like it's giving the wrong skills, though. For a hermit permit, it prints Parasympathetic Nervous System (+40% MP) instead of Stomach-Like Thing (+2adv/absorb).

Antipasta
AFH
Posts: 251
Joined: Fri Sep 21, 2007 5:24 pm

Re: relay override for Gelatinous Noobs - add absorb info to item descriptions

Post by Antipasta » Sat Feb 25, 2017 4:42 pm

Sorry, some of the skills were in the wrong order in my array, scrambled them up somehow when I reformatted the wiki info. Most of them were right, so I never noticed during my first run. Just startd second run, and noticed! Fixed now.

boozedup
Just Plain Old Pie
Posts: 7
Joined: Fri Feb 24, 2017 8:23 am

Re: relay override for Gelatinous Noobs - add absorb info to item descriptions

Post by boozedup » Sat Feb 25, 2017 6:54 pm

Awesome. This is a good script - I was planning on writing one with the same functionality myself, but figured I'd poke around a bit and see if it existed already. Thanks for the update.
Oh, and I noticed another thing just having it on yesterday - combat items give the (Absorb grants above effect, not a skill) message rather than displaying the skill.

boozedup
Just Plain Old Pie
Posts: 7
Joined: Fri Feb 24, 2017 8:23 am

Re: relay override for Gelatinous Noobs - add absorb info to item descriptions

Post by boozedup » Sun Feb 26, 2017 3:13 am

I modified the script so combat items have a skill.
Attachments
desc_item.ash
(7.88 KiB) Downloaded 19 times

Antipasta
AFH
Posts: 251
Joined: Fri Sep 21, 2007 5:24 pm

Re: relay override for Gelatinous Noobs - add absorb info to item descriptions

Post by Antipasta » Sun Feb 26, 2017 10:34 am

Yeah, sorry, I eventually fixed that too, but wanted to test it a little to avoid more of these little failures... it's updated in the original post.

It's basically just relying on mafia now, instead of trying to figure out anything independently.

ckb1
Just Plain Old Pie
Posts: 5
Joined: Wed Mar 11, 2015 9:28 am

Re: relay override for Gelatinous Noobs - add absorb info to item descriptions

Post by ckb1 » Sun Feb 26, 2017 8:55 pm

Antipasta wrote:It's basically just relying on mafia now, instead of trying to figure out anything independently.
You are still using a hard-coded list of the skills and their functions. You can use Mafia for that too (and then you don't have to maintain the list).

eliminate your skillz[] map

change line 162 from

Code: Select all

string the_effect = skillz[to_string(the_skill)];
to

Code: Select all

string the_effect = string_modifier("Skill:"+the_skill,"Evaluated Modifiers");

Antipasta
AFH
Posts: 251
Joined: Fri Sep 21, 2007 5:24 pm

Re: relay override for Gelatinous Noobs - add absorb info to item descriptions

Post by Antipasta » Mon Feb 27, 2017 6:10 am

Oh, that's cool, I didn't know about that string_modifier() function, and didn't see anything when I did ashref on things like "skill" and "effect".

boozedup
Just Plain Old Pie
Posts: 7
Joined: Fri Feb 24, 2017 8:23 am

Re: relay override for Gelatinous Noobs - add absorb info to item descriptions

Post by boozedup » Mon Feb 27, 2017 9:09 pm

ckb1 wrote:
Antipasta wrote:It's basically just relying on mafia now, instead of trying to figure out anything independently.
You are still using a hard-coded list of the skills and their functions. You can use Mafia for that too (and then you don't have to maintain the list).

eliminate your skillz[] map

change line 162 from

Code: Select all

string the_effect = skillz[to_string(the_skill)];
to

Code: Select all

string the_effect = string_modifier("Skill:"+the_skill,"Evaluated Modifiers");
Is there a simpler way to detect if an item is equipment or not?

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: relay override for Gelatinous Noobs - add absorb info to item descriptions

Post by lostcalpolydude » Tue Feb 28, 2017 8:03 pm

boozedup wrote:Is there a simpler way to detect if an item is equipment or not?
to_slot( it ) != $slot[none].

In this context, since familiar equipment is treated the same as non-equipment:

Code: Select all

to_slot( it ) != $slot[none] && to_slot( it ) != $slot[familiar]
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)

Post Reply