Where would I edit Necromutation?


Questions, Explanations, Howtos

Temple Termagant

Posts: 5

Joined: Thursday, 23rd August 2012, 17:46

Post Thursday, 23rd August 2012, 17:49

Where would I edit Necromutation?

I'd like to edit the game files I'm currently running to change the Necromutation spell into a toggle ability much like the Tengu's flight ability. Recasting Necromutation 5 times as I run to and from my stash is simply too tedious.

Is there any particular way I can do this?
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Thursday, 23rd August 2012, 18:28

Re: Where would I edit Necromutation?

You need to edit the sources to do that. Do you know how to code in C++? Have you tried compiling the game yet?
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Temple Termagant

Posts: 5

Joined: Thursday, 23rd August 2012, 17:46

Post Thursday, 23rd August 2012, 18:47

Re: Where would I edit Necromutation?

I know how to code in both java and python. C++ can't be too much of a leap. I haven't tried compiling the game yet. I was looking to see if there was just a simple text file I could edit first. Thanks for the info!

Slime Squisher

Posts: 400

Joined: Saturday, 24th September 2011, 03:45

Post Thursday, 23rd August 2012, 18:53

Re: Where would I edit Necromutation?

I can't check the source right now, but I imagine this would be as simple as finding where lichform's duration is rolled, and changing the value to 100000.

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Thursday, 23rd August 2012, 19:20

Re: Where would I edit Necromutation?

In file transform.cc, see function "_transform_duration(transformation_type which_trans, int pow)"

You'd want to add a line under "case TRAN_LICH" with some large value.

Blades Runner

Posts: 554

Joined: Tuesday, 25th January 2011, 14:24

Post Friday, 24th August 2012, 12:00

Re: Where would I edit Necromutation?

That still wouldn't turn it into a "toggle ability" though. It would just prevent you from having to recast it nearly so much.

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Friday, 24th August 2012, 13:15

Re: Where would I edit Necromutation?

A duration of 3000000 turns would effectively make it a toggle ability as you can already end the effect at will. And you can do that with one line of code.

Blades Runner

Posts: 554

Joined: Tuesday, 25th January 2011, 14:24

Post Friday, 24th August 2012, 15:12

Re: Where would I edit Necromutation?

Yes - but you have to recast it (vs. just "toggle on"). A mechanistic distinction vs. a functional one, to be sure (although I don't know if there are any game timing differences between the two.) Sounds like it would achieve the goal stated in the OP though.

Return to Coding

Who is online

Users browsing this forum: No registered users and 10 guests

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