Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: &σ - Demon's Forge 0.15 (DEMO) A Text editor (kinda'.)  (Read 3978 times)

neil_v

  • Bay Watcher
    • View Profile
&σ - Demon's Forge 0.15 (DEMO) A Text editor (kinda'.)
« on: March 03, 2012, 09:08:51 pm »

Demons Forge (0.15)

-----------------No UPDATES FOR A WHILE! -Busy with career change & derping
Dev log:
Updated to 0.15
Spoiler (click to show/hide)
Updated to 0.1
Spoiler (click to show/hide)
-----------------------------------------
The idea is: A program that is easier to use than generic text editors that are not set up for this sort of thing
What I have: A program that reads through a .txt file of your choosing. If you feel like being nice and actually select a creature file for it to read (creature_desert_new.txt for example)it will happily count the creatures, highlight them, and allow you to find them easily. You can edit the lines of text by clicking them (by edit, I mean, stone age editing).
The push button interface is modeled after DF :P because I didn't spent 2 years getting proficient at it for no reason. It will always follow the DF style input scheme, but it will have more modern additions for others (later though)
The F1 key will provide you with help, and most of the readouts are debug stuff for my benefit. If an error arises I have it set to crash without warning, no error log or report.

If you find any really bad bugs, let me know!

What I want to have:
Spoiler (click to show/hide)

Any ideas, suggestions or comments please!
I hope at least that this inspires a good programmer to make a proper tool, I also hope to not run out of steam...

Screenshot:
Spoiler (click to show/hide)
Screenshot:
Spoiler (click to show/hide)

Some junk about me:
Spoiler (click to show/hide)

Download Demon's Forge 0.15.zip: http://dffd.wimbli.com/file.php?id=5775

Place the Demon's Forge.exe in your DF/Raw/Objects/ folder for ease of use (it begins the 'open files dialog' from the directory it is located in)

Download the 0.1 source code (.gmk in a .zip): http://dffd.wimbli.com/file.php?id=5790




----Thanks!
« Last Edit: March 15, 2012, 05:50:02 am by neil_v »
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Demon's Forge (DEMO) A creature editor (but not really, yet)
« Reply #1 on: March 03, 2012, 11:59:39 pm »

Can you make a libray for all creature tags? with a short blerb about what it does, how many arguments it has, and what argument is and how to use it
Logged

neil_v

  • Bay Watcher
    • View Profile
Re: Demon's Forge (DEMO) A creature editor (but not really, yet)
« Reply #2 on: March 04, 2012, 09:17:33 am »

Hopefully. I know its possible, and I know how I am going to approach it. The intention is ease of use, legibility, and the ability to share.
So on a basic level it will be like:
Game raws:
[BUILDING_WORKSHOP:SOAP_MAKER]
[DIM:3:3]

something of how my version will be:
[BUILDING_WORKSHOP:<!>] <?>The name of your workshop
[DIM:<!>:<!>] <?>Tiles wide (0 by default) <?>Tiles high (0 by default)

when it gets to things like:
[BODY_APPEARANCE_MODIFIER:LENGTH:90:95:98:100:102:105:110]
Im sure it will be more tedious

things like:
[BODY:QUADRUPED:2EYES:NOSE:2LUNGS:HEART:GUTS:ORGANS:THROAT:NECK:SPINE:BRAIN:SKULL:MOUTH:TONGUE:RIBCAGE]
will just be
[BODY:<!!>]<?>This is the body, set the stance (biped,quadraped) and add body parts to this.

