Bay 12 Games Forum

Please login or register.

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

Author Topic: Rubble 8.5.5 - DF 44.7 - New DF, new Rubble.  (Read 71263 times)

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Humble mod: How to do semantic diffs with rubble
« Reply #15 on: January 04, 2016, 01:15:07 pm »

The working humble mod is a tiny 8KB rubblized version of parts or all of other minor mods, download the zip
and place it directly in the addons directory of rubble, dezipping not required.
What we have now:
  • All year around subterranean crops, that means that you can grow them all the seasons
Spoiler (click to show/hide)
  • Bigger containers; trying to boost FPS
Spoiler (click to show/hide)
Spoiler (click to show/hide)
« Last Edit: January 05, 2016, 06:19:31 am by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.2.0 - DF 42.4 - Automatic output syntax checking!
« Reply #16 on: January 04, 2016, 01:27:53 pm »

Cool! Nice work!

Why do you have "[OBJECT:ENTITY]" in there? Rubble doesn't care about it, and you can place these templates anywhere you want so long as they are evaluated before the data they set needs to be used. I would generally put template calls like this in a .rbl file ("aaa_humble_mod_<option>.rbl" maybe) so that the file never gets written.

Also I noticed you use SHARED_OBJECT_ADD to register reactions. Look at the ".rbl" file in the default "User/Saurians" addon, I use REACTION_ADD_CLASS, that way you can use REMOVE_REACTION_FROM_PLAYABLES and other templates of that sort.
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

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: Rubble 7.2.0 - DF 42.4 - Automatic output syntax checking!
« Reply #17 on: January 04, 2016, 02:14:20 pm »

Why do you have "[OBJECT:ENTITY]" in there? Rubble doesn't care about it, and you can place these templates anywhere you want so long as they are evaluated before the data they set needs to be used. I would generally put template calls like this in a .rbl file ("aaa_humble_mod_<option>.rbl" maybe) so that the file never gets written.
exploratory mining of the new lua system ;D
Moreover I were trying to do
Spoiler (click to show/hide)
Instead of
Spoiler (click to show/hide)
Before knowing that nested templates were not possible...
Also I noticed you use SHARED_OBJECT_ADD to register reactions. Look at the ".rbl" file in the default "User/Saurians" addon, I use REACTION_ADD_CLASS, that way you can use REMOVE_REACTION_FROM_PLAYABLES and other templates of that sort.
Most of the time I use SHARED_OBJECT_REPLACE_TAG instead of my initial bet SHARED_OBJECT_ADD to gain token locality but I can see that REACTION_ADD_CLASS is more specialized for reactions.
Milo, at the end of file aaa_sobject_libs_base.pre.lua I need to include the code below to rubblify modest mod content and others
Code: [Select]
rubble.usertemplate("SHARED_CREATURE_VARIATION", {{"id", ""}, {"raws", ""}},
[[{SHARED_OBJECT;%{id};
[MATERIAL_TEMPLATE:%{id}]
%{raws}
}]])

rubble.usertemplate("!SHARED_CREATURE_VARIATION", {{"id", ""}, {"raws", ""}},
[[{!SHARED_OBJECT;%{id};
[MATERIAL_TEMPLATE:%{id}]
%{raws}
}]])
I also need a way to copy a vanilla object with a new id to extend him, with creature objects you have the creature variation but not for the rest of the DF classes of objects, a crude way to do that in rubble will be important for doing semantic diff in modding.
for example:
Code: [Select]
!SHARED_OBJECT_COPY sourceid newid Finally a way to iterate all tokens of a particular class of DFobjects from rubble and/or lua is a common use case to do advanced things like
Code: [Select]
# file user\noExotics\noExotics.post.rex
var foundCreature = false

