Ok that sounds useful. So I can make it crash with the Memory moss and see where it was in the code.
Adding Oangband magic realms/spellbooks. What changes do I need to make?
Collapse
X
-
-
Updated github:
Though now I am worried about this (from mon-util.c):
/* Handle "invisible" monsters */
if (rf_has(mon->race->flags, RF_INVISIBLE) || mon->m_timed[MON_TMD_INVISIBLE]) {
/* See invisible */
if (player_of_has(player, OF_SEE_INVIS))
{
/* Easy to see */
easy = flag = TRUE;
}
That is looking for "mon->m_timed[MON_TMD_INVISIBLE]" under race flags (rf_has) isn't it?
Edit: I've never tested whether see invisible lets me see an invisible Memory moss...
Edit:It works perfectly, saw Memory moss until it wore off, then couldn't see it anymore; but now I am really suspicious of the invisibility effect end timer (because 2 moves later it crashed).Last edited by Elfin Jedi; July 18, 2016, 22:31.Comment
-
Yes . Instructions are (replace Makefile.win with your makefile name in the following)
# remove build files:
make -f Makefile.win clean
#Update Makefile.win , replace instance of -O2 with -g
# rebuild
make -f makefile.win
# cd to parent directory
cd ..
# run gdb on executable file. This is again platform dependent
gdb ./angband.exe
> run
# examine stack
> where
# go to stack frame that crashed (for example. 12)
> frame 12
# list code to see exact position
> list
All this assumes you are in a unix-like environment, with the compiler tools in your path.Comment
-
Signal received: SIGSEGV (Segmentation fault)
For program angband.exe, pid 25,740
Do I discard it or forward it?
Edit: Discarded and paused, crashed on the line the arrow is pointing to (mon-spell.c):
/* Tell the player what's going on */
disturb(player, 1);
---> spell_message(mon, spell, seen, hits);
Edit: It's crashing because the player doesn't see either a spell cast or possibly the timer running out, isn't it?Comment
-
Apparently the crash was because I didn't give the INVISIBLE spell a message for when it was cast by an invisible monster. I guess those are necessary.
Everything works now, except Detect Monsters still detects it.
And I don't know if the Memory moss can become visible again yet because it keeps casting INVISIBLE while still invisible, I think I will turn down the spell-freq.Comment
-
Apparently the crash was because I didn't give the INVISIBLE spell a message for when it was cast by an invisible monster. I guess those are necessary.
Everything works now, except Detect Monsters still detects it.
And I don't know if the Memory moss can become visible again yet because it keeps casting INVISIBLE while still invisible, I think I will turn down the spell-freq.takkaria whispers something about options. -more-Comment
-
Ok, I started working on my project again last month after a 7 month break.
Now I am trying to figure out how to add confusion breaths for giant bronze dragon flies from Unangband. They added fine to my 3.5.0-based version a long time ago, but the code has changed a lot since then. I am currently stuck at line 84 in effects.c (4.0.5 release): "#define ELEM(a, b, c, d, e, f, g, h, i, col) { c, i }," .
I already edited monster_spell.txt, list-mon-spells.h, and list-elements.h, but the effects.c error is too confusing for me. It specifically doesn't like something about the "i" in the "{ c, i }". If I remove the i, it complains about the "500" I put under the cap section in list-elements.h.
I will want to add fear breaths too, so any extra insight that would help me understand how to avoid errors when adding that would be useful too. Thanks!Comment
-
Comment
-
Not likely; status effects can't deal damage. I'd suggest looking at how the sound element is implemented; you'll want something similar for confusion, except that you'd check for confusion protection both for the status effect prevention and for the damage reduction. Basically wherever you see logic dealing with sound, you should add similar logic for dealing with confusion, but replace P_STUN and R_SOUND with P_CONF. The names might not be exactly those; it's been awhile since I dug into the code for elements/statuses.Comment
-
Adding an extra element should not be too hard. Off the top of my head you would need to (as Derakon said) mimic SOUND in list-elements.h and in all the project-*.c files, which is where all the code for dealing with the effects of elements on monsters, player, objects and terrain is.
Edit: It might break details like the resist panel in the character screen, and graphics, too, but you can always come back an fix those when you have it basically working.One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.Comment
-
Thanks! Now how do I add it to/interpret this? It is the same sequence as in effects.c.
project-feat.c:578:47: error: 'project_feature_handler_CONF' undeclared here (not in a function)
#define ELEM(a, b, c, d, e, f, g, h, i, col) project_feature_handler_##a,Comment
-
You need to write it, in a similar way as the one for SOUND:
static void project_feature_handler_SOUND(project_feature_hand ler_context_t *context)
....
You can probably get by with a pure copy of it. (Compare to the ones for DARK and LIGHT to see what kinds of things need to go here.) Damage and side effects to player or monster go elsewhere. You need to write some of that too.Comment
-
Oops, my bad. I thought the error was in the macro. It was because I hadn't edited the context yet.
I have my semi-variant named now btw. It is still incomplete, and a long way from a release, but I find it interesting to play.Comment
-
How do I change the default preferences for tilesets? Right now I have to turn the graphics off every time I redownload from github, because of the monsters and terrain I've added.
I have the Giant bronze dragon flies breathing confusion properly now.
And how do I add a TIMED_DEC:CUT message for the FAangband spell "Reduce Cuts and Poison"?Last edited by Elfin Jedi; April 12, 2017, 22:53.Comment
Comment