all the parts will be contained in a txt file, likley with the [BODY:] tag...(hmmm I might be able to nix the <!> and just use the colon
that'd be sweet...moving on) Like so:

[BODY:]<?>This is the body, set the stance (biped,quadraped) and add body parts to this.
QUADRUPED<?>Walks on 4 legs
2EYES<?>has 2 eyes
NOSE<?>No description nessisary
ect...

These are just ideas of how I am going to implement this.
For more advanced users, there will be the ability to type out and store tags and reactions.
I hope to have everything editable.
The first step will be to make my program read my files
The second step will be to add all the tags for the cat
The third step will be to re create the cat
I choose the cat, because I have been using the creature_domestic.txt to build this program and I see it constantly.
« Last Edit: March 04, 2012, 09:41:20 am by neil_v »
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Demon's Forge (DEMO) A creature editor (but not really, yet)
« Reply #3 on: March 04, 2012, 01:02:20 pm »

For the BODY, just remember you must always start with a BP (body part) that counts as UPPERBODY, then a LOWERBODY, then a Head. After that everything else can be added
Ex: [BODY:HUMONOID:5FINGERS:2EYES:etc...]

Because HUMONID adds UPPERBODY,LOWERBODY,HEAD,arms, hands, legs, feet. All in one go, so all that's needed to the vital organs and optics + cosmetic stuff like fingers/toes, nose, ears. Your description of the usage of [BODY] can be

"Assigns the creature a body plan, everyplan must start with Body Parts that go in this order: UPPERBODY, LOWERBODY, then HEAD or there will be connection issues."

Since your program is using C++ (if I'm correct) you might have to make the variables for the [BODY] tag a flexible Array (or better yet a single string variable (as it's alph-numerical) and a single text field that can accept 255 (256) letters (1BYTE smaller is better if you can make due. But the letter count on DWARF "BODY" arguments are 147 letters)

So I would suggest a string variable restricted to only 1BYTE or 255 letters (256 "0-255")

Also could that Workshop builder part be seperate from the creature maker? Like a second .EXE because the program "Custom Workshop Workshop" Almost has it down to a tee. But it lacks some features for me, which are:

-No ability to set a WORK_LOCATION, better yet MANY work locations
-No ability to set a Name
-No ability to set a Hotkey
-Loading from raw messes up BLOCKING horribly so.

Also as a request... Could you also make a sort of easy to use "Tile Selector" for all creatures, plants, and inorganics? I can't for the life of me figure out how to use the one supplied in the Community Mods and Utilities thread. Making my life of porting Phoebus to ASCII or any type of Tileset to another a pain.

Also some modder might like a REACTION BUILDER I can help with the formating and describe how everything works when you get that far (if you feel obliged to do so)
Logged

neil_v

  • Bay Watcher
    • View Profile
Re: Demon's Forge (DEMO) A creature editor (but not really, yet)
« Reply #4 on: March 04, 2012, 02:44:38 pm »

First, thanks for the input! it is much appreciated.
I shall try to accommodate your tile request the best I can, but that will be in the future it seems.
I will store your post for future ref.

-The method I am currently using is a single string variable (as an array), each line is represented in the array. The program seems to accept what I have thrown at it so far. (and it loads instantly on my old laptop)
for example:
480 chr (scroll to the right for full string -->):
   [TL_COLOR_MODIFIER:BLACK:1:BROWN:1:WHITE:1:GRAY:1:LIGHT_BROWN:1:DARK_BROWN:1:TAN:1:AUBURN:1:CHESTNUT:1:SLATE_GRAY:1:CREAM:1:CINNAMON:1:BUFF:1:BEIGE:1:CHOCOLATE:1:CHARCOAL:1:ASH_GRAY:1:RUSSET:1:IVORY:1:FLAX:1:PUMPKIN:1:GOLD:1:GOLDEN_YELLOW:1:GOLDENROD:1:COPPER:1:SAFFRON:1:AMBER:1:MAHOGANY:1:OCHRE:1:PALE_BROWN:1:RAW_UMBER:1:BURNT_SIENNA:1:BURNT_UMBER:1:SEPIA:1:DARK_TAN:1:PALE_CHESTNUT:1:DARK_CHESTNUT:1:TAUPE_PALE:1:TAUPE_DARK:1:TAUPE_SANDY:1:TAUPE_GRAY:1:TAUPE_MEDIUM:1:ECRU:1]
If you run the program, open creature_domestic.txt and scroll to a long string you will see the full string when you hover over it with the mouse. 

The visual part of program adds a # after every 90 characters (or whatever I decide)and adds a ... to let the user know the line extends past the boundary to break the line, but that is only for the benefit of the user. The future editable text will be another story. All that matters for now is that each line is stored correctly and unadulterated.

Quote
So I would suggest a string variable restricted to only 1BYTE or 255 letters (256 "0-255")
Spoiler (click to show/hide)

--
Regarding the workshops: I am not looking to reinvent the wheel, that's why I started this thread. Im looking for people to say "don't waste your time on this, we already have it." or "This already doesn't work at all" or "good start, we want this"

--

The workshop builder is not as important (read: im not working on that now) but as soon as the program reads creatures and is able to edit them, the workshops will work in the same way, just different tags and reactions.
The reaction builder will work in the same way as the creature builder.
All the little bits that go together to make a whole (in regards to the text files) are similar, you just have to tell the program what you want to look for. Be it [CREATURE] as it is hard coded now or [REACTION], it all is similar (it has to be, so DF can read it). The program will be designed to give suggestions on the best way to go about using the available information, but it wont hold your hand and tell you that you cant make a workshop out of [BUILD_ITEM:1:3EYES:....], there will be info in place to warn you against wasting you time doing that, but it wont be experiment proof, because I don't want it to be. Which is why the program can read any .txt file. A beginner mode would be nice, but for now its the trenches.
Thanks again! I will be sure to bug you if I get stuck on something, and feel free to criticize or comment.

-
« Last Edit: March 04, 2012, 02:53:28 pm by neil_v »
Logged

Vandala

  • Bay Watcher
  • Mad Tinkerer
    • View Profile
Re: Demon's Forge (DEMO) A creature editor (but not really, yet)
« Reply #5 on: March 04, 2012, 09:12:07 pm »

How does your program treat castes or abilities within castes?

Is working within and without castes not a problem due to it being a text editor?
Logged
Working on the "Dwarf Fortress Mod Creation Kit"
http://www.bay12forums.com/smf/index.php?topic=102881.0

GO BUY STARFARER NOW!!!! It's crazy awesome!
http://fractalsoftworks.com/

neil_v

  • Bay Watcher
    • View Profile
Re: Demon's Forge (DEMO) A creature editor (but not really, yet)
« Reply #6 on: March 04, 2012, 09:49:23 pm »

I guess it doesnt do anything in that respect, its about the user understanding what to put where.
The program will just have a blurb about what to put where.

Perhaps you could elaborate a bit as I might be mis-understanding. but...
as far as I can see it follows the same format:
(from wiki)
[CASTE:<CASTE_NAME>] defines a caste called <CASTE_NAME>. Tags following this affect only this caste.
[SELECT_CASTE:ALL] state the following tags affect all Castes
[SELECT_CASTE:<CASTE_1>]
[SELECT_ADDITIONAL_CASTE:<CASTE_2>]
[SELECT_ADDITIONAL_CASTE:<CASTE_3>], etc, is used to specify that tags affect a subset of Castes

As a text editor it can do whatever, but as a specialized program for this type of thing, it should streamline the process of using and understanding castes. should...
The idea you have for creating an editor (which inspired me to start on this text editor) is more complex and in the long run more useful than mine. Mine will just be a much quicker way of typing out information
for example:
if you press [a] or select the applicable option from the active tab
the program will place [CASTE:] in the text editor
then you can activate the tab that contains all available castes (unless you have all available castes in the current tab)
then you can use the hotkey for "leopard gecko:leopard geckos:leopard gecko" or select it from the tab with the mouse.
My program relies on user knowledge for now. Some things will be proceduralised (even a word?) in almost a create-a-thing wizard format for
generic stuff...

Logged

Vandala

  • Bay Watcher
  • Mad Tinkerer
    • View Profile
Re: Demon's Forge (DEMO) A creature editor (but not really, yet)
« Reply #7 on: March 04, 2012, 10:21:10 pm »

Yes but your program (if I understand any of this) will pretty much work forever without any need for updates no matter what dwarf fortress evolves into. Very useful.

A problem I had was wither an ability needed to be placed within a caste or without. (solved though)
But you probably won't have this problem now that I think about it, you only have to worry about working with one text file as a time which solves this I think.

I take it that the program takes into account the spaces in the .txt file that announce to dwarf fortress that some abilities are located in sub-sets within the text?

(sorry if I'm wording anything wrong, I'm still such a noob at all this)
Logged
Working on the "Dwarf Fortress Mod Creation Kit"
http://www.bay12forums.com/smf/index.php?topic=102881.0

GO BUY STARFARER NOW!!!! It's crazy awesome!
http://fractalsoftworks.com/

neil_v

  • Bay Watcher
    • View Profile
Re: Demon's Forge (DEMO) A creature editor (but not really, yet)
« Reply #8 on: March 05, 2012, 06:56:28 am »

Quote
I take it that the program takes into account the spaces in the .txt file that announce to dwarf fortress that some abilities are located in sub-sets within the text?
Not too sure. The only spaces in the .txt's I have seen so far are the line breaks.
There are spaces between the closing and an opening of a square bracket [][] but im not sure if DF needs those spaces.
The program reads empty lines, and spaces. the empty lines are assigned to an array the same as all the other lines.
if it ends up being a problem, i'll will have to do something drastic like assigning empty space a "_" but I hope it doesn't come to that.
When I run my program, everything looks how it should.
Quote
(sorry if I'm wording anything wrong, I'm still such a noob at all this)
LOL! me too. Although I am newer to modding DF than programming.
« Last Edit: March 05, 2012, 02:25:48 pm by neil_v »
Logged

Vandala

  • Bay Watcher
  • Mad Tinkerer
    • View Profile
Re: Demon's Forge (DEMO) A creature editor (but not really, yet)
« Reply #9 on: March 05, 2012, 09:28:05 am »

Well that puts my fears at rest.

Good luck with your program.
Logged
Working on the "Dwarf Fortress Mod Creation Kit"
http://www.bay12forums.com/smf/index.php?topic=102881.0

GO BUY STARFARER NOW!!!! It's crazy awesome!
http://fractalsoftworks.com/

neil_v

  • Bay Watcher
    • View Profile
Re: Demon's Forge (DEMO) A creature editor (but not really, yet)
« Reply #10 on: March 05, 2012, 02:27:10 pm »


Quote
Good luck with your program.
Right back at ya! 8)
Logged

