Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old November 25, 2007, 14:21   #11
Daven_26d1
Adept
 
Daven_26d1's Avatar
 
Join Date: Jun 2007
Location: North of England.
Posts: 211
Daven_26d1 is on a distinguished road
Quote:
Originally Posted by will_asher View Post
Install scripts to replace the original edit files with mine automatically? That sounds cool, but I wouldn't know how to write it. maybe I'll ask someone to do that for me once I have them ready to download.
I can do those for you. They're very simple and will take minutes to get working. Only thing I'm not certain about is the savefile naming conventions on different platforms, but I can find that out. Send me a message when you have them ready, and I'll do the Linux and Windows ones, but you'll have to get someone else if you want scripts for Mac.
__________________
You sold a Broken Sword (1d2) (-2,-4) {average} (j) for 1 gold.
The shopkeeper howls in agony!
You say "Dude, the clue is in the name...".
Daven_26d1 is offline   Reply With Quote
Old November 30, 2007, 05:30   #12
will_asher
DaJAngband Maintainer
 
will_asher's Avatar
 
Join Date: Apr 2007
Location: San Antonio, TX
Posts: 927
Donated: $10
will_asher is on a distinguished road
Quote:
Originally Posted by will_asher View Post
Is there any possible way (maybe a slight tweak in the code that someone can tell me how to do) to make the dumps different from vanilla dumps so there can be a separate section of the ladder for it? (I'd like to be able to dump characters on the ladder).

I've heard suggestions in another thread to get rid of some of the artifacts, and I'd like to do that except I don't really know which artifacts to take out. any suggestions? (please don't ask me to take out the uber-good stuff, I don't want my semi-variant to be harder than vanilla -just different).

Also, there are a couple flags I still don't know what they do, can anyone tell me?
POWERFUL (someone said it increased breath damage, but in the monster blow spoiler it only says that it increases the radius of the breath, and I'd be a little surprised if that was all it did.)
STUPID
(I think those are the only two I'm not sure about)

Is there a difference/ What is the difference between HURT and FIRE,ACID,COLD,ELEC besides the effect of the elemental damage?
(someone in a recent thread inplied there was a difference besides the effects of the elemental attack.)
Can anyone help with the questions I asked in the original post (quoted above) please?

Also, I have one other question:
The S_WRAITH flag make the monster summon ringwraiths right? So how does the game know which W's are ringwraiths? There's no flag for it, and there's the black wraith which has the exact same symbol as the ringwraiths.

Does it summon any unique W's? If so, that would mean I can't make any other uniques use the W symbol unless I want them summoned with that spell, right?

I put Balder the Hapless and the Lord of the Shadow Host (from the paths of the Dead) in the game, and IMO their description fits best as a wraith-type (using the letter W), and I'm wondering if that would confuse them with ringwraiths.
will_asher is offline   Reply With Quote
Old November 30, 2007, 07:21   #13
andrewdoull
Unangband maintainer
 
andrewdoull's Avatar
 
Join Date: Apr 2007
Location: Sydney, Australia
Age: 43
Posts: 872
andrewdoull is on a distinguished road
Quote:
Originally Posted by will_asher View Post
Can anyone help with the questions I asked in the original post (quoted above) please?
I can... but your best bet is to master the grep command and go looking through the code yourself. You'll get to understand C, if not necessarily using it. Character dumps are in the files.c file IIRC.

Andrew
__________________
The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
In UnAngband, the level dives you.
ASCII Dreams: http://roguelikedeveloper.blogspot.com
Unangband: http://unangband.blogspot.com
andrewdoull is offline   Reply With Quote
Old November 30, 2007, 08:53   #14
will_asher
DaJAngband Maintainer
 
will_asher's Avatar
 
Join Date: Apr 2007
Location: San Antonio, TX
Posts: 927
Donated: $10
will_asher is on a distinguished road
Quote:
Originally Posted by andrewdoull View Post
I can... but your best bet is to master the grep command and go looking through the code yourself. You'll get to understand C, if not necessarily using it. Character dumps are in the files.c file IIRC.
OK, I looked in the files.c file and found this:

/*
* Hack -- Dump a character description file
*
* XXX XXX XXX Allow the "full" flag to dump additional info,
* and trigger its usage from various places in the code.
*/
errr file_character(cptr name, bool full)
{
int i, x, y;

byte a;
char c;

int fd;

FILE *fff = NULL;

store_type *st_ptr = &store[STORE_HOME];

char o_name[80];

char buf[1024];


/* Unused parameter */
(void)full;

/* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, name);

/* File type is "TEXT" */
FILE_TYPE(FILE_TYPE_TEXT);

/* Check for existing file */
fd = fd_open(buf, O_RDONLY);

/* Existing file */
if (fd >= 0)
{
char out_val[160];

/* Close the file */
fd_close(fd);

/* Build query */
strnfmt(out_val, sizeof(out_val), "Replace existing file %s? ", buf);

/* Ask */
if (get_check(out_val)) fd = -1;
}

/* Open the non-existing file */
if (fd < 0) fff = my_fopen(buf, "w");


/* Invalid file */
if (!fff) return (-1);


text_out_hook = text_out_to_file;
text_out_file = fff;

/* Begin dump */
fprintf(fff, " [%s %s Character Dump]\n\n",
VERSION_NAME, VERSION_STRING);

That looks like the part to tweak to mark the character dump. What do I do with it?
All I can understand in the file is the comments (not even all of them). I know what version name is and a character dump, but I have no idea what to do with it or how to find the answers to my other questions.
Is grep something you can use if you don't have unix? I looked it up on the internet and wherever I find grep, it says it's a unix command.
When I looked at the edit .txt files, it sure looked like I could make my semi-variant without having to learn C. And I pretty much can, I just have these few questions in order to know what I'm doing better. I don't have time to learn C. If I had to learn C, I'd give up on my semi-variant until sometime when I have enough spare time to learn C, which would probably never happen since I'm not planning to have a job in programming.
How did all these variant makers learn it? Did they major in computers in college? Are they programmers by profession? I'm just kindof curious, I guess.

EDIT: okay, I found the answer to the questions about S_WRAITH and STUPID. I found the piece of code about HURT and the attack types but can't figure out the difference there. (it says something about attack power, but I don't know what that does).
I also found out that S_HI_UNDEAD only summons L,V,W symbol monsters which kinda stinks. I thought it would be based on monster level.
And that S_HI_DEMON only summons U's which also stinks because I had two different symbols for major demons in my semi-variant.

It's looking like I will make a couple slight tweaks in the code, meaning I'll have to distribute the whole thing instead of just the edit directory. Guess it'll be longer than I thought before it becomes available.

EDIT2: hmm, if I change this:
case SUMMON_HI_DEMON:
{
okay = (r_ptr->d_char == 'U');
break;
}
To this:
case SUMMON_HI_DEMON:
{
okay = (r_ptr->d_char == 'U') ||
(r_ptr->d_char == '&');
break;
}
will that make it summon U's and &'s?

Also, is there a way I can change this:
case SUMMON_WRAITH:
{
okay = ((r_ptr->d_char == 'W') &&
(r_ptr->flags1 & (RF1_UNIQUE)));
break;
}
so that it will also check for the color?

Last edited by will_asher; November 30, 2007 at 11:05.
will_asher is offline   Reply With Quote
Old November 30, 2007, 15:38   #15
zaimoni
Knight
 
zaimoni's Avatar
 
Join Date: Apr 2007
Posts: 590
zaimoni is on a distinguished road
Quote:
Originally Posted by will_asher View Post
Is grep something you can use if you don't have unix? I looked it up on the internet and wherever I find grep, it says it's a unix command.
On Windows, yes. (Installing huge chunks of MingW32 tools, doesn't install *NIX. grep is in core utilities, a lightweight download.)
zaimoni is offline   Reply With Quote
Old November 30, 2007, 16:46   #16
Daven_26d1
Adept
 
Daven_26d1's Avatar
 
Join Date: Jun 2007
Location: North of England.
Posts: 211
Daven_26d1 is on a distinguished road
Ok, first off, well done for jumping into the sources, that can be pretty daunting for a non-coder, and I didn't expect that you would go this far.

Something to bear in mind is that once you tweak the code, the scripts I spoke of will be useless to you, as you will need to distribute as a new variant. Its seems daft to make 3 tweaks and call it a variant mind; don't let this put you off, but you will probably want to make more changes to interest people. There are a fair few source-code patches floating around internetland which could be used to add features from certain variants, for instance fractal caverns.

It does mean you'll have to learn a little C, either by reverse engineering what is written in the code, or reading some tutorials. I recommend both in small quantities at first, and see how you get on. You'll learn heaps and probably have a lot of fun. To help you get started:

Quote:
Originally Posted by will_asher View Post
/* Begin dump */
fprintf(fff, " [%s %s Character Dump]\n\n",
VERSION_NAME, VERSION_STRING);

That looks like the part to tweak to mark the character dump. What do I do with it?
VERSION_NAME & VERSION_STRING are known as defined values (or just "defines") and are done in this way so that changing the value where they are defined will change every instance in the code when it compiles. They may be near the very top of the sourcefile you got this from, otherwise they'll probably be in defines.h - they'll look like this:
Code:
#define VERSION_NAME xxxxxxxx
#define VERSION_STRING yyyyyyy
As soon as you find them you will know what to do with xxx and yyy.

Don't worry too much about grep for now, you can use the search features of notepad for searching one source, and you can search batches of files for a string with <Windows-key>+f, seeking "files containing..." rather than "files named..." Make sure you point the search tool at the src directory, otherwise you'll scan your whole drive, and this will take forever.

The thing is, at the moment you are sort of asking the users of oook to work out the code tweaks you desire, which isn't really fair - and if you got them, then you'd presumably ask someone to compile and debug it for you, and this brings me to my next point.

You can't do this without a compiler. Someone else will probably be able to give you some advice here, as its been a long while since I coded on windows. First, you need to get the basic game built from source, once you have done that, you can make alterations and wont need to ask if changing x will work as you expect, as you can test it yourself, and actually you'll find you get more answers, more quickly that way, than you will by waiting for responses in a forum.

It may seem hard at first, but you seem to have enough enthusiasm and ideas that you should be able to get rolling. In fact, reading the sources will probably give you tonnes more ideas in itself.

Once you get started BACK UP EVERYTHING that's of any use, and keep a clean copy of the original source lying about in case you lose network access for a day. Trust me, there is nothing worse than getting the itch to code, and no way to scratch it!

Once you manage to make a change in the source, compile it and see it working, without follow zombie instructions, you will be able to pat yourself on the back because you just hacked angband. When the overwhelming sense of well-being subsides, keep going...

Best of luck. =)
__________________
You sold a Broken Sword (1d2) (-2,-4) {average} (j) for 1 gold.
The shopkeeper howls in agony!
You say "Dude, the clue is in the name...".
Daven_26d1 is offline   Reply With Quote
Old November 30, 2007, 20:52   #17
will_asher
DaJAngband Maintainer
 
will_asher's Avatar
 
Join Date: Apr 2007
Location: San Antonio, TX
Posts: 927
Donated: $10
will_asher is on a distinguished road
Thanks for all the encouragement, but I don't think I'll do much more than the few tweaks to make the new monster list fit better and make it be able to have a separate place on the ladder. ..At least not anytime very soon. Although there is a couple things I have in mind that I might do if I happen to figure out how to do them and it's not too much trouble.
Sorry about asking other people to work out the code tweaks.
I tried to teach myself Visual Basic once because someone told me it might help me get a job. I quit largely because in order to learn something like this I need someone to go to to ask questions, (not just a book or a website) and I didn't have that. That's one of the main things that makes me not want to bother to learn C. Another is that I don't feel like putting that much time into it when I have other things I have to do.
will_asher is offline   Reply With Quote
Old December 1, 2007, 20:58   #18
will_asher
DaJAngband Maintainer
 
will_asher's Avatar
 
Join Date: Apr 2007
Location: San Antonio, TX
Posts: 927
Donated: $10
will_asher is on a distinguished road
compling

on http://www.thangorodrim.net/compiling.html#Win_lcc there's step by step directions to compile Angband except that it includes the lua stuff which isn't in Angband anymore so the directions don't work. Are there updated compiling instrucions anywhere? please?

EDIT: Nevermind, I found it here http://rephial.org/wiki/Compiling

EDIT2: When I start the game I'm getting an 'out of memory' error apparently from too many lines of monster description. Is there anything I can do about this or do I just take out some monster descriptions?

Last edited by will_asher; December 1, 2007 at 21:57.
will_asher is offline   Reply With Quote
Old December 1, 2007, 23:03   #19
andrewdoull
Unangband maintainer
 
andrewdoull's Avatar
 
Join Date: Apr 2007
Location: Sydney, Australia
Age: 43
Posts: 872
andrewdoull is on a distinguished road
Quote:
Originally Posted by will_asher View Post
on http://www.thangorodrim.net/compiling.html#Win_lcc there's step by step directions to compile Angband except that it includes the lua stuff which isn't in Angband anymore so the directions don't work. Are there updated compiling instrucions anywhere? please?

EDIT: Nevermind, I found it here http://rephial.org/wiki/Compiling

EDIT2: When I start the game I'm getting an 'out of memory' error apparently from too many lines of monster description. Is there anything I can do about this or do I just take out some monster descriptions?
Increase the last number in lib/edit/limits.txt. FYI These are the values that Unangband uses.

# Size of the "fake" array for reading in names of monsters, objects,
# artifacts, store-owners, player-races, ...
M:N:25000

# Size of the "fake" array for reading in the descriptions of monsters,
# vaults, and the player-histories
M:I:130000
__________________
The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
In UnAngband, the level dives you.
ASCII Dreams: http://roguelikedeveloper.blogspot.com
Unangband: http://unangband.blogspot.com
andrewdoull is offline   Reply With Quote
Old December 2, 2007, 06:24   #20
will_asher
DaJAngband Maintainer
 
will_asher's Avatar
 
Join Date: Apr 2007
Location: San Antonio, TX
Posts: 927
Donated: $10
will_asher is on a distinguished road
cool, thanks

While trying to compile, I'm getting a resource error:
cannot open icon file 'angband.ico.' No such file or directory.

The file is there, so why would it say this?

Last edited by will_asher; December 2, 2007 at 06:44.
will_asher 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
Changes to lib/edit files Iemortal Vanilla 1 September 23, 2007 05:26
font follies- making angband appear pretty. leontes Vanilla 0 August 6, 2007 02:30
Problem with saving and score files Skeeblix Vanilla 3 July 24, 2007 21:38
semi-psuedo variants for non-programmers will_asher Vanilla 23 June 12, 2007 04:48
[ALL variants]Making warriors less boring? CJNyfalt Vanilla 7 May 20, 2007 21:47


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


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