Bay 12 Games Forum

Please login or register.

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

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

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.5.1 - DF 42.6 - Custom Lua VM!
« Reply #60 on: March 17, 2016, 12:26:25 pm »

Too late, already done :)

These scripts are all copies of the same three function calls, each with a different table providing data about what to change, so once one was done the others quickly followed.

I really should change them so they all call functions from a common module, but I felt too lazy to do that right now...



7.5.2 is now up!

This version fixes powered workshops, fixes a few engine bugs, and reintroduces the generic animal materials addons (and does a few other things, but that's what changelogs are for).
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.5.1 - DF 42.6 - Custom Lua VM!
« Reply #61 on: March 27, 2016, 02:30:23 pm »

Hi Milo!

I am porting some DF mods to the rubble system, you can see it there: https://github.com/Abadrausar/nanofort.
Spoiler (click to show/hide)

In order to integrate all of those moods into the rubble system I follow some simple directives:
Spoiler (click to show/hide)

But... What is all this system good for? Lets see some facts about it:
1) The Toady vanilla raws for DF 42.06 weight 1.55 Mb on disk.
2) Each other mod reuses some or all of the vanilla base files, even the total mods, in the next spoiler you can see the concrete parts of vanilla that are reused By the Rise of the Mushroom Kingdom mod:
Spoiler (click to show/hide)
3) The addon that enables us to play Toady vanilla version of DF without ANY modif is composed by two files that mather, one dummy.rbl is empty the other addon.meta have the following content:
Spoiler (click to show/hide)
4) So the complete rubble addon directory that enables us to play the original Toady  vanilla DF uses less of 2000 characters.
5) From now on each mod integrated into the rubble system is made compatible with all the others.

I have some quick questions :

When some rubble var is set like
Code: [Select]
{@SET;OBJECT_CURSOR;REACTION:STEEL_MAKING}And then I want to acces to the $OBJECT_CURSOR rubble global value from inside a lua function, Could I do something like next code?
Code: [Select]
rubble.template("!SET_VALUE", [[
local target,value, repl = rubble.targs({...}, {"", "", ""})
target = string.split(target, ":")
local id = rubble.configvar(OBJECT_CURSOR)
rubble.libs_base.sharedobject_walk(id, function(tag)
if rubble.libs_base.matchtag(tag, target) then
tag.Comments = "["..target..":"..value.."]"..repl..tag.Comments
tag.CommentsOnly = true
end
end)
]])

It is possible to call a defined rubble template from normal lua code?
If yes could you give me an example with any rubble template from the library?
« Last Edit: March 27, 2016, 03:00:57 pm by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Rubble 7.5.1 - DF 42.6 - Custom Lua VM!
« Reply #62 on: March 27, 2016, 04:14:16 pm »

Dirst -> The Earth Strikes back!: no changes.>
Glad to have made that part easier for you.  How would I keep your work updated as new versions of mod are released?
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.5.2 - DF 42.6 - Custom Lua VM!
« Reply #63 on: March 27, 2016, 10:32:49 pm »

Hi Milo, I have a minor bug to report in the consistency checker.  It looks like you fixed the use of built-in materials inside BLOOD tokens in 7.5.2, but they still get false-positives inside SECRETION tokens.

To get this to pass Rubble,
Code: [Select]
    Consistency warnings for: creature_tesb.txt
      Rule match failures:
        "[SECRETION:WATER:LIQUID:BY_CATEGORY:ALL:WATER:CONTINUOUS]" (line: 2871).
I have to slip a :NONE after the first WATER (the second WATER is a tissue).  But that raises an unknown state error in DF, so the subtype doesn't really belong there.

(By the way, there's no evidence that the secretion works in the arena anyway.  Not sure if that's just an arena thing or not.)
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

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: Rubble 7.5.1 - DF 42.6 - Custom Lua VM!
« Reply #64 on: March 28, 2016, 07:02:47 am »

... How would I keep your work updated as new versions of mod are released?
Maybe the best way to publish rubble mods would be that each original autor and/or actual maintainer upload the updated zip of the mod in DFFD and then use the .webload files that are described in the file Rubble Basics.md
Spoiler (click to show/hide)

