Author Topic: Map/scenario file exe procedure  (Read 1387 times)

0 Members and 1 Guest are viewing this topic.

Offline Mart

Map/scenario file exe procedure
« on: April 08, 2015, 03:29:52 PM »
This is question to exe modders.
In the decompiled code, is the map generation procedure visible?
Or, more accurately, what would be useful is map (and/or scenario) files writing procedures, so their format can be known.
Is it something, that can be printed into txt?

My idea is to create external program for generation of such .mp and .sc files, a CMN tool allowing for fast generation of scenarios, especially for multiplayer.
Thank you!

Offline Yitzi

Re: Map/scenario file exe procedure
« Reply #1 on: April 08, 2015, 03:37:21 PM »
This is question to exe modders.
In the decompiled code, is the map generation procedure visible?
Or, more accurately, what would be useful is map (and/or scenario) files writing procedures, so their format can be known.
Is it something, that can be printed into txt?

My idea is to create external program for generation of such .mp and .sc files, a CMN tool allowing for fast generation of scenarios, especially for multiplayer.
Thank you!

I've found some of the sub-procedures of the map generation procedure, but haven't conclusively identified (never mind parsed) the main procedure yet.

It's fairly complex, though.

Offline Mart

Re: Map/scenario file exe procedure
« Reply #2 on: April 08, 2015, 03:44:07 PM »
Even partial info can be used, e.g. knowing parts of the format, they could be modified in generated files by the game.
Then some of the unknowns might be deduced by trial and error.

Offline Yitzi

Re: Map/scenario file exe procedure
« Reply #3 on: April 08, 2015, 05:01:54 PM »
Even partial info can be used, e.g. knowing parts of the format, they could be modified in generated files by the game.
Then some of the unknowns might be deduced by trial and error.

Ok, the addresses for landmark creation are as follows:

5C8630: Main function (in some cases, but sub-functions seem to cover most or all cases):
  5C5EF0: jungle
  5C5C70: crater
  5C6DB0: volcano
  5C7F40: mesa
  5C8150: ridge
  5C69E0: uranium
  5C64A0: ruins
  5C7750: unity
  5C7A80: fossil
  5C7540: nexus
  5C7CB0: Nessus Canyon (by default/without mods, not created on random maps)
  5C7020: borehole
  5C6200: sargasso
  5C6740: dunes
  5C6C40: fresh
  5C83B0: geothermal

Some map details:

Flat map: 94988C, bit 1
Half map width: 68FAF0
Map width: 949870

Data for map squares:

  Height category (thousands of feet): +0, bits E0
  Height is determined by +1
  Raininess: +0, bits 18
  Rockiness: +4, bits C0 00
  Improvements: +8:
    Base: bit 1 (but seems to be a bit more complicated)
    Unit(s): bit 2 (probably, but also has same complications as base)
    Road: bit 4
    Magtube: bit 8 (so has C)
    Mine: bit 10
    Fungus: bit 20
    Solar: bit 40
    River: bit 80
    Resource bonus: bit 4 00
    Monolith: bit 20 00
    Farm: bit 80 00
    Enricher: bit 8 00 00
    Forest: bit 20 00 00
    Condenser: bit 40 00 00
    Mirror: bit 80 00 00
    Borehole: bit 1 00 00 00
  Landmarks: +C:
    Crater: 1
    Volcano: 2
    Jungle: 4
    Uranium: 8
    New Sargasso: 10
    Ruins: 20
    Dune: 40
    Freshwater: 80
    Mesa: 1 00
    Canyon: 2 00
    Geothermal: 4 00
    Pholus Ridge: 8 00
    Borehole cluster (actual holes): 10 00
    Manifold Nexus: 20 00
    Unity: 40 00
    Fossil field ridge: 80 00
    Higher seems to be control rules.

Offline Mart

Re: Map/scenario file exe procedure
« Reply #4 on: April 08, 2015, 05:32:39 PM »
Thank you!
I will try to write something working on the maps.
:)

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

Industrial Grade Nano-Paste, one of Planet's most valuable commodities, can also be one of its most dangerous. Simply pour out several canisters, slide in a programming transponder, and step well away while the stuff cooks. In under an hour the nano will use available materials to assemble a small factory, a hovertank, or enough rifles to equip a regiment.
~Col. Corazon Santiago 'Planet: A Survivalist's Guide'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 39.

[Show Queries]