Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   Adding Oangband magic realms/spellbooks. What changes do I need to make? (http://angband.oook.cz/forum/showthread.php?t=7899)

Elfin Jedi July 9, 2016 04:02

Adding Oangband magic realms/spellbooks. What changes do I need to make?
 
I am trying to add the nature and necromancy magic realms from Oangband to 4.0.4.

So far I have successfully added the new classes (druid, necromancer, assassin) by giving them clones of the mage and rogue spell sets, and added nature and necromancy spellbooks to object_base.

However it doesn't like it when I add the spellbooks to the object file (it gets a parse error, I don't see any problems with what I have entered so far).

I managed to get the code to compile, added the nature and necromancy realms to list-magic-realms.h and successfully recompiled. And now I have added nature books and necromancy books to obj-tval.c (which it is not happy about). What else do I need to do to get it to accept spellbooks as objects?

AnonymousHero July 9, 2016 04:37

Are you sure you shouldn't just be playing FAAngband? (Given the classes you've added.)

Nick July 9, 2016 04:39

Awesome, this is the sort of thing I wanted to enable :)

You will need to add nature and necromancy books to list-tvals.h, if you haven't already - let me know how it goes.

Carnivean July 9, 2016 04:50

Are realms even a necessary construct at this point? (From a technical standpoint, not a UI one)

You can create a spell from the effects of other spells from either realm in the spell list. Mages can have priest spells in their list (and vice versa) simply by copying the effects from the appropriate spell.

Elfin Jedi July 9, 2016 07:40

Quote:

Originally Posted by AnonymousHero (Post 111656)
Are you sure you shouldn't just be playing FAAngband? (Given the classes you've added.)

Actually, I want to make other changes besides just the magic/class system. I am adding monsters and races from Unangband, hopefully terrain eventually too, and races from Eyangband. And eventually I would like to make it so you can choose between a Poschengband race(? might try to combine the 2 systems)/class/magic system and the other one at character creation.

Ok, now it launches and functions ok, except that it doesn't display the name of the spellbook in my inventory list. There is instead a blank entry for a) which can be browsed or cast from normally.

takkaria July 9, 2016 14:53

Quote:

Originally Posted by Elfin Jedi (Post 111662)
Actually, I want to make other changes besides just the magic/class system. I am adding monsters and races from Unangband, hopefully terrain eventually too, and races from Eyangband. And eventually I would like to make it so you can choose between a Poschengband race(? might try to combine the 2 systems)/class/magic system and the other one at character creation.

Ok, now it launches and functions ok, except that it doesn't display the name of the spellbook in my inventory list. There is instead a blank entry for a) which can be browsed or cast from normally.

You need to add a couple of case statements to obj_desc_get_basename() in obj-desc.c to get the names to show up.

Pete Mack July 9, 2016 14:57

Hmm. Looks like (at least) two files need to be fixed so they use object-base.txt.
This one, and ui-knowledge.c

Quote:

Originally Posted by takkaria (Post 111671)
You need to add a couple of case statements to obj_desc_get_basename() in obj-desc.c to get the names to show up.


Elfin Jedi July 9, 2016 15:45

How do I fix ui-knowledge.c?

Pete Mack July 9, 2016 18:08

Add your base type to the monster_group array at line ~1058.

Elfin Jedi July 9, 2016 19:48

Ok, I updated obj-desc.c and ui-knowledge.c (both monsters and objects). The spellbooks still don't display in inventory list. What am I missing?

Also, rebalancing monsters still crashes.

By the way I started a github account: Elfin-Jedi. It might still be a bit of a mess.


All times are GMT +1. The time now is 22:43.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.