Bay 12 Games Forum

Please login or register.

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

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

Rochndil

  • Bay Watcher
  • Mad Modder
    • View Profile
Re: Rubble 7.4.2 - DF 42.6 - Color manipulation!
« Reply #45 on: February 24, 2016, 02:34:49 pm »

Good afternoon!

I'm finally moving forward with my perennially-delayed MMO mod, and just today started messing with Rubble-izing some of its components. I started simple, or so I thought, but I'm not having a lot of success. There's a very weird problem with the Graphics mod parsing. I won't bore you with all the debugging steps I've taken, but instead point directly to what seems to be the problem. I tried to get my old Chariot graphics working as a Rubble mod, and the parsing works without errors...but does NOT write anything to the raw/graphics folder. However, the included vanilla graphics mod DOES work, so I spent some time trying to tease out the reason why.

It seems to be the double-extension used (which, coming from a long history of DOS use, was a huge no-no once upon a time).

The two files in the pre-packaged "vanilla" mod, which DO work, are:

user_graphics_vanilla.graphics.txt and user_graphics_vanilla.graphics.bmp

I was looking at this for ages before I finally noticed the . instead of the _ character. If you modify one of the files to take out the extra extension, it then FAILS to move over to raw/graphics, which is how I finally noticed the problem.

All that said, though, the file reference in user_graphics_vanilla.graphics.txt points to user_tilesets_vanilla_graphics.bmp - which is the wrong filename for user_graphics_vanilla.graphics.bmp once it's copied over as user_graphics_vanilla.bmp - so there's an actual error as well as a lack of clarity going on.

Now that that's all figured out, I need to fix all my names and see if I can get this to work. Add one more tiny bug and a documentation change to your list.

Rochndil, who is always all about the documentation...

P.S. Just did a little more testing, and found 1 bug and 1 issue. Bug: the program wouldn't move the PNG files (after adding the .graphics) because the extension was .PNG instead of .png. Issue: Rubble sees a sub-directory as a separate mod, instead of a part of the MAIN mod. It's messy to have to have all my images and text files in the same folder, but if that's the way it is, I can live with it.

« Last Edit: February 24, 2016, 02:49:34 pm by Rochndil »
Logged
Build an Elf a fire, keep him warm for a day.
Drown an Elf in magma, keep him warm for the rest of his life!

Rochndil

  • Bay Watcher
  • Mad Modder
    • View Profile
Re: Rubble 7.4.2 - DF 42.6 - Color manipulation!
« Reply #46 on: February 25, 2016, 12:41:39 pm »

Well, after a lot of trial-and-error (LOT of error on my part) I've got the graphics mod working properly. I even set up a little hierarchy for all my current (one) and future (many more) mods with meta tags and stuff. There's a ton of clean-up to do on Chariot's stuff (the last time he updated was around 2010), but that's all on me to take care of.

I'm very pleased to have compiled (successfully) my first Rubble mod, knowing that it'll be the LAST time I have to do all that jiggering, and can simply apply it to future versions of DF in moments. Yay!

Future projects will get a lot more complicated, but one step at a time. I can't wait to see soil inclusions again.

Rochndil, with probably a day or two of work to finish the current clean-up...
Logged
Build an Elf a fire, keep him warm for a day.
Drown an Elf in magma, keep him warm for the rest of his life!

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.4.2 - DF 42.6 - Color manipulation!
« Reply #47 on: February 25, 2016, 03:10:10 pm »

Not recognizing uppercase extension is a simple oversight on my part, an easy fix.

The two part extensions are a standard part of Rubble, a little odd, but that's how it works. BTW: Most of those two part extensions are stripped and replaced with single part extension when the file is written out, so that's why the vanilla graphics mod refers to "user_tilesets_vanilla_graphics.bmp" internally.

Near the top of "Rubble Basics" there should be a big section that explains file tags, file extensions, how they relate to each other, and what is written where.
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.4.2 - DF 42.6 - Color manipulation!
« Reply #48 on: February 25, 2016, 08:19:26 pm »

Milo thanks a lot! and luck with the newborn lua interpreter!

That
Spoiler (click to show/hide)
Works like a charm and generates
Spoiler (click to show/hide)
As intended. I am happy! 8) 8) :o
Before that I had  tried the less verbose and more maintainable
Spoiler (click to show/hide)
That fail however with
Spoiler (click to show/hide)
Problem with nested templates?! Not so sure because  next one works
Spoiler (click to show/hide)
Knowing that macro or template expansion is very hard to do right, with all the stages involved (lexical parsing, syntactic AST, semantic, ...) I am happy with an intermediate solution that works!!!  ;D
It seems that it does not like nested
Code: [Select]
{!SHARED_OBJECT_DUPLICATE;PLANT:%{object};PLANT:%{object}_%{variety};true;true}
« Last Edit: February 25, 2016, 09:03:03 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.4.2 - DF 42.6 - Color manipulation!
« Reply #49 on: March 02, 2016, 02:18:25 pm »

