Pb2 lang

Give us your feedback about the Level Editor! Or have an idea? Post it here!

Pb2 lang

Postby lpzimm » 14 February 2018, 18:37

I think we all have experience working with frustrating triggers. They're a graphical interface that requires dropdown menus, clicking, and searching for their location. It makes the level editor clunky and slow for making maps with nice, well customised things, such as variables, and is the main bar for me personally wanting to work with the new trigger settings. My suggestion is to give the level editor an optional text editor, that treats the entire level as a script (or maybe just the trigger actions?). I don't think it would be quite as simple as simply opening up the file for text editing - there would need to be some sort of layer above it. I think it would allow for cool, customised maps to be developed at a higher rate and with fewer glitches. I do feel it wouldn't be too complex to implement in a basic form.

Optionally, some really cool stuff could be done if pb2lang did away with triggers entirely and made an entirely new, code-based system of customising the level, but that would probably cause compatability issues with older levels.
User avatar
lpzimm
Usurpation Soldier [50]
 
Posts: 84
Joined: 17 July 2013, 00:17

Re: Pb2 lang

Postby GiraRay » 15 February 2018, 10:22

The best thing about the PB2 level editor is that it is incredibly easy to learn, use and get used to. Not only will implementation of raw code-based corrupt every other map that exists today, but a lot less people would be willing make maps, which is probably the biggest reason that people still play this game today.

Adding a whole new method of mapping would be too big of an issue for many reasons, and personally, I don't have any problems with the current state of the ALE.
http://plazmaburst2.com/?s=9&a=&m=giraray-riddle1&id=826345
User avatar
GiraRay
Usurpation Soldier [50]
 
Posts: 72
Joined: 25 June 2015, 16:26

Re: Pb2 lang

Postby saw- » 15 February 2018, 12:40

ALE is ok as it is. but if u feel like typing, go back to OLE. all the triggs work I think but u have to memorize the numbers.

saw-
Civil Security Lite [100]
 
Posts: 103
Joined: 13 July 2015, 17:39
Location: Romania

Re: Pb2 lang

Postby lpzimm » 15 February 2018, 17:26

Neither of you understand what I had said. The ALE writes to the .pb2map file anyways - my first idea would be a simple case of opening the .pb2map file up a little bit and putting a layer on top of it.

@giraray it would be an optional feature, so if people felt like working with drop down menus, they still could. It wouldn't have any effect the current method of mapping either.
@saw- That's not even close to what I was talking about.

Here's my mockup of what it would look like if you enabled the text editor:
https://prnt.sc/if6mkn
So you would have the graphical interface and the text editor running parallel. It could allow you to organize your level more easily through object order and comments. Preferably the trigger type params would be strings and not IDs though.
User avatar
lpzimm
Usurpation Soldier [50]
 
Posts: 84
Joined: 17 July 2013, 00:17

Re: Pb2 lang

Postby Eric Gurt » 15 February 2018, 17:58

Every time you save map and have localStorage enabled in your browser - maps are also saved there, but in XML format. You can try editing them there.

PB2 does not have programming language for maps, at best you can get named assembler-like opcodes. Though I feel like they'll be too confusing anyway (added support for direct editing for triggers in simple yet strict syntax. You can try it at the bottom of trigger parameters).
Work it harder
Make it better
Do it faster
Makes us stronger
More than ever hour
After our work is never over.
User avatar
Eric Gurt
PB2 Developer
 
Posts: 409
Joined: 14 July 2013, 16:46
Location: dn.ua

Re: Pb2 lang

Postby lpzimm » 16 February 2018, 06:30

Eric Gurt wrote:Every time you save map and have localStorage enabled in your browser - maps are also saved there, but in XML format. You can try editing them there.

Awesome, it works. Will upload a tutorial for doing it soon, probably. Here's what I found works, step by step:
-> F12 (Inspect Element)
-> Application
-> Local Storage
-> Find latest save
-> Copy Value
-> Create (name).xml
-> Open in N++ (XML editors don't work for me)
-> Paste
-> CTRL+F
-> Find
-> Click Search Mode "Extended (\n ...)
-> Find what: ><
-> Replace with: >\n<
-> E: Optionally Replace " " (w/o quotes) with "\n " (w/o quotes) for it to look prettier.
You'll now have the full markup file. Should look close to http://prntscr.com/iffk28 (excuse my beautiful theme)
E: Ideally there would be an XML editor that makes changes live in-editor though. Still super cool, thanks a whole bunch.

Eric Gurt wrote:PB2 does not have programming language for maps, at best you can get named assembler-like opcodes. Though I feel like they'll be too confusing anyway (added support for direct editing for triggers in simple yet strict syntax. You can try it at the bottom of trigger parameters).

Cool as well, thanks. By the way, I think there's an issue with it calling the default value for the trigger A param "0" instead of "region*1" or whatever.
User avatar
lpzimm
Usurpation Soldier [50]
 
Posts: 84
Joined: 17 July 2013, 00:17

Re: Pb2 lang

Postby Eric Gurt » 16 February 2018, 08:26

PB2 supports indexes for objects of specific types. In short, 0 would mean first movable, 1 second and so on. It was like this in old level editor so such support is still here unless uid starts with #.

This will work for everything including characters, though level editor mixes up players and enemies in specific way (by putting player declarations at the very beginning and placing team players in specific order so they fill teams equally).
Work it harder
Make it better
Do it faster
Makes us stronger
More than ever hour
After our work is never over.
User avatar
Eric Gurt
PB2 Developer
 
Posts: 409
Joined: 14 July 2013, 16:46
Location: dn.ua


Return to Level Editor

Who is online

Users browsing this forum: No registered users



cron