(console:print "Works like old util noexotics.exe\n Offering a whole lot more of animals to buy in the embark screen\n strike today your dreamed ranch!\nThis reduces the limitations of the retired Overseer noble position\n    Replacing tags PET_EXOTIC and MOUNT_EXOTIC with PET and MOUNT for each creature\n")
(foreach [rubble:raws] block name content {
(if (str:cmp "creature_" (str:left [name] 9)) {
(console:print "      " [name] "\n")

[rubble:raws [name] = (df:raw:walk [content] block tag {
(if (str:cmp [tag id] "CREATURE") {
(if (int:eq (len [tag]) 1) {
(if (bool:not (str:cmp [tag 0] "TOAD")){ # Except the TOAD, our most precious natural resource, we must protect them ;)
[foundCreature = true]
}{
[foundCreature = false]
})
}{
(rubble:abort "Error: invalid param count to CREATURE raw tag in last file.")
})
})

(if (bool:and (str:cmp [tag id] "PET_EXOTIC") [foundCreature]) {
#[tag replace = (str:add "[PET]")]
[tag replace = "[PET]"]
})

(if (bool:and (str:cmp [tag id] "MOUNT_EXOTIC") [foundCreature]) {
#[tag replace = (str:add "[MOUNT]")]
[tag replace = "[MOUNT]"]
})

#(break true) #
})]
})
(break true)
})
« Last Edit: January 04, 2016, 02:43:35 pm by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.2.0 - DF 42.4 - Automatic output syntax checking!
« Reply #18 on: January 04, 2016, 02:29:19 pm »

More specialized !SHARED_OBJECT variants? Sure no problem, coming next version (inserted into the Base and everything).

A way to copy/extend a shared object is a little less easy (modders would need to worry about evaluation order), but not hard to do. Expect something like that next version as well.

There is already a "file action" API that takes a file tag based "filter". Rubble predefines some filters for all common raw file types, see... Umm... One of the global Lua scripts in the "Libs" directory, I forget the name (that script actually uses the actions API to apply some extra tags to each file, so it has a good example right there). Walking a single shared object can be done with a Lua function, I forget the name but it powers the SHARED_OBJECT_XYZ_TAG templates.

The raw parser used in 7.x is a little harder to use than the 6.x parser, but there is a Lua function that wraps it and provides a simpler interface, "rubble.rparse.walk"? I think? It should be listed in the Lua docs.
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

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: Rubble 7.2.0 - DF 42.4 - Automatic output syntax checking!
« Reply #19 on: January 04, 2016, 03:12:00 pm »

More specialized !SHARED_OBJECT variants? Sure no problem, coming next version (inserted into the Base and everything).
If possible one for each one of DFObjects classes as seen in
Code: [Select]
#  in file aaa_std_filetags.init.lua

local possibletype = {
["b_detail_plan_"] = "BodyDetailRaws",
["body_"] = "BodyRaws",
["building_"] = "BuildingRaws",
["c_variation_"] = "CreatureVarRaws",
["creature_"] = "CreatureRaws",
["descriptor_"] = "DescriptorRaws",
["entity_"] = "EntityRaws",
["inorganic_"] = "InorganicRaws",
["interaction_"] = "InteractionRaws",
["item_"] = "ItemRaws",
["language_"] = "LanguageRaws",
["material_template_"] = "MatTemplateRaws",
["plant_"] = "PlantRaws",
["reaction_"] = "ReactionRaws",
["tissue_template_"] = "TissueRaws",
}
Most are already done ;) in the rubblized vanilla raws
When we dispose of the template {!SHARED_OBJECT_CREATURE_VARIATION idToken} we will have two very interesting mods:
Remove all animalpersons from mundane raws but not from legends and engravings, nice for those that like to butcher and eat all the animals in their biomes something that is not always possible with the animalperson because of the ethics of each entity.
Code: [Select]
{SHARED_OBJECT_ADD;ANIMAL_PERSON;[DOES_NOT_EXIST]}{SHARED_OBJECT_ADD;ANIMAL_PERSON_LEGLESS;[DOES_NOT_EXIST]}Remove all giant animals from mundane raws but not from legends and engravings; making place in the biomes for a dinosaurs mod...
Code: [Select]
{SHARED_OBJECT_ADD;GIANT;[DOES_NOT_EXIST]}
A way to copy/extend a shared object is a little less easy (modders would need to worry about evaluation order), but not hard to do. Expect something like that next version as well.
Even only the copy with a new id would be extreme helpful.
There is already a "file action" API that takes a file tag based "filter". Rubble predefines some filters for all common raw file types, see... Umm... One of the global Lua scripts in the "Libs" directory, I forget the name (that script actually uses the actions API to apply some extra tags to each file, so it has a good example right there). Walking a single shared object can be done with a Lua function, I forget the name but it powers the SHARED_OBJECT_XYZ_TAG templates.
I will try it, thanks!
The raw parser used in 7.x is a little harder to use than the 6.x parser, but there is a Lua function that wraps it and provides a simpler interface, "rubble.rparse.walk"? I think? It should be listed in the Lua docs.
Me bad :o :-X, I have read the new rubble templates doc but I am waiting to read the lua ones. Until the work in the new lua interpreter is stabilized.
« Last Edit: January 04, 2016, 03:46:42 pm by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

