Jump to content

.mis file Editor - Change the build order and many other things


Recommended Posts

Posted

Download: http://funkyfr3sh.cncnet.org/files/d2k/MisEditor.zip

 

1. Extract the files to your game folder

2. Take any .mis file you like to edit and rename it to "MisEditor.MIS" then replace it with the example one included in the download

3. Open "MisEditor.txt" in a text editor and change the value you like

4. Start MisEditor.exe -> it will now read MisEditor.MIS, then it applies all values found in "MisEditor.txt" and save the file back as "MisEditor.mis"

 

I Added a few example values into the MisEditor.txt, you can find a full list here:

http://funkyfr3sh.cncnet.org/files/d2k/MissionFileValues.txt

I also tried to sort the values, some of them will only work under the [AI] section, some only under the other sections [MISSION] [EVENTS] -> http://funkyfr3sh.cncnet.org/files/d2k/MissionFileValues%20-%20sorted.txt

 

this is how the example file looks:

[AI]
HarvestersPerRefinery = 5
MaxBuildings HEAVY_FACTORY = 5
MaxBuildings BARRACKS = 0
[END]
 

Allow the AI players to have 5 harvs per refinery

it will change the max amount of HEAVY_FACTORY the AI can build to 5

it will change the max amount of BARRACKS the AI can build to 0

 

as you can see, some values take parameter like "HEAVY_FACTORY" or "BARRACKS" or even the side name "ATREIDES"

Most of the values are integers, but some are floats (you have to test around)

-

 

Note:

MisEditor.exe is just a modified dune2000.exe where I enabled the file format converter

The game will start up, convert the files and shut down again

  • Upvote 2
Posted

