Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 9 10 [11]

Author Topic: Rubble 6.16 - DF 40.24 - Final 40.x Rubble version.  (Read 64802 times)

palu

  • Bay Watcher
    • View Profile
Re: Rubble 6.16 - DF 40.24 - Final 40.x Rubble version.
« Reply #150 on: December 05, 2015, 01:07:00 pm »

Great, thank you so much! Hopefully I'll have a few mini mods out for rubble soon. Is there a way to loop over all materials of a certain type (eg. Layer stones, alloys?)
Logged
Hmph, palu showing off that reading-the-instructions superpower.
The internet encourages thoughtful, intelligent discussion and if you disagree I hate you.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Rubble 6.16 - DF 40.24 - Final 40.x Rubble version.
« Reply #151 on: December 07, 2015, 10:10:41 am »

It looks like Rubble's parser can properly ignore some, but not all, special characters within quotes.  Specifically, Rubble template variables look like %{this} and having '%' inside a template causes a confusing error about a missing close-}.

For now I put in 37 instead of '%' and it seems okay... but that string comes up a lot in plant raws.
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

palu

  • Bay Watcher
    • View Profile
Re: Rubble 6.16 - DF 40.24 - Final 40.x Rubble version.
« Reply #152 on: December 07, 2015, 09:50:02 pm »

It looks like Rubble's parser can properly ignore some, but not all, special characters within quotes.  Specifically, Rubble template variables look like %{this} and having '%' inside a template causes a confusing error about a missing close-}.

For now I put in 37 instead of '%' and it seems okay... but that string comes up a lot in plant raws.
Quote from: User templates.md
If you need a literal percent sign double it up.
Logged
Hmph, palu showing off that reading-the-instructions superpower.
The internet encourages thoughtful, intelligent discussion and if you disagree I hate you.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Rubble 6.16 - DF 40.24 - Final 40.x Rubble version.
« Reply #153 on: December 08, 2015, 06:06:45 am »

Hmph, palu showing off that reading-the-instructions superpower.
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

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 6.16 - DF 40.24 - Final 40.x Rubble version.
« Reply #154 on: December 10, 2015, 02:28:37 pm »

Wow, I forgot about that issue, maybe I can fix that... (it is mostly an artifact of the old, brain-dead, way I used to expand variables in early versions of Rubble, so it may be fixable now)

Is there a way to loop over all materials of a certain type (eg. Layer stones, alloys?)

Not really, but if you want to badly enough you can use the raw parser to examine each item in the shared object list, but it would be kinda hard to do... The Rubble 7 API is very different from the Rubble 6 API, so I don't really feel comfortable giving hints as to how it would be done when I am not sure which version you will want to use it in. For either version all I can say is look at how the templates are implemented, that should tell you how the data is stored.
« Last Edit: December 10, 2015, 02:35:58 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

palu

  • Bay Watcher
    • View Profile
Re: Rubble 6.16 - DF 40.24 - Final 40.x Rubble version.
« Reply #155 on: December 10, 2015, 05:39:56 pm »

Rubble 7, most likely. I'm trying to make more variety in some of the underground element men, and I want to automatically get the list of stones, metals, and gems so I don't have to hardcode them.
Logged
Hmph, palu showing off that reading-the-instructions superpower.
The internet encourages thoughtful, intelligent discussion and if you disagree I hate you.

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 6.16 - DF 40.24 - Final 40.x Rubble version.
« Reply #156 on: December 12, 2015, 12:43:26 pm »

Take a look at the source for the SHARED_OBJECT templates, particularly the SHARED_OBJECT_KILL_TAG template (as that one parses the raws) it will not be a trivial task, but it should be possible.

(the SHARED_OBJECT templates are defined in "Libs/Base/aaa_sobject_libs_base.pre.lua" in Rubble 7, change the ".lua" to ".rhn" for Rubble 6)
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
Pages: 1 ... 9 10 [11]