Bay 12 Games Forum

Please login or register.

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

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

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.5.2 - DF 42.6 - Custom Lua VM!
« Reply #75 on: April 01, 2016, 04:58:44 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.

Currently it takes you to a new page with a back button, but I may want to add special support for changelogs and the like using the same basic system that powers the addon file viewer later (what you get when you click a file name in the "more information" section).

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?

First things first: I think you are missing something here: You should not need to have a zip file at all, the addon loader should create that when it successfully downloads the addon pack. AFAIK if Rubble fails to communicate with the server providing the download it logs the failure and goes on (which is what it did last time I tested it), anything else is a bug.

I am currently considering adding a cross between the webload system and the "Activates" addon.meta key to allow automatic download of library addons with less restrictions than the webload system currently has, but I don't know when or if this will be ready (except it will likely be soon).

@Abadrausar: Considering your proposed "_version_XYZ_1.0.md" changelog naming convention: This is a terrible idea for one simple reason. Every time the addon updates any documentation links to the changelog will break. For this reason I propose naming changelogs "addon_changes.md", mostly so they sort with "addon.meta" and "addon.md".

Next Rubble version will ship with a detailed draft proposal of Rubble naming conventions for files, addons, etc. Obviously this will be RFC for a few versions after that, and once I get some feedback (and probably make some changes) it will become holy writ :P

File naming conventions will not be the same as I have been using, instead I chose something a little less verbose while retaining clarity.



I am currently reworking the way industries work in First Landing, and have just run into a major problem with some templates and configuration variables. Everything works as designed, but not as may be expected, if that makes any sense...

Consider the following:
Code: [Select]
{!TEMPLATE;!EXAMPLE;a;{!;%a}{E;%a}}

{@SET;TEMP;ABC}
{!EXAMPLE;$TEMP}
{@SET;TEMP;XYZ}
You could be forgiven for thinking this will return "ABCABC", but it will actually return "ABCXYZ". When working with standard library templates where you may not know how they are implemented this can be a major problem with no easy fix.

I am considering adding an alternate variable expansion syntax that expands all variables at the earliest possible time (much like template parameters are expanded). this will probably be done by using "&" instead of "$", but I haven't decided if this is the best fix for the problem yet...
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 #76 on: April 02, 2016, 10:19:51 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.

Currently it takes you to a new page with a back button, but I may want to add special support for changelogs and the like using the same basic system that powers the addon file viewer later (what you get when you click a file name in the "more information" section).
Will be much appreciated.  Collapsible sections (aka "spoilers") would also be helpful.  That's how I demote the technical details in my mod's OP, whereas in markdown they just have to sit there like everything else.

I am considering adding an alternate variable expansion syntax that expands all variables at the earliest possible time (much like template parameters are expanded). this will probably be done by using "&" instead of "$", but I haven't decided if this is the best fix for the problem yet...
Maybe arbitrary ordering something like !2# and $2# to be explicit what order things should evaluate (assuming # is an invalid label character).  The existing prefix characters would be hardcoded to steps 1, 2 and 3 for backward compatibility.  The as-soon-as-my-parent special case can be !# and $# (retaining @ and & as hardcoded equivalents).

Just brainstorming.  Besides, you'll probably have something worked out by the time you're online again.

Edit: I definitely don't get a back button.  Might be from using Chrome?
Edit 2: Even embedding an HTML link targeting _blank had the same behavior.
« Last Edit: April 02, 2016, 10:54:44 pm 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 #77 on: April 04, 2016, 11:45:56 am »

Collapsible sections (aka "spoilers") would also be helpful.

"Spoilers" are not available yet, but will be soon. I'll probably support two kinds, one that links in an external file, and one that is inline (via embedded HTML, probably DIV tags with a certain class or something).

(stuff about variable expansion)

I think you may be confusing variable expansion with template parsing...



7.6.0 is up! This version fixes a bunch of minor (and some major) bugs, as well as adding some new features such as a new variable expansion syntax (intended for use with temporary variables and certain templates), simple math templates, a new @STR_SPLIT template, and some other nice 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

KillzEmAllGod

  • Bay Watcher
  • Searching for the other sock.
    • View Profile
Re: Rubble 7.6.0 - DF 42.6 - Custom Lua VM!
« Reply #78 on: April 04, 2016, 05:16:48 pm »

Rather nice though it feels like it could be more of a mod manager, would you be able to add mods as their own category with their addons somewhere with them as well with more categories for whats there?

Mainly just suggesting it because of Modest Mod's modules and Grimlocke's History & Realism Mods modules. Modest mod has modest bodies and then Grimlocke's adds a compadability patch for that, so how might conflicts be handled?
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.6.0 - DF 42.6 - Custom Lua VM!
« Reply #79 on: April 04, 2016, 06:08:30 pm »

Generally if mods are "modular" the extra parts are children of the main addon, and the group is then distributed as an addon pack. Rubble doesn't make any special effort to group addons, but the list is sorted by name, so the parent will come first, followed by it's children.

If two addons are incompatible then it is up to one of the addons to either state that incompatibility (and thereby make it impossible to have both active at the same time) or detect the presence of the other mod and install a compatibility patch. How exactly you detect the presence of an addon depends on a lot of factors, but generally the process is quite simple (RTFM for details).

AFAIK neither of the two mentioned mods have Rubble versions, so I can't really say how it would best work for them (but you may want to talk to Abadrausar, apparently he has been making Rubble ports of a bunch of third-party mods).
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.6.0 - DF 42.6 - Custom Lua VM!
« Reply #80 on: April 04, 2016, 08:04:21 pm »

I made The Earth Strikes Back! "modular" by including a handful of configuration variables.  It probably could have been done with submodules, but I wanted some of the options to be non-binary (for example, "Hidden Gems" frequency can be set for COMMON or RARE or NEVER) and some of the options interact with one another (for example, the custom buildings disappear if and only if two different options are turned off).

It'd be an interesting exercise to figure out how to re-create that with submodules, but that is not happening in the near future.
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.6.0 - DF 42.6 - Custom Lua VM!
« Reply #81 on: April 05, 2016, 05:01:36 am »

Rather nice though it feels like it could be more of a mod manager, would you be able to add mods as their own category with their addons somewhere with them as well with more categories for whats there?

Mainly just suggesting it because of Modest Mod's modules and Grimlocke's History & Realism Mods modules. Modest mod has modest bodies and then Grimlocke's adds a compadability patch for that, so how might conflicts be handled?
There is an almost complete Rubble porting of Modest mod, unreleased by the moment.
With many other rubble mods as Dark Ages II, ...
While not a perfect system I am working around the patch conflicts between mods like this:
1. I use the addon.meta "LoadPriority": value, to indicate the required order of application of mods.
Spoiler (click to show/hide)
2. Then I use delta operators (aka semantic diff) as defined in http://martinfowler.com/bliki/SemanticDiff.html
Spoiler (click to show/hide)
3. The temporal definition (local non committed version) of those operators is:
Spoiler (click to show/hide)
4. As they log with enough detail each DELTA failure, modders are guaranteed in absence of these warning that ALL intended changes to the vanilla raws have been effectively applied in the order specified by the mods and their dependencies.
5. Some examples of use of the actual DELTA operator applying some changes in vanilla required by the modest mod maintained by Button:
Spoiler (click to show/hide)
6. The complete All races playable maintained by Lovechid using commited old delta operators (those have been deprecated)
Spoiler (click to show/hide)

KillzEmAllGod: In the long term, I think that your proposal of enabling fine grained import of vanilla objects using the standard module mechanism of lua has a lot of sense, but using what is already disponible in the rubble system we are already able of doing something very similar but a lot less flexible, please have a look at the Vanilla raws library addon:
Before release, I have some pending problems with template expansion (metaprogramming is hard to do, and even harder to do it right) that ,maybe , have been resolved by the changes that Milo has done in rubble 7.6
« Last Edit: May 04, 2016, 05:08:59 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.6.0 - DF 42.6 - Custom Lua VM!
« Reply #82 on: April 05, 2016, 06:59:15 am »

I made The Earth Strikes Back! "modular" by including a handful of configuration variables.  It probably could have been done with submodules, but I wanted some of the options to be non-binary (for example, "Hidden Gems" frequency can be set for COMMON or RARE or NEVER) and some of the options interact with one another (for example, the custom buildings disappear if and only if two different options are turned off).

