Bay 12 Games Forum

Please login or register.

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

Author Topic: Blast [V0.9.1a] - Modding on steroids.  (Read 16021 times)

MagmaMcFry

  • Bay Watcher
    • View Profile
Blast [V0.9.1a] - Modding on steroids.
« on: May 12, 2013, 06:16:17 pm »

Are YOU annoyed by DF modding because you have to copy-paste tons of junk all the time? Are YOU annoyed by all the DF raw interdependencies and the staggering unintercompatibility of DF mods? Would YOU like your mod to have easily changeable settings? Would YOU like to write quick and compatible addons to mods that don't require changing the mod's raw files, and that are perfectly compatible with other add-ons? Would YOU like a really easy way to make your mods in such a way that you don't have to change 50 raw files every time you change a single detail? Well, you're in pretty damn good luck right now, because in this thread you will find a flexible and insanely powerful solution to all these problems. Modders and gentledwarves, I present to you:

Blast Raw Compiler and Assembler v0.9.1 Alpha

Description:

Blast is a toolkit to aid experienced modders in modding DF. It extends the syntax of the DF raws into an extremely powerful language that can help you make your raws so much more concise, legible, maintainable, configurable and intercompatible.

Blast is a Perl-based tool that will assemble an entire raw folder from a mod base and addons. The mod base and addons contain something similar to raw files called "preraws". Preraws are an extremely powerful dynamic extension to raws. Blast parses these preraws and converts them into raws readable by DF or shareable with those who don't use Blast.





Included with your download is a base mod based on the vanilla DF raws, which has built-in templates and hooks that make it a lot easier to add content than unmodified vanilla raws, all while keeping very close to the original DF raws. If you want to write an extension (a mod that only adds content, say a new race or some new items or reactions) for vanilla DF, you will want to write an add-on to this base/, since it gives you more possibilities to extend DF, and it guarantees compatibility with other such extensions.

For more documentation, look at the quickstart guide and the template documentations (see below), or at the various other unsorted documentation files strewn around the zip file.

I can add tons of features on the slightest demand, although you may feel free to help me expand it using my Github repo.

Installation:

To use Blast, you need a fresh copy of DF and a fresh copy of Blast. Put the contents of Blast.zip into your main DF folder. You're now ready to run Blast. Have fun!

Syntax highlighter:

