Jump to content
3DXChat Community

Text Editor for World Editor v2


GottaGo

Recommended Posts

You can edit it with a simple text editor like notepad, notepad ++, whatever you want. It's just some simple html and javascript.

Give me some time and i will create a tutorial to let people understand how they can add their own font. It's pretty simple to do. A bit harder if you don't understand how json works. But i will try to make something easy to use.

Link to comment
Share on other sites

10 minutes ago, GottaGo said:

You can edit it with a simple text editor like notepad, notepad ++, whatever you want. It's just some simple html and javascript.

Give me some time and i will create a tutorial to let people understand how they can add their own font. It's pretty simple to do. A bit harder if you don't understand how json works. But i will try to make something easy to use.

So if I understand you correctly: If I have a finished different font I can add this in json and generate it then with your script ? 

Link to comment
Share on other sites

Yes. Any font.

If you open the script you will see an array with each character, A, B, C...

Each of theses contains several objects in .world format.

The tricky part is that you have to save each letter separately at the same exact position for the script to work.

It will be easier to understand with the tutorial and some screenshot, but the .world format is pretty easy to understand once you figured a few things.

 

Link to comment
Share on other sites

How to add your own fonts

First you will need to create a "position box" that will help you to save all your letter at the exact same position. The size is important, otherwise it would mess with the script calculation.

Here is a screen of mine, i strongly suggest you to use the same box (Here is the .world file is used for this example : https://mega.nz/file/W88zURYB#vEw306qrRegMq66To_4UJBX-jyOoi3TvQ4gk3e9hQNg)

Tuto_1.thumb.png.57bdae5ed27b58f39a0529b4448c6510.png

Once you have your box, you will have to move each letter over it. When the letter is perfectly positionned over the box (like the A in my exemple), select your letter (please make sure the box isn't selected), then save it as a single file :

Tuto_2.png.bd23804cbf20905c4b0e02cee23b6dd7.png

Tuto_3.png.ceefb6a4e76d51f3714af4b774a0cc28.png

You will have to do ALL your letters and character (it means moving every single letter over the green box, select it and save it as it's own file). The name of the world file doesn't matter, you will only need to remember which one is what. You can do any character as long as it appear on your keyboard 😛 It's a pretty long task but necessary.

Once it's done you will need some text file editor to open the .world file. In this example i use notepad++ which is free. You can use whatever you want as long as it open text files.

Below there, pay a good attention to the part of the text i select. Basically you need to remove {"valuetype":"float","objects":[{"n":"group","objects":[ at the start, and ]}]} at the end. It's possible that your letters parts aren't grouped together, so it could look like that : {"valuetype":"float","objects":[ and }]}.

Tuto_4.png.36ebfbb1e1291f611cb3887535b9e03b.png

This part is really important. If you select more or less character, the script won't work anymore and you will have to find the wrong character to fix it.

Once you have selected the good part of the text and copied it, you can past it on the script like this :

Tuto_5.thumb.png.d02ca519b2f9a592f93be71bdcc2ba9b.png

alphacontent["A"] is for letter A, alphacontent["B"] is for letter B etc etc.

Like i said you can add any keyboard character you want. For example i could add : alphacontent["~"] or alphacontent["$"]

 

Before starting to add your own font, i suggest to copy the script with another name (your font name for example) and then to reset all alphacontent values. Which mean erasing all the content inside like alphacontent["A"]=''; , that way you will only have to copy paste and won't have to remember which one you already edited or not.

 

Have fun and if you want to share your creations there to let others enjoy them as well, feel free to do so :) The more the merrier :)

Edited by GottaGo
Link to comment
Share on other sites

Well, the green box represent the way the letter will used the space allocated when the script will make the calculation. There is no perfect place, but the best is to have all letters at the same height and centered in the middle of the box. Like the A in my example.

You have to save each letter separately and move each letter separately over the green box.

Edited by GottaGo
Link to comment
Share on other sites

@GottaGo it seem that if we modifie the script it don't work anymore, i made made new font for the script and nothing work and i did it exactly as you say how to do and only Copy paste the part that is needed for every Letter. maybe there is something on the fonts i have did that is not working with the way you have made the script that is originaly create for the font you did. all your one ending with :

"m":"glass_1"} 

i think maybe problem is there or elsewhere.

I give you the file to look at : https://mega.nz/file/ullDBRLR#qMlMgjII3zg9xsQRloH46gb5fau3PqHBFzmDbAE320o

 

Link to comment
Share on other sites

On 6/1/2020 at 12:01 PM, GottaGo said:

Below there, pay a good attention to the part of the text i select. Basically you need to remove {"valuetype":"float","objects":[{"n":"group","objects":[ at the start, and ]}]} at the end. It's possible that your letters parts aren't grouped together, so it could look like that : {"valuetype":"float","objects":[ and }]}.

This is important !

Are they "group" or not ?

 

Link to comment
Share on other sites

11 hours ago, lMAXl said:

@GottaGo it seem that if we modifie the script it don't work anymore, i made made new font for the script and nothing work and i did it exactly as you say how to do and only Copy paste the part that is needed for every Letter. maybe there is something on the fonts i have did that is not working with the way you have made the script that is originaly create for the font you did. all your one ending with :

"m":"glass_1"} 

i think maybe problem is there or elsewhere.

I give you the file to look at : https://mega.nz/file/ullDBRLR#qMlMgjII3zg9xsQRloH46gb5fau3PqHBFzmDbAE320o

 

