Bay 12 Games Forum

Please login or register.

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

Author Topic: Just a coding question...  (Read 1670 times)

TheShotgunSurgeon

  • Bay Watcher
  • The milker has lached on firmly to the dragon!
    • View Profile
Just a coding question...
« on: October 17, 2011, 10:18:07 pm »

Salutations! I just want to ask a quick question, what language is Dwarf fortress coded in? I know C++ so would making mods in DF be to far fetched with that language to make mods?
Logged
Marble Hornets- Been Creepin the F*K outa people since 09'

TheShotgunSurgeon

  • Bay Watcher
  • The milker has lached on firmly to the dragon!
    • View Profile
Re: Just a coding question...
« Reply #1 on: October 17, 2011, 10:19:19 pm »

I put this in the wrong thread didn't I...
Logged
Marble Hornets- Been Creepin the F*K outa people since 09'

IT 000

  • Bay Watcher
  • Strange Mood
    • View Profile
Re: Just a coding question...
« Reply #2 on: October 17, 2011, 10:31:36 pm »

I put this in the wrong thread didn't I...

Correct

Also there is no need to crack open the data files itself. Just edit the text files in the raw folder. Search the modding forums for tutorials and suggestions and such. It's a lot simpler then using C++ but there is still a learning curve.
Logged

***CORROSION v2.14***
<<<More Than Just Zombies>>>
Back from the Dead!

Tharwen

  • Bay Watcher
    • View Profile
Re: Just a coding question...
« Reply #3 on: October 18, 2011, 06:29:48 am »

I put this in the wrong thread didn't I...

Correct

Also there is no need to crack open the data files itself. Just edit the text files in the raw folder. Search the modding forums for tutorials and suggestions and such. It's a lot simpler then using C++ but there is still a learning curve.

Yah, but you can't modify the core game, like in Minecraft. Only the objects in it.
Logged
[Signature]

Cruxador

  • Bay Watcher
    • View Profile
Re: Just a coding question...
« Reply #4 on: October 18, 2011, 10:52:46 am »

DF is coded in C++ but mods are made based on a sort of a language custom-made for the game. I don't think Toady's named it
Logged

peskyninja

  • Bay Watcher
  • Natural de-selector
    • View Profile
Re: Just a coding question...
« Reply #5 on: October 18, 2011, 12:14:27 pm »

We  shall give a name to it here and now! :o
Logged
Burn the land and boil the sea. You can't take the sky from me

Thou son of a b*tch wilt not ever make subjects of Christian sons; we have no fear of your army, by land and by sea we will battle with thee, f**k thy mother.

Starver

  • Bay Watcher
    • View Profile
Re: Just a coding question...
« Reply #6 on: October 18, 2011, 12:42:09 pm »

Fred
Logged

Starver

  • Bay Watcher
    • View Profile
Re: Just a coding question...
« Reply #7 on: October 18, 2011, 12:45:15 pm »

Sorry, rather forgot to add that it might well be backronymed to "Fortress and Regional Eco[logy|nomy] Descriptor"
Logged

YetAnotherStupidDorf

  • Bay Watcher
    • View Profile
Re: Just a coding question...
« Reply #8 on: October 18, 2011, 12:46:02 pm »

It already have name. Raws. I know, not very original, but there you have. And BTW it is NOT language in sense of computer language like C++. It is just data for Dwarf Fortress engine. Ok, enough nitpicking.
Logged
Dwarf Fortress - where the primary reason to prevent death of your citizens is that it makes them more annoying then they were in life.

G-Flex

  • Bay Watcher
    • View Profile
Re: Just a coding question...
« Reply #9 on: October 18, 2011, 12:48:09 pm »

I have no idea if the OP is still around, but:

  • Dwarf Fortress is programmed in C++, yes.
  • Knowing the language it's programmed in does not give you the capacity to modify the game; that's not really how programming works. This is a bit of an oversimplification, but basically true.
  • Any modding to the game is done by modifying the object raw files, which are just text files following their own format, which have nothing to do with what the game itself is programmed in.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Starver

  • Bay Watcher
    • View Profile
Re: Just a coding question...
« Reply #10 on: October 18, 2011, 12:55:08 pm »

And BTW it is NOT language in sense of computer language like C++. It is just data for Dwarf Fortress engine.
I would class as a Markup lanaguage.  A Raws (or "Fred") to/from XML converter, anyone? ;)

(No, I can see no use...  Save for perhaps that now you can regularly use some XML-savvy data editor in your modding work.)
Logged

G-Flex

  • Bay Watcher
    • View Profile
Re: Just a coding question...
« Reply #11 on: October 18, 2011, 12:58:31 pm »

Yeah, it's really not a scripting/programming language, which is why it's running up against limitations with some of the new content. I'd call it an object definition language, or something like that. Calling it a "markup language" seems wrong, because those are mostly about how to process or interpret text to be displayed, whereas the raw files are simply data for defining objects; the text itself isn't really the content.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Starver

  • Bay Watcher
    • View Profile
Re: Just a coding question...
« Reply #12 on: October 18, 2011, 01:14:29 pm »

Yeah, it's really not a scripting/programming language, which is why it's running up against limitations with some of the new content. I'd call it an object definition language, or something like that. Calling it a "markup language" seems wrong, because those are mostly about how to process or interpret text to be displayed, whereas the raw files are simply data for defining objects; the text itself isn't really the content.
Point well made.  XML isn't technically 'markup', though (X)HTML using XML principles is.

The hypothetical Raws2XML might convert "[TAG:this:that:theother]" into "<TAG><fooquality>this</fooquality><barquality>that</barquality><bazquality>theother</bazquality></TAG>" so there's content within the more objective structural information, of course.  (Other methods are possible, like being params, but they don't support my idea of equivalence. :) )

I was going to equate it with .css as well, originally.  Even so, there's a number of flaws in that, for those of us that care to look deep enough into it.   :P
Logged

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: Just a coding question...
« Reply #13 on: October 18, 2011, 01:21:18 pm »

Knowing the base language it was coded in doesn't directly let you modify it, no, but it does open up a few options if the programmer is determined enough.  It helps with decompiling the binary into source code (which is likely to be a hopeless cause regardless, but still).  It would also simplify the matter of macking hacks and trainers since it gives you some information on how functions are called, stack information and things like that.

Still way beyond anything that most people (myself included) would be willing to try to mod, but it could in theory be done.

Now, what would be cool is if Toady would include a scripting engine and some API hooks for modding, but heaven knows that would take some time to do and he's busy enough as it is.
Logged
Through pain, I find wisdom.

Kogut

  • Bay Watcher
  • Next account: Bulwersator
    • View Profile
Re: Just a coding question...
« Reply #14 on: October 19, 2011, 03:06:26 am »

which is likely to be a hopeless cause regardless, but still

It is doable but time consuming (OpenTTD started as decompiled TTD etc).

EDIT: And it may be illegal.
Logged
The worst bug - 34.11 poll
Tired of going decades without goblin sieges? Try The Fortress Defense Mod
Kogut, the Bugfixes apostle of Bay12forum. Every posts he makes he preaches about the evil of Bugs.
Pages: [1] 2