To use the included syntax highlighter config for the gedit editor (you'll find it under blast_doc/blast.lang), just throw it into your version of gedit's language directory. Under Unix systems this is ~/.local/share/gtksourceview-2.0/language-specs/ (don't be afraid if it doesn't exist), if you're on Windows you'll need to find that directory by yourselves.

Quickstart guide:


Template documentation:
- Standard template library
- Standard base templates
« Last Edit: January 02, 2014, 09:40:11 pm by MagmaMcFry »
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio

Post to watch :p Perhaps an easy tutorial is called for.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile

I REFUSE TO BE ASSIMILATED.

Seriously, though, I may move from DFMM to this depending on how well this works for that kind of thing.

EDIT: This would have been so, so, so very helpful when I was making Fortbent 5...
« Last Edit: May 12, 2013, 09:53:55 pm by Putnam »
Logged

MagmaMcFry

  • Bay Watcher
    • View Profile

Post to watch :p Perhaps an easy tutorial is called for.
I'll do my best, but it's hard to write a tutorial for something that has only one language construct :P

EDIT: This would have been so, so, so very helpful when I was making Fortbent 5...
Your "devlog" of Fortbent 5 was at least half the reasons I made this.
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile

This is just what I always wanted!!!

To bad I had just started writing something like this (but much less powerful), O well at least I didn't waste too much time on it :P
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

laularukyrumo

  • Bay Watcher
  • Needs More Socks
    • View Profile

This looks insanely sexy.

Logged
Quote from: Dwarfotaur
Everytime one of my militia has given birth in the Danger Room, it's lead to instant baby smoothies for everyone.

Gotta Catch 'Em All!

Dat Sig Thread

MagmaMcFry

  • Bay Watcher
    • View Profile

Updated version of this post is in OP, but maybe this can still help.

« Last Edit: January 02, 2014, 03:04:44 pm by MagmaMcFry »
Logged

Aklyon

  • Bay Watcher
  • Fate~
    • View Profile

This sounds pretty cool.
Logged
Crystalline (SG)
Sigtext
Quote from: RedKing
It's known as the Oppai-Kaiju effect. The islands of Japan generate a sort anti-gravity field, which allows breasts to behave as if in microgravity. It's also what allows Godzilla and friends to become 50 stories tall, and lets ninjas run up the side of a skyscraper.

MagmaMcFry

  • Bay Watcher
    • View Profile

So I just discovered Mod Base and Uristmod, two ancient spiritual ancestors to what I'm doing here, and I can safely say that Blast is better and more powerful than both of them together. :P
Logged

MagmaMcFry

  • Bay Watcher
    • View Profile
Re: Blast Raw Compiler and Assembler [V0.2.0a] - {#AQUIFER} anyone?
« Reply #9 on: May 15, 2013, 06:57:22 am »

Released new version. Bases and add-ons now have config files, and the base now has an {#AQUIFER} template that either expands into an [AQUIFER] or not, depending on the configuration.
« Last Edit: May 15, 2013, 09:28:07 am by MagmaMcFry »
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Blast Raw Compiler and Assembler [V0.2.0a] - {#AQUIFER} anyone?
« Reply #10 on: May 15, 2013, 05:57:17 pm »

I need a way to remove/add tags from a base in an addon without needing to make major edits to the base. With such abilitys it would be easy to distribute "Blast Mini-Mods" that would be something like a diff or patch. You could install a bunch of such addons to the default base for an easy, custom mod pack.

I can see it now, small Blast based mini-mods that can be quickly added and removed, just drop a new addon in and regenerate your raws.

The main issue is that there is no good way to add/remove PERMITED_REACTIONs and the like without editing entity_default, and if you edit entity_default your mod will clash with everything.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

MagmaMcFry

  • Bay Watcher
    • View Profile
Re: Blast Raw Compiler and Assembler [V0.2.0a] - {#AQUIFER} anyone?
« Reply #11 on: May 15, 2013, 06:47:59 pm »

I need a way to remove/add tags from a base in an addon without needing to make major edits to the base. With such abilitys it would be easy to distribute "Blast Mini-Mods" that would be something like a diff or patch. You could install a bunch of such addons to the default base for an easy, custom mod pack.

I can see it now, small Blast based mini-mods that can be quickly added and removed, just drop a new addon in and regenerate your raws.
Allowing add-ons to remove tokens is really bad for compatibility. Adding tokens should be no problem, as long as the base allows this: It can provide a template that registers stuff to program memory, and another template (preferably a post-template) that builds and returns DF raw code from this stored stuff.

What sort of tags (and what tags specifically) would you want removed anyway?


Quote
The main issue is that there is no good way to add/remove PERMITED_REACTIONs and the like without editing entity_default, and if you edit entity_default your mod will clash with everything.
You, good sir, have not properly had a look at base/objects/entity_default.txt like I suggested, because if you had, you would notice that it doesn't contain a single [PERMITTED_REACTION] tag. The ability to add new items, buildings and reactions to existing entities is obviously the most important part of a base, which is why I implemented those things right from the beginning, providing {ITEM_CLASS} and {TECH_CLASS} templates that allow add-ons to register items to have specific properties, and the {#USES_ITEM_CLASSES} and {#USES_TECH_CLASSES} templates, that, when given a list of properties, expand to a list of permissions of all items (in case of ITEM_CLASSES) or buildings/reactions (in case of TECH_CLASSES) whose requirements are met. I ported all vanilla items, buildings and reactions to this system (as you can see in the item_*.txt and reaction_*.txt files) to allow add-on entities to use this system as well (instead of having to type all the vanilla item permissions manually). You should have no problems at all defining new items and making them usable by the vanilla entities, unless you want vanilla entities to allow a new item or reaction property (e.g. steampunk or magic or really advanced metallurgy or what have you), in which case I'll gladly put that property in the applicable Blast!vanilla entity definition.

By the way, I managed to categorize the items and reactions so well that the only difference between the generated raws and the vanilla raws is that elves have [ARMOR:ITEM_ARMOR_LEATHER] using Blast, which doesn't really matter since Elves don't use leather anyway.
« Last Edit: May 15, 2013, 06:49:55 pm by MagmaMcFry »
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Blast Raw Compiler and Assembler [V0.2.0a] - {#AQUIFER} anyone?
« Reply #12 on: May 15, 2013, 07:04:32 pm »

The problem is that USES_TECH_CLASSES is inflexable.

I have a bunch of mini-mods that replace vanilla stuff with expanded versions, for example I have one that redoes all the smelter stuff. I need a way to add the PERMITTED_REACTIONs for my stuff to MOUNTAIN as a REPLACEMENT for the existing reactions without changing all the other entitys (who should still use the vanilla reactions).

With USES_TECH_CLASSES I would need to change the classes for all vanilla reactions and/or change the entity file, and changing any vanilla file (directly) defeats the purpose of a mod of that type, eg it would be made incompatible with any mod that also changes that vanilla file.

I just need a way to say not to use reaction x in entity y and use z in its place.

There is good support for ADDING things but no support for REPLACING things.
« Last Edit: May 15, 2013, 07:06:07 pm by milo christiansen »
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

MagmaMcFry

  • Bay Watcher
    • View Profile
Re: Blast Raw Compiler and Assembler [V0.2.0a] - {#AQUIFER} anyone?
« Reply #13 on: May 15, 2013, 07:13:52 pm »

The problem is that USES_TECH_CLASSES is inflexable.

I have a bunch of mini-mods that replace vanilla stuff with expanded versions, for example I have one that redoes all the smelter stuff. I need a way to add the PERMITTED_REACTIONs for my stuff to MOUNTAIN as a REPLACEMENT for the existing reactions without changing all the other entitys (who should still use the vanilla reactions).

With USES_TECH_CLASSES I would need to change the classes for all vanilla reactions and/or change the entity file, and changing any vanilla file (directly) defeats the purpose of a mod of that type, eg it would be made incompatible with any mod that also changes that vanilla file.

I just need a way to say not to use reaction x in entity y and use z in its place.

There is good support for ADDING things but no support for REPLACING things.
Well yes, that's kinda the point of it being an ADD-on. How exactly did you rework these systems? If they're similar enough, I could replace the vanilla systems with what you have there. I'd also appreciate any bugfix patches to the vanilla raws.
Logged

dimondmine2

  • Bay Watcher
    • View Profile
Re: Blast Raw Compiler and Assembler [V0.2.0a] - {#AQUIFER} anyone?
« Reply #14 on: May 16, 2013, 08:14:39 pm »

Feature request, many mods add weapons, and often foreign weapons are a part of this, would it possible to do a {get "item_name" info} so that someone could see the benefits of that weapon without navigating the raw files. An example of why I bring this up, while playing DFMM, I got a drow caravan, and they brought spiked shields, and alas neither the masterwork sub-thread nor the masterwork wiki provided any help (or I am oblivious) as to the benefits and/or drawbacks of a spiked shield. If you could add in that feature, it might help take out some of the confusion when choosing whether or not to build/buy that weapon/armor from some mod or another.
Logged
Pages: [1] 2 3 ... 6