Please check again what you need to remove from the .world file, you removed {"valuetype":"float","objects":[ but not {"n":"group","objects":[

Error.thumb.png.f8e63a0de29fe9ce2766087a697ec303.png

The "m":"glass_1"}  part is fine, it's the material you use for your objects ;)

If you remove the {"n":"group","objects":[ at the start it should work again. The end of your text seems correct on each line.

Have fun !

Link to comment
Share on other sites

@GottaGo oh yes, i seen my mistake by reading again your tutorial, was me being stupide. it work now but the letter have huge spacing but probably because i have center it and that is smal font, if i'm right to have less spacing between 2 letter need some change in the script ?

@Rodin yup was that the problem, I misread this passage of the tutorial.

it's fine as letter could be easily move closer with the tools in editor. so Have fun everyone using this new fonts for the editor. if someone have the name of the originale creator of the fonts to update my post will be nice. i will work on more fonts , if someone have suggestion of what fonts cool be nice doing on priority lets me know ! 😜 

new version of the script with switch box between different fonts will be perfect gottago 😃

-------------------------------------------------------------------------------------------------------------------------------------------------

Edit 08/06/2020 : ABC Curves added

FIRST FONT: 

( important : this fonts have only letter A to Z no number or special character )

oqqGvfN.png

Font 2 : Alexa's ABC Outlines 1.0.0 ( No number / special characters )

9frLHoE.png

Font 3 : Alexa ABC Curves ( No number / special characters )

22dg4mw.jpg

Edited by lMAXl
Link to comment
Share on other sites

Yes, to change the space there is somewhere in  script a x = x - 2 i think. Replacing it by x = x - 1 should do the trick. You can also save your letter with a bigger size.

Both ways work :)

Link to comment
Share on other sites

@GottaGo well it's better keep the letter at the original size they where dev i mean for the editor as they fine with the original size and let ppl adjust at their own after if they want it less bigger or more but lot of font are not simply to resize and need lot change manually.

i think of 1 thing for the V3 of the text editor in addition of the switch for font should be new choose for only group letter. it will be more easier for ppl adjust spacing manually for some font ( like the new font i adapted for the editor all letter are fine except the " i " being more small so more spacing between the I and other letter. so will save time not having to ungroup then regroup one by one letter. i was thinking of X and Y box that we can say what spacing we want for the letter  expecialy that all font don't have the same size. With this function we can give advice what are the best X/Y setup for text being good but don't know if it's thing you can do to instead having looking on the script to modifie.

Edited by lMAXl
Link to comment
Share on other sites

oh god ! amazing V3 😍 

this script is perfect now, i even think that this script could work  for repetitive tasks like someone want add light on ceilling, he can dev the light add it on the generator with the space he want and just have to type the keyword ( as much as he need ) he used for naming the props on the generator and it will automaticaly generate all with the exact same spacing spacing. i maybe just literraly found new script idea for you  😲 could same time for dev in some time depending what they dev.

 

 

Link to comment
Share on other sites

On ‎6‎/‎2‎/‎2018 at 10:38 AM, GottaGo said:

If enough people are interested, i might work on a maze generator later as i love to add them to my maps and it can be really long to do a good looking one.

If you're looking to build mazes, chat up HeatherK...her Overlook Hotel hedge maze from The Shining was awesome, and she's done some truly mind bruising multi level ones.

--Laz 

Link to comment
Share on other sites

11 minutes ago, Fyrefly said:

If you're looking to build mazes, chat up HeatherK...her Overlook Hotel hedge maze from The Shining was awesome, and she's done some truly mind bruising multi level ones.

--Laz 

Thanks for the notice, however i created the maze generator a year ago, you can find it in my profile :)

Link to comment
Share on other sites

2 hours ago, lMAXl said:

oh god ! amazing V3 😍 

this script is perfect now, i even think that this script could work  for repetitive tasks like someone want add light on ceilling, he can dev the light add it on the generator with the space he want and just have to type the keyword ( as much as he need ) he used for naming the props on the generator and it will automaticaly generate all with the exact same spacing spacing. i maybe just literraly found new script idea for you  😲 could same time for dev in some time depending what they dev.

 

 

I'm clearly open to new ideas ! :) I was even thinking about making some light world editor in html5, but that would be a good amount of work !

Link to comment
Share on other sites

I guess if anyone is going to want to test this Font Generator, it would have to be one of the Font designers themselves...

Sadly, not all my letters are the same width, Like the M & W.  

But would love to see some of my other ABC Fonts used.

 

Untitled.jpg

Edited by AlexaDarkness
Link to comment
Share on other sites

@AlexaDarkness yes, when i have done your outline font have noticed the problem. but, as it don't do that for all letters, it's still fine. that why have tell him to add possibility having only letter grouped. ( thing he added on the V3 ) that allow someone that use the generator to easily move letters especially usefull for complex fonts that can have differents width. it not very long ajusting the letters to not them overlap. think it's something that can't be fixed as will mean the script will have to check for every letter if letter overlap and if overlap changing width to custom one.

 

EDIT for everyone :  Added ABC Curves 

download link: https://mega.nz/file/nxFUUapK#i7bY97CeNgDuKkg5Qy-zQFT91UF0EQkXuONmU7Rx-nY 

22dg4mw.jpg

As said for other font, letter don't have same width and length so you need manually adjuste spacing on X / Y axis. The text generator of GottaGo will never totally remove work to do depending the fonts. quality and detailled custom font will always be complicate to adapt than more simple font 😉

Edited by lMAXl
Link to comment
Share on other sites

So...   @GottaGo creates the script, I create the Fonts & @lmaxl bundles them all together...

And If it catches the eyes of @Gizmo & @Lisa  maybe they will consider adding to the game somehow.

Of course it would be nice if I could bake each of my letters, so they each become an object, rather made up of many individual objects.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...