|
![]() |
#1 |
Adept
Join Date: Oct 2007
Posts: 129
![]() |
Monster spell and Projections
Just a quick question to help me understand the game data files? What *is* a projection, in the sense of what kind of thing is that file trying to describe?
How should I think of the relationship between the breath effects in monster spell and those in projections data files? |
![]() |
![]() |
![]() |
#2 |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,586
Donated: $60
![]() |
All monster ranged attacks (aside from spells that act directly on the player like causing wounds), and all player ranged attacks and effects except shooting and throwing of objects. So it includes all the elemental damage types, (as listed in list-elements.h) and a bunch of other effects to monsters, terrain, etc (listed in list-projections.h).
All the information used to be in mon-spell.c, the list-*.h files and the project*.c files; projection.txt is meant to make it easier to adjust the properties of projections (like words used in messages, effect of resistance) without having to recompile the game. Note that the code: line includes the code from the relevant list-*.h file, which is used in the project*.c files to make the effects actually happen. So monster_spell.txt will define the breath (like BR_FIRE) which appears in monster.txt; the effect line tells you that BR_FIRE uses the breath effect (defined in effects.c), the FIRE projection type, and parameters for the size of the breath cone. The breath effect code then calls the project() function to affect all the grids in the cone of effect, which in turn calls functions to deal with the effects of fire on terrain, objects, monsters and the player that are on one of those grids.
__________________
One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. Last edited by Nick; November 13, 2019 at 23:39. Reason: Answer the second part of the question |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Monster spell messages (list-mon-spells.h) conversion to text in progress | Elsairon | Development | 19 | July 19, 2015 02:40 |
Monster Spell and experience changes | Malak Darkhunter | Vanilla | 8 | October 11, 2012 02:10 |
Alternative detect monster spell? | Mikko Lehtinen | Variants | 11 | December 22, 2011 23:33 |
Feature request: breath/spell damage in monster memory | Marble Dice | Vanilla | 7 | October 21, 2009 08:17 |
LOS/FOV/projections in NPP/Sangband | half | Development | 1 | July 21, 2009 23:49 |