Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SaviorNT

Pages: [1]
1
No. The automation + folder generator is just a utility program I wrote. The .dev is a macro for world machine that includes the nodes displayed. In fact, I would suggest you don't download the .exe and run it (even though I made it). You never know what it may contain as far as being malicious. As I don't want to open-source the code, but I don't want to charge for the program, I'm in a pickle with this :)  Of course, you could always run it in a VM, and do a before/after comparison to see changes to the different VM's.

Never run executables from someone you can't hurt, err.. I mean, from someone you don't know IRL is my motto :D

(edit: I come from a cyber security minded background, hence the warning. The code isn't malicious, however, you don't know me and I do not know you, so there can't be 100% trust)

2
Macros and Plugins / Re: UE4 Export Macro
« on: May 13, 2015, 06:54:47 PM »
You're welcome. I understand its nothing overly complicated, but when you need to generate 100+ terrains and save them out.. lol

3
(Once I figure out how to gitHub stuff, I'll delete this post and add it to the main post.. this code is now outdated with 2nd release)

I should also note, that I myself am a computer security minded individual, so in the name of full disclosure, here is the visual basic code (if you want to copy/paste/compile):

Note that I use MenuStrip1 (options menu), StatusStrip1 (me + version at bottom) and a FolderBrowserDialog (the select button is tied to this)
Code: [Select]
Public Class Form1
    Private Sub folderBtn_Click(sender As Object, e As EventArgs) Handles folderBtn.Click
        Dim folderDlg As New FolderBrowserDialog
        folderDlg.ShowNewFolderButton = True
        If (folderDlg.ShowDialog() = DialogResult.OK) Then
            TextBox1.Text = folderDlg.SelectedPath
            Dim root As Environment.SpecialFolder = folderDlg.RootFolder
        End If
    End Sub

    Private Sub btnGenerate_Click(sender As Object, e As EventArgs) Handles btnGenerate.Click
        If My.Computer.FileSystem.DirectoryExists(TextBox1.Text + "\" + TextBox2.Text) Then
            Dim msg = "Folder already exists, do you wish to overwrite?"
            Dim style = MsgBoxStyle.YesNo Or MsgBoxStyle.DefaultButton2 Or MsgBoxStyle.Critical
            Dim title = "Warning!"
            Dim response = MsgBox(msg, style, title)
            If response = MsgBoxResult.Yes Then
                My.Computer.FileSystem.CreateDirectory(TextBox1.Text + "\" + TextBox2.Text)
                ProgressBar.Value = 20
                My.Computer.FileSystem.CreateDirectory(TextBox1.Text + "\" + TextBox2.Text + "\HeightMaps")
                ProgressBar.Value = 40
                My.Computer.FileSystem.CreateDirectory(TextBox1.Text + "\" + TextBox2.Text + "\NormalMaps")
                ProgressBar.Value = 60
                My.Computer.FileSystem.CreateDirectory(TextBox1.Text + "\" + TextBox2.Text + "\SplatMaps")
                ProgressBar.Value = 80
                My.Computer.FileSystem.CreateDirectory(TextBox1.Text + "\" + TextBox2.Text + "\Tiles")
                ProgressBar.Value = 100
                TextBox2.Text = ""
                ProgressBar.Value = 0
            Else
                TextBox2.Text = ""
            End If
        Else
            My.Computer.FileSystem.CreateDirectory(TextBox1.Text + "\" + TextBox2.Text)
            ProgressBar.Value = 20
            My.Computer.FileSystem.CreateDirectory(TextBox1.Text + "\" + TextBox2.Text + "\HeightMaps")
            ProgressBar.Value = 40
            My.Computer.FileSystem.CreateDirectory(TextBox1.Text + "\" + TextBox2.Text + "\NormalMaps")
            ProgressBar.Value = 60
            My.Computer.FileSystem.CreateDirectory(TextBox1.Text + "\" + TextBox2.Text + "\SplatMaps")
            ProgressBar.Value = 80
            My.Computer.FileSystem.CreateDirectory(TextBox1.Text + "\" + TextBox2.Text + "\Tiles")
            ProgressBar.Value = 100
            TextBox2.Text = ""
            ProgressBar.Value = 0
        End If   
    End Sub

    Private Sub NewFolderStructureToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles NewFolderStructureToolStripMenuItem.Click
        TextBox1.Text = ""
        TextBox2.Text = ""
    End Sub

    Private Sub ExitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ExitToolStripMenuItem.Click
        Application.Exit()
        End
    End Sub

End Class

4
Update:

Since WM is giving me grief with creating 3+ "worlds" at a time, I took a bit of time off from design, and got back into VB. Created a simplistic program that will enable the user to specify the project name / main folder, and it will create sub-folders, as well as create a "master macro" that can be used to render everything out. This has saved me a crap ton of time, so I hope it's useful to you guys!

You can get it here: http://tinyurl.com/pbvfqjv

Screenshots:






So, that was the example, here is a quick screenshot of what I'm working on.. the first 25/100:





This probably does too much tbh, but it has a bunch of different outputs. Here are the screenshots for the macro:









5
I like organization, almost to the point of being OCD about it; well, not almost. I will spend hours trying to organize folder structures >.<

Anyways, I made a simple and code inflated (I forgot how to properly had a class/module/function or w/e, so it has about 10 lines of code for folder creation) application for Windows (sorry Mac and Linux people) that will create a series of folders in a main directory. Here are some S.S:








Here is the link to download it:

Google Drive Link

Update 1:

World Machine Pro Only Feature (Automation):
- Added support for creation of simple automation: Creates (and updates) an XML file with that will load the Project Name and build the level
- Added a "Tiled Builds" checkbox: See above, this will allow you to created a tiled or normal build

* Please note that in order for the automation script to function correctly, the XML File must be located in the "main directory" and you MUST save the Project into it's respective folder, for example:

Project Name: Example1
Project Folder: Example1
Project WM Saved File: Example1\Example1.tmd

Update 2:

Behind the scenes change, tided a few things up code-wise, standardized the XML generation stuff to XML DOM (was using a mix between XMLWriter and XML DOM).

3 known bugs:
- The program doesn't save the XML declaration properly and won't save the standalone="no" string. This doesn't seem to affect the WM automation process though.
- XComment won't save to the XML document
- No spacing between parents. Not really necessary unless your directly editing the XML file, I find spacing parents makes stuff a bit more legible.

6
Feature Requests / [Request] Simple(?) Requests for WM 3.0
« on: May 10, 2015, 03:41:27 PM »
Just some simple requests for the next release of WM (3.0).. I hope that they can be included due to my own selfish needs and desires.

Quasi-Random Number Generator

This should be the easiest to implement. The user can specify a seed value, a minimum value and a maximum value. If the user does not like the result, there should also be a "Generate" button in the properties window. The generated number should then be saved in the project file so that the output will be the same no matter when the user edits the world (to avoid irritating results across sessions).

Render multiple outputs

This would be so that developers and/or world builders can create and "let run" the results. I've attempted to build more than one "world" and it failed. Or more precisely, I stopped the rendering process after 4 days to build 3 "worlds". If this is not achievable, would it be possible to include a separate "Macro Renderer", which will allow the user to choose what projects they want rendered, it will then process each project in the array.

Filename outputs - auto generated

This would be highly useful, save a bit of time, and prevent my organizational OCD from flaring up. World machine, by default, should create a folder in the default document location named as the WM file name. For example, if my project is named L001, then WM will check "%Userprofile%\Documents\World Machine Documents\" to see if there is a folder labeled as L001. If not, then it will create it.

The program should also create a nested folder within the one it just created for the different output types. By default, it will create a Height Output folder and a Bitmap Output folder. This should be able to be changed in the output nodes however. So for example, let's take a Heightmap:

By default, the Height Output folder will be created, and it will be rendered into that folder. However, if I open the node to edit it's settings, above the filename box, will be another text input box with the default of "Height Output" pre-filled in. So let's say I change this to "Heightmap".. when this node is rendered, it will create a folder named "Heightmap"

For filenames, if your World was named as ExampleWorld01, then you could use: %F_HighAngle.png which would create a file named: ExampleWorld01_HighAngle.png

Save Project Settings

This kind of relates to rendering multiple builds, however, in the Project Settings, you are able to create multiple Extents. These should be shared between projects.

Logic Gates

This also relates to the quasi-random number generator. Logic gates should include:

If/Then
For/Next
And/Or
Math Functions (=, +, -, /,*, x^y, sqr, %)

Export World Parameters as a .txt file

It would also be helpful if we had the ability to read/write the world parameters and export a text file. This way I can create or modify world max height, do some math, and export a text file to state what the Z scale in UE4 shoud be :\

Standardized XML for Automation

This request, I feel, would be the hardest to implement, possibly. Please keep in mind that I have not experimented, therefore, have not discovered it, however, according to documentation, some of the tags that are not the beginning of sections end in "/".. this should not be the case.

Current way:

Code: [Select]
<enable group="A" />
Proposed way:

Code: [Select]
<EnableGroup>A</EnableGroup>
Something else about the automation xml, is that according to the example, the file tags are held outside of the sections. This shouldn't be the case!

Current way:

Code: [Select]
<!-- Load a TMD file into WM-->
<load file="example_script2.tmd"/>
<section name="HF Export">
...
</section>

Proposed way:

Code: [Select]
<!-- Open file and add stuff to it -->
<Section name="HF Export">
<LoadFile>example_script2.tmd</LoadFile>
...
</Section>

By making the XML format to this standard (which is also the standard as per W3.org), it will do two things for use:

- It will allow users to more easily ease into the automation of World Machine
- It will allow developers to create programs more easily to auto-build automation XML files; which is what I am trying to do btw ;)

As far as the self closing tags, as per the specification, “the empty-element tag SHOULD be used, and SHOULD only be used, for elements which are declared EMPTY”. For my previous example, <enable group="A" /> is not an empty tag. An empty tag would be: <enable group /> (but again, it should be: <EnableGroup />

I hope this will be the last edit :)


Pages: [1]