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:
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:
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. =)
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:
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
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. =)
Comment