Author Topic: op2 mapper  (Read 4403 times)

Fire Plague

  • Guest
op2 mapper
« on: September 29, 2018, 07:23:21 PM »
the generate code function in the mapper is archaic. do we still have the source code that made the mapper? It would be nice to update the fields so we don't have to look up every mapID value over hundreds of lines of code and even add a few items like lava possible as a game object.

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1015
Re: op2 mapper
« Reply #1 on: September 29, 2018, 07:51:24 PM »
Fire Plague,

The OP2Mapper backend code is available in the repository here: https://github.com/OutpostUniverse/OP2Editor.

The frontend code is generally available if you search through the forums. Unfortunately, we have never checked it into a repository.

Leeor has started a replacement mapper, but I don't think it gets much attention right now with Outpost HD in full swing. You can find that code here: https://github.com/OutpostUniverse/op2-landlord

-Brett

Fire Plague

  • Guest
Re: op2 mapper
« Reply #2 on: September 30, 2018, 12:38:53 AM »
I'm not sure what you mean by front end and back end. I'm assuming that you mean the GUI is the front end and the back end is the coding doing the dirty work in the background. Really, all I was saying was that I know in the past there was a file that you could change having "$$" for references to fields and that the code generator would place these in the code it generates. Therefore I could take the code it generates for the little white flags that pop up and change them to lava possible. (this I did with some help back along time ago)

Now the thing is only one exe. So updating the code that it spits out would have to be in the source code right....

I was hoping that it would be sitting there and all someone had to do was change a few lists of fields and recompile.  Dream big right.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: op2 mapper
« Reply #3 on: September 30, 2018, 05:08:59 PM »
What you want to do makes sense, and seems like it shouldn't be that hard. Would be nice if we could just update a few templates.

I'm afraid I don't know how to make this change currently. The editor hasn't aged well. The front end (user interface) was written in VB6. VB6 hasn't had an updated compiler released in about 20 years. Additionally, Microsoft doesn't provide the old one for free as part of any downloadable Visual Studio package. I hear you can get the old VB6 compiler with one of their paid packages or subscriptions. Failing that, someone would need to use a hacked version to work on the editor front end.

The code generation feature is part of the front end.


For reference, the backend was written in C++. It does all the file parsing and writing, handling of archives and compression, and provides the front end with (hopefully) easy to use objects. We can update the backend using freely available versions of Visual Studio. The backend code is also a bit antiquated, but still works.


If you're interested in digging up an old version of VB6 and working on this, perhaps we can offer some help and guidance. One of my current stumbling blocks with this project is I use Linux now, and the old VB6 compiler supposedly doesn't work under Wine, so I'd have no way to use it without access to a Windows development environment.

Fire Plague

  • Guest
Re: op2 mapper
« Reply #4 on: October 01, 2018, 08:36:55 AM »
as much as I would like to do that, it's not in my realm of possibilities. I hear there is a not so prosperous attempt to re create it on C++ but that headache is well above my level. Since we are on the topic of broken mapper, I was poking around the user interface for a while now and I noticed that I can export map files but when I go to add them they crash the mapper and when I try to add wells to art.vol (like well00001.bmp or my created well000013.bmp) it wont crash but won't add them either. How do you guys get the files into the .vol that you need? I thought that you had to upload them into the file so that the game will actually use them.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: op2 mapper
« Reply #5 on: October 01, 2018, 08:56:18 AM »
No, just copy files to the Outpost 2 folder, they will override what is in the VOL files.

If you really want to repack or unpack VOL files (which you don't need to make a level), you can use the OP2Archive tool.