This topic is being created for anyone who might be new to the development process (like myself) and curious about some of the lingo used!! (Sorry, bear with me! )
Can anyone please answer what a weapon ego is, and what it's purpose is? ( Is this actually documented anywhere? And should documentation become a part of the code stored on the repository? )
And on the first day I wrote a line of code, on the second I wrote ten, on the third day I rested with a beer, admiring all I had accomplished
An ego item is an item that is better than just a normal magic item (the kind that has combat pluses and nothing more) but not an artifact. Ego items pseudo-id as {excellent} while normal magic items are {good} and artifacts {special}. Item egos are those things that add to the item's name and give special abilities.
Nerdanel wrote:An ego item is an item that is better than just a normal magic item (the kind that has combat pluses and nothing more) but not an artifact. Ego items pseudo-id as {excellent} while normal magic items are {good} and artifacts {special}. Item egos are those things that add to the item's name and give special abilities.
Ego items pseudo-ID as {excellent} if your ID is good enough. For non-warriors with combat <11 ego weapons and armor pseudo-ID as {good}. Also, I am not sure how ego magic items (scrolls, wands, staffs, rings, amulets) pseudo-ID.
Nerdanel wrote:An ego item is an item that is better than just a normal magic item (the kind that has combat pluses and nothing more) but not an artifact. Ego items pseudo-id as {excellent} while normal magic items are {good} and artifacts {special}. Item egos are those things that add to the item's name and give special abilities.
Ego items pseudo-ID as {excellent} if your ID is good enough. For non-warriors with combat <11 ego weapons and armor pseudo-ID as {good}. Also, I am not sure how ego magic items (scrolls, wands, staffs, rings, amulets) pseudo-ID.
I'm mostly positive what you mean by pseudo-ID, but could you explain the ramifications of how that works, or the area of the engine that deals with it?
And on the first day I wrote a line of code, on the second I wrote ten, on the third day I rested with a beer, admiring all I had accomplished
I looked around a little and it turns out that there is a bitfield, byte ident, in the struct object_type dealing with the state of identification an item has. The byte is the datatype.
/*
* Special Object Flags
*/
#define IDENT_SENSE 0x01 /* Item has been "sensed" */
#define IDENT_FIXED 0x02 /* Item has been "haggled" */
#define IDENT_EMPTY 0x04 /* Item charges are known */
#define IDENT_KNOWN 0x08 /* Item abilities are known */
#define IDENT_STOREB 0x10 /* Item is storebought !!!! */
#define IDENT_MENTAL 0x20 /* Item information is known */
#define IDENT_CURSED 0x40 /* Item is temporarily cursed */
IDENT_SENSE is the pseudo-id flag. It gets turned on when the object is pseudo-id'd. In ToME 2 this happens randomly when you carry stuff around, but I don't think it's hardcoded in the T-Engine. Instead, module code can flip the bit if the module maker feels like including the feature.
Also in object_type is "byte sense" which is a number which determines which description is picked from the sense_desc table (in tables.c) that has the different things objects can be pseudo-id'd as.
Egos are additional features that an item can get and usually alter the name of the object. For example "a sword" can be made "a fiery sword" or "a sword of extra attacks".
In ToME 3.x there can be material and normal egos. Normal egos can be preppended or appended to the name: "a something sword of whatever". Material items are prefixed: "a fiery golden sword of extra attacks".
elcugo wrote:Egos are additional features that an item can get and usually alter the name of the object. For example "a sword" can be made "a fiery sword" or "a sword of extra attacks".
In ToME 3.x there can be material and normal egos. Normal egos can be preppended or appended to the name: "a something sword of whatever". Material items are prefixed: "a fiery golden sword of extra attacks".
Ah yes, I noticed this when I was looking at the ToME module. I did notice the "before","after" strings when specifying weapon effects.
are egos limited to adding damage to an item? As this is all that I've seen so far, can it be done to include other effects and boosts?
Sorry if the questions seem silly, just trying to get a feel for the scope of the possibilities! Thank you all for your patience
And on the first day I wrote a line of code, on the second I wrote ten, on the third day I rested with a beer, admiring all I had accomplished
Egos can do anything. You can have egos that provide resistances or immunities to various effects or ones that make you fly or detect monsters telepathically through the walls. All of those and more are already in ToME 2.
With the T-Engine the sky's the limit. Beyond using the existing effects in new combinations, you can add all sort of weird stuff to your module at the cost of having to program it in Lua. With weird ego items that would include introducing a new flag, giving that flag to the ego, and doing stuff elsewhere in the code that checks if the player has that flag.
No, they can add any kind of flag. All items can have egos, even junk (try DBT module for example). You can add any ability to egos, much like you can add any ability to artifacts.
For example you can add the BLINK_MOVE flag to an hypotethical ego "of blinking" and get a fun mixed-bless weapon.