Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old September 16, 2011, 23:14   #1
redrobert
Scout
 
Join Date: Sep 2011
Posts: 29
redrobert is on a distinguished road
Vanilla Angband editing

Hello, now that i can actually compile Angband Vanilla i have a few questions:

is there an object flag that increases your spell points ... same with hit points. either an absolute number or lik 1 HP per level would be fine

if not, is there an easy way to make such a flag?

another thing ... i liked in z+ that i can throw poison potion for some nice low-level damage. is that possible in Vanilla also? It's similar to the oil flasks

damage multipliers of crossbows ... is it enough if i add a line in tvalsval.c

i think i will remember more questions in a while

thanks for your help
redrobert is offline   Reply With Quote
Old September 16, 2011, 23:26   #2
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,024
Derakon is on a distinguished road
There's no flag to directly affect HP/SP in Vanilla. I've added flags in the past; IIRC I just followed an existing flag around through the code to make certain my new one was in all the right places, then also found the bit of code I wanted the flag to modify (In your case, wherever maximum HP/SP is calculated).

Item damage is in object.txt. Take a look at the oil flask to see how it works.

No idea on the launcher multipliers, sorry.
Derakon is offline   Reply With Quote
Old September 16, 2011, 23:45   #3
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Quote:
Originally Posted by redrobert View Post
Hello, now that i can actually compile Angband Vanilla i have a few questions:

is there an object flag that increases your spell points ... same with hit points. either an absolute number or lik 1 HP per level would be fine
It's not what you are asking for, but the traditional answer is to put on an int and wis or con bonus on the item. That has the desired effect, but only in a particular range [like above 18/50 but below max].

If you want that sort of change to affect early players more, you could join the crowd asking for a linear stat system. The louder more people shout the sooner it may happen.

If you want a boost over what you get from maximum spellstat or con, you need a new flag. [You don't need to tax your imagination to forsee that I will complain that you are further tilting already broken game balance.] The most important place to modify the code after you manage to add a new flag is in the block of code where attributes are computed, which used to be in src/xtra1.c and I don't know where it is now. Grepping/searching for mhp should show you where to look, probably in the player subdirectory.
PowerDiver is offline   Reply With Quote
Old September 17, 2011, 00:05   #4
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
As the others have said, there's no flag that directly increases hp or sp - but yes there is an easy way to make one. Add it to src/object/list-object-flags.h and then add the code to parse it in the functions calc_hitpoints() or calc_mana() in src/player/calcs.c.

Thrown potions don't do much damage in V, but you can edit the damage they do in lib/edit/object.txt (poison does 3d4).

Launcher mults are sval-dependent, so you'll need to add an sval to tvalsval.h for each new launcher you want to create (or change the svals of existing launchers if you want to change the mult). The mult is the last digit of the sval (but don't use svals over 99 or things will break - I am not sure if we reliably use % 10).
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old September 17, 2011, 09:16   #5
redrobert
Scout
 
Join Date: Sep 2011
Posts: 29
redrobert is on a distinguished road
maybe i should give the poison potion a brand_pois flag.

thanks for the help, i will try a few things out :-)
redrobert is offline   Reply With Quote
Old September 17, 2011, 23:14   #6
redrobert
Scout
 
Join Date: Sep 2011
Posts: 29
redrobert is on a distinguished road
Quote:
if (p_ptr->state.flags[OF_SP]) b->sp_bonus = _ptr->pval[which_pval(o_ptr, OF_SP)];
msp += p_ptr->sp_bonus * levels;

do i have a mistake in this bit of code?
redrobert is offline   Reply With Quote
Old September 17, 2011, 23:19   #7
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by redrobert View Post
do i have a mistake in this bit of code?
Yes - you're missing the o of o_ptr ... you're also assigning the bonus to b->sp_bonus, but then adding something called p_ptr->sp_bonus, which is not the same thing.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old September 17, 2011, 23:32   #8
redrobert
Scout
 
Join Date: Sep 2011
Posts: 29
redrobert is on a distinguished road
Quote:
msp += b->sp_bonus * levels;
it this better?
redrobert is offline   Reply With Quote
Old September 17, 2011, 23:32   #9
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by redrobert View Post
it this better?
Yes, that should be fine.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old September 17, 2011, 23:35   #10
redrobert
Scout
 
Join Date: Sep 2011
Posts: 29
redrobert is on a distinguished road
so one task after the other should be allright
redrobert 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
Compile error - latest Vanilla Angband SVN PaulBlay Development 3 April 19, 2009 21:20
Crazy idea - Angband Vanilla as a ToME Module PaulBlay Variants 0 February 16, 2009 14:47
Misc editing/changing Angband gameplay AirBreather Variants 7 August 19, 2008 06:53
compiling vanilla angband on msvc++ 9 express hugh Vanilla 6 March 17, 2008 15:49
Review: Vanilla Angband TJA Variants 24 August 23, 2007 23:30


All times are GMT +1. The time now is 14:28.


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