making a semi-variant (more talk about modifying the /edit .txt files)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Daven_26d1
    Adept
    • Jun 2007
    • 211

    #16
    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:

    Originally posted by will_asher
    /* 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...".

    Comment

    • will_asher
      DaJAngband Maintainer
      • Apr 2007
      • 1124

      #17
      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
      aka LibraryAdventurer

      My old variant DaJAngband:
      http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)

      Comment

      • will_asher
        DaJAngband Maintainer
        • Apr 2007
        • 1124

        #18
        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, 21:57.
        Will_Asher
        aka LibraryAdventurer

        My old variant DaJAngband:
        http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)

        Comment

        • andrewdoull
          Unangband maintainer
          • Apr 2007
          • 872

          #19
          Originally posted by will_asher
          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

          Comment

          • will_asher
            DaJAngband Maintainer
            • Apr 2007
            • 1124

            #20
            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, 06:44.
            Will_Asher
            aka LibraryAdventurer

            My old variant DaJAngband:
            http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)

            Comment

            • andrewdoull
              Unangband maintainer
              • Apr 2007
              • 872

              #21
              Originally posted by will_asher
              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?
              Can you provide the full output?
              The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
              In UnAngband, the level dives you.
              ASCII Dreams: http://roguelikedeveloper.blogspot.com
              Unangband: http://unangband.blogspot.com

              Comment

              Working...
              😀
              😂
              🥰
              😘
              🤢
              😎
              😞
              😡
              👍
              👎