FAangband 0.3.6
Collapse
X
-
Firstly, thanks for a great fun variant.
There does seem to be something a little suspect about shop valuations though.
The Magestaff of Aliman (1d3) (+14,+8) [4,+0] (+3 to stealth)
It increases your stealth and speed by 3, It makes you vulnerable to darkness(5%). It provides permanent light and speeds your regenerative powers. ...
is unsaleable.
It was never cursed or anything.
Is the minor vulnerability considered that major a negative? or does any negative render a randart unsaleable.
Thanks,
JonathanLeave a comment:
-
Confirmed. I went back to the file where I'd generated one earlier, and the same one loaded as I'd said. Stairscummed until another one appeared based on the same bone file, and the mana and AC had increased. Quit and restarted; back to normal.I think I have worked it out (although I haven't had a chance to check back in the code yet). The adjustments for race and class that I mentioned actually overwrite the values in the r_info array (as Pete warned against in another thread). This might still be fine, but they are not reversed when that ghost disappears (either by being killed or the player just leaving the level), so effects like HP inflation are cumulative.
If this is the case, saving and reloading should reset the values to what they should be.Leave a comment:
-
Overwriting nominally "const" templates in r_info will almost certainly break things. You can fix this by either having some non-const slots in r_info as you propose, or by using flag values, like -1, -2, ..., or like 100001, 100002, ..., to reference indexes in a non-const auxiliary r_info. Your proposal is preferred here, because it means that your use of "non-const-ness" is limited to one place (initializing a new ghost), rather than spread all over the code.
EDIT: (In Object-oriented programming, the second model is generally preferred, because the array(s) would be wrapped in getter/setter functions, and the monster indexes would be opaque.)Last edited by Pete Mack; March 10, 2009, 06:57.Leave a comment:
-
I think I have worked it out (although I haven't had a chance to check back in the code yet). The adjustments for race and class that I mentioned actually overwrite the values in the r_info array (as Pete warned against in another thread). This might still be fine, but they are not reversed when that ghost disappears (either by being killed or the player just leaving the level), so effects like HP inflation are cumulative.
If this is the case, saving and reloading should reset the values to what they should be.
The way I plan to fix this is to put a special entry in monster.txt (and thence into r_info) which can is completely overwritten by the selected ghost template, then race/class modified, whenever a ghost is generated. Then the actual ghost just needs to be pointed at that entry instead of the template. What have I missed?Leave a comment:
-
Yeah, I suppose I'd better try and tangle with it again. I just seem to have spent a lot of time getting stuff to work with different compilers over the years.
Leave a comment:
-
I have no idea about Dev-C++. In Visual Studio, see:
(I don't know why Visual Studio Express isn't the default non-gcc MS compile. You are almost crazy not to use it.)
For gdb, see (for example):
OS X works the same way. If you are using XCode rather than gdb directly, use the gdb control panel.Leave a comment:
-
I've been using Dev-C++ to debug, but it seems to be impossible to stopIf it's really a static value where the ghost stuff gets stored, you can put a watchpoint on to detect if it's getting corrupted.
A watchpoint is a (range of) memory address(es) that causes the debugger to stop the process when it's written to. If it's getting corrupted by some unexpected route, you will catch it in the act.
it again after giving it free reign. (e.g. can't add new break points
once the program starts running) You can watch variables but not (I think) stop on changes.Leave a comment:
-
If it's really a static value where the ghost stuff gets stored, you can put a watchpoint on to detect if it's getting corrupted.
A watchpoint is a (range of) memory address(es) that causes the debugger to stop the process when it's written to. If it's getting corrupted by some unexpected route, you will catch it in the act.
EDIT:
Watchpoints can really slow down your process, so use them sparingly.Leave a comment:
-
If you are not doing anything fancy, scrambled data usually means bad pointers. If this is a static structure, check what you defined above it. If it is on the stack, double-check, and then triple-check afterward, that it wasn't defined in some function that has exited. Of course, you know all that already, but sometimes it takes external prodding to look at one's own code afresh.
Without knowing a thing about it, I will make a wild guess that it is related to generating two ghosts on the same level.Leave a comment:
-
This is a good excuse to give an outline of how player ghosts work.
The game comes with a set of preprepared bone files (these were fun to write). The bone files are often (p = 1/3) deleted after use. When a character dies (unless in town) a 'bone.d' file is written where d is approximately the depth of the character on death; if there is already a bone.d, this fails. So there's a fair churn in these things. All they record is sex, race and class (and optionally a custom greeting with no gameplay effect).
A player ghost is generated when one of a number of different level ghost templates (which appear after the uniques in monster.txt) is chosen as a monster for generation. At this point a bones file of approximately the right level is selected, and changes are made to the monster data based on the race and class (for example dwarf ghosts get a small boost to HP, druid ghosts get to summon animals). So the relationship to the character is pretty tenuous.
I'm not sure where in the process the 'scrambled data' bug is coming in; it doesn't happen consistently, and how bad it is varies as well. It's going to take some chasing.Leave a comment:
-
In the "too little too late" category, I just looked and there is not even a bone.018 file, despite "danger level 18". There is a bone.017 file [and deeper ones]. Could the bug be related to upgrading the level from 17 to 18?Leave a comment:
-
That's not the compaction code, but rather the drop code. The compaction code [in V] is silly too, or at least it used to be. It does [did?] first compact squelched items, but then it keeps compacting, so the order doesn't really matter.Just came back, picked again the game, found 2 other bugs
I am using option "hide squelchable" on.
- ... things start to "disappear from view"! eeek!
...
Now, the first bug is pretty obvious... Make the item compaction code kill the squelched items first, or kill them after some time, or both
I sent Tak a fix for the drop problem a long time ago, and not so long ago he told me that he had finally committed the changes to the dev code, so one could [hopefully] find the fix there.Leave a comment:
-
Yes, savefile on the ghost level is the most informative thing. There is certainly something funny going on - I've had a couple of zombie PGs with 200 mana and 50 HP - which is about the reverse of what it should be. They are meant to get adjusted by class and race, but not that much.Leave a comment:
-
Silly me, I thought the ghost was defined in the bones file, so I did not copy the savefile. If I notice another absurd ghost I'll backup the savefile right away, but usually I do not bother to check monster memory, simply fleeing instead.Leave a comment:
Leave a comment: