Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old January 20, 2020, 05:43   #1
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
Throw vs Fire

I'm using the original command set.

I found a throwable weapon and was practicing with it. I noticed that when I do 'f' command it prompts "Fire which ammunition?" and puts up my quiver contents as the list to choose from. All well and good.

But the 'v' command isn't working as I expected. The Rephial.org doc says:

Quote:
Throw an item ('v')
You may throw any object carried by your character. Depending on the weight, it may travel across the room or drop down beside you. Only one object from a pile will be thrown at a time. Note that throwing an object will often cause it to break, so be careful! If you throw something at a creature, your chances of hitting it are determined by your plusses to hit, your ability at throwing, and the object's plusses to hit. Once the creature is hit, the object may or may not do any damage to it. Note that flasks of oil will do some fire damage to a monster on impact. If you are wielding a missile launcher compatible with the object you are throwing, then you automatically use the launcher to fire the missile with much higher range, accuracy, and damage, than you would get by just throwing the missile. Throw, like fire, requires a direction. Targeting mode (see the next command) can be invoked with '*' at the 'Direction?' prompt. This command takes some energy.
So from that I'd expect 'v' to put up a list of my inventory, not my quiver. Ideally the items it makes sense to throw, but perhaps just the whole inventory, since you can throw anything whether it makes senses or not (throw an orc a slice of meat?) But rather than show inventory, the 'v' command also puts up the quiver, albeit with a different prompt "Throw which item?" and the prompt has an option, '/', to list the inventory - an option missing with the 'f' command.

So these commands aren't just aliases, but the 'v' doesn't seem to be particularly well tailored to what it seems to exist for, throwing weapons or flasks of oil and such.

I tried inscribing my throwing weapon with @v0, but when I type v0 it throws or fires my ammunition which is inscribed with @f0. That was also unexpected. Since the implementation of these commands isn't treating them as aliases, it seems the macro processor should be able to distinguish also.
eastwind is offline   Reply With Quote
Old January 20, 2020, 12:09   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,969
Donated: $60
Nick will become famous soon enough
You would get an inventory prompt for the fire command if there was any ammo in the inventory; that only happens when the quiver fills up, though.

The inscription thing is certainly a bug, and throw should probably start on the inventory - unless we bring in the feature that some variants have where throwing weapons can go in the quiver.
__________________
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 January 20, 2020, 12:30   #3
Werbaer
Adept
 
Join Date: Aug 2014
Posts: 126
Werbaer is on a distinguished road
Quote:
Originally Posted by eastwind View Post
So these commands aren't just aliases, but the 'v' doesn't seem to be particularly well tailored to what it seems to exist for, throwing weapons or flasks of oil and such.
Early in the game, it's can also be effective to throw ammunition by hand. Example: You have an unenchanted sling and pebbles (or no lauchner), but find some excellent arrow or bolts.

(i also use throwing sometimes to throw some staffs into a save corner when large fire breathers approach)
Werbaer is offline   Reply With Quote
Old January 21, 2020, 18:08   #4
luneya
Swordsman
 
Join Date: Aug 2015
Posts: 258
luneya is on a distinguished road
Quote:
Originally Posted by Werbaer View Post
Early in the game, it's can also be effective to throw ammunition by hand. Example: You have an unenchanted sling and pebbles (or no lauchner), but find some excellent arrow or bolts.

(i also use throwing sometimes to throw some staffs into a save corner when large fire breathers approach)
Yes, but it's far more common to throw weapons or flasks of oil rather than ammo. The throw prompt should default to throwing from inventory and allow you to page over to throw from quiver if needed, rather than working the other way around as it does now.
luneya is offline   Reply With Quote
Old January 21, 2020, 22:05   #5
Ingwe Ingweron
Veteran
 
