• Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Askeladd

  • Rank
  1. I'm using OrderedDictionary because I want to take care of double tag keys and I want to preserve the order of the tags. There is no built-in generic version of it which is annoying, so I wrote one myself yesterday. Thanks for the tips. There are several ways to do things in C#, but I know what I'm doing.
  2. Nevermind, I figured it out. The mistake was in the Format80 decoder. I added an argument to specify the start of the destination buffer but forgot to take that offset into account in the algorithm. D'oh XD
  3. Hi guys. I want to read RA1 map files and I can decode the MapPack section just fine, however when reading for example scg01ea.ini (first Allied mission) I am encountering several (template id, template tile index) entries where the index is set to 255 rather than a valid index (0, 1, 2, etc). Yet the map displays fine in the game and RAED. How do they handle this? I'm positive my code is correct and I couldn't find an answer digging through the OpenRA, openredalert, etc, source codes. Here is the relevant code just in case (C#): private static TerrainTile[] ReadMapPack(IOrderedDictionary mappack) { var sb = new StringBuilder(); for (int i = 0; i < mappack.Count; i++) sb.Append(mappack[i] as string); var bin = Convert.FromBase64String(sb.ToString()); var br = new BinaryReader(new MemoryStream(bin)); var mapdata = new byte[3 * Constants.MapCells]; int mdcnt = 0; while(mdcnt < mapdata.Length) { int cmpsz = br.ReadUInt16(); // compressed size int ucmpsz = br.ReadUInt16(); // uncompressed size var chunk = br.ReadBytes(cmpsz); Format80.Decode(chunk, 0, mapdata, mdcnt, cmpsz); mdcnt += ucmpsz; } var terrain = new TerrainTile[Constants.MapCells]; var tmpids = new ushort[Constants.MapCells]; br = new BinaryReader(new MemoryStream(mapdata)); for (int i = 0; i < Constants.MapCells; i++) tmpids[i] = br.ReadUInt16(); for (int i = 0; i < Constants.MapCells; i++) terrain[i] = new TerrainTile(tmpids[i], br.ReadByte()); return terrain; }
  4. Could you at least open source it so that somebody else can pick it up?
  5. Cool, thanks for the effort man! No worries I know how to use a hex editor. :yo: Update: I'm currently using Iran's 3.03p that's on Github. The hex edit works but only if I disable extra multiplayer countries (by commenting out the include line in main.asm and rebuilding the .exe). Just letting people know in case someone else wants to use this tweak.
  6. I meant the original game interface but now that you mention it, it would be useful if it was possible in the CnCNet interface as well (for a mod obviously).
  7. No need to be sarcastic. I know how the rules.ini and everything works and what is and isn't possible. I'm actually hoping that someone knows a hex edit tweak to limit the number of entries in the country drop down list.
  8. Hi, I would like to only show the first two countries in the skirmish/multiplayer menu, Russia and England (and rename them to Soviets and Allies). Is there a way to do this?
  9. RAED crashes when I drag something like a unit or structure over waypoint 98 (others are fine) with the following error: Cannot change Visible in OnShow or OnHide. Runtime error 255 at 00037A51. For some reason it only seems to happen on new maps (including the blank maps that you provided) but not on the original maps.