Spacebat

  • Bay Watcher
    • View Profile
Re: Rubble 7.1.2 - DF 42.3 - Now with Lua!
« Reply #20 on: January 07, 2016, 04:05:04 pm »

In custom Lua VM news: I have 50 bazillion off by one errors to find and fix, and it seems something is trashing the Lua stack, but I still have high hopes that it will be ready soon...

So... why are you making a Lua VM? Isn't that kind of unnecessary?
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.2.0 - DF 42.4 - Automatic output syntax checking!
« Reply #21 on: January 08, 2016, 11:35:19 am »

So... why are you making a Lua VM? Isn't that kind of unnecessary?

Because the one I have is 5.1, and I want _ENV, yes it's that simple. I know of a Go 5.2 VM, but last time I tried it, it was riddled with bugs, and when I reported them nothing happened(I need a VM written in Go so it uses the Go GC and can share values easily).

Me bad :o :-X, I have read the new rubble templates doc but I am waiting to read the lua ones. Until the work in the new lua interpreter is stabilized.


The Lua API is more-or-less stable at this point, the interpreter may change, but the script API will remain the same.

@Abadrausar: You know that code you posted earlier with the heavily templated nobles? That should work now, it didn't before because I forgot to parse the parameters for some of the entity templates.



7.3.0 is up!

This version brings lots of stuff related to !SHARED_OBJECT, including support for rule-based editing based on the same merge code used for tilesets, a template for duplicating existing objects, and a way to "classify" shared objects (which can be used with @FOREACH_LIST to do some really cool stuff). I included more specialized !SHARED_OBJECT variants, but not for some of the most rare objects (color/shape descriptors and languages), and not for reactions, entities, and buildings. I may or may not include the missing objects later. Also included are some templates to allow advanced template interactions, namely @PARSE_TO.

A few new Lua functions appear this version as well, namely those needed to power the rule-based merger template.
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

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Rubble 7.3 merge raws and rule based generic iterators
« Reply #22 on: January 09, 2016, 06:55:08 am »

@milo christiansen: Could those new assets of the Rubble framework help us in reintroducing the by now deprecated Addon standard materials?
It is so important to delay the FPS death of our forts...

Reading the changelog of Rubble 7.3 and the corresponding parts of files "Rubble Base Templates.md" and "Rubble Basics.md" that is at least my 1st bet.
Spoiler (click to show/hide)
# in file "Rubble Base Templates.md":
Spoiler (click to show/hide)
#In file "Rubble Basics.md":
Spoiler (click to show/hide)
« Last Edit: January 09, 2016, 12:02:03 pm by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

Outlawshadow27

  • Escaped Lunatic
    • View Profile
Re: Rubble 7.3.0 - DF 42.4 - Automatic output syntax checking!
« Reply #23 on: January 11, 2016, 08:39:14 am »

For some reason, the tissue_template_default isn't generating all of the tissue templates. In fact, I am only getting 10 templates. Is there something more I need to do for the template to generate fully?
Logged

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: Rubble 7.3.0 - DF 42.4 - Automatic output syntax checking!
« Reply #24 on: January 12, 2016, 08:14:49 am »

