Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old February 27, 2015, 22:36   #1
Therem Harth
Knight
 
Therem Harth's Avatar
 
Join Date: Jan 2008
Location: New England winter
Posts: 921
Therem Harth is on a distinguished road
Magic and edit files after the restructure

Because I have to ask: post-restructure, will the spell info in p_class.txt still look like this?

Code:
B:0:1:1:30:4
B:1:2:2:35:4
B:2:3:3:35:4
B:3:5:3:15:4
B:4:5:4:35:4
B:5:7:5:40:3
B:6:7:5:40:3
B:7:9:7:40:3
B:8:9:7:40:3
B:9:9:8:40:3
B:10:11:9:40:3
B:11:11:10:45:3
B:12:11:10:45:3
B:13:13:10:45:3
B:14:13:11:45:4
B:15:15:13:45:4
B:16:15:15:50:4
B:17:17:15:50:4
B:18:17:15:50:4
B:19:19:15:50:4
B:20:19:15:50:4
B:21:21:17:50:3
B:22:23:17:50:3
B:23:25:20:50:3
B:24:27:21:50:3
B:25:29:22:50:3
B:26:31:24:60:3
B:27:33:28:60:3
B:28:35:32:70:4
B:29:99:0:0:0
B:30:99:0:0:0
B:31:5:5:50:1
B:32:15:15:80:12
B:33:25:25:80:16
B:34:30:15:80:135
B:35:99:0:0:0
B:36:17:15:50:25
B:37:23:25:60:35
B:38:99:0:0:0
B:39:45:80:90:250
B:40:99:0:0:0
B:41:20:13:70:20
B:42:99:0:0:0
B:43:30:35:80:200
B:44:40:40:80:100
B:45:99:0:0:0
B:46:10:16:50:20
B:47:25:30:80:15
B:48:99:0:0:0
B:49:40:70:80:200
B:50:42:80:85:250
B:51:47:95:85:250
B:52:7:7:50:2
B:53:20:20:50:4
B:54:25:25:80:12
B:55:35:50:75:115
B:56:40:60:75:10
B:57:99:0:0:0
B:58:99:0:0:0
B:59:99:0:0:0
B:60:99:0:0:0
B:61:99:0:0:0
B:62:99:0:0:0
B:63:99:0:0:0
Because that was probably half the reason I removed the Mage/Priest system in Neoband, instead of adding to it. And now that I want to build on the book system instead, the above is making my eyes bleed.

I know moving stuff to edit files is supposed to be good, but personally I would rather see things like class-based spell prohibitions hardcoded, even if it means cheesy hacks. Anyone with a rudimentary knowledge of programming can deal with hackish hardcoded stuff, as long as the coding style is reasonable. The edit file format OTOH still gives me problems after ~10 years of mucking around with Angband.
Therem Harth is offline   Reply With Quote
Old February 27, 2015, 23:26   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,849
Donated: $60
Nick will become famous soon enough
Here's a sample book:

Code:
book:prayer book:[Words of Wisdom]:7:2

spell:Scare Monster:5:4:29:3
effect:BOLT_AWARE:TURN_ALL
dice:$B
expr:B:PLAYER_LEVEL:+ 0
desc:Attempts to scare a single monster for a level-dependant duration.
desc:  Uniques and monsters that resist fear are not affected.

spell:Portal:5:4:30:4
effect:TELEPORT
dice:$B
expr:B:PLAYER_LEVEL:* 3
desc:Teleports you randomly over a short distance.

spell:Cure Serious Wounds:5:4:32:4
effect:HEAL_HP
dice:25+m20
effect:CURE:BLIND
effect:CURE:CUT
effect:CURE:CONFUSED
desc:Cures 20% of your wounds (min 25hp) and heals all cut damage.

spell:Chant:5:5:34:4
effect:TIMED_INC:BLESSED
dice:24+d24
desc:Blesses you, giving a bonus of +5 to AC and +10 to-hit, for 24+1d24
desc: turns.

spell:Sanctuary:7:5:36:3
effect:TOUCH_AWARE:OLD_SLEEP
dice:$B
expr:B:PLAYER_LEVEL:+ 0
desc:Attempts to put to sleep each monster directly adjacent to you.
desc:  Uniques and monsters that resist sleep are not affected.

spell:Satisfy Hunger:7:5:38:4
effect:SET_NOURISH
dice:16999
desc:Magically renders you well-fed (but not satiated).
desc:  This will also cure a bloated stomach.
## get rid of remove_curse in 3.4 until curses are redone
#spell:Remove Curse:7:6:38:5
#effect:REMOVE_CURSE
#D:Removes all ordinary curses from all equipped items.
#D:  Heavy or permanent curses are not affected.

spell:Resist Heat and Cold:7:7:38:5
effect:TIMED_INC:OPP_COLD
dice:10+d10
effect:TIMED_INC:OPP_FIRE
dice:10+d10
desc:Gives you temporary resistance to cold and fire, for 10+1d10 turns each.
and restruct has been merged into master branch now, so you can see them all here.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old February 28, 2015, 00:52   #3
Therem Harth
Knight
 
Therem Harth's Avatar
 
Join Date: Jan 2008
Location: New England winter
Posts: 921
Therem Harth is on a distinguished road
Wow, thanks! That's a lot better. I suppose it makes sense for Vanilla...

OTOH it still looks very verbose to me, for when new classes are wanted. So minimize tedium, I will probably continue avoiding the book-based magic system.
Therem Harth is offline   Reply With Quote
Old February 28, 2015, 02:00   #4
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,849
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by Therem Harth View Post
OTOH it still looks very verbose to me, for when new classes are wanted.
Well, it has also replaced spell.txt, and all the stuff that was in x-spell.c. There is now no dedicated spell code at all, just references to effects (as seen in effects.c). This has been a big change that has unified all magical effects, and pushed a huge amount of the game control out to the edit files. In fact, creating a new class is pretty much *only* a matter of editing that file.

It is a lot to take in
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old March 2, 2015, 13:13   #5
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,666
PowerWyrm is on a distinguished road
This will be fun when I'll have to port the 11 magic realms of PWMAngband
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old March 5, 2015, 22:09   #6
Therem Harth
Knight
 
Therem Harth's Avatar
 
Join Date: Jan 2008
Location: New England winter
Posts: 921
Therem Harth is on a distinguished road
Quote:
Originally Posted by Nick View Post
Well, it has also replaced spell.txt, and all the stuff that was in x-spell.c. There is now no dedicated spell code at all, just references to effects (as seen in effects.c). This has been a big change that has unified all magical effects, and pushed a huge amount of the game control out to the edit files. In fact, creating a new class is pretty much *only* a matter of editing that file.

It is a lot to take in
That sounds really great in general, just not for my purposes; I would rather tack on content as code. Partly because that's how I've been learning to program...
Therem Harth is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the edit files CunningGabe Idle chatter 7 April 4, 2012 18:23
update edit files on oook fizzix Oook! 3 July 16, 2010 17:34
edit files? tummychow Vanilla 2 September 13, 2009 21:38
Editing lib/edit files moonsdad Vanilla 0 November 9, 2008 11:48
Changes to lib/edit files Iemortal Vanilla 1 September 23, 2007 06:26


All times are GMT +1. The time now is 20:31.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.