Announcement

Collapse
No announcement yet.

Seeking advice for El Aurens v2

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • This thread shows just what can be achieved with advanced CIV2 tweaking...!

    It is definitely a masterclass of scenario design...
    http://sleague.apolyton.net/index.php?title=Home
    http://totalfear.blogspot.com/

    Comment


    • Originally posted by Boco
      Catfish, Mercator (even though the program is useless to you — xls vba ), does this interface make any sense? It doesn't actually hex edit a file. Just uses AXE v2 to jump to the offset (via SendKeys! ) and figures out what should be entered. All listboxes except Byte 5 are single selection boxes. The whole thing has a whopping 14 lines of code.
      So I suppose that means that you have to enter values in the Coordinates box to let it calculate the offset, and enter values in the Byte 1-6 boxes to let it display the tile byte string?

      The way the frames are arranged now is a little confusing. Maybe you can arrange them better so it's clear that ccordinates -> offset, and bytes -> tile byte string. And also make clear that those are essentially 2 separate things, so keep the coordinates/offset and bytes/tile byte string groups separate. Can you do tabs in VBA?
      Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

      Comment


      • Good supposing, Merc, and useful critique! Yes, I think I can do tabs. My only reservation is the extra clicking that requires. I'll see what I can come up with. One requirement is to share the screen with a hex editor displaying 6 bytes per row.

        Overall, this is supposed to be a (wretchedly) poor man's map editor. Catfish convinced me of the utility of renumbering land masses to make for a smarter AI. Plus I frequently needed to edit transport/city present attributes, not to mention rivers.

        In truth, this dialog doesn't do much more than Catfish's xls. As with his original, you enter coordinate and map information to learn where information about that tile is stored in a sav file.

        The remaining bits simply allow you to figure out what to enter into that address. I don't think my mind is as quick as most of the hex whizzes around here with that kind of math, so I benefit from an interface.

        It's quick and dirty, but it has certainly sped up my editing by a huge amount. In practice, it has worked all right so far.

        The right way to do this is to use a graphical (i.e. map) interface, pay royalties to Merc to get his sav file i/o routines (in addition to the royalties to Catfish for the original algorithm), and write a true hex editor in a standalone program. Could be a little time before that happens....
        El Aurens v2 Beta!

        Comment


        • Originally posted by Boco
          My only reservation is the extra clicking that requires.
          Or you could just arrange them as two frames next to each other or so.

          (...) pay royalties to Merc to get his sav file i/o routines (...)
          Can you do that in Excel/VBA too, though? Perhaps the first step would be to add the I/O to that spreadsheet so that the values you enter there will actually be saved to the savegame. With added savegame I/O, could you let the spreadsheet load the values from a savegame and write them back when necessary?

          That would make the interface a bit easie too, because users would only need to enter the tile's X, Y and Z coordinates after which they can view/edit its values.

          In any case, I don't know if that's possible. But if you need the routines, I can give them to you at a very favourable price.

          Another thing, maybe you can increase the list box size in the Byte 3 frame so you don't get the scrollbar anymore.
          Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

          Comment


          • Originally posted by Mercator
            Can you do that in Excel/VBA too, though? Perhaps the first step would be to add the I/O to that spreadsheet so that the values you enter there will actually be saved to the savegame. With added savegame I/O, could you let the spreadsheet load the values from a savegame and write them back when necessary?

            In any case, I don't know if that's possible. But if you need the routines, I can give them to you at a very favourable price.
            For me, special price! Only 3,000,000 guilders? Can you even find guilders any more?

            Yes as you imply, it's very likely that your VB code would port directly. Storing values in a spreadsheet is an excellent idea (for someone with ambition).

            Catfish, you've been mum. Absent or ticked? I sorta blurted this out without asking you.
            El Aurens v2 Beta!

            Comment


            • Originally posted by Boco
              For me, special price! Only 3,000,000 guilders? Can you even find guilders any more?
              I think I have a few cents left somewhere, but you can't really find any anymore.
              How about for €0,000,000

              (for someone with ambition)


              Yeah, I wouldn't know about that. Just let me know when you need any code.

              Catfish, you've been mum. Absent or ticked? I sorta blurted this out without asking you.
              Probably just not really following this thread. I know I don't usually follow scenario threads. He's only posted in this thread once. I don't know how you tricked me into posting here regularly.
              Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

              Comment


              • Originally posted by Boco
                Hexing pollution and airbase yields a whacky label, but I'm not sure of its function.
                Pollution + Airbase = Transporter + Airbase. Likewise, Transporter + Fortress = Transporter + Airbase. This combination gives you a 'whacky label' because you're only editing one of the map tile bytes and not the transporters table (beginning at offset 29900). For some reason I omitted the farmland and airbase improvements from my original table.
                Code:
                Hex Binary Tile Improvement
                0x01 0b00000001 Unit Present
                0x02 0b00000010 City Present
                0x04 0b00000100 Irrigation
                0x08 0b00001000 Mining
                0x0C 0b00001100 Farmland
                0x10 0b00010000 Road
                0x30 0b00110000 Railroad*
                0x40 0b01000000 Fortress
                0x42 0b01000010 Airbase
                0x80 0b10000000 Pollution
                0x82 0b10000010 Transporter
                 
                0xC2 0b11000010 Transporter + Airbase
                *See Mercator's comments below.

                Originally posted by Boco
                Catfish, Mercator (even though the program is useless to you — xls vba ), does this interface make any sense?
                I'd probably clearly label the decimal and hexadecimal offsets as such. Also need to check the byte for the number of transporters (offset 29896). I'm not sure whether it's an unsigned byte or an unsigned short integer (offsets 29896-29897). I suspect the latter.

                Originally posted by Boco
                @Catfish. This uses the DEC2HEX function. Since it's a pain to tell people how to install Add-Ins, I'm going to try to write/google my own vb function to do the same thing. If you have the Add-In installed, I'll send the file your way.
                I do (already answered at CFC).

                Originally posted by Boco
                The right way to do this is to use a graphical (i.e. map) interface, pay royalties to Merc to get his sav file i/o routines (in addition to the royalties to Catfish for the original algorithm), and write a true hex editor in a standalone program.
                Mercator already has a version of that algorithm for MapEdit, which I'm sure he'd use if he made a stand-alone program, but you can pay me royalties anyway for being such a tremendous bloke.

                Originally posted by Boco
                Could be a little time before that happens....
                I believe you will be able to simply 'paint' land mass numbers onto the map with a brush tool in Mercator's Civ2 scenario editor - you know, the one he's been working on furiously since April 1 2004.

                Originally posted by Boco
                Catfish, you've been mum. Absent or ticked?
                Patience, Grasshopper.
                Last edited by Catfish; January 10, 2006, 08:14.
                Catfish's Cave - Resources for Civ2: Test of Time | Test of Time FAQ | War of the Ring scenario

                Comment


                • I made worksheet formulas to convert dec to hex anyway. Catfish, you're too advanced in this for the interface to be of much benefit. Others may not be clear on how to load Add-Ins. Merc's idea of storing map info in worksheets is intriguing. I shall work furiously on it, but may work on a better dialog design first. Then a beta release.

                  As far as omitting...shh! There's no checkbox for the mystery resource value in the first byte.

                  How well known is 'Grasshopper' these days? At least it's not Padawan.
                  El Aurens v2 Beta!

                  Comment


                  • He's dating himself.
                    Tecumseh's Village, Home of Fine Civilization Scenarios

                    www.tecumseh.150m.com

                    Comment


                    • Originally posted by Catfish
                      Pollution + Airbase = Transporter + Airbase. Likewise, Transporter + Fortress = Transporter + Airbase.
                      Ah, good to know.

                      0x20 - 0b00100000 - Railroad


                      That's not entirely true. Railroad is really 0x30 (0b00110000), or Railroad + Road. The Railroad flag by itself will only make a square cost no movement points. You still need the Road flag to get Railroad graphics and the Road trade bonus.

                      (...) but you can pay me royalties anyway for being such a tremendous bloke.




                      I believe you will be able to simply 'paint' land mass numbers onto the map with a brush tool in Mercator's Civ2 scenario editor - you know, the one he's been working on furiously since April 1 2004.


                      Ah yes... (not)

                      Originally posted by Boco
                      As far as omitting...shh! There's no checkbox for the mystery resource value in the first byte.
                      You mean the 0x20 flag on the first byte? That value isn't much use. ToT saves squares with that flag when their resource graphics were being animated the moment you saved your game. Adding it to other squares does nothing, and I think this flag is ignored altogether when loading a game in any case.
                      Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                      Comment


                      • While we're hexing, where's the @UNITS_ADVANCED info stored? My apologies, if it's in 40 point bold in one of you tremendous bloke's docs or web sites.

                        Thanks for the ref to the transporter table. How difficult is it to decipher? I'll be in a position to answer that myself at the end of week, but I'm willing to get an easier answer.
                        El Aurens v2 Beta!

                        Comment


                        • Hexing the Transporter Table



                          So, is this right?
                          Code:
                          4F 00 = x coordinate of 1st square linked by transporter
                          11 00 = y coordinate of 1st square linked by transporter
                          00    = map for 1st square
                          00    always 00 in EAv2
                          4F 00 = x coordinate of 2nd square linked by transporter
                          11 00 = y coordinate of 2nd square linked by transporter
                          03    = map for 2nd square
                          01    = transporter type (0-2 = types 1-3)
                          00 00 always 00 in EAv2
                          In EAv2, this seems to match a 'one-way' type 2 transporter to Beirut (map 0) from map 3. Later in the table, there seems to be another entry describing another link with the same coordinates between maps 2 and 0 (also type 2). This is all consistent with what exists on the map.

                          If so, then yippee! I can finally change a transporter type.

                          [Edit]I just changed a transporter type, and it works! [/Edit]
                          Last edited by Boco; January 9, 2006, 20:58.
                          El Aurens v2 Beta!

                          Comment


                          • Ever test a hex edit where the x and y coordinates of the two squares differ? I suppose you may need to hex the terrain as well.
                            El Aurens v2 Beta!

                            Comment


                            • Originally posted by Mercator
                              That's not entirely true. Railroad is really 0x30 (0b00110000), or Railroad + Road.
                              Fixed.

                              Originally posted by Mercator
                              You mean the 0x20 flag on the first byte? That value isn't much use. ToT saves squares with that flag when their resource graphics were being animated the moment you saved your game. Adding it to other squares does nothing, and I think this flag is ignored altogether when loading a game in any case.
                              Great. Don't have to worry about it now.

                              Originally posted by Boco
                              While we're hexing, where's the @UNITS_ADVANCED info stored? My apologies, if it's in 40 point bold in one of you tremendous bloke's docs or web sites.
                              I did post that information once before at Apolyton, but MarkG kindly deleted it. Only columns D, E and F of the @UNITS_ADVANCED table are stored in the .sav file. Instead of inserting tables in my posts, it's easier to simply provide a link to a web page. The page displays only the very top of the table I use for hex-editing ToT. I've cut the rest because there are things that need to be verified. I started work on the HTML version at the beginning of last year but was too lazy to finish. It only goes as far as the cities data. I have a fairly shambolic spreadsheet which goes past that point. The page also requires a list of acknowledgements.

                              Originally posted by Boco
                              So, is this right?
                              It's exactly what I have.

                              Originally posted by Boco
                              Ever test a hex edit where the x and y coordinates of the two squares differ? I suppose you may need to hex the terrain as well.
                              Yeah, I tried that one some time ago. It doesn't work.
                              Last edited by Catfish; January 10, 2006, 18:05.
                              Catfish's Cave - Resources for Civ2: Test of Time | Test of Time FAQ | War of the Ring scenario

                              Comment


                              • Originally posted by Catfish
                                Only columns D, E and F of the @UNITS_ADVANCED table are stored in the .sav file.
                                I'm most interested in E. So A, B, C, and G are read from rules.txt on each load? I've seen instant results from changes in G, but never checked A-C.

                                Originally posted by Catfish
                                Instead of inserting tables in my posts, it's easier to simply provide a link to a web page...
                                The href isn't working with my Opera browser. Is that a browser gotcha or a syntax error?

                                [Edit]
                                Directly to Catfish's Hex Table
                                So that's how it's done.
                                Indirectly to Catfish's Hex Table
                                [/Edit]

                                Thanks for the shambolic uncredited info!

                                Originally posted by Catfish
                                Yeah, I tried that one some time ago. It doesn't work.
                                It didn't force me to go into Sherlock mode to guess that I was treading territory familiar to you. Since no tremendous bloke would keep that breakthrough to himself, I sorta assumed that it didn't work.
                                Last edited by Boco; January 10, 2006, 18:46.
                                El Aurens v2 Beta!

                                Comment

                                Working...
                                X