Bay 12 Games Forum

Please login or register.

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

Author Topic: bloop_bleep's Moving Fortress Parts Mod! (v0.4 released)  (Read 6340 times)

bloop_bleep

  • Bay Watcher
    • View Profile
Re: bloop_bleep's Moving Fortress Parts Mod! (v0.4 released)
« Reply #15 on: December 20, 2018, 07:02:15 pm »

You might have more of an idea of this than me, but my immediate reaction is that such things are mostly infeasible, and guaranteed to be a maintainability nightmare, because it requires dealing with DF AI and invasions, two things that are opaque, prone to change, badly understood and just downright complicated.

Well, Roses is doing research into how the new invasion system works (though that might be on hold for a while; I知 not sure.) I might even be able to help. I知 sure we値l figure it out eventually.  :D

Additionally, I don稚 think much knowledge of DF AI is required; we could simply override it when needed, like how warmist痴 diggingInvaders does. Really all we need to do is completely disable the AI for the invaders that get put into the control seats of the invading machines and implement our own separate AI for how the machines move.

But, first things first. I知 currently on point 9 (plugin data), but I got stuck on some technical issues. I should be fine now, and will work on it the next chance I get.
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.

bloop_bleep

  • Bay Watcher
    • View Profile
Re: bloop_bleep's Moving Fortress Parts Mod! (v0.4 released)
« Reply #16 on: January 02, 2019, 02:54:56 am »

Quick update. After countless hours of effort invested, I have created my own little serialization library (with a healthy dose of TMP trickery attached), and used it to *finally* get plugin data saving/loading to work. However, there is no internet connection on my laptop for the moment (I知 writing this on my phone), so until that works again I知 not able to push my changes to Github or upload the files to DFFD.
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.

lethosor

  • Bay Watcher
    • View Profile
Re: bloop_bleep's Moving Fortress Parts Mod! (v0.4 released)
« Reply #17 on: January 03, 2019, 11:53:12 pm »

This sounds really neat. I'm not entirely sure what's possible after reading the thread, but whatever it is, it's pretty cool. Is this intended for standalone vehicle-like things, or platforms that move in specific directions within a confined area? Are "multilevel" machines ones that can move across levels, or take up multiple levels, or something else? Are wheels required / are they the only requirement?

  • Distinguish moving machine platforms from normal constructions in some way, perhaps by using reverse video? POSTPONED, no obvious way to do this.
Not sure what this means, but I might have ideas. Are you trying to distinguish them for users (i.e. making them more visible) or for some internal plugin purpose?
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

bloop_bleep

  • Bay Watcher
    • View Profile
Re: bloop_bleep's Moving Fortress Parts Mod! (v0.4 released)
« Reply #18 on: January 04, 2019, 12:31:22 am »

This sounds really neat. I'm not entirely sure what's possible after reading the thread, but whatever it is, it's pretty cool. Is this intended for standalone vehicle-like things, or platforms that move in specific directions within a confined area? Are "multilevel" machines ones that can move across levels, or take up multiple levels, or something else? Are wheels required / are they the only requirement?

  • Distinguish moving machine platforms from normal constructions in some way, perhaps by using reverse video? POSTPONED, no obvious way to do this.
Not sure what this means, but I might have ideas. Are you trying to distinguish them for users (i.e. making them more visible) or for some internal plugin purpose?

Thank you for your interest.  :D

I guess I should be more clear. This mod is supposed to implement standalone vehicles that move by themselves; "platform" is just the name I gave to a construction which is part of a moving machine. "Multilevel" machines are machines that take up more than one level (i.e. have walls inside them.) Wheels are the mechanism for making the machines move, so they are required if you want your platform to do anything.

And I meant distinguish visually, so the users know what is platform and what is not. (The plugin already distinguishes platforms internally using its own construction flag.) I recently was thinking that I might be able to pull it off by designating the constructions for removal but then deleting the removal job from the queue, but I'm not sure if that'll work. Are there tiletypes specifically for constructions designated for removal?

If I'm not able to pull it off in a more-elaborate-yet-less-tedious way, I guess I could always just hook viewscreen_dwarfmodest.

EDIT: Actually, come to think of it, making constructions designated to be platforms look like those designated for removal might be too confusing, especially if you have to designate constructions to be both.... I might just hook viewscreen_dwarfmodest and make arrows flash over the moving machine to indicate which way it's going, or ■ when it's stationary.
« Last Edit: January 04, 2019, 12:38:51 am by bloop_bleep »
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.

lethosor

  • Bay Watcher
    • View Profile
Re: bloop_bleep's Moving Fortress Parts Mod! (v0.4 released)
« Reply #19 on: January 04, 2019, 01:07:12 am »

Thanks. Yeah, hooking into the render method is what I'd usually do. Some buildings have a drawBuilding method that you can hook into instead, which is somewhat easier, but I don't remember if constructions have it or implement it (that is, it's possible that DF simply doesn't call it for constructions).
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

bloop_bleep

  • Bay Watcher
    • View Profile
Re: bloop_bleep's Moving Fortress Parts Mod! (v0.4 released)
« Reply #20 on: January 04, 2019, 01:29:59 am »

Yeah, it took me a long enough time to discover that df::building_constructionst's only existed when the construction was designated but not yet built, and got destroyed immediately once it was built and replaced by df::construction's. That caused me a whole load of trouble.  :P
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.

lethosor

  • Bay Watcher
    • View Profile
Re: bloop_bleep's Moving Fortress Parts Mod! (v0.4 released)
« Reply #21 on: January 04, 2019, 11:45:18 am »

Constructions don't have the drawBuilding method (or any virtual methods), unfortunately.
The pathable and siege-engine plugins draw to the map - pretty much every map tile, so it's not exactly what you're doing, but the calculations should be useful.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.
Pages: 1 [2]