@Abadrausar: Change PROTOTYPE to !PROTOTYPE and it should work... Yes it's that simple.

BTW: Don't use "generic" names like PROTOTYPE, template names are global. Add a short prefix or postfix related to the addon name or similar (for example First Landing templates have "_FL" appended).



Rubble 7.5.0 is up now!

This is the new VM version, so Lua scripting is 5.3 now!

I am now totally sick of Lua, after spending three days straight doing nothing but bug fixing it is time for a break... At least that was the idea. Actually I then got bored and ported all the old powered workshop addons from Rubble 6... Help! I. Can't. Stop. (well, I do have some new games that need attention, so I'll probably do that now...)
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

Rochndil

  • Bay Watcher
  • Mad Modder
    • View Profile
Re: Rubble 7.4.2 - DF 42.6 - Color manipulation!
« Reply #50 on: March 03, 2016, 09:47:35 am »

Not recognizing uppercase extension is a simple oversight on my part, an easy fix.

Good morning!

I look forward to testing the new version, since I JUST finished the Chariot graphics changes (not without a few bugs) and need to test them anyway.

I had a sneaking suspicion that case-insensitive filenames would be complicated to implement. In my day-job work, I've seen our programmers struggle with similar issues. NOT doing it, but documenting the NEED for case-sensitivity, is a perfectly acceptable choice.

As I work through this project, if anything else relevant crops up, I'll let you know. Thanks!

Rochndil: test...bug!...fix...test again...
Logged
Build an Elf a fire, keep him warm for a day.
Drown an Elf in magma, keep him warm for the rest of his life!

Rochndil

  • Bay Watcher
  • Mad Modder
    • View Profile
Re: Rubble 7.5.0 - DF 42.6 - Custom Lua VM!
« Reply #51 on: March 03, 2016, 03:38:16 pm »

Got a bug.

It's pretty small, but definitely there. Here's the header from a graphics TXT file, before Rubble parses it:

Code: [Select]
graphics_qs_st_crt_annelids

[OBJECT:GRAPHICS]

[TILE_PAGE:CRT_ANN]
[FILE:qs_st_crt_annelids_16x16.png]
[TILE_DIM:16:16]
[PAGE_DIM:1:5]

The filename, unsurprisingly, is: graphics_qs_st_crt_annelids.graphics.txt

Now here's what Rubble drops into the /raw/graphics folder:

Code: [Select]
graphics_qs_st_crt_annelids.graphics

# Automatically generated, do not edit!
# Source: addons:dir:Rochndil/Graphics/Chariot/graphics_qs_st_crt_annelids.graphics.txt
graphics_qs_st_crt_annelids

[OBJECT:GRAPHICS]

[TILE_PAGE:CRT_ANN]
[FILE:qs_st_crt_annelids_16x16.png]
[TILE_DIM:16:16]
[PAGE_DIM:1:5]

You can clearly see that the filename parsing doesn't strip off the .graphics extension when it creates the new first-line-same-as-filename, though it DOES do so when it actually names the saved TXT file. On the up side, DF doesn't seem to care, and didn't error on any of the files.

You might want to check the code that parses the filename and then adds the header, or, alternatively, you could just rename the file, keep the (redundant in this example) original first-line-same-as-filename header, and insert your two #-fronted lines between that and [OBJECT:GRAPHICS] - whichever makes more sense.

Rochndil, still hunting for and finding bugs...
Logged
Build an Elf a fire, keep him warm for a day.
Drown an Elf in magma, keep him warm for the rest of his life!

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.5.0 - DF 42.6 - Custom Lua VM!
« Reply #52 on: March 03, 2016, 04:47:50 pm »

Oops... You are right that DF won't care about it, but it is sloppy and should be fixed. Good find!

About upper case and mixed case extensions: It would be trivial to make the file tagger recognize them, but the code that handles writing files would need significant changes to make them work, so I didn't add them to 7.5.0

I literally just thought of a way to make them work without too much trouble (force all extensions to lowercase in the addon loader) so I may add them later... Even so, there are loads of places where files are referred to by name ("addon.meta" for example) that would be hard to make work in a reliable way with mixed or uppercase extensions. It would be easy to make work if I was only planning to support Windows, but I support OSX and Linux as well, so it could be problematic. For now I would rather just say that extensions are case-sensitive (just like filenames, since filenames need to be case-sensitive for Linux).
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

nefariousD

  • Bay Watcher
    • View Profile
Re: Rubble 7.5.0 - DF 42.6 - Custom Lua VM!
« Reply #53 on: March 10, 2016, 08:44:01 am »

