Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old October 18, 2011, 21:08   #171
s0be
Apprentice
 
Join Date: Jan 2008
Posts: 96
s0be is on a distinguished road
Quote:
Originally Posted by s0be View Post
The borg is confused about everburning lanters again:

# Waiting for 'Lantern (Everburning)' to Recharge.
& Key <R>
& Key <7>
& Key <5>
& Key <?>
and a save for good measure
Attached Files
File Type: zip save.zip (29.6 KB, 33 views)
s0be is offline   Reply With Quote
Old October 19, 2011, 14:13   #172
s0be
Apprentice
 
Join Date: Jan 2008
Posts: 96
s0be is on a distinguished road
Your latest version introduces itoa, which is not part of the stdlib on linux. A simple workaround is to use:

Code:
char *itoa(long i, char* s, int dummy_radix) {^M
    sprintf(s, "%ld", i);^M
    return s;^M
}
which works in this case as you're only using base 10.
s0be is offline   Reply With Quote
Old October 21, 2011, 14:39   #173
fizzix
Prophet
 
Join Date: Aug 2009
Location: Madison, Wisconsin, US
Posts: 3,020
fizzix is on a distinguished road
So I've lately found myself staring at the borg instead of staring at my thesis defense. Which is probably a bad plan, but much more entertaining.

Anyway, I've been paying a lot of attention to it's inventory management, and I have some questions and possible improvements.

It seems that the borg fills up all the free slots of his inventory with random things it finds in the dungeon and then deletes the last entry. This often means that my warrior will be carrying around a magic and priest beginner's handbook and will chuck the broad sword of acid.

Easiest solution would be to delete the *first* item in the inventory it doesn't care about. Which would be spellbooks and then mushrooms, things that cell for very little money. A harder solution would be to estimate the cost of the items, and chuck the thing that sells for the least.

More on mushrooms. The borg seems to love gathering useless and useful mushrooms and then selling them to the BM for 5 gold. This is bad not only for the reason mentioned above, but also because it blocks better stuff from appearing in the BM by taking up its inventory spaces. A better solution would actually be to buy cheap things in the BM and chuck them, freeing up spaces. This might be hard to code though, so the interim solution would be to throw away all useless mushrooms on sight and never sell anything to the BM.

The borg warrior picked up a second rod of door/stairs location and promptly sold it. It's probably a good idea to keep two of each utility rods to protect from electrical damage.

The borg doesn't seem to consider Deep Descent scrolls as a means of escape, when it really is one of the most useful means of escape. Maybe that's a good thing though, considering how squeamish it is about running away.

I may actually get around to looking at the code at some point. But just wanted to share my thoughts. Thanks for the amazing product!
fizzix is offline   Reply With Quote
Old October 21, 2011, 14:43   #174
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by fizzix View Post
Easiest solution would be to delete the *first* item in the inventory it doesn't care about. Which would be spellbooks and then mushrooms, things that cell for very little money. A harder solution would be to estimate the cost of the items, and chuck the thing that sells for the least.
Is the borg allowed to cheat? If so it could just call object_value_real() and know which was least valuable. Or it could call object_value() and use only the info it knows about the item.
__________________
"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 October 23, 2011, 04:36   #175
APWhite
Adept
 
APWhite's Avatar
 
Join Date: Jul 2007
Location: St George Utah, USA
Posts: 244
APWhite is on a distinguished road
Quote:
Originally Posted by Magnate View Post
Is the borg allowed to cheat? If so it could just call object_value_real() and know which was least valuable. Or it could call object_value() and use only the info it knows about the item.

The borg is able to correctly estimate the value of an item. If the item is known, or ID'd then he is very accurate in predicting the value. Unknown and unid'd items have a general value of 1gp.
APWhite is offline   Reply With Quote
Old October 23, 2011, 04:49   #176
APWhite
Adept
 
APWhite's Avatar
 
Join Date: Jul 2007
Location: St George Utah, USA
Posts: 244
APWhite is on a distinguished road
Quote:
Originally Posted by fizzix View Post
So I've lately found myself staring at the borg instead of staring at my thesis defense. Which is probably a bad plan, but much more entertaining.

Anyway, I've been paying a lot of attention to it's inventory management, and I have some questions and possible improvements.

It seems that the borg fills up all the free slots of his inventory with random things it finds in the dungeon and then deletes the last entry. This often means that my warrior will be carrying around a magic and priest beginner's handbook and will chuck the broad sword of acid.

Easiest solution would be to delete the *first* item in the inventory it doesn't care about. Which would be spellbooks and then mushrooms, things that cell for very little money. A harder solution would be to estimate the cost of the items, and chuck the thing that sells for the least.

What you are describing is in borg7.c in borg_crush_junk(). It will sort the inventory and crush the inventory slot which hold the least value. Only I found a mistake in there today after reviewing your post. The warrior borgs were not correctly crushing the first spellbook (it had an inventory index of zero-- same as swap armor.)

