• ✨ ARCHIVE MODE ✨
    The forum has now been set to read-only mode, no new posts, resources, replies etc will not be possible.
    We recommend you join our Discord server to get real-time response: Discord Invite Link

Pokeditor - The P3D map editor | testing build available

Status
Not open for further replies.

DracoHouston

Kolben Developer
Contributor
lol no need to ass kiss, im kinda learning vb.net and some stuff about XNA I didn't know, I'm pretty much banging rocks together. hopefully it results in a decent tool for y'all soon. i found a bunch of issues with the map saving (loading is fine) and i think i gotta implement a bunch of entities that don't exist like NPCs (they don't show up in the editor but they have to so they can be saved!). floors can't deal with entity fields and if you try to save them the position isn't set in the tag it saves so you end up with every floor at 0,0,0 and the game crashes

to fix that i gotta write a function for the entities that when asked will take its CURRENT properties and construct a valid map entity tag as a string. right now on load entities are assigned a Store string which is basically the tag they were spawned with. But if I edit the properties that will be out of date! lots of work to do. I got a git repo (private, natch) for me and nilllzz so I might get him to do some of that so I can focus on getting entities to spawn based on what you set in your content browser by clicking and dragging the entity out of it. later i'll put in placement mode where you can move that old cursor block around as if it were an entity, which can be resized etc then you click add and it sticks the entity where the block was.

pretty much my plans for first version are the ability to click drag new entities into your map, then the ability to select them (done) and edit the properties (not done) and when you're finished be able to save the map without ruining it all. remove entity is in i also need the ability to remove fields (easy) and we have something thats better than doing it in notepad. after that it needs a crapload of QoL features and the ability to manipulate the selected entities with your mouse and keyboard in the 3d view, ideally in real time.
 

DracoHouston

Kolben Developer
Contributor
something the main engine could benefit from, the bounding boxes of entities are not scaled by the entity scale, so if you scale an entity the engine treats it as the non scaled box in the middle of it for collision, and consequently, my cursor selection. i found these kinds of scaled entities unusable as walls because they didn't block players unless its center was around the z the player is walking from
i was able to use scale for things the player does not touch, like the pillar in sprout tower, here's the bounding box from inside the pillar
 

DracoHouston

Kolben Developer
Contributor

the map format cant store all the rotation data though, only 1 of 4 directions on the y axis. nilllzz is thinking about changing that maybe
 

DracoHouston

Kolben Developer
Contributor
sorry for no update in a while, we had to work on generating pokemon data for next patch.

For the first release the method of making new entities will be setting their properties in a properties grid window like the one in the screenshot above, then when you click add entity it spawns it on your position. from there you will be able to edit it.

i'm doing some boring behind the scenes stuff on the editor atm, rewriting how the map loads so its easier to save. i don't know if this will be ready by 0.19 but that was kinda optimistic anyway. not ruling that out though
 

DracoHouston

Kolben Developer
Contributor
maps are loading fine with my new code, there should be more progress from here. I'm busy during the day tomorrow and the day after though so I won't have as much time to work on this before the update is pushed. but now the level loader passes the values for entities as they were given by the map file all the way down to the entity itself. each entity in the field has a full set of values to use so if i ungroup a field it will Just Work when it comes to save.

so here's whats left to do before first release
-finish up the entity edit window, it needs to set things in the tags store when a value changes, and a few properties i want aren't exposed to it yet.
-finish up the class that stores the properties you want to set for the next entity you make. this will be basically a copy/paste of the previous problem's solution
-make it so when you click add entity the previous thing's values are used to create a new entity.
-write the level saver, this has been made easier by tonight's work
-test to make sure current maps don't crash it and that it can open and save them without damaging anything

could happen by the time nilllzz pushes the update out but it's more likely to be done by the end of the week.
 

DracoHouston

Kolben Developer
Contributor
testing map saving and loading at the moment, fixed a load of glitches in my loader and now i'm working through saving official maps i've opened in the editor and opening them with the game to see what crashes it. i saved and loaded copies of sprout tower f1 and azalea town. i need to test a route next and once thats working perfect its on to finishing the, you know, editing part.

edit: routes working, gunna call that done.

entity editing needs to be polished up, entity field editing has to be put in and adding for both

i also gotta find out from nilllzz how to stop this thing accepting mouse clicks when it doesnt have focus
 

DracoHouston

Kolben Developer
Contributor
apparently i cant post in features unless i get flagged as kolben dev lol so we're back here, anyways



NPC sprite changing is next. then adding entities in a window like this
 

DracoHouston

Kolben Developer
Contributor
Will allow this editor create a roof?
yes, the editor is basically a stripped down version of the engine that can draw the maps and its entities, you can look and move in all directions and there is no clipping, you select entities with the mouse, or you can set it to select fields and you can click to select those instead. for a roof you'd spawn in a all sided block/cube entity field with the size, position, textures etc you want and that'd be your roof. once an entity/field is in the world you'll be able to edit their properties or remove them.
 

DracoHouston

Kolben Developer
Contributor
still lots to do so this won't be out with 0.19, sorry folks. i'll be striving to get it out by week's end. i may take some extra time to make it more comprehnsive, like i just put in a way to edit the locationname, musicloop, canfly etc so now i realize i gotta add support for making .pokes as well
 

DracoHouston

Kolben Developer
Contributor
ive had an idea for interoperability with editing a map with a text editor, or taking examples from the wiki/forums etc, if you have a valid tag in your clipboard (ctrl+c etc) you can then paste it into a instance of pokeditor and it will use that tag to make an entity. if you copy while selecting something it will copy all the tags for that to your clipboard. this way you can also have 2 pokeditor windows open and copy/paste entities between. them turns out that apart from validating the tag before pasting (so it doesnt crash the editor) it's a simple matter of getting the string you want and making a function call to put it in clipboard and anohter function call to get whats in clipboard atm. cutting could be put in too

other quality of life features im looking at (because i can probably spend a week polishing this thing instead of rushing it out) are the ability to open/create scripts for npcs so you can edit and save them, the ability to generate .pokes by adding pokemon to a list with some other values for chance etc. a way to go to battle map, which would prompt you to save your map then create/open that map's battle map, which you would be able to edit and then switch back to the main map, which would again prompt you to save then reload the main map for you. ideally people shouldnt have to know about folder structure at all to use this thing, but its going to take a lot of work to foolproof it all.

for example bad values entered into entity properties can crash the editor at the moment, if you know what you're doing and save often its no big ish and still better than using a text editor for it all but that Undocumented Feature has to go at some point. maybe i'll make it totally safe by 0.20

eventually this thing needs to be our 2nd IDE, where we do everything else in between coding in visual studio. if the basics are in place before its nice and friendly i will release it on the forums as a zip that patches a p3d install with it

edit: oh and i really really want undo, this is essential
 
Status
Not open for further replies.
Top