Running the latest dfhack with DF 42.06 and rubble 7.5.0, I noticed when starting a new game after having selected all of the powered workshops that dfhack was producing tons of error output.. specifically, the following block is repeated for each powered workshop plugin enabled:

Spoiler (click to show/hide)
Logged

Dirst

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

Running the latest dfhack with DF 42.06 and rubble 7.5.0, I noticed when starting a new game after having selected all of the powered workshops that dfhack was producing tons of error output.. specifically, the following block is repeated for each powered workshop plugin enabled:

Spoiler (click to show/hide)
I don't use the powered workshops, but I thought I'd throw in my 2¤ so you don't have to wait until Milo comes back online.

The engine is looking for workshops_libs_dfhack_powered.lua in several different places, but that file wasn't copied over to the raws folder for some reason.  You might be able to work around it by grabbing the Powered/workshops_libs_dfhack_powered.dfmod.lua file from your Rubble folder and pasting it into the hack/scripts/ folder in your DF, then renaming it to workshops_libs_dfhack_powered.lua
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

nefariousD

  • Bay Watcher
    • View Profile
Re: Rubble 7.5.0 - DF 42.6 - Custom Lua VM!
« Reply #55 on: March 11, 2016, 08:45:38 am »

I ended up having to copy everything from rubble/addons/Libs/Powered/ into hack/lua/ and rename these files to match the naming convention mentioned in the error message. Unfortunately after all that, I start getting a lot of other errors. I'll just wait for Milo to come back, seeing as how I'm just stumbling in the dark  :P
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.5.0 - DF 42.6 - Custom Lua VM!
« Reply #56 on: March 11, 2016, 12:29:43 pm »

Damn. I assumed all that stuff worked, since I use those libraries to power the automated workshops in First Landing, and since I was busy I didn't test them... Yes, yes, I know "if you don't test it it doesn't work", sigh.

The problem(s) almost certainly lie in the individual workshop scripts themselves, I'll have it fixed for next version.

A quick check reveals that the workshop scripts are looking for "*_libs_dfhack_powered.lua" when they should be looking for "*_libs_powered.lua". An easy fix, but there may be more problems, I'll have to do some testing.

BTW: If you want to use powered workshops later feel free to generate worlds with them active. You won't be able to use them yet, but it is possible to copy the fixed scripts over later to get them working.



7.5.1 is up!

This version brings some minor bug fixes (powered workshops are still broken) and a new interface. All of the previous interfaces have been "unified" into one "universal" interface. This interface loads "actions" from external packages, so it is very easy for me to extend.

Since I only need to distribute one binary for each OS/arch combination I have started to package 64 bit binaries now, enjoy!
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.0 - DF 42.6 - Custom Lua VM!
« Reply #57 on: March 12, 2016, 02:49:51 am »

I like the new unified interface and the 32 - 64 bits thing :)

Keep the good work Milo!

Any chances of having back Rhino as a rubble supported script lang?

My concern is the generic materials transformation, which is really nice to have for all people with aged machines, up to 25% more FPS claims are not rare!

Another quick question: Has Rubble support for adding content into the data/speech directory?
I did not find any explicit mention in the docs, not even in Rubble Basics.md
« Last Edit: March 14, 2016, 05:13:51 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.5.1 - DF 42.6 - Custom Lua VM!
« Reply #58 on: March 14, 2016, 09:34:17 am »

Any chances of having back Rhino as a rubble supported script lang?

If you want it wouldn't be hard to add. The API would, by necessity, be a little different (the way script APIs interact with Rubble changed in 7.0.0), but Rhino is a lot slower than even my new, optimized, Lua VM.

My concern is the generic materials transformation, which is really nice to have for all people with aged machines, up to 25% more FPS claims are not rare!

It would be possible to re-implement these in Lua, I just need to get off my a** and do it...

Are there any other 6.x addons I have forgotten to port? I guess I'll have to check when I get home.

Another quick question: Has Rubble support for adding content into the data/speech directory?
I did not find any explicit mention in the docs, not even in Rubble Basics.md

Not explicitly. You would need to use a script and write to "df:data/speech" with the AXIS API. Keep in mind that as "data/speech" is global your worlds would no longer be self-contained...



I have a version of Rubble almost ready that fixes the issues with the powered workshop. The issues were all simple oversights on my part (a minor API change I had forgotten to compensate for and the renamed scripts).
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 #59 on: March 16, 2016, 01:55:47 pm »

It would be possible to re-implement these in Lua, I just need to get off my a** and do it...
Alternatively, If you do just one in lua, I will take this one as a model and do the rest.
Spoiler (click to show/hide)
I prefer that you keep doing the polishing and enhancement of the rubble system that I can not do.
Spoiler (click to show/hide)
« Last Edit: March 16, 2016, 02:07:05 pm by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::
Pages: 1 2 3 [4] 5 6 ... 14