The borg_crush_junk() was based on depth not on clevel, so in theory a clevel 50 borg on depth 1 would keep daggers. I modified the routine so that the borg will also consider his clevel when looking at what objects he should crush.


Quote:
Originally Posted by fizzix View Post
More on mushrooms. The borg seems to love gathering useless and useful mushrooms and then selling them to the BM for 5 gold. This is bad not only for the reason mentioned above, but also because it blocks better stuff from appearing in the BM by taking up its inventory spaces. A better solution would actually be to buy cheap things in the BM and chuck them, freeing up spaces. This might be hard to code though, so the interim solution would be to throw away all useless mushrooms on sight and never sell anything to the BM.
I have thought about doing a BM buy-out a few times. He has plenty of money by the time he's about clevel 37. It is not very hard to program, actually. I could get it done in about 2 hours of work. I haven't done so because I have never really found it to be that advantageous. I have only found stat potions to be the only BM ware of any interest. Now, if randarts showed up in the BM, that would be cool. Do you guys buy-out the BM and if so, what types of things do you look for?

Quote:
Originally Posted by fizzix View Post
The borg warrior picked up a second rod of door/stairs location and promptly sold it. It's probably a good idea to keep two of each utility rods to protect from electrical damage.
Ya, that is not hard to do. It's probably a good idea to carry to Rods of Recall as well.
APWhite is offline   Reply With Quote
Old October 27, 2011, 14:23   #177
s0be
Apprentice
 
Join Date: Jan 2008
Posts: 96
s0be is on a distinguished road
In your latest update, there's an error in borg5.c

This:

Code:
    /* Note (r_info[kill->r_idx].name)*/
        borg_note(format("# Creating a monster '%s' at (%d,%d), HP: %d, Time: %d, Index: %d, Danger: %d",
                     (r_info[kill->r_idx].name),
                     kill->y, kill->x, kill->power, kill->when, kill->r_idx), p);
should be:

Code:
    /* Note (r_info[kill->r_idx].name)*/
        borg_note(format("# Creating a monster '%s' at (%d,%d), HP: %d, Time: %d, Index: %d, Danger: %d",
                     (r_info[kill->r_idx].name),
                     kill->y, kill->x, kill->power, kill->when, kill->r_idx, p));
line 1690 (final ')' for format is too early)
s0be is offline   Reply With Quote
Old October 27, 2011, 15:03   #178
fizzix
Prophet
 
Join Date: Aug 2009
Location: Madison, Wisconsin, US
Posts: 3,020
fizzix is on a distinguished road
Quote:
Originally Posted by APWhite View Post
I have thought about doing a BM buy-out a few times. He has plenty of money by the time he's about clevel 37. It is not very hard to program, actually. I could get it done in about 2 hours of work. I haven't done so because I have never really found it to be that advantageous. I have only found stat potions to be the only BM ware of any interest. Now, if randarts showed up in the BM, that would be cool. Do you guys buy-out the BM and if so, what types of things do you look for?
If I'm going for a speedy game I will use excess cash to buy out cheap slots in the BM so that something more useful (usually hoping for consumables) will get stocked there. I don't think it's worthwhile for the borg to do that. However, it shouldn't sell things to the BM unless there is a lot of money to be made (which is nigh impossible.)
fizzix is offline   Reply With Quote
Old November 1, 2011, 14:47   #179
Tobias
Adept
 
Tobias's Avatar
 
Join Date: Dec 2009
Posts: 172
Tobias is on a distinguished road
With this char the borg stops working immediately after starting. Borg version 31.oct.
Attached Files
File Type: zip Saver.zip (49.6 KB, 34 views)
__________________
My Angband videos : http://www.youtube.com/view_play_lis...385E85F31166B2
Tobias is offline   Reply With Quote
Old November 2, 2011, 03:45   #180
APWhite
Adept
 
APWhite's Avatar
 
Join Date: Jul 2007
Location: St George Utah, USA
Posts: 244
APWhite is on a distinguished road
Quote:
Originally Posted by Tobias View Post
With this char the borg stops working immediately after starting. Borg version 31.oct.
Thanks, I forgot to check for identification in the new borg_equips_item() The bubbling potion in the inventory is a !Hero and he thinks he is allowed to use it.

I got it fixed and will upload right away.
APWhite 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
(not) running into molds half Vanilla 12 May 24, 2009 09:04
Re-thinking running (away) buzzkill Development 2 March 8, 2009 08:42
3.1 running bug Faust Vanilla 0 January 11, 2009 16:16
Disturbs when running. Zero Vanilla 1 June 19, 2008 16:30
Anyone running the nightlies... takkaria Vanilla 3 July 13, 2007 16:54


All times are GMT +1. The time now is 12:10.


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