Jump to content

Hal's Prefab Editor


HAL9000

Recommended Posts

[QUOTE=Guppycur;400735]Hal ol' buddy ol' pal. Let's talk World Editor. ...so I mentioned a bit back about when you place items and get that giant red box, having some indication (based off the XML setting of that prefab) what "ground level" is supposed to be. You give that any more thought? I'm thinking, when you choose the prefab, it checks the XML, sees that the y offset is -3, so makes the first three layers in the prefab placement box red, and the remaining ones above, blue.[/QUOTE] Thanks for the reminder Guppy. I hadn't thought about it much tbh. I've got a couple of other projects on at the moment and other than a few bug fixes for Mag I haven't looked at the editor for a while. It's definitely something that can be done so if I don't get time to do it before A14 lands remind me again then and I'll add it in while I'm updating the editor for A14.
Link to comment
Share on other sites

While we're in request mode I was wondering if it would be much work for you to output the prefabheights.csv as an xml file instead. Also the list blocks function to output an xml file with the data. Ideally a subfolder with a file for each prefab and a command to generate the data for all prefabs in one go. I'm working on an idea for a prefab repository and this would automate a huge chunk of the process for me ;) With this info I will be able to generate a complete loot list (with count ranges and probabilities) and a full harvest list with required special tools and yields of materials etc I can do all this manually from the data now and a quick script to convert from the csv and blocks text data so no prob if its too much work. An example for abandoned_house_01. Maybe a way to add an entities section as well if that's possible. [code] [/code]
Link to comment
Share on other sites

[QUOTE=StompyNZ;400934]While we're in request mode I was wondering if it would be much work for you to output the prefabheights.csv as an xml file instead. Also the list blocks function to output an xml file with the data. [/QUOTE] Hey Stompy, Yeah that can be done, I'll add it to the next release. You'll find it under the "Global Prefab Functions" menu in the editor
Link to comment
Share on other sites

[QUOTE=Guppycur;401167]Okay. Last request (for the day). World Editor. A listbox that shows the BLOCKS, so we can place those live as well. Complete with some sort of rotation indicator. :)[/QUOTE] That one is a bit more complicated. I tried it before but the level of resolution is too small and getting precise block placement is a PITA. Getting it to a better resolution would mean rewriting a lot of the map viewer code so the chances are unlikely I'll have that much free time and inclination. The workaround solution I've been thinking about is using the export chunks feature that's already in there to pull the data out of the world and into the prefab editor part then you can make the changes and push it back to the world. A lot less coding and it means I don't have to use up more screen space with new controls. That's the plan anyway, release date: Soon™
Link to comment
Share on other sites

Connection Error Hello Hal, I was wondering if anyone has had any issues running this on Windows Server 2012 R2 ? I am unable to get the World Editor to connect, firewall is turned off, password and port are both correct and changed several times. HalGlobal.txt settings: halserveractive=True halserverpass=12345 halserverport=55555 autogenchunks=10000 This is what im seeing: --------------------------- --------------------------- System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 192.168.1.10:55555 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) at HalServerStuff.HalClient.ConnectAndSend(WorldViewerJob job) --------------------------- OK --------------------------- Also, some times when I start the World Editor I get this error: --------------------------- --------------------------- Attempted to divide by zero. --------------------------- OK --------------------------- Any ideas?
Link to comment
Share on other sites

