Ambrosia Garden Archive
    • A few more specific questions about PC Development.


      Ok, here's the thing. I have a few questions regarding development on the PC end. I am one of those wierd programmers who just Really REALLY likes to go through something bit by bit on my own, without using a Front-end mission editor or ship editor etc.

      Therefore, my big question is this, first. Is it at all possible to unpack the compressed Mac Files on a PC so that the file looks EXACTLY like it would on a Mac? In otherwords, , it might look odd to a PC, but (I believe) that Win 98 and XP both have the ability to deal with odd files, although they may not be able to run them, it would be manipulatable on a binary or hex level.

      Now, if the answer to that question is YES, then my next question is this. Exactly what IS the ResEdit tool on Macs? Is it essentially a Binary or Hex editor? And if so, would it then be feasable for me to merely use a Hex or Bin editor that I have on my PC to veiw and edit such a file (meaning the Plug-in type files that you can download). If so, that might eliminate my having to wait for a 3rd party front-end or for the .rez format to be released.

      About the .rez format for that matter. If anyone from ambrosia or somewhere might comment on whether information released on that format will be specifically formatted for Bin. or Hex editing?

      Anyway, hope that someone out there has the answers to a few of these questions, I just am really looking forward to getting into some plugin making

      Thanks

      Valic Vacosties (Derek Rosborough in "Real" Life)

      ------------------

    • ResEdit is a rescource editor. Hence the name.

      ------------------
      "The way I see it, God put me on Earth to achieve a certain number of things. By now I'm so far behind I'll never die." -Calvin
      (url="http://"http://www.livejournal.com/~rootski")Rootski's Blog(/url) | (url="http://"http://www.AmbrosiaSW.com/games/evn/addons.html")Free Stuff That's Still Overpriced(/url) | (url="http://"http://www.winternet.com/~mikelr/flame1.html")Webboard Personality Test(/url) | (url="http://"http://www.evula.com")World Domination HQ(/url) | (url="http://"http://www.joecartoon.com")Yield to Immaturity(/url) | (url="http://"http://www.newgrounds.com")Prepare to be Offended!(/url) | (url="http://"http://macaddict.com")A Better Machine, a Better Magazine(/url) | (url="http://"http://www.maximonline.com")Sex, Gear, Sports, Entertainment, More Sex(/url) | (url="http://"http://homepage.mac.com/neonsoldierx/PhotoAlbum3.html")Sephil Saga(/url) | (url="http://"http://www.theonion.com")Because Turnips Suck(/url) | (url="http://"http://homepage.mac.com/neonsoldierx/.Pictures/studmuffin.jpg")Neon's Mug Shot(/url)

    • Resedit is a resource editor, meaning that it takes data encoded as hex or ASCII tect (I think - is that what the STR# rsrc are?) and decodes it enough to give you a simpler way of editing it. Novatools is a front-end for the Nova custom files, which resedit can't decode and simply displays as hex.

      There is no reason for you to need to "unpack" the compressed files: the data is al there in uncompressed hex, I think.

      So in theory it would be possible for you to edit the code using a standard hex editor, but there's no real documentation on how you'd go about doing that.

      IMHO, you can (a) emulate a mac, or (🆒 buy a mac. If you do figure out how to make it work, then perhaps you can post it here.

      ------------------
      (url="http://"http://www22.brinkster.com/swnova")Star Wars: Nova(/url)
      (url="http://"http://forums.evula.com/viewforum.php?f=23")SW:N Forums(/url)

      (This message has been edited by Echoboom (edited 08-18-2003).)

    • Quote

      Originally posted by Neon Soldier:
      **ResEdit is a rescource editor. Hence the name.

      **

      ResEdit, as its most basic level, is a hex editor.

      ------------------
      (url="http://"http://www.ariossoftware.com")Arios SoftWare(/url)
      (url="http://"http://www.ariossoftware.com/programs/evone/")EVONE 1.0.0 - the plugin editor for EV/EVO/EVN(/url)

    • Quote

      Originally posted by Echoboom:
      So in theory it would be possible for you to edit the code using a standard hex editor, but there's no real documentation on how you'd go about doing that.

      It is quite possible to see the hex in any data fork hex editor. However, you need to be sure that the file is compressed into a .bin format, so the resourcefork is preserved. Because resource forks do not exist in Windows, it will automatically remove the fork from macintosh files.

      To completely understand all the files, you will need to get a text copy of the templates, documentation on the resource fork structure, and documentation on the .bin file format. This is quite a bit of work to merely change one aspect of a file, but it is possible. 😉

      ------------------
      Eat blazing electric death!

    • Quote

      Originally posted by Valic:
      About the .rez format for that matter. If anyone from ambrosia or somewhere might comment on whether information released on that format will be specifically formatted for Bin. or Hex editing?

      This is a preliminary .rez file format posted by Mehrunes a few weeks ago. It seems his original post fulling covering this format is no longer to be found, but I did find this partial listing in another topic.
      (url="http://"http://www.ambrosiasw.com/webboard/Forum9/HTML/004378.html#")http://www.ambrosias...ML/004378.html#(/url)

      The file is seperated into 3 main sections...
      1. File header (contains offsets to each resource as well as the resource map)
      2. Resource Entries (the resources themselves as written in the Nova Bible)
      3. Resource Map(Contains an entry number, resource type, resource ID
                        and name of the resource in the same order the resources
                        themselves are listed in the file)
      
      File Header & Offset list - (INTEL BYTE ORDER)
          42 52 47 52 - Header
          LONG - 01 00 00 00 unknown
          LONG - Offset of end of header(before the "resource.map" line, actually it seems to always point to the first 'e' in the 'resource.map' string at the end)
          LONG - 01 00 00 00 unknown
          LONG - Number of first resource in Index (all index entries are numbered sequentially starting with this number)
          LONG - Number of entries in Index
       
          repeated for each resource entry {
              LONG - resource offset
              LONG - resource length
              LONG - Unknown ( the last entry in the list contains it's own offset, for all other entries this is 00 00 00 00)
          }
          "resource.map" - 12 byte String
          00 - null terminator 
      
      
      **everything else appears to be in Motorola byte order 
      
       Resource Entries-
             These are defined in the Nova Bible. 
             Each entry is immediately followed by the next
             Here's the format of the a few of the resource types...
      
      // 1860 bytes
      struct Ship {
          SHORT    shipHolds;
          SHORT    shipShield;
          SHORT    shipAccel;
          SHORT    shipSpeed;
          SHORT    shipTurn;
          SHORT    shipFuel;
          SHORT    shipFreeMass;
          SHORT    shipArmor;
          SHORT    shipShieldRecharge;
          SHORT       shipWeapon1;
          SHORT       shipWeapon2;
          SHORT       shipWeapon3;
          SHORT       shipWeapon4;
          SHORT       shipWeapon1Count;
          SHORT       shipWeapon2Count;
          SHORT       shipWeapon3Count;
          SHORT       shipWeapon4Count;
          SHORT       shipWeapon1Ammo;
          SHORT       shipWeapon2Ammo;
          SHORT       shipWeapon3Ammo;
          SHORT       shipWeapon4Ammo;
          SHORT     shipMaxGuns;
          SHORT     shipMaxTurrets;
          SHORT     shipTechLevel;
          LONG    shipCost;
          SHORT     shipDeathDelay;
          SHORT    shipArmorRecharge;
          SHORT    shipExplode1;
          SHORT    shipExplode2;
          SHORT     shipDispWeight;
          SHORT     shipMass;
          SHORT     shipLength;
          SHORT     shipAI;
          SHORT     shipCrew;
          SHORT     shipStrength;
          SHORT     shipGovmnt;
          USHORT     shipFlags;
          SHORT   shipPodCount;
          SHORT   shipDefaultItem1;
          SHORT   shipDefaultItem2;
          SHORT   shipDefaultItem3;
          SHORT   shipDefaultItem4;
          SHORT   shipDefaultItem1Count;
          SHORT   shipDefaultItem2Count;
          SHORT   shipDefaultItem3Count;
          SHORT   shipDefaultItem4Count;
          SHORT   shipFuelRegen;
          SHORT   shipSkillVar;
          USHORT   shipFlags2;
          ULONG  shipContributes;
          ULONG  shipContributes;
          CHAR     shipAvailability(255);
          CHAR     shipAppearOn(255);
          CHAR     shipOnBuy(256);
          SHORT   shipDeionize;
          SHORT   shipIonizeMax;
          SHORT   shipKeyCarried;
          SHORT   shipDefaultItem5;
          SHORT   shipDefaultItem6;
          SHORT   shipDefaultItem7;
          SHORT   shipDefaultItem8;
          SHORT   shipDefaultItem5Count;
          SHORT   shipDefaultItem6Count;
          SHORT   shipDefaultItem7Count;
          SHORT   shipDefaultItem8Count;
          ULONG     shipRequire;
          ULONG     shipRequire;
          SHORT   shipBuyRandom;
          SHORT   shipHireRandom;
          CHAR     Unused(68);
          CHAR     shipOnCapture(255);
          CHAR     shipOnRetire(255);
          CHAR     shipShortName(64);
          CHAR     shipCommName(32);
          CHAR     shipLongName(128);
          CHAR     shipMovieFile(32);
          SHORT   shipWeapon5;
          SHORT   shipWeapon6;
          SHORT   shipWeapon7;
          SHORT   shipWeapon8;
          SHORT   shipWeapon5Count;
          SHORT   shipWeapon6Count;
          SHORT   shipWeapon7Count;
          SHORT   shipWeapon8Count;
          SHORT   shipWeapon5Ammo;
          SHORT   shipWeapon6Ammo;
          SHORT   shipWeapon7Ammo;
          SHORT   shipWeapon8Ammo;
          CHAR     shipSubtitle(64);
          USHORT     shipFlags3;
          SHORT     shipUpgradeTo;
          LONG     shipUpgradeCost;
          LONG     shipSellValue;
          SHORT     shipEscortType;
          CHAR     Unused(16);
       
      // 192 Bytes
      struct Govt {
          SHORT   VoiceType;
          USHORT   Flags;
          USHORT   Flags2;
          LONG   ScanFine;
          SHORT   CrimeTol;
          SHORT   SmugPenalty;
          SHORT   BoardPenalty;
          SHORT   KillPenalty;
          SHORT   ShootPenalty;
          SHORT   InitialRec;
          SHORT   MaxOdds;
          SHORT   Class1;
          SHORT   Class2;
          SHORT   Class3;
          SHORT   Class4;
          SHORT   Ally1;
          SHORT   Ally2;
          SHORT   Ally3;
          SHORT   Ally4;
          SHORT   Enemy1;
          SHORT   Enemy2;
          SHORT   Enemy3;
          SHORT   Enemy4;
          SHORT   SkillMult;
          USHORT   ScanMask;
          CHAR   CommName(16);
          CHAR   TargetCode(16);
          ULONG Require;
          ULONG Require;
          SHORT InhJam1;
          SHORT InhJam2;
          SHORT InhJam3;
          SHORT InhJam4;
          CHAR   MediumName(64);
          ULONG Color;
          ULONG ShipColor;
          SHORT Interface;
          SHORT NewsPict;
          CHAR Unused(16);
      };
       
      // 1860 Bytes
      struct Miss {
          SHORT  AvailStel;
          SHORT Unused;
          SHORT  AvailLoc;
          SHORT  AvailRecord;
          SHORT  AvailRating;
          SHORT  AvailRandom;
          SHORT  TravelStel;
          SHORT  ReturnStel;
          SHORT  CargoType;
          SHORT  CargoQty;
          SHORT  PickupMode;
          SHORT  DropOffMode;
          USHORT  ScanMask;
          SHORT Unused;
          LONG  PayVal;
          SHORT ShipCount;
          SHORT ShipSyst;
          SHORT ShipDude;
          SHORT ShipGoal;
          SHORT ShipBehav;
          SHORT ShipNameID;
          SHORT ShipStart;
          SHORT CompGovt;
          SHORT CompReward;
          SHORT ShipSubtitle;
          SHORT BriefText;
          SHORT QuickBrief;
          SHORT LoadCargText;
          SHORT CompText;
          SHORT FailText;
          LONG TimeLimit;
          SHORT CanAbort;
          SHORT ShipDoneText;
          SHORT Unused;
          SHORT AuxShipCount;
          SHORT AuxShipDude;
          SHORT AuxShipSyst;
          SHORT Unused;
          USHORT Flags;
          USHORT Flags2;
          SHORT Unused;
          SHORT Unused;
          SHORT RefuseText;
          SHORT AvailShipTyp;
          CHAR AvailBits(255);
          CHAR OnAccept(255);
          CHAR OnRefuse(255);
          CHAR OnSuccess(255);
          CHAR OnFailure(255);
          CHAR OnAbort(255);
          LONG Require;
          LONG Require;
          SHORT DatePostInc;
          CHAR OnShipDone(255);
          CHAR AcceptButton(32);
          CHAR RefuseButton(32);
          SHORT DispWeight;
          CHAR Unused(17);
      };
      
      Resource Map-
          **this is the last entry in the offset index.
          
          LONG - Unknown (always 00 00 00 08 from what I've seen)
          LONG - Number of resource types in the file
       
           repeated for each type of resource included in the file
           {
                4 Byte String - Resource type name
                LONG - Offset from beginning of resource map to first entry of that type
                LONG - Number of entries of that resource type
           }
      
           repeated for each resource entry {
                LONG - Index of resource in file starting from the number defined in the resource.map
                4 Byte STRING - resource type ("sp•n", "shŠn", "bššm"...)
                SHORT - Object ID (in game terms, i.e. Federation govt is ID 128)
                256 Bytes - ANSI String - Object 'Name' (any additional space is filled with buffer overrun)
           }
      
      EOF
      

      Some people are working on a Windows editor, such as myself.
      The .rez format was written by Burger at Contaband. Notice the first 4 letters of the .rez file are BRGR.
      Send a message to Mehrunes and he'll probably give you the entire .rez format he put together.
      Hope this info helps.

      (/edit) Woops. Didn't realize the format of the .rez file would get jumbled like that. You should look at the link I posted above.(/edit)
      ------------------
      Dawn of Infinity(formerly OpenEV): the open-source multi-player EV (url="http://"http://openevgalaxy.sourceforge.net")http://openevgalaxy.sourceforge.net(/url)

      (This message has been edited by Geuis (edited 08-18-2003).)

      (This message has been edited by Mazca (edited 08-18-2003).)

    • Geuis - Use the CODE tag instead of QUOTE if you want to preserve the formatting. I've edited your post to that effect.

      ------------------
      (url="http://"http://www.mazca.com/")Mazca(/url) , Moderator, (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&number;=9&SUBMIT;=Go&urgaylol;=yes")EV Developer's Corner(/url)
      Go get your knife.

    • Mazca, if you could, could you adjust those comments to reduce on the horizontal scrolling? Anyways, at least it's readable now... 😉

      (edit)Hrm... Well, that format looks almost exactly like the Mac Resource Format, from what I've seen. The resource fork format also has a Resource Header, which gives the offsets to the resource map, and the resource map also lists each individual resource type. The only difference I see is that the name is included in the resource map, as opposed to being in a seperate offset. A change for the better, as I see it. :)(/edit)

      ------------------
      Eat blazing electric death!

      (This message has been edited by SpacePirate (edited 08-18-2003).)