For some reason, the tissue_template_default isn't generating all of the tissue templates. In fact, I am only getting 10 templates. Is there something more I need to do for the template to generate fully?
@Outlawshadow27: You are right!, what is generated is
Spoiler (click to show/hide)
instead of
Spoiler (click to show/hide)
but the addons\bases\base\tissue_template_default.txt is correct
Spoiler (click to show/hide)
so the error should be in the file adddons\Lib\Base\aaa_sobject_libs_base.pre.lua or in the Rubble framework
Spoiler (click to show/hide)
In both cases only Milo can correct the bug because I dont see where the error is in the cited lua file, maybe the new rule based automatic syntax checking that Milo is developing is silently thrashing any preraws considered malformed by the actual set of rules that is not feature complete at the moment...

@milo christiansen: trying to Rubblize the mod Deeper dwarven domestication the line
Code: [Select]
{SHARED_OBJECT_REPLACE_TAG;MAKE_MEAD;REAGENT:honey;[REAGENT:honey:150:LIQUID_MISC:NONE:CREATURE_MAT:NONE:HONEY][HAS_MATERIAL_REACTION_PRODUCT:DRINK_MAT]}Fails silently (no error but it does not the requested replace), I need to modify only one of the many reagents that the vanilla reaction MAKE_MEAD has, to enable the MEAD reactions of the Dewbettle and the vanilla bumblebee.

Sure I could delete this vanilla reaction and recreate it like I need; but this use case where one object has many different instances of one token and you need to target only one of those happens a lot so if you can do something it would be of use.  ;D

Briefly, what I need is to replace in the vanilla reaction MAKE_MEAD the REAGENT line whose id is honey -> REAGENT:honey
Code: [Select]
[REACTION:MAKE_MEAD]
[NAME:make mead]
[BUILDING:STILL:CUSTOM_M]
[REAGENT:honey:150:LIQUID_MISC:NONE:CREATURE_MAT:HONEY_BEE:HONEY]
[UNROTTEN]
[REAGENT:honey container:1:NONE:NONE:NONE:NONE]
[CONTAINS:honey]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[REAGENT:barrel/pot:1:NONE:NONE:NONE:NONE]
[EMPTY]
[FOOD_STORAGE_CONTAINER] barrel or any non-absorbing tool with FOOD_STORAGE
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:5:DRINK:NONE:GET_MATERIAL_FROM_REAGENT:honey:DRINK_MAT]
[PRODUCT_TO_CONTAINER:barrel/pot]
[PRODUCT_DIMENSION:150]
[SKILL:BREWING]
The line
Code: [Select]
[REAGENT:honey:150:LIQUID_MISC:NONE:CREATURE_MAT:HONEY_BEE:HONEY]By the line
Code: [Select]
[REAGENT:honey:150:LIQUID_MISC:NONE:CREATURE_MAT:NONE:HONEY][HAS_MATERIAL_REACTION_PRODUCT:DRINK_MAT]
If it is more easy to develop we could go with the more verbose and less resilient face to the vanilla changes
Code: [Select]
{SHARED_OBJECT_REPLACE_TAG;MAKE_MEAD;[REAGENT:honey:150:LIQUID_MISC:NONE:CREATURE_MAT:HONEY_BEE:HONEY];[REAGENT:honey:150:LIQUID_MISC:NONE:CREATURE_MAT:NONE:HONEY][HAS_MATERIAL_REACTION_PRODUCT:DRINK_MAT]Thats is
Code: [Select]
{SHARED_OBJECT_REPLACE_TOKEN;<ID>;<source preraws>;<destination preraws>}
« Last Edit: January 12, 2016, 10:22:53 am by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.3.0 - DF 42.4 - Automatic output syntax checking!
« Reply #25 on: January 12, 2016, 10:55:11 am »

Lots of stuff... Lets take it one bit at a time.

For some reason, the tissue_template_default isn't generating all of the tissue templates. In fact, I am only getting 10 templates. Is there something more I need to do for the template to generate fully?

I am an idiot. The templates are working as intended, but not producing the intended output... If that makes any sense?

The problem is that the missing tissues use the same IDs as some of the material templates, since the material templates come first the get added but the tissues do not. This fix is simple, just add the object type to the id passed to the !SHARED_OBJECT template.

Just change `"{!SHARED_OBJECT;%{id};\n"..`, to `"{!SHARED_OBJECT;%{id}:"..v..";\n"..` at the end of "aaa_sobject_libs_base.pre.lua" (proper fix coming soon!).


@milo christiansen: trying to Rubblize the mod Deeper dwarven domestication the line
Code: [Select]
{SHARED_OBJECT_REPLACE_TAG;MAKE_MEAD;REAGENT:honey;[REAGENT:honey:150:LIQUID_MISC:NONE:CREATURE_MAT:NONE:HONEY][HAS_MATERIAL_REACTION_PRODUCT:DRINK_MAT]}Fails silently (no error but it does not the requested replace), I need to modify only one of the many reagents that the vanilla reaction MAKE_MEAD has, to enable the MEAD reactions of the Dewbettle and the vanilla bumblebee.

Sure I could delete this vanilla reaction and recreate it like I need; but this use case where one object has many different instances of one token and you need to target only one of those happens a lot so if you can do something it would be of use.  ;D

This (as you have discovered) won't work for two different reasons:
1) The reaction is not wrapped in !SHARED_OBJECT or one of it's specialized variants.
2) "{SHARED_OBJECT_REPLACE_TAG;MAKE_MEAD;REAGENT:honey;<stuff...>}" is invalid syntax, the ":honey" part cannot be there.