As an example I have created in the root addons directory a file Milo_First Landing.webload whose content is:
Code: [Select]
http://dffd.bay12games.com/download.php?id=11605&f=First+Landing+1.5.zipThen I have downloaded and renamed the Milo 1.5 version of First Landing into Milo_First Landing.zip in the same directory as the .webload file, ... and apparently it works!
Some additional info about automatic updates with .webload files:
Spoiler (click to show/hide)
# Conventions as a way to give access to the information (RFC)
Dirst The Earth Strikes Back! is in many ways more advanced from the rubble conversion point of view than any of my own conversions or original content, that said, I use The Earth Strikes Back! and First Landing mechanics to inspire my own workings, but it is also true that when you begin to work in the rubble conversion of a good number of mods some common patterns emerge...
So if I were to ask you to do some minor changes to your mod:
Spoiler (click to show/hide)
...report in the consistency checker...
Some more reports of the consistency checker to help Milo to track the false positives or even the forgotten tokens in some rarer cases, they are grouped by mod:
1) Dark Ages II: War & Myth
Spoiler (click to show/hide)
« Last Edit: March 29, 2016, 08:28:13 am by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: Rubble 7.5.2 - DF 42.6 - Custom Lua VM!
« Reply #65 on: March 28, 2016, 07:19:18 am »

Sorry post size limit must continue in a new post
# Some more reports of the consistency checker to help Milo to track the false positives or even the forgotten tokens in some rarer cases, they are grouped by mod:
2) Rise of the Mushroom Kingdom
Spoiler (click to show/hide)
« Last Edit: March 28, 2016, 07:38:58 am by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: Rubble 7.5.2 - DF 42.6 - Custom Lua VM!
« Reply #66 on: March 28, 2016, 07:45:49 am »

3) Sparking
Spoiler (click to show/hide)

Some special treatement should be given to the deprecated tokens as [LIKES_FIGHTING]  Retired as of v0.40.14 so that rubble could be usable in old versions.
One way could be a table where the token is associated with the vanilla version that deprecates and/or introduces it.
Spoiler (click to show/hide)
If a exhaustive table like the anterior were compiled and the version of the vanilla base that is being used is known rubble could so some limited and safe automatic translation of tokens between versions  ;D
« Last Edit: March 28, 2016, 02:00:35 pm by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Rubble 7.5.2 - DF 42.6 - Custom Lua VM!
« Reply #67 on: March 28, 2016, 10:10:35 am »

Thanks for all the effort :)
TESB does have a stable URL for the current version at DFFD, but it's for the non-Rubble version.  For 2.02 I'll get all of the naming convention stuff in order and make a DFFD entry for the Rubble version.

The only content difference between them is (1) Rubble has configuration variables and (2) non-Rubble has Stonesense content.
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.5.2 - DF 42.6 - Custom Lua VM!
« Reply #68 on: March 29, 2016, 11:49:11 pm »

Chugging along, and I would like to link to that _version file rather than repeat the changelog in the readme.  After several failed attempts, could someone tell me how to hyperlink to a file elsewhere in the same addon?

I think the problem might be the addon's name.  Based on what I saw in the documentation, I tried

![Change log](/addonfile?addon=The%20Earth%20Strikes%20Back%21&file=_version_TESB_2.02.md)

which rendered as a broken link.  A lot of variations just gave me back what I typed.

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 7.5.1 - DF 42.6 - Custom Lua VM!
« Reply #69 on: March 30, 2016, 10:15:23 am »

I have some quick questions :

When some rubble var is set like
Code: [Select]
{@SET;OBJECT_CURSOR;REACTION:STEEL_MAKING}And then I want to acces to the $OBJECT_CURSOR rubble global value from inside a lua function, Could I do something like next code?
Code: [Select]
rubble.template("!SET_VALUE", [[
local target,value, repl = rubble.targs({...}, {"", "", ""})
target = string.split(target, ":")
local id = rubble.configvar(OBJECT_CURSOR)
rubble.libs_base.sharedobject_walk(id, function(tag)
if rubble.libs_base.matchtag(tag, target) then
tag.Comments = "["..target..":"..value.."]"..repl..tag.Comments
tag.CommentsOnly = true
end
end)
]])

