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

YouTube Channel
User avatar
Lionhardt
Contributor
 
Posts: 1070
Joined: 29 Jan 2013, 23:44
Has liked: 188 times
Been liked: 144 times
FAF User Name: Lionhardt

Re: Python SCMap Parser

Postby teddy26 » 06 Jan 2019, 12:43

Hello,

Friends I don't know about python SCMap parser.I'm beginner in python Language so tell me its working with python so that when I learn on that topic it gives me knowledge about them.One thing please provide some details which is important part python language from job purposes.
Please Reply...
Thanks...
teddy26
 
Posts: 2
Joined: 06 Jan 2019, 12:19
Has liked: 0 time
Been liked: 0 time
FAF User Name: tedd

Re: Python SCMap Parser

Postby teddy26 » 20 Mar 2019, 20:46

With Python 3 being the future of Python while Python 2 is still in active use, it is good to have your project available for both major releases of Python. This guide is meant to help you figure out how best to support both Python 2 & 3 simultaneously.

If you are looking to port an extension module instead of pure Python code, please see Porting Extension Modules to Python 3.

If you would like to read one core Python developer’s take on why Python 3 came into existence, you can read Nick Coghlan’s Python 3 Q & A or Brett Cannon’s Why Python 3 exists.
teddy26
 
Posts: 2
Joined: 06 Jan 2019, 12:19
Has liked: 0 time
Been liked: 0 time
FAF User Name: tedd


Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest