Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old July 15, 2014, 03:45   #1
riftor_77
Rookie
 
riftor_77's Avatar
 
Join Date: May 2014
Location: 7 floors above a dungeon
Posts: 13
riftor_77 is on a distinguished road
[PosChengband 3.3.4] Changing Weapon Proficiencies

I've been greping and browsing all over the code, but i can't find the array that assigns weapon proficiencies to classes. Where is this array and how do I alter the values?

Thanks.
riftor_77 is offline   Reply With Quote
Old July 15, 2014, 11:39   #2
chris
PosChengband Maintainer
 
Join Date: Jan 2008
Posts: 702
chris is on a distinguished road
Quote:
Originally Posted by riftor_77 View Post
I've been greping and browsing all over the code, but i can't find the array that assigns weapon proficiencies to classes. Where is this array and how do I alter the values?

Thanks.
Skills are set in a text file: lib/edit/s_info.txt. This file is read by init_s_info() which is called by init_angband().
chris is offline   Reply With Quote
Old July 22, 2014, 05:11   #3
riftor_77
Rookie
 
riftor_77's Avatar
 
Join Date: May 2014
Location: 7 floors above a dungeon
Posts: 13
riftor_77 is on a distinguished road
*Bangs self on head and completely forgets about Lua scripting*

Thanks. I have another question: The following weapon proficiency list contains many uncommented svals. Are these actual weapons, or something else entirely?

Code:
### RANGER ###
N:4
# Bow
W:0:0:0:4  # 0
W:0:1:0:4  # 
W:0:2:0:3  # SLING
W:0:3:0:4  # 
W:0:4:0:4  # 
W:0:5:0:4  # 
W:0:6:0:4  # 
W:0:7:0:4  # 
W:0:8:0:4  # 
W:0:9:0:4  # 
W:0:10:0:4  # 10
W:0:11:0:4  # 
W:0:12:1:4  # SHORT_BOW
W:0:13:1:4  # LONG_BOW
W:0:14:0:4  # 

etc...
Thanks.
riftor_77 is offline   Reply With Quote
Old July 22, 2014, 10:21   #4
chris
PosChengband Maintainer
 
Join Date: Jan 2008
Posts: 702
chris is on a distinguished road
(There is no lua scripting in poscheng).

You can get svals from defines.h. I would not rely on all of them being commented in s_info.txt. Also, some of the comments are japanese so it is hard to know what they mean without digging in other files. As for the extra svals, I would guess that they were added in case of future weapon additions to make sure baseline skill settings are initialized. This is actually pretty considerate (though I can think of better ways to do this). After all, what maintainer who adds a cool new weapon is going to even know about the cryptic s_info.txt file? What maintainer would be pleased with having to dance through a 15,000 line pref file adding new cryptic info lines for the new type?

As an aside, if you're curious about the whacky bow svals, the old code (and I mean ancient code) used to encode the shooter's multiplier in the sval. You could recover the multiplier with sval % 10. Neat, huh?
chris 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
[PosChengband 3.3.4] How many weapon proficencies can I max out? riftor_77 Variants 3 June 25, 2014 12:17
changing command settings help bryony80 Vanilla 3 February 25, 2013 18:26
Changing the edit files CunningGabe Idle chatter 7 April 4, 2012 17:23
Changing the level cap to 30 Derakon Variants 8 July 22, 2011 17:32
Changing colors of uniques Donald Jonker Development 4 June 27, 2009 20:00


All times are GMT +1. The time now is 00:13.


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