(SOLVED, MAY DELETE NOW) Any tools to easily CROP a map (not CUT off a piece, but CROP, see inside).

Somebody613

Deity
Joined
Nov 18, 2019
Messages
2,685
I see that Pit is very unlikely to ever do it (editing Space out of his current Earth Map) himself, and I got annoyed (and rage quit) after merely editing 10 lines of text, lol.
So, any actual TOOLS out there that would let me CROP a map the same way you would crop an image (that is, from any side and in any dimensions)?
Note: I'm talking about Pit's map specifically. It has Space added AT THE TOP of the map, as additional (y) coordinates, and thus it can only be textually edited line-by-line. For 200+ lines. Thanks but no thanks.
Any HELP, please?
 
Sounds like it should be possible to edit the lines more systematically than line by line.

Could you describe what you do when you edit the lines?
 
I literally manually cut out entire chunks from y=123 to y=199, for each x. And there are 230+ instances of x there. It's insane.
The problem to do so systematically is because you have a 3-layer repetitive matrix:
PLOT
x=N, y=M
END PLOT
Where N and M are from 0 to "map size -1".
I really don't see how a script would be able to handle the task of cutting out only SOME of these N-M combinations.
 
Well, if there’s a pattern that can be defined it should be doable with a creative regex and a simple search and replace.
What file is it? i might have time to look at it later today
 
The latest version of Pit's map, lol.
I want to de-Space it, both because of memory issues and because we now actually have Multi-Maps-Space available (to a degree).
The task it to delete all PLOT lines for each x, and each y=(123,199).
You technically also need to edit the map size at the top of the file to (y=123), but I can do so myself, lol.
I would really appreciate, if you manage to crack this nut.
 
Hopefully I didn't misunderstand your request.
In the attached files all the BeginPlot-EndPlot has been replaced by blank lines for all y values of 123-199 (had a brief look at the result and I think I got them all)
 

Attachments

  • C2C-UEM-ByPit2015-V5.8 Edited.7z
    117.5 KB · Views: 4
Hopefully I didn't misunderstand your request.
In the attached files all the BeginPlot-EndPlot has been replaced by blank lines for all y values of 123-199 (had a brief look at the result and I think I got them all)
Edited it to full functionality.
Huge thanks. Gonna post it in Pit's thread and CREDIT you.
 

Attachments

  • (no space)C2C-UEM-ByPit2015-V5.8.CivBeyondSwordWBSave
    2.8 MB · Views: 5
Removed the blank lines as well (removed all blank lines in the file, so if there were any other than those I created they are gone as well)
 

Attachments

  • C2C-UEM-ByPit2015-V5.8 Eited2.7z
    117.1 KB · Views: 5
Removed the blank lines as well (removed all blank lines in the file, so if there were any other than those I created they are gone as well)
I did that by loading the scenario as Americans (civ #0) and then saving it in WB, then editing it back to Pit's format, lol.
I'll compare the files now.
 
No worries, hopefully i didn’t remove too much.
Learned regex just the other day, so I’m just glad I could actially use it.
 
Top Bottom