Jump to content

Avernum 6 - Editor Question


night32

Recommended Posts

Hey everyone. I just created this account so I can ask for help since I've searched the forums (and using search engines like google) and cannot find an answer.

(I've found answers to questions I've had on this forum previously while just a guest)

 

So, my question is, is there a way to lower a spell's skill level back to 0 or 1-8?

Normally the skill starts at 0 (without points in mage/priest) and when you add to it, it goes up to 8. But then if you use a trainer to get it to 9 or higher, the editor doesn't reset the number. My example is, my spell "Bolt of Fire" is level 3000. I was trying to see how high it would go before reverting back to 0 but gave up after 3000 clicks (got tired, as you would guess.

 

I was just messing around in the editor when I found this, I'm not sure if it's a glitch/bug or intended.

 

So if anyone can tell me how to revert my spell(s) back to level 0 without making a new character, please let me know.

Thanks in advance.

Link to comment
Share on other sites

So I guess you don't have a save from right before you did this, huh? You might check the autosave; if it's not too far back, that's the easiest way out of your problem. Failing that, the only other option is probably a script edit — as long as you're not playing on a tablet.

Link to comment
Share on other sites

Okay, well there's a slight problem, which is that I can't find a way to alter a stat for a single character in A6. It's not really a big deal as spell levels don't go below zero. So everyone's Bolt of Fire will go to zero, then you can edit them back to where they belong.

 

First. locate the script called z510portkeedlg.txt; I picked this one because of its central location, but if you don't have access to the portal yet, pick z610Tdepotdlg.txt, which of course is the food depot. You are going to attach a bit of code to a dialogue node — don't worry, it's easy.

 

First, make a back-up copy of the script before you change it! Then you need to find a node. In the portal script, search for the word "unhinge". That will take you to the sentinel dialog, which looks like this:

 

 

begintalknode 18;
state = -1;
nextstate = -1;
condition = 1;
question = "";
text1 = "The Portal Keep is defended by several magical sentinels. They are stone figures, with crystals for eyes and long sharp blades on their hands. The air around them is warm. They are remarkable pieces of magical engineering.";
text2 = "They stand perfectly still, doing nothing to react to your presence. They must be activated by vocal commands. Hopefully, the magical radiation from the portal won't do anything to unhinge them.";

 

Add 3 lines at the end, exactly like this:

 

 

begintalknode 18;
state = -1;
nextstate = -1;
condition = 1;
question = "";
text1 = "The Portal Keep is defended by several magical sentinels. They are stone figures, with crystals for eyes and long sharp blades on their hands. The air around them is warm. They are remarkable pieces of magical engineering.";
text2 = "They stand perfectly still, doing nothing to react to your presence. They must be activated by vocal commands. Hopefully, the magical radiation from the portal won't do anything to unhinge them.";
code =
alter_stat(30000,40,-3000);
break;

 

If you're using the depot script, I recommend attaching it to the guards' dialogue, which you can find easily by searching for "applicants". Once you've saved your changes, load your game and click on the sentinel (or guard), and that should do it.

 

Don't forget to change the script back afterward!

Link to comment
Share on other sites

Thank you sooooo much for that!

 

Took me a few minutes to figure it out, but I got it to work with the depot guard.

Now, would it be possible to get a list of the rest of the spells?

 

I mean, like Bolt of Fire is (30000,40,-3000) which I noticed the 3rd value is how many points to deduct, if I'm correct?

So which of the first 2 values would I change to reset the other mage/priest spells?

Only asking if it's possible because I did go over a few more points after Bolt of Fire (before I got it to the thousands) seeing if all the spells I trained in were doing the same thing. (mostly got a bunch of them to lvls 15-50 when I was messing around).

 

 

But if I'm correct about what I said before, I could change the "-3000" to "-1" and each time I talk to the guard would simply decrease the spell by 1?

 

Also, if you don't want to make a full list of the spells and their values, feel free to just tell me which value it would be to change, and I'll go through the hassle of figuring out which value is which spell :p trial and error style, since I backed up the original script.

 

EDIT: Or, I just thought of it, if there is a value that can change ALL spells at once, that would be so much easier. I don't mind re-adjusting points from 0 to where I want them. I don't have a lot of knowledge in scripting but I'm an extremely quick learner.

Edited by night32
Link to comment
Share on other sites

The first value just indicates your party. You're correct that the third value sets the amount to change, positive or negative; you can set that to anything you like. The second value selects the stat to be changed. Mage spells range from 41 to 59 in order; priest spells likewise go from 60 to 79.

 

While there's no command to change all the spells at once, you could do it with a while loop. It would require a bit more scripting, like so:

 

 

begintalknode 271;
state = -1;
nextstate = -1;
condition = 1;
question = "";
text1 = "There are several guards here, keeping a stern watch on the many desperate applicants for aid. They all have truncheons in their hand and more dangerous weapons close nearby.";
text2 = "You try to speak with one of them, but you don't get anywhere. They won't let their concentration waver for a moment.";
code =
i = 40;
while (i < 80)
{
alter_stat(30000,i,-3000);
i = i + 1;
}
break;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...