Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Pixel Perfect Tile Editor (https://forums.graalonline.com/forums/showthread.php?t=134267103)

Twinny 10-02-2012 02:54 AM

I would much prefer the option to be able to use your own rights to save levels rather than open up NPC-Server to everything...especially on a server like Testbed :|

0PiX0 10-02-2012 05:06 AM

Quote:

Originally Posted by Twinny (Post 1704939)
I would much prefer the option to be able to use your own rights to save levels rather than open up NPC-Server to everything...especially on a server like Testbed :|

I would prefer that as well, but currently it's not possible. You can certainly still use the editor, but special features won't work without the NPC-Server having rights. I'm aware that it is a security risk, but the servers that aren't worried about that are able to enjoy these features.

savelevel(str) needs to be fixed by Stefan before you will be able to save levels immediately without NPC-Server having rights.

Other special features will probably require NPC-Server rights for a long time. Stefan would have to provide additional functionality. He's already busy as it is, so it won't be soon.

Tim_Rocks 10-02-2012 07:00 AM

He means adding something to the script to check serverside if you actually have the rights to the current level. At least that's what I'm assuming :)

0PiX0 10-02-2012 03:11 PM

Quote:

Originally Posted by Tim_Rocks (Post 1704953)
He means adding something to the script to check serverside if you actually have the rights to the current level. At least that's what I'm assuming :)

It already does that :). He was saying that if he gave the Testbed NPC-Server rw rights to all levels, that it could be abused by malicious scripters. Possibly destroying others' work.

MattKan 10-02-2012 10:38 PM

I have used a level editor that did not require the NPC server to be given rights.

0PiX0 10-03-2012 12:56 AM

Quote:

Originally Posted by MattKan (Post 1704990)
I have used a level editor that did not require the NPC server to be given rights.

The editing of tiles does not require NPC-Server rights.

Draenin 11-06-2012 09:41 PM

1 Attachment(s)
This thing is really nice. However, I'd like to request a feature.


This editor does work on terrain maps as well, but the image of the tiles you currently have selected in the clipboard shows up on the ground quite a bit below where the cursor is, making it offset by a lot and confusing to work with. Would it be possible to include an option to toggle off the clipboard display, or change it so that it also hovers on the screen layer where the mouse is?

Here's a screenshot of what I mean. The cursor position is in red, the clipboard image is in blue.

Cubical 11-19-2012 06:43 AM

I cannot get this to work on a terrain gmap, I have all the correct rights set however when i try to place a tile nothing happens

Draenin 02-20-2013 03:34 AM

I have it working partially on terrain maps, but the icons and tiles stored in the clipboard don't quite play nice when z-height gets involved. I can lay down tiles and save them on terrain maps, but it's awkward.

Also, on another subject... In future versions, could you try to work in something for setting links in levels too? Even if it's a separate tool, that would be fantastic.


And I just wanted to say again, this is excellent work.

MattKan 03-18-2013 10:43 PM

Where are the images for this?

fowlplay4 03-18-2013 11:00 PM

Quote:

Originally Posted by MattKan (Post 1715149)
Where are the images for this?

They're generated by the script. See the long base64 strings near the top of the script.

JohnnyChimpo 09-06-2013 02:19 AM

So i am having trouble with this editor saving.
Problem: When i go to file update level it says that the npcserver does not have read rights to levels/0. The problem seems to be that it can not find the correct filepath. However i modified the script to have the correct filepath and also gave the npcserver rights to that exact file and still i have the same error message. The level does save if i let it sit and after a few seconds it will save on its on.

Let me explain a few things. My levels files are in a folder in the levels folder. ex: levels/mainOW/*
ex: levels/temp/* etc. I gave myself and my npcserver the needed rights, also set savelevels=true in server options.

alissalee 09-06-2013 02:55 PM

Quote:

Originally Posted by JohnnyChimpo (Post 1722350)
So i am having trouble with this editor saving.
Problem: When i go to file update level it says that the npcserver does not have read rights to levels/0. The problem seems to be that it can not find the correct filepath. However i modified the script to have the correct filepath and also gave the npcserver rights to that exact file and still i have the same error message. The level does save if i let it sit and after a few seconds it will save on its on.

Let me explain a few things. My levels files are in a folder in the levels folder. ex: levels/mainOW/*
ex: levels/temp/* etc. I gave myself and my npcserver the needed rights, also set savelevels=true in server options.

please message me on aim jaycassini or msg me on atrius. i had loged on today to see if you were there but you were not on. i would like to see the issue u described.

JohnnyChimpo 09-06-2013 10:11 PM

The problem still persists, if your reading this and own a server, i suggest you take a look into the problem yourself it seems like i am not alone.

Testing the problem:
1. Open /te and put down a tile.
2. Goto File->Update Level.
3. Update the level on your player account by saying "update level"
4. Does the tile stay? Did you get a message after you went to File->Update Level?

If you are having the same problem it could be because of a recent update by Stefan, earlier this week. Please post and let me know.

JohnnyChimpo 09-16-2013 12:40 AM

After further analysis it seems the loadfolder() function is not working properly anymore. I have made a very simple work around for those whos pixel editors are malfunctioning.

1. Add this line to configurations.
PHP Code:

//FOLDER CONFIG
this.levelFolders = {"YourLevelFolder1","YourLevelFolder2"}; 

Add the folders that contain your levels in the array.
2. Replace the function
PHP Code:

function getLevelFilePath(temp.levelName) {
  if(
this.levelFolders.size()>0){
    for(
temp.i=0i<this.levelFolders.size(); i++){
      
temp.fileList = {};
      
temp.fileList.loadfolder("levels/"@this.levelFolders[i]@"/*"1);
        for (
temp.fileNametemp.fileList) {
          if (
temp.fileName == temp.levelName) {
              
temp.filePath this.levelFolders[i]@ "/" temp.fileName;
           return 
temp.filePath;
          }
       }
    } 
  }
  
temp.fileList  = {};
  
temp.fileList.loadfolder("levels/*.nw"1);
  for (
temp.fileNametemp.fileList) {
    if (
temp.fileName == temp.levelName) {
       return 
temp.fileName;
    }
  }
  return 
NULL;



Thats it! Hopefully that solves some headaches.:D


All times are GMT +2. The time now is 06:09 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.