That looks OK (obviously I haven't tested it), "rubble.configvar" is definitely the function you want, and leaving off the second parameter reads the value instead of setting it, so that part looks correct.

It is possible to call a defined rubble template from normal lua code?
If yes could you give me an example with any rubble template from the library?

Yes, but it is a pain in the ass.

If I have something that I want to be able to call as a template and from Lua code I normally define the "guts" of the template as a function in a Lua module, then make the template itself a thin wrapper around the function call (note that since template body functions may not have upvalues you will need to "require" the module inside the template body or store the module in a global variable).

If you really must call a template from Lua code you will need the "rubble.calltemplate" function. Keep in mind that the parse stage for the template is inferred from its name, and "@" templates are always called with the current stage, so calling this function with an @ template from a pre or post script may not work correctly.

Code: [Select]
rubble.calltemplate("!PRINT", "This will work in any stage, but some templates may not like being run outside their defined stage.")
BTW: the other stuff in this post looks to contain some really good ideas, I'll have to glean it for possible new default templates and tips for a later "best practices" guide :) Keep up the good work and interesting ideas!

It looks like you fixed the use of built-in materials inside BLOOD tokens in 7.5.2, but they still get false-positives inside SECRETION tokens.

OK, I'll fix that. I'ts really too bad the hardcoded materials work so inconsistently... (between reactions and creatures)

... How would I keep your work updated as new versions of mod are released?

As Abadrausar says, .webload files. Obviously my practice of including the version number in the file name for FL is a bad idea (what can I say, I wasn't thinking).

(several consistency checker logs)
Thanks for those logs, I'll look at them when I get home. Some of the reported errors are actually errors in the source raws, for example LIKES_FIGHTING is depreciated (and is a no-op since 40.x), but most look like minor rule issues.

Your suggestion for depreciated tokens is good, but the rule format has no provision for such a feature. not sure how hard something like that would be to add, but it would certainly be possible...

![Change log](/addonfile?addon=The%20Earth%20Strikes%20Back%21&file=_version_TESB_2.02.md)

That link should probably be:
Code: [Select]
[Change log](/addonfile?addon=The%20Earth%20Strikes%20Back%21&file=_version_TESB_2.02.md)Adding an exclamation point to the beginning of a link statement in a markdown document turns it into an image...
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.5.2 - DF 42.6 - Custom Lua VM!
« Reply #70 on: March 30, 2016, 10:26:55 am »

Thanks, that worked, though the file comes up as plain text rather than markdown.  That's okay, it shouldn't have any bells and whistles in it anyway.

I'll get the .webload thing working once I have a version 2.02 to post.

Edit: Oops plain text IS a problem.  There is no back button in the rendering, and the browser's back button is greyed out.
« Last Edit: March 30, 2016, 10:30:04 am by Dirst »
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 7.5.2 - DF 42.6 - Custom Lua VM!
« Reply #71 on: March 30, 2016, 10:32:00 am »

Thanks, that worked, though the file comes up as plain text rather than markdown.

I should probably add a way to use addon file links with the existing documentation page system. Nothing major, just a slightly different URL.
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.5.2 - DF 42.6 - Custom Lua VM!
« Reply #72 on: March 30, 2016, 11:58:21 am »

Thanks, that worked, though the file comes up as plain text rather than markdown.
I should probably add a way to use addon file links with the existing documentation page system. Nothing major, just a slightly different URL.
So that a .md in a addon could link to another .md in the same addon or even inside any other addon actually installed in the axys  VFS? that would be really cool!

Milo when a .webload exist in the local dir for an addon but no the related .zip file of the addon, could the actual implementation of the .webload system be slightly modified? in order to:
1) Redownload the .zip when the fileserver is accesible.
2) If not, log that the needed file is offline for any reasons and also one message saying that the file will be redownloaded when the file will be accesible again.
3) Never the rubble generation process should fail or block only because one zip is missing when it can be automatically redownloaded later. (with the actual system, if the user did not find the missing .zip he is forced to delete the .webload file  >:( to deblock the rubble generation )

With this alternative system we could distribute only the .webload  files with a base rubble distribution :o
« Last Edit: March 31, 2016, 04:02:21 am by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Rubble 7.5.2 - DF 42.6 - Custom Lua VM!
« Reply #73 on: March 30, 2016, 06:06:27 pm »

For the hyperlinks, either it should retain the UI elements around it (including Rubble's back buttons), or be a pop-out window so that it doesn't break the user's session.
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

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: Rubble 7.5.2 - DF 42.6 - Custom Lua VM!
« Reply #74 on: March 31, 2016, 04:18:13 am »

For the hyperlinks, either it should retain the UI elements around it (including Rubble's back buttons), or be a pop-out window so that it doesn't break the user's session.
... Nothing major, just a slightly different URL....
In the breakthrough Redox OS http://www.redox-os.org/ developped in the promising Rust https://www.rust-lang.org/ they have furthered the UNIX concept of everything is a file with the more handy everything is a URL https://doc.redox-os.org/book/design/urls_schemes_resources.html#What does "Everything is a URL" mean?

Rust Reddit https://www.reddit.com/r/rust

Rust RFCs tracks their Request for Comment process
1) Actives: https://github.com/rust-lang/rfcs
« Last Edit: March 31, 2016, 06:41:06 pm by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::
Pages: 1 ... 3 4 [5] 6 7 ... 14