When modifying reactions it is best to use "REMOVE_REACTION_FROM_PLAYABLES" to ignore the original reaction, then introduce your own custom version of the reaction with a new ID. "SHARED_OBJECT_REPLACE_TAG" is far too limited to handle most reaction tags.

If you really, really don't want to replace the whole reaction you can do a search and replace over the whole file via a script or you could parse the raws and isolate the object yourself...

If it is more easy to develop we could go with the more verbose and less resilient face to the vanilla changes
Code: [Select]
{SHARED_OBJECT_REPLACE_TAG;MAKE_MEAD;[REAGENT:honey:150:LIQUID_MISC:NONE:CREATURE_MAT:HONEY_BEE:HONEY];[REAGENT:honey:150:LIQUID_MISC:NONE:CREATURE_MAT:NONE:HONEY][HAS_MATERIAL_REACTION_PRODUCT:DRINK_MAT]Thats is
Code: [Select]
{SHARED_OBJECT_REPLACE_TOKEN;<ID>;<source preraws>;<destination preraws>}

This is possible, but why don't you use @PARSE_TO, @READ_TABLE, and @SET_TABLE with the string replacement template (forget it's exact name)? I don't want to add even more templates for fragile operations to the base...

Of course this won't help with reactions because they do not have a !SHARED_OBJECT variant...

A reaction variant would be a real pain to do (backwards compatibility would be non-trivial), which is the main reason I skipped it. Maybe I should rethink that... (also it would add even more stuff to the already crowded shared object namespace, but I have a fix for that)

We'll see next version...


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

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: Rubble 7.3.0 - DF 42.4 - Automatic output syntax checking!
« Reply #26 on: January 13, 2016, 03:44:54 am »

The problem is that the missing tissues use the same IDs as some of the material templates, since the material templates come first the get added but the tissues do not. This fix is simple, just add the object type to the id passed to the !SHARED_OBJECT template.

Just change `"{!SHARED_OBJECT;%{id};\n"..`, to `"{!SHARED_OBJECT;%{id}:"..v..";\n"..` at the end of "aaa_sobject_libs_base.pre.lua" (proper fix coming soon!).
...
We'll see next version...
The patch works ;) all tissues are being generated when you have correctly (using logical namespaces) resolved the problem of hygiene of identifiers to evite the clash between identical ids of objects of different kind (tissues and material templates in this particular issue). In an abstract sense being able of correctly target <REAGENT:honey> is another issue of hygiene of identifiers. Similarly when you copy-duplicate one object with a new id; the rubble framework must know his kind (tissues, material templates, creatures or any other) to evite the possibility of a clash.
Spoiler (click to show/hide)
I am having this error
Spoiler (click to show/hide)
With the mod Intensive subterranean sprouting.rbl
Spoiler (click to show/hide)
The problem seems that, at the moment of doing the object duplicate, it has not parsed the vanilla plants that I want to copy-prototype to specialize after that
What I have tried so far to make it work:
- in the filename of the rubble script some file extensions (.pre .post or NONE) from Rubble Basics.md that attach the script to one of the phases of the rubble generation
- in the addon.meta of this script the "LoadPriority": <value>
- in aaa_sobject_libs_base.pre.lua redefining !SHARED_OBJECT_DUPLICATE as #SHARED_OBJECT_DUPLICATE
So, I need an use case of !SHARED_OBJECT_DUPLICATE ... or alternatively elevate my lua proficiency ::)
« Last Edit: January 13, 2016, 08:02:13 am by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.3.0 - DF 42.4 - Automatic output syntax checking!
« Reply #27 on: January 14, 2016, 12:53:54 pm »