neil_v

  • Bay Watcher
    • View Profile
Re: Demon's Forge 0.1 (DEMO) A creature editor (kinda'.)
« Reply #11 on: March 05, 2012, 09:29:11 pm »

-Updated to 0.1

-edit
another minor update (edit is disabled...its a bug...i'll fix it later)

-edit 2
 fixed & re-uploaded
« Last Edit: March 07, 2012, 10:13:31 am by neil_v »
Logged

neil_v

  • Bay Watcher
    • View Profile
Re: &σ - Demon's Forge 0.15 (DEMO) A Text editor (kinda'.)
« Reply #12 on: March 10, 2012, 05:42:47 pm »

Updated to 0.15 (15% completed)

The next step is making the word processor aspect as well as fixing some bugs.

Anyone have any comments? good, bad, ugly?
« Last Edit: March 10, 2012, 05:48:45 pm by neil_v »
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: &σ - Demon's Forge 0.15 (DEMO) A Text editor (kinda'.)
« Reply #13 on: March 10, 2012, 07:02:21 pm »

I'm glad thi si coming along nicely. I like the fact that it can pick out objects and sort them/tally them

I'll wait until this goes farther by allowing the objects to be opened/closed like visual basic does for functions/methods/events so that you don't have to look at every objects code(tags) all at once, only the ones you select expand to view the contents.

Of course so far it's only a word processor.

But I'll say, it looks good from those screenshots
Logged

neil_v

  • Bay Watcher
    • View Profile
Re: &σ - Demon's Forge 0.15 (DEMO) A Text editor (kinda'.)
« Reply #14 on: March 10, 2012, 07:15:55 pm »

The "only see what you want" is what I was working toward. A jump-to is is far as I will go until it can get the actual word processing (more likely, just an advanced text editor)  part done. I have an array that is logging the distance between the filter tag and the beginning of the next filter tag, but I have not implemented it (or checked to see if it is working).
Paradoxically, I am not looking forward to figuring out how to actually make the text editor (based on how I have already grabbed the information with the array)but I am looking forward to the challenge.
Thanks for replying!
Logged
Pages: [1] 2