Join Date: Jan 2009
Location: Manhattan Beach, CA
Posts: 1,858
Ingwe Ingweron is on a distinguished road
Quote:
Originally Posted by luneya View Post
Yes, but it's far more common to throw weapons or flasks of oil rather than ammo. The throw prompt should default to throwing from inventory and allow you to page over to throw from quiver if needed, rather than working the other way around as it does now.
I disagree with your assertion about the relative regularity of throwing weapons or oil versus ammo. In the early game, I almost always throw ammo until a suitable launcher has been found, and after that I often will throw unid ammo if not compatible with my launcher, in order to hopefully identify the unknown rune. I also throw inventory to get it out of the way of likely destruction when meeting certain monsters. It is oil and weapons that I very uncommonly throw.
__________________
“We're more of the love, blood, and rhetoric school. Well, we can do you blood and love without the rhetoric, and we can do you blood and rhetoric without the love, and we can do you all three concurrent or consecutive. But we can't give you love and rhetoric without the blood. Blood is compulsory. They're all blood, you see.”
― Tom Stoppard, Rosencrantz and Guildenstern are Dead
Ingwe Ingweron is offline   Reply With Quote
Old January 21, 2020, 22:46   #6
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,591
Donated: $40
Pete Mack is on a distinguished road
I usually throw flasks of oil--save a stack of 12 for a good target like Bullroarer. They do more damage than thrown ammo. (Really the only ammo you should be able to throw is sling. No way can you throw bolts or arrows.)
Pete Mack is offline   Reply With Quote
Old January 21, 2020, 22:57   #7
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,002
Derakon is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
(Really the only ammo you should be able to throw is sling. No way can you throw bolts or arrows.)
Ehh, it's a fantasy game. If we let people throw swords, we should let them throw arrows. Nobody says it has to be effective, but given that there's no multiplier on the throw, that's already taken care of.
Derakon is offline   Reply With Quote
Old January 22, 2020, 04:47   #8
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
Well, what use really is it to have the 'f' command refuse to do anything if you don't have a launcher?

Why not just eliminate that check and have 'v' default to inventory and 'f' default to quiver, whether you have a launcher or not. If you have a launcher, 'f' or 'v' should use it if you pick something from the quiver, and if you don't have a launcher, or don't pick something from the quiver, they should both throw what you select. Even if it's a spell book.

I think both 'f' and 'v' should have options to switch lists. I.e. 'v' and 'f' are completely the same, except for which list they offer up first.

Now if you want to argue that there should be only one command in the first place, then I'll hear you out, but if we're going to have two commands, why not make them work symmetrically as above?
eastwind is offline   Reply With Quote
Old January 27, 2020, 20:40   #9
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
I debugged into this to see what was going on with the inscription part of it.

do_cmd_throw() in player-attack.c is not setting player->upkeep->command_wrk, so it is zero when textui_get_item() in ui-object.c is called, and is still zero at line 1310 of ui-object.c where the choice is made of which list to display. The code is slightly weird at that point (because each of those cases is setting something that it has just determined is already set and thus doing nothing).

Code:
	if (allow_inven || allow_equip || allow_quiver || allow_floor) {
		/* Start where requested if possible */
		if ((player->upkeep->command_wrk == USE_EQUIP) && allow_equip)
			player->upkeep->command_wrk = USE_EQUIP;
		else if ((player->upkeep->command_wrk == USE_INVEN) && allow_inven)
			player->upkeep->command_wrk = USE_INVEN;
		else if ((player->upkeep->command_wrk == USE_QUIVER) && allow_quiver)
			player->upkeep->command_wrk = USE_QUIVER;
		else if ((player->upkeep->command_wrk == USE_FLOOR) && allow_floor)
			player->upkeep->command_wrk = USE_FLOOR;

		/* If we are obviously using the quiver then start on quiver */
		else if (quiver_tags && allow_quiver)
			player->upkeep->command_wrk = USE_QUIVER;
The code falls into the final case and sets USE_QUIVER.

The quiver is special, in that it picks items with numbers rather than letters. The numbers 0-9 are menu choices, so v0 causes the first item in the quiver to be used, without consideration of inscriptions. This is forced by passing in QUIVER_TAGS in the mode bitfield.

I think the @f0 inscription only works because of a hack: when you inscribe something with @f0 it rearranges the quiver at that time to put that item in slot 0 - rather than the inscription causing the item to be picked at picking time.

I am testing changing two lines in do_cmd_throw(). One line sets player->upkeep->command_wrk to USE_INVEN so that 'v' defaults to presenting the inventory first, and the other is to remove the QUIVER_TAGS flag from the call to cmd_get_item() so that v0 is interpreted as an inscription reference.
eastwind is offline   Reply With Quote
Old February 3, 2020, 02:24   #10
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
I pushed a fix for this a few days ago. I don't think there's a good way to make the @v inscriptions work while also continuing to have 'v' default to the quiver, because the quiver requires 0-n be used for the quiver slots, so the 0-n binds to quiver slots rather than anything inscribed.

So the fix makes the inventory the default for 'v', and you can use @v0 inscriptions and type 'v0' to throw that object out of the inventory. Of course you can still throw object 0 out of the quiver, you just have to type v|0 to switch v from the inventory to the quiver before selecting item 0.
eastwind 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
Saving Throw explained? Grotug Vanilla 3 December 18, 2017 10:44
What should I throw away? Talharim Vanilla 66 September 11, 2015 20:36
What does 100% saving throw mean? TJS Vanilla 3 November 12, 2012 12:46
Saving Throw scud Vanilla 8 July 7, 2011 19:11
what to throw away (and other noob questions) iaindb Vanilla 16 January 15, 2008 19:47


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


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