Intensive subterranean sprouting.rbl

Here's your first problem, even if everything work exactly as it should nothing will happen. ".rbl" files are for cases where you need to parse some template code, but do not care about the template return values. In this case you DO care about the return values, as !SHARED_OBJECT_DUPLICATE inserts the new object at the call location. Since you are working with plants try "plant_intensive_subterranean_sprouting.txt"

{!SHARED_OBJECT_DUPLICATE;MUSHROOM_HELMET_PLUMP;MUSHROOM_HELMET_PLUMP_SPROUTING;EDIT_RAWS=true}

Problem #2: the last argument should be just "true", leave the name out.
Code: [Select]
{!SHARED_OBJECT_DUPLICATE;MUSHROOM_HELMET_PLUMP;MUSHROOM_HELMET_PLUMP_SPROUTING;true}

Actually, since that parameter defaults to true you can leave it off entirely if you want.

[/spoiler]
The problem seems that, at the moment of doing the object duplicate, it has not parsed the vanilla plants that I want to copy-prototype to specialize after that
[/quote]

Exactly. This problem is kinda annoying, and there is only one solution, rename your file so it sorts after the file with the object you want to specialize (this is the problem the template documentation means when it refers to "evaluation order issues"). To be super safe you can name your file something like "plant_z_intensive_subterranean_sprouting.txt". Try to avoid capital letters, since sorting is lexical "Z" comes before "a".



Rubble 7.3.1 is up!

This version includes a fix for shared objects of different types clobbering each other. Sadly this fix means that you will have to prefix all shared object IDs with their type. The specialized !SHARED_OBJECT variants do this automatically, but if you use any of the templates that take shared object IDs as a parameter you will have to add type IDs to them. Shared object IDs now take the form: "<type ID>:<object ID>".

I also threw in specialized !SHARED_OBJECT variants for all object types that did not have them yet. Reactions, buildings, and entities are a little special in that they automatically insert calls to some extra templates as well as the shared object stuff.
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

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Rubble 7.3.1 - DF 42.4 - OK, *now* it works!
« Reply #28 on: January 19, 2016, 08:47:58 am »

Hi Milo, been putting some configuration variables into my mod and they work as expected.  I do have a couple requests if they aren't too difficult:

1. The {PRINT} template buries its output in the Rubble log where a user is unlikely to see it.  I put a simple reality check in one of my files that under the right conditions prints

The Earth Strikes Back! module has been installed with all featues turned off.
This is probably an error.


Would it be possible to save up {PRINT} messages until the end of the log?  Then the current behavior can be captured in a {LOG} template.  Or keep {PRINT} how it is and add a {USERMESSAGE} or {ANNOUNCE} or something for text to appear at the end of the log?

2. Is there any way to expand a $VAR inside a nested template?  I'd like to be able to put an @IF inside the else clause of another @IF, but if I do this I can't refer to any $VARs.

Thanks!
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Rubble 7.3.1 - DF 42.4 - OK, *now* it works!
« Reply #29 on: January 19, 2016, 04:25:43 pm »

Ran into a speedbump.  My creature graphics info keeps showing up in the aux text folder.

That is, graphics_test_creatures.graphics.txt shows up in the same "text" folder as the book titles.  The .png file shows up in the right place, but I can't use it without the graphics raws.

Has anyone gotten this to work?
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map
Pages: 1 [2] 3 4 ... 14