Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old March 31, 2020, 18:15   #71
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,345
wobbly is on a distinguished road
What are you using to compile? I use MINGW & I just edit makefile.win adding the line

MINGW=yes

then I type:

make -f makefile.win

& that's it. (except when it throws compiler errors)
wobbly is offline   Reply With Quote
Old March 31, 2020, 18:20   #72
DavidMedley
Knight
 
Join Date: Oct 2019
Posts: 726
DavidMedley is on a distinguished road
I just followed these instructions on linux:
Code:
./autogen.sh
./configure --enable-win --disable-curses --build=i686-pc-linux-gnu --host=i586-mingw32msvc
DavidMedley is offline   Reply With Quote
Old April 1, 2020, 15:44   #73
DavidMedley
Knight
 
Join Date: Oct 2019
Posts: 726
DavidMedley is on a distinguished road
When you're testing and want to advance a character in experience (through debug commands), how do you balance equipment? Any rules of thumb?
DavidMedley is offline   Reply With Quote
Old April 1, 2020, 16:01   #74
DavidMedley
Knight
 
Join Date: Oct 2019
Posts: 726
DavidMedley is on a distinguished road
Quote:
Originally Posted by wobbly View Post
What are you using to compile? I use MINGW & I just edit makefile.win adding the line

MINGW=yes

then I type:

make -f makefile.win

& that's it. (except when it throws compiler errors)
I wasn't able to follow these directions. The closest I could find was src/Makefile.win . But I get errors like this:
Code:
/bin/bash: no: command not found
Makefile:31: recipe for target 'win/angband.res' failed
My knowledge of compiling C is close to zero
DavidMedley is offline   Reply With Quote
Old April 1, 2020, 17:03   #75
Sideways
Knight
 
Join Date: Nov 2008
Posts: 619
Sideways is on a distinguished road
Quote:
Originally Posted by DavidMedley View Post
When you're testing and want to advance a character in experience (through debug commands), how do you balance equipment? Any rules of thumb?
For testing monster balance, the ideal is to just have a real character of the appropriate level, put aside for testing purposes. (You don't necessarily need to have that many of them - one early-game @, one or two midgame @s and one endgame @ will go a really long way.)

If you're testing character balance (e.g. on a new class or a heavily modified one) there's really no shortcuts, you have to play a real @ to know if it's good, or somehow convince a bunch of other people to do it for you

If you're testing things unrelated to monster/character balance you generally don't need to worry about niceties like equipment; and if you're testing monsters of really high level and don't have a real endgame character at hand you can just put together a random kit of oppy artifacts.
__________________
The Complainer worries about the lack of activity here these days.
Sideways is online now   Reply With Quote
Old April 1, 2020, 17:49   #76
DavidMedley
Knight
 
Join Date: Oct 2019
Posts: 726
DavidMedley is on a distinguished road
Quote:
Originally Posted by Nick View Post
Here is my recommendation for managing your own version of the angband git repository:
  1. Fork the official repo (angband/angband) using the fork button on github
  2. Clone/download this to get your own local copy
  3. Keep your master branch up-to-date with the official master branch, do not do development work on your master branch
  4. For development work, create a branch and do your work there. Once it's ready for inclusion, push it to your github repo and make a pull request
  5. The official master branch will be updated frequently. Make sure that you (fairly frequently):
    • Pull changes from the official repo and update your master (it should be just a fast-forward, since you are not developing on your master);
    • Rebase your development branch or branches against your master branch, resolving any conflicts that arise

This is how I work, and it should keep confusion to a minimum.
I did some much overdue study on git. The above directions helped me a lot. I think the main step I was missing, and maybe should have been in these directions, was to add the original fork to my list of remotes:
Code:
git remote add official https://github.com/angband/angband.git
After that it was pretty smooth sailing.
DavidMedley is offline   Reply With Quote
Old April 1, 2020, 17:51   #77
DavidMedley
Knight
 
Join Date: Oct 2019
Posts: 726
DavidMedley is on a distinguished road
Thanks for the advice, Sideways!
DavidMedley is offline   Reply With Quote
Old April 1, 2020, 21:14   #78
DavidMedley
Knight
 
Join Date: Oct 2019
Posts: 726
DavidMedley is on a distinguished road
I don't understand these errors.

Code:
                 from player.c:19:
player-attack.h:46:55: warning: ‘struct player’ declared inside parameter list will not be visible outside of this definition or declaration
 typedef struct attack_result (*ranged_attack) (struct player *p,
                                                       ^~~~~~
player-attack.h:56:38: warning: ‘struct player’ declared inside parameter list will not be visible outside of this definition or declaration
 int chance_of_melee_hit(const struct player *p, const struct object *weapon);
                                      ^~~~~~
player-attack.h:59:30: warning: ‘struct player’ declared inside parameter list will not be visible outside of this definition or declaration
 extern void py_attack(struct player *p, struct loc grid);
                              ^~~~~~
player-attack.h:60:35: warning: ‘struct player’ declared inside parameter list will not be visible outside of this definition or declaration
 extern bool py_attack_real(struct player *p, struct loc grid, bool *fear);
                                   ^~~~~~
Successfully compiled player.c.
My "BGmod" branch on Github is up to date now, if that helps.
https://github.com/damedley/myband/b...d/src/player.c
DavidMedley is offline   Reply With Quote
Old April 1, 2020, 22:48   #79
backwardsEric
Apprentice
 
Join Date: Aug 2019
Posts: 72
backwardsEric is on a distinguished road
Quote:
Originally Posted by DavidMedley View Post
I don't understand these errors.

Code:
                 from player.c:19:
player-attack.h:46:55: warning: ‘struct player’ declared inside
parameter list will not be visible outside of this definition or declaration
 typedef struct attack_result (*ranged_attack) (struct player *p,
                                                       ^~~~~~
...
Successfully compiled player.c.
Those are the first references to struct player that it saw in that compilation unit: effects.h is your first include file in player.c and neither it nor the files it pulls in bring in player.h. You could include player.h in player-attack.h or you could add a forward declaration of struct player to player-attack.h. The latter is just a way of introducing the name but doesn't provide a full declaration; it would look like

Code:
struct player;
and you'd put it in player-attack.h before you mention struct player in the typedefs or function prototypes.
backwardsEric is offline   Reply With Quote
Old April 2, 2020, 00:59   #80
DavidMedley
Knight
 
Join Date: Oct 2019
Posts: 726
DavidMedley is on a distinguished road
Yeah, that all makes sense. I guess the real question is: how did I introduce this warning, when I haven't touched player-attack.h, other than to add:
Code:
extern bool py_attack_real(struct player *p, struct loc grid, bool *fear);
But that's probably something I have to figure out for myself.
DavidMedley 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
is there a code? jozmon Development 19 August 4, 2014 00:38
Questions regarding vanilla inscriptions Avenger Vanilla 8 December 13, 2013 21:15
Questions regarding vanilla dungeon design Cazliostro Vanilla 23 October 11, 2010 12:05
code help please will_asher Variants 22 March 15, 2010 19:00
Looking through the code K.I.L.E.R Vanilla 5 July 11, 2007 08:01


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


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