Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old April 28, 2010, 16:02   #1
ClaytonAguiar
Scout
 
Join Date: May 2009
Posts: 34
ClaytonAguiar is on a distinguished road
Unhappy Orc captain attacking just after game load

Hi,

I was fighting an Orc Captain with my mage. When I was almost dying (just 6 HP), I saved my game. Now, when I load this game, just after the load process, the captain attacks me, and I die.

I think the game should start in "paused" mode. Isn't that right, or a bug? Can I still save this char?

Vanilla official beta from rephial.org (3.1.2v2), downloaded last week. Savegame attached.

Help, please.
Attached Files
File Type: zip Orinegis.zip (12.9 KB, 122 views)
ClaytonAguiar is offline   Reply With Quote
Old April 28, 2010, 16:19   #2
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,047
Derakon is on a distinguished road
Given that you can only save the game when it's your turn, this does sound like a bug; it should still be your turn when you load the game.
Derakon is offline   Reply With Quote
Old April 28, 2010, 19:22   #3
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Quote:
Originally Posted by ClaytonAguiar View Post
I think the game should start in "paused" mode. Isn't that right, or a bug? Can I still save this char?
Can you compile the source yourself? Then it is easy. Otherwise, you could get someone to hack the savefile so that the adjacent orc captain has less energy.

The problem is that in an attempt to give you the first move, someone took it away. At around line 1400 in src/dungeon.c it reads

Code:
        /* Player gets to go first */
        p_ptr->energy = 100;
Unfortunately, you and the orc captain both have energy over 100, so that costs you the move. I think the idea of putting something like that there is a mistake, but I don't know that part of the code well enough to suggest removing it. If you could change it and recompile, you would get your turn with

Code:
       /* Player gets to go first */
        if (p_ptr->energy < 100)
                p_ptr->energy = 100;
I think it is a bit more complicated for someone to fix an official release as opposed to adding the fix to the nightlies, so it may be a while before there is a 3.1.2.v3.
PowerDiver is offline   Reply With Quote
Old April 29, 2010, 04:09   #4
ClaytonAguiar
Scout
 
Join Date: May 2009
Posts: 34
ClaytonAguiar is on a distinguished road
Compilation problem

Hi,

I downloaded the source from the Download tab in this forum. Followed the instructions in http://rephial.org/wiki/Compiling using Dev C++ for Windows, targeting a Windows environment. I had to remove the Nintendo DS stuff, and everything seems to compile ok. But the angband.exe had no "main menu". So, I saw a "Click file menu" message and no menu at all.

Which of the "compiling instructions" is 100% safe for the windows port using dev c++? I have to compile WITH or WITHOUT the stl references?

Thanks in advance.
ClaytonAguiar is offline   Reply With Quote
Old April 29, 2010, 04:23   #5
ClaytonAguiar
Scout
 
Join Date: May 2009
Posts: 34
ClaytonAguiar is on a distinguished road
MinGW ok

Hi,

The compilation using MinGW worked flawlessly. I think the Dev C++ issue is related to the lack of "make" support using the supplied makefile.win.

I'm still curious how to compile angband with Dev C++. :-)
ClaytonAguiar is offline   Reply With Quote
Old April 29, 2010, 05:03   #6
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
If you are having problems, I just cast teleport self and saved. Hopefully I zipped and attached it to this message.
Attached Files
File Type: zip Orinegis.zip (13.0 KB, 114 views)
PowerDiver is offline   Reply With Quote
Old April 29, 2010, 15:38   #7
ClaytonAguiar
Scout
 
Join Date: May 2009
Posts: 34
ClaytonAguiar is on a distinguished road
Ok

Thanks a lot.

About this change in the code: is it necessary to open a ticket for this issue myself to add it to the nightlies? You already did it? Any other option?

Clayton.
ClaytonAguiar is offline   Reply With Quote
Old April 29, 2010, 18:52   #8
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Quote:
Originally Posted by ClaytonAguiar View Post
About this change in the code: is it necessary to open a ticket for this issue myself to add it to the nightlies? You already did it? Any other option?
I did open a ticket already.

I think someone else needs to do the fix. Direct changes to p_ptr->energy should only happen in 3 places -- birth, the do an action loop, and the one game turn passes loop. The fix I suggested is wrong. The line should be removed entirely.

Whoever put it there must have had a reason, and presumably that reason ought to be addressed some other way.

I guess it wouldn't hurt to make the change I suggested and redo or comment the ticket, so long as a record of the need to remove it entirely remains.


BTW - Thanks a whole lot for finding this!!! I've felt like something occasionally seemed strange on reload, but never could figure out what or where to look.
PowerDiver is offline   Reply With Quote
Old April 29, 2010, 19:21   #9
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,047
Derakon is on a distinguished road
Shouldn't all creature energy be saved when the game is saved? And the game can't be saved when it isn't the player's turn, right? Therefore, all creature energy should be restored properly on load, meaning it should always be the player's turn when a save is loaded.

Basically I'm trying to figure out why manipulating energy on load would ever be necessary.
Derakon is offline   Reply With Quote
Old April 29, 2010, 19:48   #10
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Quote:
Originally Posted by Derakon View Post
Basically I'm trying to figure out why manipulating energy on load would ever be necessary.
It isn't. Someone trying to solve some other problem did something wrong, with the side effect that on load energy is reduced.
PowerDiver 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
Ringil from an orc pit! Philip Vanilla 3 February 7, 2010 21:29
Attacking unseen invisibles buzzkill Development 2 January 5, 2010 06:20
Can't load savefile on linux. Modeco Vanilla 12 November 14, 2009 14:39
Slay Orc / Troll and Westernesse AceRimmer Vanilla 10 August 4, 2009 03:20
SLOW load on Vista64 Orillian Vanilla 2 February 8, 2009 01:37


All times are GMT +1. The time now is 16:09.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.