It'd be an interesting exercise to figure out how to re-create that with submodules, but that is not happening in the near future.
I see both systems as complementary and I like the extra versatility of the variables.
Your mood is a very good example for other modders of what can be accomplished in rubble using configuration variables.
This has however his limits, the directory thing is more adapted only when some parts of your mod are susceptible of independent use in external mods as librairies or as addons or even both at the same time, because it helps to be able of activating (importing) strictly the parts that you want to use. If you need to go the library way you can not always rely in the final user to manually do the correct pruning of objects ;)

So at the end, all is a question of who must take the decision of including or not some objects:
1. The modder?
2. The final user?

Each situation and type of user makes one or the other more adapted, but if you submerge the final user with way too much decisions, that he must take in order to be able to play; you risk that he become confused.

This problem has recently been addressed by Milo introducing his addons_list, while I have followed another approach:
1. All that is not a complete playable mod have the "Tags": {"Dev": true} so by default the user only sees those when the dev button is clicked in the rubble interface.
2. By default then, the users only sees the shorter list of complete playable mods.
3. Additionally, an extensive use of separators is done in the rubble interface to have all the mods ordered in clearly separated categories: 1st complete mods, 2nd toolbox, ...,Nnd Test and Tutorials.

In some way what I am doing is separating for the same addon his many different aspects into separate directories, that is, if for example an addon have one library aspect, it is defined inside a nested Libs directory while the interface parts of this same addon are inside the nested Base directory, each one with his own addon.meta and inside the required tags that each one of them needs. Here "LoadPriority": value is very special because it is used to list and order the addon into their correct categories in the interface, but also to control the correct order to apply a chain of path mods, only depending of the aspect of the nested addon directory -> library or interface?

The inspiration was taken from the model view controller (MVC) that does a similar separation of concerns. And in order to have all of this working as a whole system I simply have established some range meaning reservations for the values of "LoadPriority": value, to have the behavior piloted by the data 8)
« Last Edit: April 05, 2016, 09:01:20 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 #83 on: April 06, 2016, 01:38:07 pm »

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 )
First things first: I think you are missing something here: You should not need to have a zip file at all, the addon loader should create that when it successfully downloads the addon pack. AFAIK if Rubble fails to communicate with the server providing the download it logs the failure and goes on (which is what it did last time I tested it), anything else is a bug.
Report of a BUG in the webload system:
When you have in the root addons directory of rubble 7.6.0 the two files First Landing.zip (version 1.6) and First Landing.webload and inside this last file the content: http://dffd.bay12games.com/download.php?id=11605&f=First+Landing.zip
If then you generate with rubble you have:
Spoiler (click to show/hide)
However if you delete or rename the First Landing.zip file you have instead:
Spoiler (click to show/hide)
So you are right in one thing, someone is missing something here, but all evidence indicate that the person missing the facts is not who you think...

The worst thing that one can do when there are bad news is trying to kill the messenger, so if someone uses his valuable time reporting someone other a bug in his software, it is in order to help this person advance his project.
To be short and clear, it is bad politic to devalue or negate the perceptions of facts or the work of another person without even contrasting your opinions with the actual reality first!!!
For your user base, what rubble did once upon a time is less relevant than what it does now. Except for historical or narrative purposes.
You do not have the time or the motivation to follow or verify the bug?
Easy, you can JUST ignore it! It is your user base and your project, no one is better placed than you to know what do you want to do with them!

Rubble is about to become a central and very important piece in the Dwarf Fortress community, that places you in a position of some leadership, even if you do not want it.
A true leader respect the good work of his people and his own image; because people have the sane habit of committing themselves to projects whose leadership they can respect.
A leader in a open and democratic society is only the "first between his pairs", never an absolute king, that has been placed there by his capacity and actitudes at the same level, no one doubt of your technical capacities (heck!, even Linus Torvalds himself can have some bugs from time to time) but your actitudes when you MUST receive and acknowledge a bug report have space to be better, more able to deserve our respect.
« Last Edit: April 07, 2016, 02:37:30 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.6.0 - DF 42.6 - Custom Lua VM!
« Reply #84 on: April 06, 2016, 02:34:08 pm »

Since I don't want to accidentally rip a hole in the timespace continuum, how am I supposed to distribute the .webload file?  Does it belong zipped in with the rest of the module?