[QUOTE=Guppycur;401195]Think of it as building a framework for more and better functionality. Better to do it earlier than later. :)[/QUOTE] I'm thinking it's more "Right tool for the job" and there's no earlier or later if you never do it ^^ [QUOTE=Juneass;401214]Hello Hal, I was wondering if anyone has had any issues running this on Windows Server 2012 R2 ? I am unable to get the World Editor to connect, firewall is turned off, password and port are both correct and changed several times. HalGlobal.txt settings: halserveractive=True halserverpass=12345 halserverport=55555 autogenchunks=10000 This is what im seeing: --------------------------- --------------------------- System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 192.168.1.10:55555 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) at HalServerStuff.HalClient.ConnectAndSend(WorldViewerJob job) --------------------------- OK --------------------------- Also, some times when I start the World Editor I get this error: --------------------------- --------------------------- Attempted to divide by zero. --------------------------- OK --------------------------- Any ideas?[/QUOTE] That error means either nothing is running on that port or something is blocking the communication. If firewall is off and you're on the same network then sounds like it's not listening on that ip/port combo. Make sure the game is running. If it is then have a look in the editor's log file in %SaveGameDir%/BlockBackup/Users/log.txt and in there near the top should be something similar to: Manager Pre Server Trying to listen... Server thread started Listen loop on 192.168.1.10 port: 55555 If it isn't there then the world editor isn't running in the game so you won't be able to connect, check the HalGlobal file to make sure everything is set up (you have to restart the 7DTD server every time you change the HalGlobal file). If you're running VPN software (or any type of vLAN) it can cause the editor to bind to that IP range and if you have multiple NICs it will bind to the first one it finds, either way the log will tell you where it's listening.
Link to comment
Share on other sites

[QUOTE=HAL9000;401218] That error means either nothing is running on that port or something is blocking the communication. If firewall is off and you're on the same network then sounds like it's not listening on that ip/port combo. Make sure the game is running. If it is then have a look in the editor's log file in %SaveGameDir%/BlockBackup/Users/log.txt and in there near the top should be something similar to: Manager Pre Server Trying to listen... Server thread started Listen loop on 192.168.1.10 port: 55555 If it isn't there then the world editor isn't running in the game so you won't be able to connect, check the HalGlobal file to make sure everything is set up (you have to restart the 7DTD server every time you change the HalGlobal file). If you're running VPN software (or any type of vLAN) it can cause the editor to bind to that IP range and if you have multiple NICs it will bind to the first one it finds, either way the log will tell you where it's listening.[/QUOTE] Its bound to the wrong NIC. [CODE]Trigger started... Manager Pre Server Server thread started HAL Init Complete Trying to listen... Listen loop on 169.254.15.141 port: 55555[/CODE] Any way to fix this? Will it detect disabled NIC?
Link to comment
Share on other sites

Try enabling the disabled nic, and assign it a static IP; you may find luck in that the world editor goes after the first one in the list, and that configuring the disabled one makes it not the first one? ...just throwing out possibilities, I'm far from a CNE.
Link to comment
Share on other sites

[QUOTE=Guppycur;401230]Also make sure the dll is overwritten on the server computer. @hal: Bah, I tried, guess I'll be content with using creative mode. :)[/QUOTE] Points for trying but I really do think having it go through the prefab editor is the best solution. That way you get access to all the functions and tools to replace blocks etc but they're only on the screen taking up space when they're needed. Plus it will take me 1/10 of the time to code which means it'll arrive quicker and I have more time for other features. [QUOTE=Juneass;401249]Its bound to the wrong NIC. Any way to fix this? Will it detect disabled NIC?[/QUOTE] Yes disabling the other NIC, starting the server and waiting for the bind message to appear in the log then re-enabling the NIC should do it. I'll have a look at adding a new line to the HalGlobal file where you can specify an IP to bind to.
Link to comment
Share on other sites

[QUOTE=HAL9000;401307] Yes disabling the other NIC, starting the server and waiting for the bind message to appear in the log then re-enabling the NIC should do it. I'll have a look at adding a new line to the HalGlobal file where you can specify an IP to bind to.[/QUOTE] Got it working now, thanks. On a side note. How did you programmatically get a list of inactive and active NICs? I had a project 3 years ago where I needed a list of all NICs, but .NET was only able to supply me with the active ones. If I wanted a full list then the registry was my only option.
Link to comment
Share on other sites

