Jump to content

CnCNet Forums

Search In
  • More options...
Find results that contain...
Find results in...

lovalmidas

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About lovalmidas

  • Rank
    Technician
  1. Hi, I come from https://forum.dune2k.com/forum/11-dune-2000/ so I am rather new here. Please be patient with me :D Also, I don't see a separate subforum for modding information, hence I post it here. If there is a more appropriate place for this information, please help inform me so I can make future posts there. My content is catered more to the single player aspect and modders so those in the multiplayer scene, I'm sorry but I don't have much for you. Information is also shown here: https://forum.dune2k.com/topic/28787-campaignuib-research/ And summarized here: https://github.com/nguoiyoujie/Spice2k/blob/master/doc/spec/uibCampaign.md I have made an editor that allows you to inspect and modify a campaign.uib file: https://github.com/nguoiyoujie/Spice2k . It is still under development, so use with caution and many backups! ------------------- When you first start a new campaign, you see the campaign map evolve from a globe of Arrakis (or if you did not have a working cutscene file, just the map). Then the following occur: The game announcer (SFX voice) opens the campaign with three statements. One for Atreides, one for Harkonnen, one for Ordos. The order depends on which house you chose to play as. Let's say you picked Atreides. In fact, we may use this video as reference: https://www.youtube.com/watch?v=-x9MahcVn7k The game announcer opens with the first statement about Atreides. Concurrently, the map animates, and some regions are colored blue, left to right. The game announcer delivers a second statement about the Ordos. Concurrently, the map animates, and some regions are colored green, left to right. The game announcer delivers a second statement about the Harkonnen. Concurrently, the map animates, and some regions are colored red, left to right. Two Atreides icons appear on the map. The game releases control to the player. The player may select the regions where the icons are, or perform other actions (Save, Load, Quit). If the player selects a playable region, the game takes the player to the briefing for that mission. For the most part, these actions are controlled by the campaign.uib file, I have found out roughly how it works, and other interesting tidbits related to the single-player campaign. My findings are summarized in the image below: The control flow for the campaign map is a little arcane (I kinda dislike it), but here goes: The campaign.uib file is divided into 3 Houses, each House with 10 104-byte sections. Each section represents a mission 0 to 9. Mission 0 appears to be a setup performed before animating Mission 1. The campaign.uib file is loaded into the game memory (0x00795708) at startup, like other uib files. If changes are made to the file while the game is in progress, the game has to be restarted for the changes to apply. The executable has hardcoded the following limits: 3 supported Houses, 9 supported missions, each mission having 2 supported versions (V1 and V2), and 27 map regions. Changing those require modifying the executable. The campaign map is split into 27 map regions. The background piece is DUNEMAP2. The graphics for each map piece lies in /data/UI_GFX/regions. The position and polygon hitbox are hardcoded in the game. The polygon points appear to be a POINT (int x, int y) array in executable addresses 0x004be3fc to 0x004beb84. Reference Flow: Atreides Mission 4 - https://www.youtube.com/watch?v=_3hZzNg9TrA Some items remain hardcoded in the game: The maximum number of mission choices is 2. The maximum number of house campaigns, without modifying the executable, is 3. The maximum number of missions per house, without modifying the executable, is 9. The number of regions is hardcoded to be 27, excluding the null region (00) The icons are for display only. The clickable regions are polygons hardcoded into the game at 0x04BE3FC, in an array of 27 72-byte structures, each structure containing a uint representing point count, and a sequence of POINT {x, y} structures denoting each point's location relative to the top left corner of the map. Trivia: The original game has a bug where region 26 overlaps with another region (see image below, the bottom right corner of the map). It has never been detected because the original campaign never used region 26 as a clickable region, and I am not sure if there ever has been a modded campaign.uib.
×
×
  • Create New...