If it is supposed to be distinct from the zip, it is at least as much work for the player as installing the module.  If it is supposed to be in the zip, it think it would work better as part of addon.meta
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.6.0 - DF 42.6 - Custom Lua VM!
« Reply #85 on: April 07, 2016, 02:14:09 pm »

Since I don't want to accidentally rip a hole in the timespace continuum, how am I supposed to distribute the .webload file?  Does it belong zipped in with the rest of the module?

The .webload needs to be distributed separately, as it may not be packed inside a a zip. Actually .webload files MUST be placed in the root of the addons directory (if you have multiple addons directories any of them will do), they use the same rules as zip files basically.

The only benefit for users is automatic update.

As for including it in addon.meta, that is non-trivial due to the way Rubble loads addons. See, when Rubble starts it needs to create a new State. The State holds three main groups of data: All the addons currently installed (all their files, and all the meta-data to go with), a copy of each script runner (which maintains global state for all scripts), and the AXIS file system. In addition to these three it also holds the script data registry, configuration variables, templates, etc. The important part for this topic is the addon database. Rubble does not know (and can not know) what addons a user will need when it is loading, so it has to load everything all in one go. .webload works by running before the loader, the zip files it downloads are not given any special treatment, they are simply loaded as normal.

To read something from addon.meta the addons need to be loaded, but if the addons are loaded it is too late to inject more zip files without massive effort. What if a webloaded addon contains directives to webload another addon? Things can get messy fast.

My solution to the problem is simple (and a little lazy). There is now a "Download" key in the addon.meta file that lists addon packs to download. These packs are always loaded, and no attempt is made to see if they are needed or not. To avoid the worst problems addons inside packs that are loaded this way are not allowed to load more packs.

(lots of stuff)

Sorry? .webload is hard for me to test, so I did it once when I wrote it way back when and have kept my hands off since. I now realize that it probably broke in one of the updates I made to AXIS VFS (most likely way back in Rubble 4 or 5). The problem is that old versions of AXIS allowed "axis.WriteAll" to create missing files, and newer version require a call to "axis.Create" first.

You will be happy to know that while the current version still suffers from this problem, but it should still work, it just won't actually write the file to disk (the new version uses the existing in-memory copy to mount on the filesystem). This means that it will alway download a fresh copy, but at least it won't abort. As soon as I can I will push a new version with the problem fixed.



7.7.0 is up now! This version brings a new way for addon developers to load remote dependencies, as well as some minor bug fixes.
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.6.0 - DF 42.6 - Custom Lua VM!
« Reply #86 on: April 07, 2016, 03:05:11 pm »

...
Only wanting that you acknowledge a bug report only after reproducing it yourself, when you need additional info please ask for it, in any other case you simply ignore it.
No time for verifications, perfect we understand, agendas are complicated, but if you do not verify the bug for any reason.
I think that it is for best to delay any comment about it until you have an informed opinion.

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.7.0 - DF 42.6 - Automatic remote dependency download!
« Reply #87 on: April 07, 2016, 03:34:59 pm »

The problem is I can't confirm or deny until I get home, and I don't want to make everyone wait for several days for a response...
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.7.0 - DF 42.6 - Automatic remote dependency download!
« Reply #88 on: April 07, 2016, 04:20:08 pm »

The problem is I can't confirm or deny until I get home, and I don't want to make everyone wait for several days for a response...
Do not worry about that,  make me confidence, waiting for several days for a response is always way better than that.
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 )
First things first: I think you are missing something here: You should not need to have a zip file at all, the addon loader should create that when it successfully downloads the addon pack. AFAIK if Rubble fails to communicate with the server providing the download it logs the failure and goes on (which is what it did last time I tested it), anything else is a bug.
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.7.0 - DF 42.6 - Automatic remote dependency download!
« Reply #89 on: April 07, 2016, 04:33:31 pm »

I did add a "should", a disclaimer about last time it was tested, and a bit about anything else being a bug... I don't claim to be right all the time (or even most of the time), in that case I thought that maybe you had made an invalid assumption. It turned out I had, but at least my message confirmed that the observed behaviour was not intended, right?

I am sorry I hurt your feelings, next time I say something stupid feel free to correct me again.
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 ... 4 5 [6] 7 8 ... 14