Hey Hal it's been a while since I've had to harass you, but when playing around with the custom cityblocks I was unable to import them directly with the bbb IP command, pops a prefab load error into the chat box. Thinking it may have been the prefab I was working on, it seems after some testing that I can't import any of the large prefabs, the cityblocks are 117 x 117, but I did also try some of the larger prefabs from the compo pack like the slum hub sections and they drop the same error too. Has anyone else experienced this too? I'm not sure exactly when the size becomes too big to cause the error, but I did experiment with old prefabs, vanilla, exported > saved > bbb ip'd, creating prefabs from scratch in the editor and trying to bbb IP, and everything worked fine except for the large stuff. It's hardly life or death, I got around to doing what I wanted spawning thru the mixer instead but there are times when being able to import a large prefab is particularly useful.
Link to comment
Share on other sites

[QUOTE=Juneass;401317]Got it working now, thanks. On a side note. How did you programmatically get a list of inactive and active NICs? I had a project 3 years ago where I needed a list of all NICs, but .NET was only able to supply me with the active ones. If I wanted a full list then the registry was my only option.[/QUOTE] Glad you got it working. I've added the new HalGlobal entry for the next release to make things easier in future. As far as I know I don't think you can get disabled NICs through .NET as the drivers aren't loaded so there's nothing to query. The editor just does a DNS lookup on the host name and binds to the first address. The new way searches all (active) NICs for the specified IP and uses it if it finds it else falls back to the DNS host lookup. [QUOTE=Slaan;401393]Hey Hal it's been a while since I've had to harass you, but when playing around with the custom cityblocks I was unable to import them directly with the bbb IP command, pops a prefab load error into the chat box. Thinking it may have been the prefab I was working on, it seems after some testing that I can't import any of the large prefabs, the cityblocks are 117 x 117, but I did also try some of the larger prefabs from the compo pack like the slum hub sections and they drop the same error too. Has anyone else experienced this too? I'm not sure exactly when the size becomes too big to cause the error, but I did experiment with old prefabs, vanilla, exported > saved > bbb ip'd, creating prefabs from scratch in the editor and trying to bbb IP, and everything worked fine except for the large stuff. It's hardly life or death, I got around to doing what I wanted spawning thru the mixer instead but there are times when being able to import a large prefab is particularly useful.[/QUOTE] Hey Slaan. I've imported larger prefabs so shouldn't be a issue. Can you send me the prefab that's causing the error? I'll test it on my machine and see what errors pop up. May also be useful to check out the log file %SaveGameDir%/BlockBackup/Users/log.txt to see if there's a better error message for what went wrong.
Link to comment
Share on other sites

Hey guys, Just released an update for 13.8. Fixed: Global Prefab Functions Added: World editor prefab box displays y-Offset Added: HalServerIP entry to HalGlobal.txt to specify which IP to bind to. Leaving blank will still auto-bind Added "usexml" flag to bbb InsertPrefab command to use y-offset when inserting Added: Prefab Info XML generation in the global prefab functions menu Added: New world editor command "Edit Chunks In Prefab Editor" found in the Actions menu Stompy, your XML file generation has been added to the global functions menu. Click on it and it will create a subfolder in the prefab folder and put a file in for each prefab entry. Guppy, your y-offset stuff should be in too. Give it a try and see if it works. I've also included the first version of being able to edit the world chunks by bringing them into the prefab editor. The new option is in the Action menu. Click it and highlight the chunks you want to edit and the prefab editor will pop open with the data. When you're done making changes close the window and you'll be asked if you want to push the changes to the server. Click yes and it should move the info back to the server. As usual if you don't see the changes straight away then teleport far enough that the chunk unloads and come back. Have fun, let me know if you have any issues.
Link to comment
Share on other sites

Does the dedicated server have whatever resources the editor needs to use it as a "game setting"? Right now I have to install the game AND the dedi on my dedi machine in order to run the editor on it (for quick fixes). ...in that vein, what's the best method for editing prefabs over a network? Right now I edit locally then copy over to the dedi, is there a feature I'm not taking advantage of?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...