I started to write down the values of the original _prac.mis file, here are the first values (it's not even the half, there are tons)

 

[AI]

FirstAttackBuildingDelay = 12000
TimeBetweenBuildingAttacks = 15000
AttackBuildingStrength = 40
ProtectStrength = 75
DefendStrength = 40
SpeedWeight NoPurpose = 1.0
SpeedWeight Base = 1.0
SpeedWeight Guarding = 1.0
SpeedWeight Protect = 1.0
SpeedWeight Defend = 1.0
SpeedWeight AttackBuilding = 1.0
SpeedWeight AttackUnit = 1.0
SpeedWeight GuardBuilding = 1.0
SpeedWeight Harvesters = 1.0
SpeedWeight Carryalls = 1.0
SpeedWeight Returning = 1.0
SpeedWeight Repair = 1.0
SpeedWeight TempGuard = 1.0
SpeedWeight Deploying = 1.0
SpeedWeight Rampaging = 1.0
SpeedWeight DefendArea = 1.0
HPWeight NoPurpose = 1.0
HPWeight Base = 1.0
HPWeight Guarding = 1.0
HPWeight Protect = 1.0
HPWeight Defend = 1.0
HPWeight AttackBuilding = 1.0
HPWeight AttackUnit = 1.0
HPWeight GuardBuilding = 1.0
HPWeight Harvesters = 1.0
HPWeight Carryalls = 1.0
HPWeight Returning = 1.0
HPWeight Repair = 1.0
HPWeight TempGuard = 1.0
HPWeight Deploying = 1.0
HPWeight Rampaging = 1.0
HPWeight DefendArea = 1.0
FirePowerWeight NoPurpose = 1.0
FirePowerWeight Base = 1.0
FirePowerWeight Guarding = 1.0
FirePowerWeight Protect = 1.0
FirePowerWeight Defend = 1.0
FirePowerWeight AttackBuilding = 1.0
FirePowerWeight AttackUnit = 1.0
FirePowerWeight GuardBuilding = 1.0
FirePowerWeight Harvesters = 1.0
FirePowerWeight Carryalls = 1.0
FirePowerWeight Returning = 1.0
FirePowerWeight Repair = 1.0
FirePowerWeight TempGuard = 1.0
FirePowerWeight Deploying = 1.0
FirePowerWeight Rampaging = 1.0
FirePowerWeight DefendArea = 1.0
CashStash NoJob = 1800
CashStash RepairBuildings = 1800
CashStash RepairUnits = 1800
CashStash BuildHarvesters = 1800
CashStash BuildCarryalls = 1800
CashStash BuildBuildings = 2500
CashStash BuildUnits = 2575
Morale NoPurpose = 100
Morale Base = 100
Morale Guarding = 100
Morale Protect = 100
Morale Defend = 100
Morale AttackBuilding = 80
Morale AttackUnit = 100
Morale GuardBuilding = 100
Morale Harvesters = 100
Morale Carryalls = 100
Morale Returning = 100
Morale Repair = 100
Morale TempGuard = 100
Morale Deploying = 100
Morale Rampaging = 100
Morale DefendArea = 100
AttackSidePriority ATREIDES = 0
AttackSidePriority HARKONNEN = 0
AttackSidePriority ORDOS = 0
AttackSidePriority EMPEROR = 0
AttackSidePriority FREMEN = 0
AttackSidePriority SMUGGLER = 0
AttackSidePriority MERCENARY = 0
AttackSidePriority OTHER = 0
UnitBuildPriority "LIGHT INF" = 3.0
UnitBuildPriority TROOPER = 3.0
UnitBuildPriority ENGINEER = 0.01
UnitBuildPriority THUMPER = 0.0
UnitBuildPriority SARDAUKAR = 1.0
UnitBuildPriority TRIKE = 1.0
UnitBuildPriority RAIDER = 1.0
UnitBuildPriority QUAD = 1.0
UnitBuildPriority HARVESTER = 0.0
UnitBuildPriority "ATREIDES COMBAT TANK" = 1.0
UnitBuildPriority "HARKONNEN COMBAT TANK" = 1.0
UnitBuildPriority "ORDOS COMBAT TANK" = 1.0
UnitBuildPriority MCV = 0.0
UnitBuildPriority "MISSILE TANK" = 1.0
UnitBuildPriority DEVIATOR = 1.0
UnitBuildPriority "SIEGE TANK" = 1.0
UnitBuildPriority "SONIC TANK" = 1.0
UnitBuildPriority "DEVASTATOR TANK" = 1.0
UnitBuildPriority CARRYALL = 0.0
UnitBuildPriority CARRYALL2 = 0.0
UnitBuildPriority ORNITHOPTER = 3.0
UnitBuildPriority FREMEN = 0.0
UnitBuildPriority "FR NON STEALTH" = 1.0
UnitBuildPriority SABOTEUR = 0.0
UnitBuildPriority "DEATH HAND ROCKET" = 0.0
UnitBuildPriority SANDWORM = 0.0
UnitBuildPriority "CHOAM FRIGATE" = 1.0
UnitBuildPriority GRENADIER = 1.0
UnitBuildPriority "STEALTH RAIDER" = 1.0
UnitBuildPriority "MP SARDAUKAR" = 1.0

[END]

 

More values coming soon...

  • Upvote 2
Posted

Very nice work!

 

Can you also recover information about the possible values (like minimum and maximum)?

For example, UnitBuildPriority looks to run from 0.0 to 3.0, which is actually kinda an odd range.

Posted
this is how the example file looks:

[AI]

HarvestersPerRefinery = 5

MaxBuildings HEAVY_FACTORY = 5

MaxBuildings BARRACKS = 0

[END]

 

Allow the AI players to have 5 harvs per refinery

it will change the max amount of HEAVY_FACTORY the AI can build to 5

it will change the max amount of BARRACKS the AI can build to 0

It is interesting to know, how many harvesters per refinery in not changed game?

Posted
004E1890   .  52 45 49 4E 4 ASCII "REINFORCE",0                          ; ASCII "REINFORCE"004E18B0   .  41 4C 4C 45 4 ASCII "ALLEGIANCE",0                         ; ASCII "ALLEGIANCE"004E18D0   .  4C 45 41 56 4 ASCII "LEAVE",0                              ; ASCII "LEAVE"004E18F0   .  42 45 53 45 5 ASCII "BESERK",0                             ; ASCII "BESERK"004E1910   .  50 4C 41 59 5 ASCII "PLAYSOUND",0                          ; ASCII "PLAYSOUND"004E1930   .  53 45 54 42 5 ASCII "SETBUILDRATE",0                       ; ASCII "SETBUILDRATE"004E1950   .  53 45 54 41 5 ASCII "SETATTACKBUILDIN"                     ; ASCII "SETATTACKBUILDINGRATE"004E1970   .  53 45 54 43 4 ASCII "SETCASH",0                            ; ASCII "SETCASH"004E1990   .  53 45 54 54 4 ASCII "SETTECH",0                            ; ASCII "SETTECH"004E19B0   .  57494E00      DD 004E4957                                  ; ASCII "EP2"004E19D0   .  4C 4F 53 45 0 ASCII "LOSE",0                               ; ASCII "LOSE"004E19F0   .  42 4C 4F 58 4 ASCII "BLOXFILE",0                           ; ASCII "BLOXFILE"004E1A10   .  41 54 54 52 4 ASCII "ATTRIBFILE",0                         ; ASCII "ATTRIBFILE"004E1A30   .  52 45 56 45 4 ASCII "REVEAL",0                             ; ASCII "REVEAL"004E1A50   .  53 48 4F 57 5 ASCII "SHOWTIMER",0                          ; ASCII "SHOWTIMER"004E1A70   .  48 49 44 45 5 ASCII "HIDETIMER",0                          ; ASCII "HIDETIMER"004E1A90   .  53 48 4F 57 4 ASCII "SHOWMESSAGE",0                        ; ASCII "SHOWMESSAGE"004E1AB0   .  41 44 44 55 4 ASCII "ADDUNITS",0                           ; ASCII "ADDUNITS"004E1AD0   .  53 45 54 46 4 ASCII "SETFLAG",0                            ; ASCII "SETFLAG"

Hmm, that all seems like event types. Some of them are known and supported by Mission editor, but several not (these were actually not used in any mission). For example, the Unknown6 event is actually SETBUILDRATE. What for example means LEAVE or BLOXFILE? Can anyone play around with those uknown/unused event types? They might be really useful in making more possibilities for custom missions and campaigns.

Posted

Adriano:

I think 2

 

Klofkac

You can also add events to the MisEdit.txt, but the format is a bit more complicated (IF THEN ELSE etc)

I don't really know how the events are stored in binary form, if some knows it and could explain then might be easier to reverse them

 

All these belong to the [Mission] section which has something to do with the events:

DEPLOYREINFORCEALLEGIANCELEAVEBESERKPLAYSOUNDSETBUILDRATESETATTACKBUILDINGRATESETCASHSETTECHEP2LOSEBLOXFILEATTRIBFILEREVEALSHOWTIMERHIDETIMERSHOWMESSAGEADDUNITSSETFLAGNoPurpose

There is also a [Events] sections, not sure if there are some strings for this section, probably this ones:

004E1730   .  42 55 49 4C 4 ASCII "BUILDINGEXISTS",0                     ; ASCII "BUILDINGEXISTS"004E1750   .  55 4E 49 54 4 ASCII "UNITEXISTS",0                         ; ASCII "UNITEXISTS"004E1770   .  49 4E 54 45 5 ASCII "INTERVAL",0                           ; ASCII "INTERVAL"004E1790   .  54 49 4D 45 5 ASCII "TIMER",0                              ; ASCII "TIMER"004E17B0   .  43 41 53 55 4 ASCII "CASUALTIES",0                         ; ASCII "CASUALTIES"004E17D0   .  42 41 53 45 4 ASCII "BASEDESTROYED",0                      ; ASCII "BASEDESTROYED"004E17F0   .  55 4E 49 54 5 ASCII "UNITSDESTROYED",0                     ; ASCII "UNITSDESTROYED"004E1810   .  52 45 56 45 4 ASCII "REVEALED",0                           ; ASCII "REVEALED"004E1830   .  48 41 52 56 4 ASCII "HARVESTED",0                          ; ASCII "HARVESTED"004E1850   .  46 4C 41 47 0 ASCII "FLAG",0                               ; ASCII "FLAG"
  • 1 month later...
Posted

I started to write down the values of the original _prac.mis file, here are the first values (it's not even the half, there are tons)

 

 

More values coming soon...

Could you please add more values? I am playing around with the MisEditor.exe to retrieve the byte positions of the properties in .mis file, I already managed it for all values you posted here, but I'm having problems with the others.

Fow example I added this:

BuildingRepairValue BARRACKS = 0.5

But I got this error:

Unknown building [bARRACKS] [ gGameTicks = 0 ]

But for MaxBuildings it worked just well.

 

What are the correct parameters? And what about boolean values?

It would be also good if you helped with finding the offsets of the properties (like HarvestersPerRefinery = 7428, SpecialWeaponDelay = 7448 etc).

Thanks!

Posted

Those should be all params:

 

## group types 1 ##
NoPurpose
Base
Guarding
Protect
Defend
AttackBuilding
AttackUnit
GuardBuilding
Harvesters
Carryalls
Returning
Repair
TempGuard
Deploying
Rampaging
DefendArea

## group types 2 ##
NoJob
RepairBuildings
RepairUnits
BuildHarvesters
BuildCarryalls
BuildBuildings
BuildUnits

## sides ##
ATREIDES
HARKONNEN
ORDOS
EMPEROR
FREMEN
SMUGGLER
MERCENARY
OTHER

## units ##
"LIGHT INF"
TROOPER
ENGINEER
THUMPER
SARDAUKAR
TRIKE
RAIDER
QUAD
HARVESTER
"ATREIDES COMBAT TANK"
"HARKONNEN COMBAT TANK"
"ORDOS COMBAT TANK"
MCV
"MISSILE TANK"
DEVIATOR
"SIEGE TANK"
"SONIC TANK"
"DEVASTATOR TANK"
CARRYALL
CARRYALL2
ORNITHOPTER
FREMEN
"FR NON STEALTH"
SABOTEUR
"DEATH HAND ROCKET"
SANDWORM
"CHOAM FRIGATE"
GRENADIER
"STEALTH RAIDER"
"MP SARDAUKAR"

## buildings ##
CONSTRUCTION_YARD
CONCRETE
CONC2
WIND_TRAP
BARRACKS
SIETCH
WALL
REFINERY
MEDIUM_GUN_TURRET
OUTPOST
LARGE_GUN_TURRET
AT_HIGH_TECH_FACTORY
HIGH_TECH_FACTORY
LIGHT_FACTORY
SILO
HEAVY_FACTORY
STAR_PORT
REPAIR_PAD
RESEARCH_CENTRE
ATREIDES_PALACE
HARKONNEN_PALACE
ORDOS_PALACE
IMPERIAL_PALACE
SP_OUTPOST

 

bool:

YES

TRUE

NO

FALSE

 

 

Edit:

The values for BuildingRepairValue are in Templates.bin starting at 0x0B474

Posted

OK, thanks for reply. I already found out the list of buildings by myself, I discovered that the game probably gets the building names from text.uib (because I did not find strings like CONC2 inside exe).

What I am asking is what parameters should I supply for properties like BuildingRepairValue, DefendBuildingPriority, AttackBuildingPriority, TimeBeforeRebuilding etc. These apparently need building type as parameter, but supplying anything what MaxBuildings normally accepts results in error I posted here. Maybe I need to specify also side (like there are three types of each building)?

Btw I found out that there are values for 100 buildings and 60 units available, but only about half of them are really used (there are 30 unit types). So each building-related property takes 400 bytes and unit-related property takes 240 bytes (except of ProtectUnit which is boolean and takes 60 bytes). I found it out thanks to DefaultBuildingRepairValue and DefaultUnitRepairValue which set the same value for all buildings/units. That quite helped me.

Posted

The names in Templates.bin starting at 0x0B474 are different than the other building names (more building types and those have spaces so you probably need to put them in quotes)

 

yes it should always be the same length for each type, maybe even saved in the same order (could save some time)

Posted

Not sure if it helps, but here is how the game is reading the mission files:

 

80 bytes - TechLevel array (and maybe something else, not sure)

8 bytes - Unknown

60864 bytes - Unknown

64 bytes - Unknown

4608 bytes - Unknown

1344 bytes - Unknown

200 bytes - TileSet

200 bytes - TileData

1 byte - Unknown

1 byte - Unknown

4 bytes - MissionTimerTicks

692 bytes - Unkown

 

You probably know what name some of those arrays have, would be nice to know so i can save it in my db

Posted

Oh nice, last region is related to timers, seems to be used only in places where it draws a text message

Are you talking about the last 692-byte region in .mis files? For me it seems that this region is unused at all. I looked into several .mis files (many, but not all) and it was always full of zeros. Even in missions where time limit is set (A5V1, O6V1, O6V2). Does the game access/use data in that region in any way?

 

And about AI regions. It seems, that the whole first half of AI segment (up to byte around 3800) is unused at all (is filled with zeros), only in the very beginning there are several values (about 40 bytes).

Posted

The first 8 bytes are used (2x int32) in the last region, not sure about the rest

 

Will take a look into the AI settings too

Do you know any .mis file where the 8 bytes are used (are non-zero)?

Posted

Nope dunno if there is a mission, here is what i found out:

 

int32

int32

int32 - index for array 1

int32 array 1 (length = 5) - duration?

int32 array 2 (length = 5)

string array (length = 5 - each 128 byte)

 

I think the game can show up to 5 messages at the same time, the first array holds the duration of the message

 

So this is pretty much the text message queue

Posted

Hmm so if it is just all about shownig some messages then the potential use in custom missions is not very significant, so probably we don't need to much investigate it. However if you possibly get it to work you can tell me.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.