FEMultiPlayer-V2 icon indicating copy to clipboard operation
FEMultiPlayer-V2 copied to clipboard

External Map Editor

Open ghost opened this issue 8 years ago • 17 comments

Issue type: feature request

Description:

I recall reading a tutorial on the subreddit somewhere that there is a map editing interface within FEMP, but it requires having an entire java development environment installed just to access it. Can we make this utility a separate java executable, along with implementing my other feature request #45 (Making resources such as music and maps external, like with the team and config files)?

I'd love to be able to make some custom maps in a way that doesn't require an entire development kit.

ghost avatar Apr 20 '16 18:04 ghost

net.fe.editor.LevelEditor is in the distributed Fire_Emblem_Multiplayer_V2.jar, but given the fat-jaring-lwjgl nonsense, I wouldn't know an easy way to access that main method in the distributed jars. java -cp Fire_Emblem_Multiplayer_V2.jar net.fe.editor.LevelEditor results in an "I can't find lwjgl!" error.

rayrobdod avatar Apr 20 '16 19:04 rayrobdod

Can it be compiled separately as a standalone jar with any other resources it may need? Or is it too heavily dependent on the rest of the source? Perhaps it can be something gradually worked on? I'd like the project to move away from having so much internalized, inaccessible bloat as it could also be lending to other errors like the music issue given even music is embedded atm, as referenced in #45

ghost avatar Apr 20 '16 22:04 ghost

The hard way to access that main method in the distributed jars is: open Fire_Emblem_Multiplayer_V2.jar as if it were a zip file, edit META-INF/MANIFEST.MF by change the line Launcher-Main-Class: net.fe.FEMultiplayer to Launcher-Main-Class: net.fe.editor.LevelEditor

rayrobdod avatar Apr 21 '16 02:04 rayrobdod

Being extremely crude in the discarding, and not knowing any way to automate it, yes it is possible to get a smaller jar to run the map editor. Just discarding resources can get a less than 5KB jar; discarding code too can get something smaller than 3.4KB. And I'm sure that I'm leaving things that aren't necessary. But, as I said, I have no idea how to automate it.

rayrobdod avatar Apr 21 '16 03:04 rayrobdod

I can probably get it to put itself together with only the required files, plus libraries. Just lemme mess with ant for a bit

HamaIndustries avatar Apr 21 '16 04:04 HamaIndustries

How's this coming along? Would like to try my hand at map buiilding.

ghost avatar Apr 22 '16 22:04 ghost

Its not having fun. The original devs made the map that you generate dependent upon specific lines in the code; that is, to create a map, you need to hard code it into the game. I'll try making a gui or something, or better yet just have it passed as a command to the game through running it from cmd.

HamaIndustries avatar Apr 23 '16 16:04 HamaIndustries

The command line option sounds promising actually, not as user friendly though but that doesn't affect me any. I still wish maps can be saved externally, with checksums and hash checks done by FEServer to ensure A.) Map file exists for all clients, and B.) Even if the filename matches, that the maps are truly identical to prevent everything from going to Hell. I envision a day where people freely distribute custom maps to their friends, fire up FEServer, and they all play on it.

That being said, FEServer should ideally do client version checks so you don't have that incident where a unit lived on one end but died on another.

ghost avatar Apr 23 '16 20:04 ghost

The real issue is loading maps in general from a file, in a manner similar to teams. as it is, map editing won't do anything, even if you insert the map into the jar, because you would need to add the map's name into the code. I'm also going to need to change the nature of level files such that game modes are saved with the levels themselves.

HamaIndustries avatar Apr 24 '16 02:04 HamaIndustries

even if you insert the map into the jar [it wouldn't do the end-user any good], because you would need to add the map's name into the code.

So it's really hardcoded in there, sucks... Can that behavior be changed by just having it scan the directory for all available maps while FEServer ensure that A.) all clients have it, and B.) it's not different than the host's version? (employing checksums embedded into the map should ensure that)

After all, if the community can make and share maps more easily, then FEMP will never go stale.

Speaking of user-friendly, how pleasant is the map making interface - are terrain effects hardcoded or can the editor also assign them in order to recreate something like Radiant Dawn's Part 4: Rebirth(4) where the indoor tiles yielded different terrain bonuses? (hoping the user can select tiles without having to cycle blindly one by one)

ghost avatar Apr 24 '16 13:04 ghost

Can that behavior be changed by just having it scan the directory for all available maps

oh yeah, I'm really just noting the difficulties as a means of telling myself what parts need work.

Speaking of user-friendly, how pleasant is the map making interface

depending on the tile, various effects can be achieved. tiles are found by accessing the tile palette, and when I finish, I'll post a list of the tiles and their effects.

HamaIndustries avatar Apr 25 '16 00:04 HamaIndustries

So I toyed with the preliminary build using ant on EditorBuild.xml and I have no idea what the controls are for the most part. I also learned that for whatever reason it makes the window bigger than my display (which is 1600x900) and the mouse pointer calibration is way off (registering clicks as significantly more lower-right than my pointer) for some reason. I guess I have to wait until it's more ready.

ghost avatar Apr 29 '16 14:04 ghost

oh yeah its kinda silly. The controls are posted in one of the tutorials on r/femp, tutorial 2 I think. It's definitely not done, but in progress.

HamaIndustries avatar Apr 29 '16 15:04 HamaIndustries

Can we add autotiling to the editor. Having autotile would make it profoundly more user-friendly.

~~The following link explains how it works and the logistics of it, but not how to implement it since the given tutorial was made strictly for use with another engine, but explains how it works.~~

~~http://blog.rpgmakerweb.com/tutorials/anatomy-of-an-autotile/~~

As this serves the most use for scenery like large mountains, bodies of water, sand, etc. Would love to see more tiles too for different scenery if possible.

ghost avatar Apr 29 '16 15:04 ghost

That article is 99% describing mini-tiles, which are stupid and no and especially if we are stealing resources not designed for minitiling, and 1% almost hinting at what Squidi calls view-tile rulesets which is great and which I may have implemented in a different project.

rayrobdod avatar Apr 29 '16 18:04 rayrobdod

I see. I was just looking into ways to make throwing together parts of the map simpler and quicker without the need to piecemeal as much. Somehow I thought it could be done with our existing tiles for things like lakes and mountains.

@rayrobdod is there any way to do the method you mentioned graphically? Or would it boil down to editing levels via notepad? Since that's the impression your article left me under after skimming it until I'm able to read it more thoroughly.

ghost avatar Apr 29 '16 18:04 ghost

As long as the brushes are "Mountain" or "Path" or "Plains" and not "Tile Number 23" or "Tile Number 65", then it is possible to make a graphical editor.

rayrobdod avatar Apr 29 '16 19:04 rayrobdod