Python SCMap Parser

Post here if you want to help developing something for FAF.

Python SCMap Parser

Postby b2ag » 14 Apr 2017, 03:00

Hi,

I've build a script based on the bits currently flying around in the world wide web (mostly thanks to HazardX) on scmap file format parsing. My implementation successfully parsed the 123 SC maps currently on my PC with map minor versions including 60, 59 (only one map), 56 and 53.
I've chosen Python to write this script, because I'm using Linux and can't really deal with VB, .NET and C# code there.
The script definitely contains some unexplained readings and possible wrong readings to variable name mappings. Nevertheless it is able to find the props section on at the very bottom of each map file for all my 123 maps.

https://pastebin.com/wX333Uea
This should be seen as possible starting point for other developers for their own projects, since it's not that many information out there. Please connive the hacky code.

Have fun,
b2ag
b2ag
Crusader
 
Posts: 17
Joined: 02 Apr 2017, 10:58
Has liked: 6 times
Been liked: 9 times
FAF User Name: b2ag

Re: Python SCMap Parser

Postby b2ag » 18 Apr 2017, 00:51

Younger sibling of code linked above is the beginning of a mirror map tool linked here: https://pastebin.com/kNctKNMq
Read more here: viewtopic.php?f=53&t=14382&start=10#p147024
b2ag
Crusader
 
Posts: 17
Joined: 02 Apr 2017, 10:58
Has liked: 6 times
Been liked: 9 times
FAF User Name: b2ag

Re: Python SCMap Parser

Postby Dragonfire » 20 Apr 2017, 14:33

for code sharing I suggest https://gist.github.com/
My native language is not english, please correct me, because I want to improve my skills # Resource Overview
User avatar
Dragonfire
Evaluator
 
Posts: 559
Joined: 19 Dec 2013, 10:18
Has liked: 39 times
Been liked: 61 times
FAF User Name: Dragonfire

Re: Python SCMap Parser

Postby b2ag » 04 May 2017, 02:16

Dragonfire wrote:for code sharing I suggest https://gist.github.com/


I've now uploaded everything to Github, since I wanted to release the tool which needed this parser. The current parse code is at https://github.com/b2ag/scmap_mirror_to ... d_scmap.py
b2ag
Crusader
 
Posts: 17
Joined: 02 Apr 2017, 10:58
Has liked: 6 times
Been liked: 9 times
FAF User Name: b2ag

Re: Python SCMap Parser

Postby Lionhardt » 05 Feb 2018, 18:05

I have written a small adaptation of your parser and mirror script to randomise decals lod cutoffs. Is it fine if I post that adaptation in the mapping forum?
Help me make better maps for all of us, visit my Mapping Thread.

Maps needing gameplay feedback:
Spoiler: show
[list updated last: 31.1.2018]

(maps available in the vault)

- Hexagonian Drylands
- Fervent Soil and Torrid Suns
User avatar
Lionhardt
Contributor
 
Posts: 1064
Joined: 29 Jan 2013, 23:44
Has liked: 187 times
Been liked: 144 times
FAF User Name: Lionhardt


Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest